The stupid question is the question not asked | |
PerlMonks |
Re: Danger, danger Will Robinson (documenting code)by yakko (Friar) |
on Mar 30, 2001 at 09:55 UTC ( [id://68286]=note: print w/replies, xml ) | Need Help?? |
In the AppleII world, I got to play that "What Assembler (and OS) is it?" game... but on the whole, decent listings included this information, or it was a dead giveaway (ie, a big fat "MLI = $BF00 ;ProDOS MLI entry" is a good indicator that this program isn't for DOS 3.3...) A recent peeve of mine has been not just what comments say, but what one names the variables. This, IMHO, is just as important as meaningful comments -- perhaps even more so. Check this out: Even though this snippet is my own that I just altered extremely to provide example, when I saw very similar code in another script when I was just starting out in perl, it proved that variable names -do- matter, and -do- provide insight into the program's workings. It doesn't have to be ugly, tho: . . . and it's still debatable as to the usage of some of these vars. I'll have to work on cleaning it up. :o) Which would you rather have the pleasure of trying to understand? --
In Section
Meditations
|
|