45

Comment the "why", not the "what". If your code needs comments to explain what it does, rewrite the code (use good, descriptive identifiers).

Comments
  • 4
    Good advice although it is not always practical to re-write code. Also some code may be out of the technical reach of some and does need the WHAT explained by way of a comment.
  • 0
    Or both.
  • 0
    @gloslistan Comments redundant with code means either one of them is bad. Or both. They are exceptions, but they are more rare than you'd think (low level optimization is one).
Add Comment