News for hackers. Stuff that matters.
Re:On Comments in Code by kelnos on Tuesday June 15, 2021 @05:10PM (#27521545)
The worst, though, is when a comment tells you the valid input range, but it's wrong, because someone later changed the code and didn't update the comment. While this doesn't happen frequently, I've gotten bit by it enough that I will generally at least take a cursory look over the function body to verify that the comment is still correct.

I wouldn't say this makes the comment useless, but it does reduce the usefulness. And this might end up biting someone who has decided to trust the comments.

Re:On Comments in Code by nytgop77 on Tuesday June 15, 2021 @06:00PM (#27522080)
Full agreement.

Unfortunatly it is a story, that is set to repeat 3 times.

There is a similar tragedy of outdated documentation.

And then the final part of the trilogy is named "outdated and even misleading naming" (vars/functions).

In all cases, one should have same amount of trust as with weather forcast or politician's speech. Trusting 100% would be naive, but complete dismisall would be foolish as well.