• When possible, explain yourself in code not comments (meaningful names)
  • Useful for documentation generation
  • Required for legal comments
  • May be useful to explain intent (i.e. when using regex)
  • Warnings are useful
  • To-do comments should not be used as an excuse for bad code

Bad comments include:

  • Noise: no meaningful information
  • Redundant information
  • Commented out code
  • Too much or wrong type of information