Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: coding rulesby mstone (Deacon) |
on Jun 13, 2005 at 04:21 UTC ( [id://466053]=note: print w/replies, xml ) | Need Help?? |
'Nother one to consider: Make the readability of names proportional to their scope. You don't need long names for short-lived carrier variables:
but it does make sense to use long, descriptive names for things that will be used far away from where they're defined. The same applies to functions. It's okay to short names for internal functions (the ones you'd start with an underscore), because you won't see them being used unless you're close enough that you can find the definition and read the associated comments. For exported functions, even though people do hate typing the long names, it's worthwhile to add a few characters that will save people from having to RTFS in order to learn what the thing does. Used consistently, the readability of a name can cue you in to how far you'll have to look to find the original definition.
In Section
Meditations
|
|