2 ms·
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. Whi
by kelnos 5y ago
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.
- deleted 5y ago[deleted]
- nytgop77 5y agoFull 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.