A comment about commenting

Saturday, November 28th, 2009 at 22:39  

#1, #2, #4, and #5 in these Five Rules for Writing Good Code are right on the money, but the edict against comments in #3 is shortsighted. A concise, five-line function following language and framework conventions can still benefit from a comment explaining why the function works a certain way, when it should be used, and what other related functions should be looked at. Sometimes your audience is unfamiliar with the language or the framework or the project and needs to make a change quick; inline comments will help them make it the right change.

posted by glyphobet  

This post doesn't have any trackbacks yet.

respond via trackback only.