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

Comments should explain the "why" and not the "what".

The code _should_ explain the what just fine, but it doesn't explain the problem the code is trying to solve at all. If you struggle to explain the why with a docstring or few comments, then that's a sign you didn't decompose the problem enough.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: