3 ms·
> My favorite was the "don't write comments because as soon as you do they're out of date." A better version of that is “if the code and comments disagree, the
by dspillett 3y ago
> My favorite was the "don't write comments because as soon as you do they're out of date."
A better version of that is “if the code and comments disagree, there is a good chance that both are wrong”.
If code and comments get out of sync, at best someone has been careless, and you need to be on the lookout for more carelessness in changes made at the time. At worst changes have been made without fully understanding what is going on, so there is a huge can of edge-case worms about to burst open.