O'Reilly logo
  • Keith Kjer thinks this is interesting:

In general, comments should discuss why something is done, its purpose and its goal. The code already shows how it is done, so commenting on this is redundant—and is a violation of the DRY principle.

Commenting source code gives you the perfect opportunity to document those elusive bits of a project that can't be documented anywhere else: engineering trade-offs, why decisions were made, what other alternatives were discarded, and so on.


Cover of The Pragmatic Programmer: From Journeyman to Master


Pragmatic Programmer Pg 252