Hacker News new | ask | show | jobs
by jevinskie 5302 days ago
Inline comments are accurately tracked in version control. I don't see how updating comments when you update the code is any different except for the obvious advantage of seeing the comments right next to the relevant code.
2 comments

It's really easy to miss updating a comment somewhere. I mean, people introduce bugs into programs even with extensive automated tests. Rendering a comment obsolete is something your tests will never catch, so it's easy to miss the fact that you've broken something until you actually need the comment.

By contrast, it's nigh impossible to forget to include a commit message, since failure to do so will cancel your commit.

I'm on your side. If dates are an issue then have a change-log noted in the source code file where you create a tag (such as initials+date) and insert that above large code changes so you can see code commit changes based on date within code as well.

Comments don't take up much space (reading or on disk) so don't think its bad to be verbose.