3 ms·
Programmers don't need documentation to describe what the program does, the code is already a perfect description of what it does. You need documentation to de
by chaosite 5y ago
Programmers don't need documentation to describe what the program does, the code is already a perfect description of what it does.
You need documentation to describe the intent that is not present in the code, i.e., why something is the way it is.
- xg15 5y ago> the code is already a perfect description of what it does. No it isn't. Code is a series of steps that in the right environment will lead to a particular behaviour. Code doesn't (automatically) tell you what that behaviour is - even less if that behaviour is also the intended behaviour. You can have "self-documenting code" to some extent, but even this code is often low-level, spread out over dozens of files and has to handle various cross-cutting concerns which are usually not of interest to you. This is why command line tools have manpages, even if the audience are programmers and the code is open source, so a user could theoretically learn everything by looking through the code.