Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Programming Perl also uses %Flintstones and %Simpsons as examples. I don't hear anyone complaining about that. And as far as picking names for variables, the names should mean something. For example, if I was coding a robot, I might use $gypsy, $crow, or $cambot as variable names because I'm a fan of Mystery Science Theatre 3000, and it's a mnemonic device. By the same token, someone who is a serious Christian might use biblical figures to accomplish the same purpose.

Here's an example, although you'd be unlikely to see it in the real world.

A system is password-protected. In order to make the login more difficult, you have to enter your login and password three times. Each time, you will be denied access, and asked to try again. After three failed attempts, security leaves you alone, and you can enter. You might call this section of code "Peter", because the apostle Peter denied knowing Christ three times, even though he did know him. Another section might monitor user behavior, and report improper behavior back to the admin so the user can be removed. It wouldn't be reaching to call that section "Judas", because it betrays the user.

I'm not a Christian, but I love a good pun, and I appreciate the amount of work that goes into an extended metaphor. If a person can understand their code better by using Biblical names, go nuts. As long as useability isn't hindered, say by making a variable name $I_am_going_to_hell_because_I_took_the_Lords_name_in_vain, who cares?

-Logan
"What do I want? I'm an American. I want more."


In reply to Re: Re: Re: Religion in the Monastery. by logan
in thread Religion in the Monastery. by benn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (7)
    As of 2014-07-29 21:42 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (228 votes), past polls