3 ms·
Looking at someone else's code, how would you know which was out of date, the code or the comment?
by irthomasthomas 2y ago
Looking at someone else's code, how would you know which was out of date, the code or the comment?
- Vegenoid 2y agogit blame will show when lines in a file were last changed, and the commit that changed them
- mook 2y agoDoes it matter? If the comment doesn't match the code, there's a bug (in the comment or the code). Either way you need to spend time to understand the context and figure out the correct thing, not trusting either.
- mumblemumble 2y agoLooking at the commit history is a great start. Especially if your team actually empowers people to reject code reviews when the commit messages are unclear or insufficiently detailed.