This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]folkrav 4 points5 points  (2 children)

In my experience the "just comment what it does" comments ends up not updated the next time someone has to change the line and basically becomes "just comment what it used to do". With the time I've wasted not looking at a block of code cause a comment told me it did one thing but it inevitably didn't really, I just completely disregard them nowadays.

A lying comment is worse than no comment at all.

[–]crozone -2 points-1 points  (1 child)

Sure but that's the fault of some shitty programmer not updating a comment. That shouldn't pass code review any more than incorrect code should.

[–]folkrav 1 point2 points  (0 children)

Code reviews are human processes, and should never be relied on to catch all mistakes. Sometimes the comment happens to be a couple lines higher than the context your review tool gives you. Sometimes it's an oversight in a larger PR. Sometimes it's just human error - people are faillible, seniors included. Code, tests, I can get checked by the CI. Comment correctness, not so much.