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

I like what the author has to say about commenting, as a counter-point to those that think comments are a sign of bad code:

... I think by focusing on this communication, the code becomes inhertitly (sic) better, because you think more deeply about the abstractions and layering you are doing ...

Explaining a problem (or solution) definitely helps me understand it better (or even realise that I don't fully understand it). Interestingly, you might find that the act of commenting refines your code to the point where some or all of the commentary becomes unnecessary - it's served its purpose. So sometimes the feedback loop might have a few iterations to get to the most clear and concise form of code + commentary.



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

Search: