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

I came to write basically this exact thing FWIW. Always write the why, not the what. It's the clear difference between useful comments and excess noise.


There are particularly clever one liners that need a bit of unpacking on the what - Python is bad for this but anytime you are patting yourself on the back for the cleverness, a brief note (at least on the test) is probably warrented. I supposed one can code without cleverness but it's less fun :)


Cleverness that hurts readability is not good. Sometimes you can do a lot in a single line without hurting readability (it may even be more readable), but sometimes there's indeed so much to unpack that it's better to show the steps.




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

Search: