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

I'm pretty much in agreement with you on this, however I'm always aware of the possibility of comments being bugs. If code gets moved around, there is the very real possibility that the comment is now attached to the wrong method or line of code.

I now comment on method or function basis, describing what the method does. The how should be evident in the body itself.

He doesn't seem to often concede to being wrong.



The how should be, but the why might not be. I think comments should explain choices, especially ones that I am likely to question when returning to the code later.




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

Search: