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

I don't like such rules of thumb.

A better approach would be that A comment should tell you something that you cannot glean from the code and/or is non-obvious. Yes, I understand non-obvious can have a truck driven through it, but in general it should work.

You can read code and understand what it's doing mechanically, but you may not understand why the obvious approach wasn't taken or understand what it's trying to achieve in the larger context. Feel free to comment on those, but if the code is difficult to understand mechanically, the code is generally bad. Not always, everything has exceptions, but generally that's true.




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

Search: