Commenting code

Recently there was a discussion on Slashdot about code comments. As always it’s mostly people building straw-men and all-out-attacking them. Still, entertaining read. My own commenting practice boils down to:

  • code is up-to-date, hence better to write just verbose code than dense code and comment it
  • explain the “why” in comments

Ie. the general Clean Code & Code Complete way.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">