DEV Community

Discussion on: Don’t comment your code

Collapse
 
xtofl profile image
xtofl

Thanks for this!

Since many objections raise about the title, maybe consider the positive advice: "Comment just the non-obvious". A corollary of this advice is 'make the code obvious' :).

I encountered every topic you've described in these 20+ years of coding.

  • The very worst, may be the obsolete and/or misleading comments: try out some new code by reading the comment/documentation, and find out it doesn't even compile.
  • Also recently discovered: the 10 line license preamble in each and every file: not needed at all.