Hacker News new | ask | show | jobs
by ttty 4357 days ago
Then you will read the comment that says to do one thing but the program will do a completely other thing. I don't see any problem, do you?
1 comments

That's why good comments are about explaining WHY you're doing something, or HOW to use the code, and possibly making the code itself clearer but only if there's no way to do that by introducing better variable and method naming.

Comments are highly valuable but like any tool they can be abused, or done in such a way that they don't make things better.

The point is that comments can become out of date, and there's no automated way to enforce they stay up to date.