Ten Essential Development Practices

G

gyromagnetic

The following url points to an article written by Damian Conway
entitled "Ten Essential Development Practices":
http://www.perl.com/pub/a/2005/07/14/bestpractices.html

Althought the article has Perl as a focus, I thought that some of the
general points made might be of interest to the Python community. It
would certainly be interesting to put together an analogous version of
this article that centers on Python.

Best Regards,
g
 
M

Michael Hoffman

The following url points to an article written by Damian Conway
entitled "Ten Essential Development Practices":
http://www.perl.com/pub/a/2005/07/14/bestpractices.html

Althought the article has Perl as a focus, I thought that some of the
general points made might be of interest to the Python community. It
would certainly be interesting to put together an analogous version of
this article that centers on Python.

He spends so much space on "Create Consistent Command-Line Interfaces,"
a section that, in Python, could be replaced with a simple "Use optparse."
 
J

Jeremy Moles

He spends so much space on "Create Consistent Command-Line Interfaces,"
a section that, in Python, could be replaced with a simple "Use optparse."

Haha... I don't know why but that really made me laugh. :) Might even
use it as a sig or something... :)

 
R

Robert Kern

The following url points to an article written by Damian Conway
entitled "Ten Essential Development Practices":
http://www.perl.com/pub/a/2005/07/14/bestpractices.html

Althought the article has Perl as a focus, I thought that some of the
general points made might be of interest to the Python community. It
would certainly be interesting to put together an analogous version of
this article that centers on Python.

import this

And you get 9 bonus Essential Development Practices, too! What a bargain!

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
M

Michael Hoffman

Robert said:
import this

And you get 9 bonus Essential Development Practices, too! What a bargain!

One of these days I'm going to figure out how to embody "Namespaces are
one honking great idea -- let's do more of those!" Then I shall be
enlightened.
 
D

Dan Sommers

One of these days I'm going to figure out how to embody "Namespaces are
one honking great idea -- let's do more of those!" Then I shall be
enlightened.

And when the one obvious way to do something *is* be obvious at first,
then I shall be Dutch! <wink>

Regards,
Dan
 
A

Aahz

One of these days I'm going to figure out how to embody "Namespaces are
one honking great idea -- let's do more of those!" Then I shall be
enlightened.

What don't you understand about it? (This is a serious question -- I
can think of several answers to give you, but want to know what focus is
needed first.)
 
M

Michael Hoffman

Aahz said:
What don't you understand about it? (This is a serious question -- I
can think of several answers to give you, but want to know what focus is
needed first.)

I wasn't expecting a serious answer to this, but here goes.

First, I wasn't a Python user when namespaces were introduced. It's hard
for me to even imagine Python without namespaces. Did imported modules
just go into the same namespace as everything else? Yuck. It's too bad
this happened before there were PEPs so I could understand the design
and what came before.

Is it the fact that Python is unimaginable without namespaces that makes
them such a honking great idea? Aren't they somewhat of an obvious idea?
Several other languages have them.

Was the implementation of namespaces easy or hard to explain?

I'd love to do more honking great ideas, but I'm not even sure what the
Dutch ideal of a honking great idea is in the first place.
 
R

Robert Kern

Michael said:
I wasn't expecting a serious answer to this, but here goes.

First, I wasn't a Python user when namespaces were introduced. It's hard
for me to even imagine Python without namespaces. Did imported modules
just go into the same namespace as everything else? Yuck. It's too bad
this happened before there were PEPs so I could understand the design
and what came before.

I'm pretty sure that namespaces are fundamental to the design of Python.
I don't think there was any "before namespaces."
Is it the fact that Python is unimaginable without namespaces that makes
them such a honking great idea? Aren't they somewhat of an obvious idea?
Several other languages have them.

Was the implementation of namespaces easy or hard to explain?

It isn't just that Python has namespaces, but that they are the
implementation for quite a lot of things. Modules: namespaces. Classes:
namespaces. Instances: namespaces. Scope: namespaces. It's a very
elegant way to handle a broad class of language features very consistently.

That said, I made a boo-boo. The Zen of Python is really a set of design
principles (and some of them, like this one, are more specifically
*language* design principles), not Essential Development Practices.
That'll teach me to not RTFA.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
D

Dan Sommers

That said, I made a boo-boo. The Zen of Python is really a set of
design principles (and some of them, like this one, are more
specifically *language* design principles), not Essential Development
Practices. That'll teach me to not RTFA.

