![]() |
|
more useful options | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
To go with all of these temporary variable names, here is a useful naming convention.
Make all of your flags be questions starting with "is". One of the most common errors people make is to reverse what a flag is supposed to stand for. For instance if you are looking at a variable called $status_flag, is 1 success or failure? Who knows? Much better to call it $is_ok or $is_bad as appropriate, then there is no room for confusion. The rule is, Say what you mean, mean what you say, and stop saying it before you mess up! Make your variables say your story. Don't leave landmines by changing what they mean. Don't make people have to maintain stuff in both comments and code. So on and so forth... In reply to Re (tilly) 1: Favorite Descriptive Variable Name
by tilly
|
|