Hacker News new | ask | show | jobs
by timdaub 1756 days ago
IMO, comments are needed when the code itself can't express something necessary to understand its overall function.

I've found that hence e.g. for rather complex statements where the code isn't lacking information, not commenting is the correct approach.

Whereas sometimes, when I'm forced to write exceptional code because of e.g. a workaround, a comment can nicely introduce my future self and other readers to the context.