May I respectfully disagree? The Zen applies to all aspects of software
(and other things, too, but they're off topic here), from human readable
reports and requirements and documentation, to GUI's, to test cases, to
code, to database schemta, as well as the development methodology and
practices themselves.

Sometimes you have to look at the Zen sideways, so that "implementation"
appears to be replaced by the particular aspect or aspects (or the
software, or just software, as a whole, for the true Masters out there)
you happen to be working on at the time, but such is the nature of Zen.

Regards,
Dan
 
P

Peter Hansen

Dan said:
The Zen applies to all aspects of software
(and other things, too, but they're off topic here), from human readable
reports and requirements and documentation, to GUI's, to test cases, to
code, to database schemta, as well as the development methodology and
practices themselves.

Sometimes you have to look at the Zen sideways, so that "implementation"
appears to be replaced by the particular aspect or aspects (or the
software, or just software, as a whole, for the true Masters out there)
you happen to be working on at the time, but such is the nature of Zen.

It also applies to Motorcycle Maintenance, of course... (as in "Zen and
the Art of").

-Peter
 
R

Robert Kern

Dan said:
May I respectfully disagree?

No, I'm afraid that you may only disrespectfully disagree with me. I
will not tolerate politeness. Why? Uh, my .sig quote justifies rudeness!
Yes, that's it![1]
The Zen applies to all aspects of software
(and other things, too, but they're off topic here), from human readable
reports and requirements and documentation, to GUI's, to test cases, to
code, to database schemta, as well as the development methodology and
practices themselves.

Sure, and I can find programming advice in the Old Testament, too, if I
try hard enough[2]. But that doesn't change the fact that the "Essential
Development Practices" (e.g. "Use a source control system") are in a
different category than the Zen of Python (e.g. "Namespaces are one
honking great idea -- let's do more of those!"). Hence Michael Hoffman's
very good question about how he might embody that particular bit of Zen:
it's just not applicable to the things he's doing because it's a design
principle for Python the language, not about development (or even
design!) in general.

Of course other pieces of the Zen are more generally applicable
("Readability counts.") as a "development practice," but that's
something of an accident. Usually, they're about design, sometimes
specifically about the design of Python the language.
Sometimes you have to look at the Zen sideways, so that "implementation"
appears to be replaced by the particular aspect or aspects (or the
software, or just software, as a whole, for the true Masters out there)
you happen to be working on at the time, but such is the nature of Zen.

That's a bit too much navel-gazing for me. With enough effort, you make
anything a symbol of anything else. But that doesn't get any code written.

[1]
http://groups-beta.google.com/group/comp.lang.python/msg/72f205c9b6709163

[2] Proverbs 28:14 JPS "Happy is the man that feareth alway; but he that
hardeneth his heart shall fall into evil." Obviously an exhortation to
not ignore raised exceptions with "except: pass".

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
S

Steve Holden

Dan said:
May I respectfully disagree? The Zen applies to all aspects of software
(and other things, too, but they're off topic here), from human readable
reports and requirements and documentation, to GUI's, to test cases, to
code, to database schemta, as well as the development methodology and
practices themselves.

Sometimes you have to look at the Zen sideways, so that "implementation"
appears to be replaced by the particular aspect or aspects (or the
software, or just software, as a whole, for the true Masters out there)
you happen to be working on at the time, but such is the nature of Zen.

Regards,
Dan
If I canpoint out the obvious, the output from "import this" *is* headed
"The Zen of Python", so clearly it isn;t intended to be universal in its
applicability.

regards
Steve
 
M

Michael Hudson

Steve Holden said:
If I canpoint out the obvious, the output from "import this" *is*
headed "The Zen of Python", so clearly it isn;t intended to be
universal in its applicability.

It's also mistitled there, given that it was originally posted as '19
Pythonic Theses' and nailed to, erm, something.

Cheers,
mwh
 
D

Dan Sommers

If I canpoint out the obvious, the output from "import this" *is*
headed "The Zen of Python", so clearly it isn;t intended to be
universal in its applicability.

Ok, not universal. But as usual, Zen is not easily nailed to a tree.

Was Tim writing about developing Python itself, or about developing
other programs with Python?

Regards,
Dan
 
P

Paolino

The following url points to an article written by Damian Conway
entitled "Ten Essential Development Practices":
http://www.perl.com/pub/a/2005/07/14/bestpractices.html

Althought the article has Perl as a focus, I thought that some of the
general points made might be of interest to the Python community. It
would certainly be interesting to put together an analogous version of
this article that centers on Python.
Hmm, Perl is called a write once language, but it has thousands of
libraries.Any comment appreciated.

That said,those points are mixing different responsabilities in writing
code.I keep on mixing for fun:

-Writing libraries is not writing scripts.
-Writing readable,well structured,non redundant code is somewhat
perpendicular to tests.
-Writing tests is a must for more people to work on the same code.
-Deciding the interface and writing docs before coding can be bad for
experimental coding.
-Logic optimization can influence interfaces.
-Time optimization is a leverage to get paid in open source
software.Never think about that for free.

Paolino





___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
 
T

Tim Peters

[Steve Holden]
[Michael Hudson]
It's also mistitled there, given that it was originally posted as '19
Pythonic Theses' and nailed to, erm, something.

'Twas actually posted as "20 Pythonic Theses", although most times I
count them I find19. Nevertheless, that there are in fact 20 was
channeled directly from Guido's perfectly Pythonic mind, so 20 there
must be. I suspect he withheld one -- although, as some argue, it's
possible he thinks in base 9.5, that just doesn't seem Pythonic to me.
 
T

Tim Peters

[Dan Sommers]
Ok, not universal. But as usual, Zen is not easily nailed to a tree.

Was Tim writing about developing Python itself, or about developing
other programs with Python?

Tim was channeling Guido, and that's as far as our certain knowledge
can go. It _seems_ reasonable to believe that since Guido's mind is,
by definition, perfectly Pythonic, any truth channeled from it
necessarily applies to all things Pythonic.

nevertheless-we-interpret-the-gods-at-our-peril-ly y'rs - tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top