in reply to Re: Re: Comment Block Creator
in thread Comment Block Creator
But you did post here, and posting here implies inviting critique and comment. Hence my comment.
The problem with "fancy comments" is that they are either making into comments what should be POD or a separate document, or they are making it hard to rewrite the code, because you don't want to touch the "sacred" fancy comments. Also, being set off that way, you might trust the comments more than the code, and many years of programming has lead me to believe that in "live" code, the comments eventually lie, because someone has edited the code and not the comments.
Keep your comment style simple. Keep it describing the "what" and not the "how", unless the "how" is particularly tricky. (And most "how" comments should be inline anyway.) Keep it describing any tricky presumptions, assertions, or dependencies. Keep it being for other programmers, not for users of the code (which should be in POD anyway).
I think once you figure out what really does need commenting, you'll comment less and code more.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Re: Re: Comment Block Creator
by Anonymous Monk on Dec 05, 2003 at 11:45 UTC | |
by merlyn (Sage) on Dec 05, 2003 at 11:56 UTC | |
by Anonymous Monk on Dec 05, 2003 at 13:10 UTC |