November 13, 2006

In Praise of the Lowly Comment

Here's an article showing how to make comments in your code more useful and effective for you and your fellow developers. It identifies the four kinds of comments that are worthwhile in most source code:

  • Placeholder comments - A string around your virtual finger - eg. TODO comments
  • Summary comments - explain an entire block of code at one time
  • Intent comments - Why is this code here?
  • Rocket Science comments - sometimes people need a little help to understand the rocket science in a piece of code!

http://www.developer.com/design/article.php/3642901

Entry categories: Programming
Posted by Jorgen Thelin at November 13, 2006 02:00 PM - [PermaLink]