3 Matching Annotations
- Sep 2022
Code explains what and how Documentation explains why.
Do you really need those lines? Isn’t it clear enough? Well, I still find comments like this in a lot of cases and it gets funnier when the comment is obsolete and the code is doing other things. Following the example, let’s imagine that another developer adds support for PUT method. I think that this is what would happen.
- becomes outdated quickly
- source code: comments: explain why, not what or how
- documentation: inaccurate/outdated
- source code: comments
- documentation: good
- answer the "why?"
- Sep 2020