4 ms·
Great thing about Git, is you can look at the code at the time when the comment was written, and still retain the original value of the comment. If there have
by jonfw 4y ago
Great thing about Git, is you can look at the code at the time when the comment was written, and still retain the original value of the comment.
If there have been major structural changes that make the comment useless- that’d be pretty easy to see, it’s very easy to delete comments
- pmoleri 4y agoThis, I prefer an inconsistent comment that can still shred light on some code than no comment at all. Code also becomes obsolete and no comment just makes it worse.
- wombatpm 4y agoComments in code are like pizza or sex. When they are good, it’s really good. When it’s bad, it’s better than nothing
- makeitdouble 4y agoBut then are you looking at the git context of all the comments you come across ? I'd argue you could do the same on methods and class you want more context on, removing the need for the majority of comments, and most companies will have the associated ticket numbers or design discussions attached to the MR/PR. I think there will still be rare situations where comments are absolutely needed, but in these rare cases they should probably refer to an external resource (a bug report for a specific library, an incident that required a specific fix, etc.)
- jonfw 4y agoI typically do look at the commit history of a part of code if I'm not familiar with it and I'm going to make changes there