hi,

On Mon, Jan 12, 2009 at 11:17 AM, Sebastian <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> recently I've started getting into Python and Django programming as
> well as shell scripting.
>
> I was wondering is there any rule or guide on good practice on how to
> comment code?

i agree with the replies to this thread already.

the only thing i'd add as advice to a new programmer - try to avoid
the need for comments by making the code as human-readable as
possible. yeah, this may seem like not quite what you were asking, but
i think its part of the same problem.

so:

- try to make variable names, function names, etc, as meaninful as
possible within the constraints of the language and keystroke-sanity
- whenever possible, avoid magic numbers/strings, and define a
variable/constant with a meaningful name

cheers
justin
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to