4 ms·
Not the comments I write. I don't write what the code does or even what "I understand the code to do". I explain choices, especially ones that the next develop
by kristiandupont 2y ago
Not the comments I write.
I don't write what the code does or even what "I understand the code to do". I explain choices, especially ones that the next developer or my future self is likely to misunderstand when looking at the code.
- readthenotes1 2y agoBut what about a year later when someone's changed the code but not the comment?
- kristiandupont 2y agoI would say that I have observed something like this about as many times as someone has changed some semantics in a way that a variable or function name is no longer correct. That is to say: probably a few times in 25 years, but nothing compared to how much value I have received from them.