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.
- documentation: good
- becomes outdated quickly
- documentation: inaccurate/outdated
- answer the "why?"
- source code: comments
- source code: comments: explain why, not what or how
- Sep 2020