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

There's a lot of back-and-forth in this discussion already and I feel like some people aren't understanding that it's not about _never_ commenting the code; it's about only commenting when it is absolutely necessary (which is actually quite rare if you're writing clean, simple code (which is, itself, quite rare!)).

I think that everybody should be required to read the chapter about commenting in "Clean Code" before contributing to this discussion. It's very java-centric and not perfect, but there is some really good insight. There is a pdf available here: http://www.tud.ttu.ee/material/kallik/JOOP/Clean_Code_-_A_Ha... (if it really helps you, consider buying a copy and supporting the authors).



The key things are:

1) The code should speak for itself, and

2) You comment when you have something to say outside of what the code says.

Chances are, ironically, if you stop using comments as a crutch, you will use them more often because they will start to be a useful tool.




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

Search: