DEV Community

Discussion on: Why Code Comments Still Matter

Collapse
 
qbe_root profile image
Noki Doki
  1. If you’re being lazy or can’t find a clear way to write a piece of code, just put a comment instead, but self-explanatory code is still better ultimately

  2. Meh, classes and methods do a much better job of providing an outline

  3. Metadata is a special case, I don’t think anyone includes that in comments that “need to be banned” as it just can’t be replaced with better code

  4. Lmao, who the hell actually uses that? I guess it falls back to point 1 where you can’t write clear code, but if you’re using joke languages like this, making your code hard to read is most likely the whole point anyway

  5. Some companies require comments because they’re (considered) important, not the other way around, this doesn’t prove anything

  6. Documentation kind of falls in the same case as metadata imo, it can’t be replaced by code, as its readers may not even have access to the code

  7. Well yeah, code can’t really explain what code is yet to be written

Basically comments do have their uses, but they should be used sparingly (except documentation and metadata) to let code speak for itself.