On 21 Nov 2011 at 10:11, Jason McBrien wrote:
I've found the following to be true:
1 - If you wrote the code, even if it's undocumented, you are going to
be likely to know what it does when reviewed later on
I'll say only this--it depends upon how much code you write every day
and how long it's been since you've seen it--and how memorable the
project itself is.
After about 20 years, I forget what I've written, and often, even
that I've written it.
Good commentary (not the line-by-line drivel, but block comments
obeying the reporter's axion "Say what you're going to do, say what
you're doing, then say what you've done") has saved my bacon
countless times.
--Chuck
No arguments there. I used to manage some programmers and I'd find lots
of lines like:
a++; // add one to a
Totally pointless.
I also used to tell them that if they did something they thought was
clever that the should be proud of it and point it out in the comments
and be sure to include why it was so clever...that saved us a bunch of
time when clever==wrong
Brian