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

There's truth to both sides. Depends on the comment really.

``` doesAThing() //does a thing ```

doesn't help anyone.

My rule: Code is for how, comment is for why.




> Code is for how, comment is for why.

Excellent. For interfaces, other code that uses the interface (perhaps even tests) can also help to document the "why".




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: