Hacker News new | ask | show | jobs
by say-vagnes 2681 days ago
Good article. However, I'd like to talk about documentation and comments, as they were mentioned a lot.

I think the industry should rely on them less. The trouble is, nobody updates every comment, and documentation is even more out of date. They cannot be automatically verified either.

Getting worked up about it is just going to give you stress. Further, it is terribly subjective. Instead, advocate for the other good practices - variable names, clear separation of concerns, single responsibility, functional purity, etc.

I have this inkling, actually, that the more comments there are in a function, the worse it is. Even high level overview comments, like some outlining an algorithm, could instead be high-level code, composing the various pieces together.

It is very rare that a concept is actually nuanced in code. Instead, it is usually the implementation - and you can improve it.

That said, it's a ton of work, and we have to ship a product at the end of the day.

So here we are again, discussing tradeoffs in tech, and I think in these cases a comment block is an OK compromise. Just be cognizant that it IS a compromise.