in reply to Thoughts on naming loop LABEL:
As far as labels go, answer the question "What's happening here" (but without getting too humourous -- a client might be reading this code some day). In your example I would use READ_TAGS because you are looping and reading tags.my $FileName; my @Lines = <HTML>; my %MenuSelections;
Naming subroutines is the same deal: "What does it do?" Something called sub ReadData may make sense at the time, and maybe sub ReadFinancialData is lots more to type, but look how cool it looks when you review the code a few months later. All is explained. Lovely.
For me, it all comes back to making the signal to noise ratio in the source code as high as possible. My variable declarations at the beginning of this post read as "My filename, my lines, my menu selections", and that makes sense to me.
--t. alex
"Nyahhh (munch, munch) What's up, Doc?" --Bugs Bunny
|
|---|