Comment

Comment by soulofmischief

I agree that there should be "why" comments. Those are great to have in any codebase. However, that does not preclude descriptive comments.

Obviously, the best way to make code self-documenting is to wrap logic in a method whose name clearly describes its intended function. For one-liners however this can lead to overabstraction, and leaving a "what" comment can be entirely appropriate if the engineer decides it is. This cult-like behavior of engineers who think that well-commented code is some sign of weakness or unprofessionalism is beyond silly.

Absolutisms are a sign of a bad engineer, but I can give you the benefit of the doubt and not assume you're a bad engineer just because you employ such absolutist statements and use erroneously use them to judge code by oversimplified metrics instead of relying on deeper analysis.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton