3 ms·
None of those comments bug me all that much. What does bug me are: 1) Out of date comments. I hate when comments say one thing, but clearly the code has chang
by kenjackson 16y ago
None of those comments bug me all that much.
What does bug me are:
1) Out of date comments. I hate when comments say one thing, but clearly the code has changed and the code now does something else.
2) Comments lacking context. I've seen things like, "exception only occurs when persisted"... what's persisted? I don't see how any exception occurs here. It's until an hour later can I find what they're referring to.
- joe_the_user 16y agoHmm, One interesting thing is that out-of-date comments may tell you that whoever last modified the code didn't know what they were doing.
- ajuc 16y agoI find it easier to remember to add meaningful comment to commit (we have commit hook that prevents you from commiting without comment), than to remember to change every comment in source code that I touch (especially if it is far from the lines of code I changed - eg in the class header, or in the header of the base class when I only change some method in derived class). Commit messages tells me on each line, why it is here (we have policy of adding JIRA task number to the commit message).