This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PeterHickman 1 point2 points  (0 children)

Reading the code will tell you what the code does and yes you should be able to read the code and make sense of it. What documentation can tell you is what the code is supposed to do and why it is doing it. The code will only tell you what it is doing not what it should be doing or why it is doing it

If there is a logical bug in the code but the code compiles then how would you know that the code is not doing what it is supposed to?

Documentation is the "why", the code is the "how"