Bryan Martin
Aug 18, 2022

--

Impossible? I hope that's hyperbole. It's a matter of habit. Usually the "why" of something doesn't change that often. If it does, change the comment. Always review any comment code related to a block of code before changing it. You shouldn't have that many inline comments in your code to maintain. They should be an exception. If you find yourself having to explain why your doing something too often, that is a code smell.

Technical documentation should never be at that level of detail. That documentation is at more risk of becoming out of sync with the code. How will a developer know there is an accompanying document that corresponds with that block of code?

--

--

No responses yet