Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Funniest Variable/Subroutine names

by lshatzer (Friar)
on Apr 05, 2002 at 03:39 UTC ( [id://156816]=perlmeditation: print w/replies, xml ) Need Help??

In my journal, I mentioned funny names of variables, or subroutines.

Such as %HugeAssHash (later shortened to %hah).

I didn't get as many responses as I anticipated there, since it is a lower traffic site. I decided to post it here to see what other monks have named variables/functions.

Replies are listed 'Best First'.
(shockme) Re: Funniest Variable/Subroutine names
by shockme (Chaplain) on Apr 05, 2002 at 03:56 UTC
    I ++'d this thread. Even though I don't make a practice of using non-meaningful names, I think it's hilarious to stumble across something like this when I'm supporting/maintaining code. The only reason I refrain is because my memory blows chunks. I need meaning ful names so, when I'm revisiting my code at a later date, my intentions are fairly apparent.

    This thread does bring to mind a funny, but extremely off-topic, error message my team received from an OS core dump on an older VMS system some years ago. The error message was "Shut 'er down Clancy, she's pumping mud!" Oddly, this error message was undocumented. After a fairly lengthy conversation with one of the OS's authors, he stated that this error message should never be reached. For some reason, they had a conditional similar to the following:

    if true { something; } elsif false { something else; } else { print "Shut 'er down....."; }
    And somehow, we managed to be neither true nor false.

    If things get any worse, I'll have to ask you to stop helping me.

      Yes, I do agree meaningfull variable names are needed. I forgot to mention, all of these funny variable names were in throw away code, early in my perl career or as a joke for co-workers that was shortly changed.

      In regards to your VMS error, I have done something similar, without the humor though, put a debug message, even though in all accounts it should have never been executed. And of course, somehow my shebang was changed to #/usr/bin/murphy, or so I thought, and it was executed, fixed the code, after a few tests, and seeing the light. Good thing I put a message like "If you see this, something very wrong happened."

      Thanks for your response!
      Someone actually told me the details of the 'Clancy' error message a few days ago...I'll try to remember them as best I can.

      The first appearance of this message was for a kernel panic on a Texas Instruments xxx100 (forgot the letters). TI was headquarted in Dallas, and the company got its start producing equipment for oil well drilling. Well, if you're drilling an oil well and hit water, then all you pump out of the ground is mud. The only thing you can do at that point is to tear down the drilling rig and move it somewhere else (time consuming and expensive).


      OmG! They killed tilly! You *bleep*!!

        Wow. I was working at Texas Instruments when this happened. It would've been in '86 or very early '87. Interesting. (As to breaking down and moving oil rigs, the expense involved is mind-boggling.)

        If things get any worse, I'll have to ask you to stop helping me.

      I like to:
      my @bits = split(/\|/,$string); foreach my $bit(@bits){ # work with each bit.. }
      I also had some fuzzy logic in some code: setting a string flag to iether 'true', 'false' or the equally valid value 'maybe'
      ___ /\__\ "What is the world coming to?" \/__/
Re: Funniest Variable/Subroutine names
by jepri (Parson) on Apr 05, 2002 at 05:24 UTC
    While we're on the funniest messages topic, when shutting down UML recently I saw "Alert! Inodes still open! Self destructing in 3 seconds". Kind of funny when you realise that there's sod all you can do. Even powering off won't help the situation...

    As for funny variable names, I occaisionally find myself writing things like if $action{$action} in my code, or creating files called smack and please so I can type

    prompt> more smack please

    Other reannual favourites are things like stupidlylongvariablename or  HFV(the human-friendly variable). For CGI scripts running under mod_perl, my favourite jump target is the_edge:.

    Hmmm. I think my sense of humour needs a brush up.

    I didn't believe in evil until I dated it.

Re: Funniest Variable/Subroutine names
by MZSanford (Curate) on Apr 05, 2002 at 08:56 UTC
    I, like everyone, use meaningful names, but, we have all had our moments of levity, so here are a few :
    • &dont_miss_the_egress() - thanks Mr. Barnum
    • $yonko_the_sane_variable_of_doom - from a 5 line temp script.
    • %dung_heap - big HoH
    • And, Wookie tends to put comments after use strict;, which i think belong here :
      • use strict; # only the bad ones don't
      • use strict; # if you want to live
      • use strict; # for world peace
      • use strict; # or else ...
      • use strict; # or wait til your father gets home
      • use strict; # [CENSORED] - many of these

    from the frivolous to the serious
Re: Funniest Variable/Subroutine names
by dws (Chancellor) on Apr 05, 2002 at 06:58 UTC
    Many years back, in a C program
    double your_pleasure; double your_fun;
    IIRC, they weren't used.

Re: Funniest Variable/Subroutine names
by Sweeper (Pilgrim) on Apr 05, 2002 at 05:34 UTC
    This is C code, but this is obviously Perl-related:
    From "Larry Wall's quotes"
    double value; /* or your money back! */
    short changed; /* so triple your money back! */ 
         --Larry Wall in cons.c from the perl source code
Re: Funniest Variable/Subroutine names
by vagnerr (Prior) on Apr 05, 2002 at 10:29 UTC
    At University one of my dorm mates was doing a PASCAL course and was told off for using variables like 'a' and 'b' in his programming assessments and was told to produce more descriptive names in the next assessment. So he started using 'this_variable_is_the_loop_counter_it_counts_the_loops' and 'i_am_storing_the_number_of_times_that_the_user_has_responded_with_a_yes_here'

    the instructor stopped hassling him after that :-}

    ---If it doesn't fit use a bigger hammer
Re: Funniest Variable/Subroutine names
by shotgunefx (Parson) on Apr 05, 2002 at 08:42 UTC
    Decorum prevents me from listing mine. Sometimes when trying to debug complex programs, I'll just add little warning variables that occasionally get printed out. If the solution to the problem continues to elude me, my vars and warning messing get progressivly harsh until they sound like Pacinio in ScarFace.

    One of the big problems I had with my older code was hunting down things like  do_this() or die "F***KING SH*T, do_this() spewed $! all over the place!"

    Not something that should really be in production code :)

    On a related note, a prominent eCommerce company that I will not name had an admin util called storef*cker.


    "To be civilized is to deny one's nature."
Re: Funniest Variable/Subroutine names
by maverick (Curate) on Apr 05, 2002 at 14:43 UTC
    Once upon a long time ago I had some cron jobs that emailed me in the event of critical errors...
    open (OUTPUT,">$some_file") || drop_dead("Couldn't open outputfile: $! +");
    Another story that I wasn't direct witness to involved some HP server of some sort on some bleeding edge hardware. The thing kept crashing, finally they worked their way up the tech support chain to one of the kernel developers. He told them to add the following to the kernel boot options:
    The machine ran perfectly from then on.

    OmG! They killed tilly! You *bleep*!!


      Thats frightening, but at the same time it seems to make a lot of sense :-)

      ---If it doesn't fit use a bigger hammer
