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

> It's fairly ironic that you've spent so many words re-iterating the argument that "code should be self-documenting".

It would be ironic if it was being argued that natural languages are bad. But that is not what's being argued, and the author of that comments was not trying to convey an algorithm to you.

> That's the job of a programmer, and if the programmer isn't doing their job [...]

This is puritanism. Just because it's work, doesn't mean it's useful.



Documenting your code is Puritanism?

Human communication is the rate-limiting process for all software teams. Individual productivity is almost entirely irrelevant, if your personal productivity means that you slow down ten other people.


As i said in a comment further down: Comments are not documentation.

Documentation explains how to use the exposed API to get the code to do something the user desires. It does however not describe what the code does, or why a specific bit of code is done in a certain way.

Comments do not concern themselves with the API, they also do not describe what the code does, that task is up to the code by way of structuring and proper naming of variables and functions.

What is left to the comments is to explain to the guy coming in afterwards why a certain bit of code is as it is when the code or the documentation cannot adequately explain its purpose explicitly or implicitly.




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

Search: