Python development time is faster.
Gabriel Genellina
gagsl-py at yahoo.com.ar
Mon Nov 20 19:29:22 EST 2006
At Monday 20/11/2006 13:04, Sells, Fred wrote:
>My design goals are for a method to be <10 lines of code and a class
>definition to fit on one printed page (ok, 10pt font ;). I don't always
>achieve these goals, but more often than not.
>
>In order to achieve these goals, I seldom comment and rely on long function
>names and clear variable names. Perhaps that's a bad thing, but I've found
>that the comments were always obsolete when I picked up someone else's code,
>then they just got in the way.
Docstrings are A Good Thing (TM).
I usually never write silly comments like this:
savedState = state # store the current state
but I always write an explanation when something is not done on the
"obvious way" or following "common practice" - to prevent the "smart
guy next door" (myself inclusive) from modifying it later just to
discover it won't work that other way.
And loop invariants are good comments sometimes.
--
Gabriel Genellina
Softlab SRL
__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
More information about the Python-list
mailing list