Friday, July 25, 2008

Wither Comments?

Jeff Atwood has an excellent post at Coding Horror about comments.


http://www.codinghorror.com/blog/archives/001150.html
.

Worth reading. I believe that function / method names should tell you what's happening (at a suitable level of abstraction), and any comments that do exist should explain the rare cases where your well-named entities could be misleading.

Avi Pilosof has an excellent related point about the kinds of comments that are often underused at http://blogs.msdn.com/avip/archive/2008/07/25/code-commenting-try-business-commenting.aspx.

No comments: