Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Funny variable names

Funny variable names

Scheduled Pinned Locked Moved The Lounge
question
59 Posts 46 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W wizardzz

    It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

    S Offline
    S Offline
    Stefan_Lang
    wrote on last edited by
    #29

    The necessity of adapting our huge code base slowly to an object oriented standard sometimes forces me to some obscure tricks to prevent having to change hundreds of references to functions or former simple data structures which now turned class. For instance when I created a class for a simple plane in 3D instead of the various types of existing structures already being used with a conglomerate of functions that worked on either of the types or just took the defining point coefficient arrays as arguments, I created a long list of constructors to accomodate each of the existing calling 'conventions'. For one particular constructor I had to be very creative though, as it was supposed to take two arguments, one of which would _always_ be a NULL value instead of the double* pointer usually passed for this argument. That 0 value would indicate a specific type of plane. (the case for non-NULL pointers was already covered by a constructor taking arguments of type CPoint and or CVector, both of which were defined to be implicitely created from a pointer to double - unfortunately that case would also create an ambiguity for the compiler if I just created another constructer with an argument type of double*). My solution was to not use double* as the argument type for that NULL pointer, but a pointer to an internal struct type named only_null_allowed_here. As the struct was privately declared, no one outside the class could ever create a variable of type only_null_allowed_here*, nor would a pointer variable of any type be accepted for this constructor. But writing '0' as an argument was perfectly acceptable. The point of this struct's name was the compiler error it would create for anyone trying to use an improperly typed pointer here: it would say something like: 'cannot access private member ... only_null_allowed here'

    1 Reply Last reply
    0
    • W wizardzz

      It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

      M Offline
      M Offline
      Mr Crisp
      wrote on last edited by
      #30

      Programming in the games industry a couple of amusing names came up. Well functions. Working on a flying game the cockpit recieved bullet damage with the function CockHoles()! Also you could change your flying helmet colour, decals etc the interface was called GUIhelmet. Chorkle!

      1 Reply Last reply
      0
      • P Pete OHanlon

        Not exactly funny, but I knew a developer who named a SocketException variable sex.

        I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

        Forgive your enemies - it messes with their heads

        My blog | My articles | MoXAML PowerToys | Onyx

        S Offline
        S Offline
        ScottM1
        wrote on last edited by
        #31

        But then what would he call his SQLExceptions?

        M 1 Reply Last reply
        0
        • W wizardzz

          It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

          N Offline
          N Offline
          NeverHeardOfMe
          wrote on last edited by
          #32

          OK, so my textboxes are called txtThis, labels lblThat etc... call me puerile, but I stil smile when naming my File Upload conrtols fuOther.... even had one simply called fu2 once :)

          1 Reply Last reply
          0
          • W wizardzz

            It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

            S Offline
            S Offline
            SpoonLord
            wrote on last edited by
            #33

            A project I used to work on had a module called 'cunit'. I was shocked when I first saw it.

            S 1 Reply Last reply
            0
            • L Lutoslaw

              wizardzz wrote:

              Does anyone else have any examples or funny stories to add?

              A poor design of a huge JAVA system caused some GUI errors happen only at the first run. As a quick fix I've added a

              bool virgin = true;

              field which was set to false after the initiation initialization...

              Greetings - Jacek

              H Offline
              H Offline
              hoernchenmeister
              wrote on last edited by
              #34

              That calls for a BlastHymen() setter ;)

              1 Reply Last reply
              0
              • W wizardzz

                It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

                B Offline
                B Offline
                BillW33
                wrote on last edited by
                #35

                One of my favorite silly variable names, written by a co-worker late at night, he named a boolean variable "JuatABool". :)

                Just because the code works, it doesn't mean that it is good code.

                1 Reply Last reply
                0
                • S SpoonLord

                  A project I used to work on had a module called 'cunit'. I was shocked when I first saw it.

                  S Offline
                  S Offline
                  Stefan_Lang
                  wrote on last edited by
                  #36

                  Well in your case it was just a matter of misreading, but in our application, some of the older code that used hungarian style names (i. e. names consisting of one or more abbreviated words) is consistently using the fragment 'anal' to denote something to do with 'analysis'. :doh:

                  J 1 Reply Last reply
                  0
                  • J Jason Christian

                    Worked on a system that had 2 character prefixes (depending on the file) followed by 4 char field names (same across files), so there were fun items like xxPORN (Purchase Order Number) all over the place.

                    J Offline
                    J Offline
                    Julian Nicholls
                    wrote on last edited by
                    #37

                    A lot of the active-low Power-on resets in the hardware I'm working on are called PORn too.

                    1 Reply Last reply
                    0
                    • W wizardzz

                      It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

                      B Offline
                      B Offline
                      BrainiacV
                      wrote on last edited by
                      #38

                      A variable name I'll never forget was for a conveyor system I worked on with a friend. He had this naming convention of 8 characters max, using the normal names you'd like for the variable divided by the number of words gave you the number of characters to take from each word to create the variable name. Ex. PRINT SPOOLER became PRINSPOO and (my favorite) SHIPPING STATION CONTROL LOOP became SHSTCOLO (pronounce sheh sta co low). But another buddy wnt the other direction creating long names. One of his SmallTalk objects was called FireHunterSeekerBlowBackTo. In high school the PALD-8 Assembler for the DEC PDP-8 only allowed 6 character names. So when it came to having a counter, we started with COUNT, removed the vowels for CNT, started adding them back giving CONT and (I'll let you figure out the logical conclusion here).

                      Psychosis at 10 Film at 11

                      1 Reply Last reply
                      0
                      • W wizardzz

                        It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

                        S Offline
                        S Offline
                        Sound Dude
                        wrote on last edited by
                        #39

                        I always use funny names for endless loops that wait for a condition then break. as in: const bool TheAZCardinalsStillSuck = true; while (TheAZCardinalsStillSuck) { ... } although the above example almost broke in 2008 - 2009, that code is secure this year.

                        1 Reply Last reply
                        0
                        • W wizardzz

                          It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

                          S Offline
                          S Offline
                          Slice24
                          wrote on last edited by
                          #40

                          A colleague of mine used a variable called tibet. Once he was finished with the variable, he was then able to free(tibet)

                          J 1 Reply Last reply
                          0
                          • W wizardzz

                            It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

                            A Offline
                            A Offline
                            Alan Burkhart
                            wrote on last edited by
                            #41

                            I downloaded some code a few years ago in which all the buttons in the interface had names like buttGo, buttSort, buttYes, buttNo...

                            Everybody SHUT UP until I finish my coffee...

                            1 Reply Last reply
                            0
                            • S Slice24

                              A colleague of mine used a variable called tibet. Once he was finished with the variable, he was then able to free(tibet)

                              J Offline
                              J Offline
                              Joan Dineiro
                              wrote on last edited by
                              #42

                              I had a collegue who had to write a credit app program. They named the database table CRAP and the columns in the table were all like CRAP_descript, CRAP_Type, etc. The boss made them rename everything. Bosses have no sense of humor

                              JodiYoda

                              1 Reply Last reply
                              0
                              • J jimgale

                                I had a coworker who named variables after Egyptian Gods - based on the code intention's personality (matching the gods). Ra, Hathor, Isis, Anubis. [Personally I think of Stargate with these names]. But she knew their histories well. It's harder to get any more abstract and removed from the real semantic meaning of the variable than that.

                                A Offline
                                A Offline
                                agolddog
                                wrote on last edited by
                                #43

                                Similarly, I once worked for a firm where the servers were all Vegas casinos: MandalayBay, Venetian, etc, and the developer machines were all games: CaribbeanStud, Blackjack, etc. Not such a bad thing in a small shop, but it took a while to get up to remembering who was what.

                                1 Reply Last reply
                                0
                                • W wizardzz

                                  It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

                                  S Offline
                                  S Offline
                                  Steve Poulter
                                  wrote on last edited by
                                  #44

                                  I once had to deal with some MS-Basic code written by a bored kid who amused himself with variable names including:

                                  dim eieio

                                  (Think Old MacDonald...)

                                  1 Reply Last reply
                                  0
                                  • S Stefan_Lang

                                    Well in your case it was just a matter of misreading, but in our application, some of the older code that used hungarian style names (i. e. names consisting of one or more abbreviated words) is consistently using the fragment 'anal' to denote something to do with 'analysis'. :doh:

                                    J Offline
                                    J Offline
                                    JasonPSage
                                    wrote on last edited by
                                    #45

                                    So..everything in that system .... ahhaha

                                    Know way too many languages... master of none!

                                    1 Reply Last reply
                                    0
                                    • W wizardzz

                                      It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

                                      T Offline
                                      T Offline
                                      Tony Wright UK
                                      wrote on last edited by
                                      #46

                                      My favourite is a variable to hold the current time - SecsNow.

                                      1 Reply Last reply
                                      0
                                      • W wizardzz

                                        It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

                                        R Offline
                                        R Offline
                                        Richard Hylton
                                        wrote on last edited by
                                        #47

                                        Not sure this is funny. Quite sure that it amused my small mind. I was working on a Purchase Order project and somehow variables ended up being named c3PO and extensions of that name.

                                        RHYlton

                                        1 Reply Last reply
                                        0
                                        • W wizardzz

                                          It just happened to me now. Following a legacy naming convention my class had an object named pipTable, then I added feedTable, and now poolTable. I know it's not really funny, but when I'm coding and see variable names form something meaningful, it makes me :). I know this has happened to me many times before, occasionally causing me to reconsider the convention when the name becomes R or even X rated. Does anyone else have any examples or funny stories to add?

                                          P Offline
                                          P Offline
                                          programmervb netc
                                          wrote on last edited by
                                          #48

                                          yorn What is that you ask...... Yes or No....dumb We also have a set of classes we call the blue classes because they all start with smrf. Bad thing is the little smurfs keep multiplying. Humble Programmer

                                          W 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups