Hacker News new | past | comments | ask | show | jobs | submit login

Looking at someone else's code, how would you know which was out of date, the code or the comment?



Does 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.


Looking 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.


git blame will show when lines in a file were last changed, and the commit that changed them




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: