Skip to content

Comment on My Case Against Code Comments

Comments

Commented out code: frequently due to lack of version control, in my experience. Or one-off tests that should've been removed, but they forgot.

  /** Class FooBar - The purpose of this class is to do XYZ... */
  public class FooBar { ... }
>This is one of my favorite examples. Almost an entire line of comments wasted

Not if you use a documentation-builder. They frequently result in simple documentation turning into several lines (@param desc \n @param desc, and the like). /* * does xyz * / does not imply it is documenting that class and only that class. It could easily be meant for two or three classes in the same file, as they could be part of a greater whole.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.