Re: Funniest Variable/Subroutine names
by simon.proctor (Vicar) on Apr 05, 2002 at 08:24 UTC
    I went through a phase where I called all temporary variables 'bob' or 'plop'. I particularly liked plop as it was easy to type on the keyboard. Plus I wanted to be different and not use 'foo'.

    Later, when I learned OO, I would give private methods funny names to stop me getting bored. Examples included 'munge' and 'doMe' plus some other slightly ruder ones :P

    But I don't do that anymore, I stick to putting silly things in my comments.
      And then there were your comments simon :-P
      # If the high priestess has been given the correct holy runes of salva +tion then the writings returned from the gods should indicate # that a string needin a split and the like needs to be put on the alt +ar and its innards displayed to the four winds.
      which was for
      my @rows_of_data = split(/\n/,$results);
      In defence to him of course it was written at 4am when running a deadline to the wire :-)

      ---If it doesn't fit use a bigger hammer
Re: Funniest Variable/Subroutine names
by kappa (Chaplain) on Apr 05, 2002 at 12:34 UTC
    What I use all the time are different funny values of truth.
    From obvious:
    while ('forever') {} unless ('debug') {}
    to more funny and local:
    if ('courier is ill') {} while ('cisco smokes in the corner') {} return if 'function not implemented';
Re: Funniest Variable/Subroutine names
by Biker (Priest) on Apr 05, 2002 at 12:56 UTC

    I have to admit the following:

    I've had reason to (don't ask me why) write:

    return 'O'; # That's an upper-case Oh, not a zero.

    to return a 'true' value.

    Less bizarre, I keep the right to end my modules with a string of my own personal choice instead of ending with 1.

    Everything went worng, just as foreseen.

Re: Funniest Variable/Subroutine names
by Biker (Priest) on Apr 05, 2002 at 07:07 UTC

    The "main working subroutine", where I write the top level program flow, is often named saltmine().

    Everything went worng, just as foreseen.

