• (cs)

    Oooh... I get to be the first responent....

    Reminds my of a WTF I saw years ago.  (The original was in the funky script used by FileNet -- which is a WTF in itself -- so I'll translate into a more recognizable language)

    char cArnold = "|";
    for(i=0; i<len; ++i)
    {
         /// TO stuff with str[i]
        if (str[i] == cArnold)
              break;
    }

    So, why is that variable called "Arnold"?  After ponding it for some time (that idoim was used often in the code), I finally realized --- because it was the terminator.

  • (cs)

    Was that "true2" as in "true as well", or "too true"? Could things ever become "true" enough to become "false" due to "disbelief" or "astonishment"?

  • (cs)

     This is just the providing forward compatibility for boolean logic on quantum computers.

  • (unregistered)

    After ponding it for some time (that idoim was used often in the code), I finally realized --- because it was the terminator.

    Dude, that is great.  I'm gonna start using that one...LOL

  • (cs)

    Neat!  What's the next value after "true2"? "true4ever"? and what about "false2"?

  • (cs)

    i stumbled upon some code that had parameters that looked like this: p_sSaveSTR

    I assume the p_ stood for "parameter," the s prefix stood for string, and the STR was a backup for those who missed the s prefix.  The interesting thing was that each method basically only accepted one parameters, which would be a string in the format of "Phil|Scott|3025 Wentworth Ave" and then they'd use split to convert the string into the array, and use the array to populate a recordset.

    Got the job done, I guess.

  • (cs)

    you can clearly see that this person hasn't taken a class in basic programming to find out that strings take up space as it's longer, and data types such as boolean take up minimal space. 

    "true", "false"... that's the wtf.  then when you validate against that variable, you're doing a string comparision that's always more time consuming than a boolean or integer based comparison.

    The "true2" just reminds me of a vb guy click/dragging a button on the form, and leaving them "Button1" and "Button2".  Looks like hate code to me.  :)

  • (unregistered)

    That "Arnold" story reminded me of one from my very first programming job.  This was back in the Dark Days when people actually had to maintain MAKE files by hand.  I realized that because of the company standards we had adopted (one header for each module, base names must match, no circular references), it was trivial to write a program that scanned our source code and automatically built the MAKE file.

    So I built it. This was a tool for our own internal use, not production code, so I decided I could have some fun in it.

    In the data structures inside that program was a variable named GuzintaFile.  Someone asked me what that meant?  "Well," I said, "one file GOES INTO the compile of another...".

  • (cs) in reply to

    One time, in the very beginning of my career, in some FoxPro (xBase) production code I wrote while consulting for Wells Fargo,  I was having a little bit of fun with the code, and wrote something approximately like the following:

    Here's the p-code:

    1. get input from user
    2. find row in table based on index seek using user input
    3. display resultant row

    Now, FoxPro doesn't enforce type safety on variables, AND I made the horrible mistake of not validating the input before using it.   Also, the version of FoxPro I was using at the time had no notion of Debug vs Release, so when an error occurred, a pretty dialog box appeared showing the offending line of code that raised the error.

    In order to create a pun using the language, and because I'm was/am a sexist male pig, I chose to name my variable "blowjob".

    So the real code was something like:

    ...
    blowjob = GetInputValueFromForm(I forget the actual function name, but you get it)
    SELECT tablename
    SEEK blowjob
    ...

    Well, it was a numeric field and he typed some alpha characters in, and whammo, dialog box appears saying "An Error has occurred.   SEEK BLOWJOB".  Of course, the dialog only had an "OK" button on it, which added to the hilarity.

    Yes, I should have been fired, but the manager I reported to thought it was hilarious as the end user of this application was in fact quite uptight.


  • (cs) in reply to

    I think we've all gotten to the point where you had yet another counter/label/sub name and had to think up some name for it.

    My best (and I think it was quite common in those days) example comes from Turbo Basic (which needed no line numbers):

    ... code here ...
    Hell:
    ... more code here ...
    if ... something or other ... then goto hell

    For any dutch speaking people here, on my university x86 assembly project I used a label 'NaarDePomp'. Nice label to use in a loop ;)

    <FONT size=1>(For people who don't read dutch, literally it would say 'Walk to the (water)pump' which basically means 'get outta here' or 'goto hell'.)</FONT>

    Drak

  • (cs)

    Blue's message reminds me of this:

    http://digilander.libero.it/chiediloapippo/Engineering/iarchitect/stupid.htm

    The site is really a good laugh.

    Drak

  • (unregistered)

    This is hilarious.  

    I suppose "true" is equal to <FONT color=#0000ff>true</FONT>.  And when does "true2" get's used?

  • (unregistered) in reply to JamesCurran
    JamesCurran:

    So, why is that variable called "Arnold"?  After ponding it for some time (that idoim was used often in the code), I finally realized --- because it was the terminator.



    I've got a few like that.

    "Why is this program named betsy_ross?"

    "Don't you know?  That is the program you run to set the flags!"

    "Okay, why is this one rotisserie?"

    "That one takes a slice of the cylinder and rotates it to create a full cylinder!"

    "And this one named x-ray?"

    "It lets you view inside data files to see the variables."

    "Oh, now I'm getting it.  So this one, named executioner, it probably kills off other programs, right?"

    "No, that one just runs programs."

  • (cs)

    Well, since everyone like the "Arnold" story, let's me tell you about, My Nightmare, part II (Almost certainly the same programmer, possibly the same file)

    DocumentTypes[] Shakes = GetDocumentTypes();
    for(int i =0; i< Shakes.Length; ++i)
         ProcessDocumentType(Shakes[i]);

    So, why was an array of DocumentTypes called "Shakes"?  Anyone?  Bueller?

     

     

    Because a DocumentType was called a "DT" and the "DTs" ("Delirium tremens")(http://www.answers.com/topic/delirium-tremens) are the "Shakes"

  • (cs) in reply to Drak

    Drak, that was a funny site indeed!  The only example close to mine was the Autodesk tooltip with "idiot" in it... But still, quite funny!

  • (cs) in reply to

    :

    "Oh, now I'm getting it.  So this one, named executioner, it probably kills off other programs, right?"

    "No, that one just runs programs."

    PowerBuilder has a dialog box where you can build & test SQL statements.  The toolbar button which run (i.e., "executes") the query, has just an axe on it.  I'm told that during the beta, it was a bloody axe.

     

  • (cs) in reply to JamesCurran

    More proof that all developers have a morbid sense of humor.

    Drak

  • (cs) in reply to skicow

    skicow:
    Neat!  What's the next value after "true2"? "true4ever"? and what about "false2"?

    Truest?

    MoreTrue?

    True.Degree = Nth ??

    Power(True, MAX)      (See cArnold above)

  • (cs) in reply to JamesCurran
    JamesCurran:
    char cArnold = "|";
    for(i=0; i<len; ++i)
    {
         /// TO stuff with str[i]
        if (str[i] == cArnold)
              break;
    }

    So, why is that variable called "Arnold"? 

    Haha! I copy pasted this to a colleague, and the first words he said were 'What the f*ck?!?' without even knowing where this snippet came from [:O]

    Drak

  • (unregistered) in reply to JamesCurran
    JamesCurran:

    Oooh... I get to be the first responent....

    Reminds my of a WTF I saw years ago.  (The original was in the funky script used by FileNet -- which is a WTF in itself -- so I'll translate into a more recognizable language)

    char cArnold = "|";
    for(i=0; i<len; ++i)
    {
         /// TO stuff with str[i]
        if (str[i] == cArnold)
              break;
    }

    So, why is that variable called "Arnold"?  After ponding it for some time (that idoim was used often in the code), I finally realized --- because it was the terminator.

     

    Heh, that's great humour!  One should always be allowed a little fun while coding as long as it is not overdone!

  • (unregistered)

    True 2 - for all those times when True just isn't True enough.

    [N]

  • (unregistered) in reply to Phil Scott

    i stumbled upon some code that had parameters that looked like this: p_sSaveSTR

    I assume the p_ stood for "parameter," the s prefix stood for string, and the STR was a backup for those who missed the s prefix. 

    Prefix naming convention - now that's a WTF in itself.

    At least they didn't name it sStringSTR I guess [:)]
  • (unregistered) in reply to Drak
    Drak:

    For any dutch speaking people here, on my university x86 assembly project I used a label 'NaarDePomp'. Nice label to use in a loop ;)

    <FONT size=1>(For people who don't read dutch, literally it would say 'Walk to the (water)pump' which basically means 'get outta here' or 'goto hell'.)</FONT>

    Drak

    Another dutch funny variable name:

    in a project i had to use dutch variablenames, prefixes(3 letters) which indicate the type of variable (not very uncommon) so i had to store a receivingchannel for a message over a queue. in dutch, receivechannel = "OntvangstKanaal" added a prefix for a string type it would be strOntvangstKanaal which could be literally translated as shit-catch-channel

    After a reviewer of the customer waded through the code, i had to change it into another variablename

  • (unregistered)
    <font face="Courier New"><div style="font-size: 30pt">font-size: 30pt
      <div style="font-size: 0.7em">font-size: 0.7em
        <div style="font-size: 0.7em">font-size: 0.7em
          <div style="font-size: 0.7em">font-size: 0.7em
          </div>
        </div>
      </div>

    </div>
    </font>
    gets:

    font-size: 30pt
    font-size: 0.7em
    font-size: 0.7em
    font-size: 0.7em

    This is the cause of some strange font sizing problems in this topic. "em" refers to the parent font size and so nested use of e.g. "0.7em" causes shrinking of the text. (see used stylesheet in the source, classes txt1-txt5).

  • (unregistered) in reply to

    replace "topic" with "forum"

  • (unregistered) in reply to Blue

    I had a routine lying around that parsed a string in the form <verb> <arg=value> <arg=value> ... However, I needed to parse a similar string, one that didn't contain a verb. No problem really, all I needed to do was put a dummy verb in the string. That one I called... You guessed it, "dummy".

    Now, if the system found a string it couldn't parse, it would split out an error message and include the string in order to help understand the problem.

    Hilarity ensued when one day I accidentally passed an empty string to the parser, triggering a validation error that read something like:

    "Unable to parse string: dummy."

    Luckily I caught that one during testing. I can imagine customers might not have been entirely amused by the phrasing of that particular error message...


  • (unregistered)

    its obviously a fuzzy logic true.

  • (unregistered)

    son of a bitch.

  • (unregistered)

    i once worked with a guy who named a java interface IInterface. yep, two I's (the first one is to indicate that this is, indeed an interface (not a class). what to make of the remaining "Interface" part of the name is up to all of you.

  • (unregistered)

    true for a given value of true.....  I don't think this guy has found his true vocation yet, perhaps programming isn't for him and the career of a politician beckons.

  • (unregistered)

    <FONT face=Verdana color=black size=2>Working at a local university many, many years ago, I had my hand in a number of applications that were basically the same (e.g. keeping track of "things"), but were different enough to make the job interesting.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT>

    <FONT face=Verdana color=black size=2>The applications were developed on an old VAX system, and were executed by the users via the use of COM files (just like the MS-DOC BAT files).  Our naming convention at the time was to create three letter COM file names.  For example, the COM file that ran the telephone inventory system application was named TIS.COM.<o:p></o:p></FONT>

    <FONT face=Verdana color=black size=2>I wrote an application that kept track of student athlete information.  I must have been in a good mood the day I named that COM file because instead of using SAI.COM, I used JOX.COM...<o:p></o:p></FONT>

    <FONT face=Verdana color=black size=2>Get it?</FONT>

  • (unregistered) in reply to

    Fun in cool.  Cleverness (especially when it comes to variable names) for its own sake is dumb.  cArnold is dumb.

  • (cs) in reply to

    :
    <FONT face=Verdana color=black size=2>I used JOX.COM...</FONT>

    Some years ago, Someone I know write a simple database app for his friend's wife. It was called "Terry's Information Tracking System" --- with the appropriate abbreviation for the filename.

  • (unregistered) in reply to
    :
    true for a given value of true.....  I don't think this guy has found his true vocation yet, perhaps programming isn't for him and the career of a politician beckons.

    Perhaps programming is his true vocation, but politics is his true2 vocation.

  • (unregistered)

    true, true

  • (cs) in reply to Blue

    In the first paid programming job I ever did (I was actually a salesman for the store, but they needed a POS system and didn't want to pay for one), I was using Foxpro 2.5 for MS-DOS. As a typical snarky first-timer, I had some fun with the variable names: for example, the customer table was named SUCKERS, the employee table was SLAVES, and the error message window was S_O_L. The worst was a boolean variable which marked whether or not a customer was in the database; as a nod to both Lisp and the Jargon File, I dubbed it CUS_P.

  • (unregistered) in reply to
    [:P]very funny but great idea
    me too!

    Dude, that is great.  I'm gonna start using that one...LOL

    [/quote]

Leave a comment on “Unconventional Naming”

Log In or post as a guest

Replying to comment #:

« Return to Article