Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's usually better to put that information in the revision comments when you commit rather than in the code itself. Otherwise the code accumulates layers and layers of comments over years.


Personally, I've developed a strong preference for putting this type of information as close to the affected code as possible. Immediately next to the affected code is the only place these types of comments have a prayer of being kept up to date. Keeping them in another document, a commit message, or anything similar just results in the content of the message instantly going out of date.


I feel like it depends - I know I don't just start digging through the commit history of every line I edit.

If I'm trying to fix a bug, and only have to change one line for it to start working, and the tests still pass - but that line was there for a reason that wasn't commented (some edge case) - I'll likely miss it.




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

Search: