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

> Like he says, the "comment" describes what he wants to do. That's not what humans are interested in.

When I'm maintaining other people's code, or my own after enough time has gone by, I'm very interested in that sort of comment. It gives me a chance to see if the code as written does what the comment says it was intended to do. It's not valuable for most of the code in a project, but is incredibly valuable for certain key parts.

You're right that comments about why things were done the way they were are the most valuable ones, but this kind of comment is in second place in my book.



Or for something that needs like a quick mathematical lemma or a worked example. A comment on what is fantastic.




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

Search: