星期五, 三月 21, 2008

Comments in the code

Comments are easier to write poorly than well, and commenting can be more damaging than useful.

Kinds of comments:
Repeat of the code
remove
Explanation of the code
make the code itself clear, and then use summary or intent comments
Maker in the code
standardizing the style
Summary of the code
useful
Description of the code's intent
very useful
Information that cannot possibly be expressed by the code itself
acceptable