Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Besides the other sorts of comments people are likely to mention, I like the WTFWIT (WTF Was I Thinking) sort. Often times we write odd code to get around some special case or problem (real or imagined), but then we completely forget about what that problem was later. For instance, a remote system might return an odd result because it had a bug, and that bug has disappear. Or, more commonly, the "my brain is mush" explanation OR
I don't put these into the category of "good documentation", but I find them useful so I can think about what the programmer was going through when he was typing that stuff. It's completely subjective material that reminds us that programming is a human endevour. Anything that can help the maintenance programmer see what the original author was thinking is helpful :) And, as one of my early programming mentors said in his coding standards "All clever-ass tricks must be explained in the comments for us less clever types." </code>
-- brian d foy <brian@stonehenge.com> In reply to Re: The art of comments: (rave from the grave)
by brian_d_foy
|
|