Of course, i never check in my comments/asserts to the main branch, since i'm not sure whether my understanding is correct
I also add my own comments when understanding/using/changing other people's code. I do eventually check them in though. After all, why not?
* If the original author is no longer available, you're now the best authority on the subject; chances are your comments will help anyone in your shoes sometime later, including yourself. If you're really unsure, add that information to the comments.
* If you're making changes based on your understanding of the code, you or someone else will be testing those changes, thereby validating or falsifying those assumptions. If, after testing, the bugfix/feature/task works, so do the comments.
* If the original author will be available at a future date, you can get them to do a "comment review" (cf code review) when they get back.
I also add my own comments when understanding/using/changing other people's code. I do eventually check them in though. After all, why not?
* If the original author is no longer available, you're now the best authority on the subject; chances are your comments will help anyone in your shoes sometime later, including yourself. If you're really unsure, add that information to the comments.
* If you're making changes based on your understanding of the code, you or someone else will be testing those changes, thereby validating or falsifying those assumptions. If, after testing, the bugfix/feature/task works, so do the comments.
* If the original author will be available at a future date, you can get them to do a "comment review" (cf code review) when they get back.