Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: keywords versus variables

by Gavin (Canon)
on Aug 30, 2007 at 17:06 UTC ( #636140=note: print w/ replies, xml ) Need Help??


in reply to keywords versus variables

Less chance for spelling and copy and paste errors too if variable names are kept simple.


Comment on Re: keywords versus variables
Re^2: keywords versus variables
by girarde (Friar) on Sep 06, 2007 at 13:38 UTC
    True, but maintenance gets hard when they aren't evocative.
      but maintenance gets hard when they aren't evocative.

      Not so.

      Did you ever see music annotated with: "This_is_the_second_demi_semi_quavar_in_the_third_bar_of_fifth_stanza" (*).

      Or a resistor on a circuit diagram annotated: "This_is_the_470_ohmm_resistor_that_impedance_matches_the_output_of_the_third_stage_amplification_to_the_fourth_stage_feed_back_loop". (**)

      (*)I've no idea if that makes sense, but a musician would.

      (**)Ditto; but an electronics engineer would.

      Short variable names in context are just as clear to the maintanence programmer, and often more so, than long, overly descriptive ones--if the programmer has familiarised themselves with the purpose of the routine of which they are a part.

      And if he hasn't, he should not be maintaining the code.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://636140]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2014-10-01 09:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (393 votes), past polls