DEV Community

Discussion on: Comments Are The Only "Code Smell"

Collapse
 
bytebodger profile image
Adam Nathaniel Davis • Edited

We're probably picking nits here, but my point is that:

  1. Comments, when misused, often indicate a code smell.
  2. The vast majority of comments I ever see are unnecessary, and are frequently used to cover up obtuse code. In other words, most comments are absolutely misused. So most comments === code smell.
  3. If the comment tries to tell me what the code is doing, it's a "code smell". Period.
  4. The title, specifically, is a bit of a follow-on from the article that I wrote just before this one, where I basically said that "code smells" don't exist - and they're often the result of people making snobby judgments on other peoples' code.