On Nov 21, 2011, at 9:57 PM, Toby Thain wrote:
On 21/11/11 10:11 AM, 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
Not everyone agrees with this (e.g. Charles Simonyi*; even prodigies grow old).
Simonyi may have been a prodigy, but I don't think I can ever forgive him for
Hungarian Notation. It's like the crazy uncle of literate programming.
I'm with him on that, though; even when I was younger (I'm still not even close to
"old" for any standard value of the word, so I use that in its full relative
meaning), it only took a few months to completely forget what my inscrutable code did.
That, if nothing else, taught me to stop using single-letter or obnoxiously abbreviated
variable names, and to start leaving some comments once in a while.
Once I got into Perl, the timeframe shrunk to a few weeks. :-) Fortunately, I'm
pretty much done with write-only languages these days and haven't had to touch Perl
for about five years. I still have a soft spot for Forth, for some reason, even though it
lends itself neither to readability nor commenting; perhaps I like the puzzle of figuring
out what I meant with Forth.
- Dave