Re: Funniest Variable/Subroutine names
by tachyon (Chancellor) on Apr 06, 2002 at 02:19 UTC
    fork() while 'waiting for system to crash'




Re: Funniest Variable/Subroutine names
by munchie (Monk) on Apr 05, 2002 at 20:51 UTC
    Try writing subroutines like this:

    sub liminal_messages {} sub ordinate_flunky {} sub par_perl_subroutine {}

    > munchie, the number munchin newb
    Llama: The other other white meat!
    (you had to be there :-P)

Re: Funniest Variable/Subroutine names
by pdcawley (Hermit) on Apr 05, 2002 at 20:53 UTC
    In the as yet unreleased Acme's::Abbreviations you will find such delights as
    @ISA = 'Bloody Silly Thing To Do'; sub can't {...} sub won't {...} ... sub mustn't { my $target = shift; my $method = shift; no strict 'refs'; my $old_glob = \ $ {"${target}::"}{$method}; delete $ {"${target}::"}{$method}; *{"$target\::$method"} = *{$old_glob}{$_} for (qw/ SCALAR HASH ARRAY IO /); 1; }
    well, you know, it seemed like a silly thing to do at the time.
Re: Funniest Variable/Subroutine names
by Amoe (Friar) on Apr 05, 2002 at 13:28 UTC

    I recently wrote a module Net::LiveJournal to allow me to programmatically post to my journal. Me and my friends all have them, and we have our little injokes. One amongst us isn't a very experienced typist; when we talk on messenger programs, he always misspells "post" as "psot". For some reason, he can't seem to spell it, or even misspell it another way.

    The upshot of this is that using "psot" as a synonym for the verb "post" when referring to our journals has passed into our lexicon. Hence, when I created my module, I wrote a sub post to post an entry, and I also wrote a wrapper sub called psot to call post with the same arguments.

    Well, I found it amusing at the time... :p


      Is he, mayhap, a TEUNC?

      (See TEUNC Page).

      One the more typical TEUNCs is -- and I quote -- Menelvagor the Slayer of Killerbytes, Editor of Sauron's Dairy, and Lord High Enervator of the Empire of Psot, Tamer of Firestorm the Dragon, Hopelessly Wacky Baritone, and Grand Flusher of the Sacred Precincts of Tyope, Protector of the TraskÚd Stuff, R.E.A.L.L.Y.W.E.I.R.D, and Count Tildanor the Rog

      (Emphasis mine -- and yes, that is typical for that bunch.)

      The Sidhekin
      print "Just another Perl ${\(trickster and hacker)},"

Re: Funniest Variable/Subroutine names
by buckaduck (Chaplain) on Apr 05, 2002 at 13:10 UTC
    There were a few funny replies to a previous thread which might be relevant.


Re: Funniest Variable/Subroutine names
by Juerd (Abbot) on Apr 05, 2002 at 06:38 UTC



Re: Funniest Variable/Subroutine names
by thelenm (Vicar) on Apr 05, 2002 at 17:46 UTC
    I wrote a compiler for a class once with a guy who named temporary variables with prefixes and suffixes like
    char MrCharacter; int Intster; double MrsPlatypus;
    The funniest one (late at night, so I guess you had to be there) was 'DrChickenster'. I don't have any idea what that variable was supposed to do. :-)
Re: Funniest Variable/Subroutine names
by djohnston (Monk) on May 19, 2005 at 21:43 UTC
    After extracting a friend's Perl module, I got a little chuckle from his CHANGES file...
    cat CHANGES Everything's different now.
Re: Funniest Variable/Subroutine names
by perrin (Chancellor) on Apr 05, 2002 at 16:09 UTC
    I just name all of my subroutines do_it().
Re: Funniest Variable/Subroutine names
by smocc (Novice) on May 19, 2005 at 13:52 UTC
    One of my personal favorite things like this was in a C++ class while the teacher was constructing a sample linked list for the class. We decided to name the list object (we made a linked list class) Bob.
    It got interesting once we started to create members for Bob like:
    bob.getTail(); bob.getHead(); bob.InsertintoTail();
    Well I thought it was funny, anyway.
    As for me, I will occaisionally write stuff like
    blah de $blah or die "I canna do it, Cap'n!";
       ---------- "We shall peck them to death tomorrow, my dear."

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://156816]
Approved by rob_au
Front-paged by demerphq
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-25 10:52 GMT
Find Nodes?
    Voting Booth?

    No recent polls found