• Henry (unregistered)

    adds a whole new dimension to sloppy seconds

  • VAleks (unregistered)

    Obfuscation by distraction... A whole new method...

  • SchizoDuckie (unregistered)

    People that use function names like this in production code should be shot, killed, shot again and then hung...

    function names like checkThatGoDaimnThing() aren't just enough for his frustration??

  • Anonononymous (unregistered)

    The head bug is Sally doesn't give any on the first date. So you have to call her again.

  • htg (unregistered)

    Must ... kill ... programmer ...

    I'm assuming of course that the real code has a lovely descriptive comment block before it saying what it does and thus it is merely amusing rather than retarded.

    captcha: 1337

  • (cs)

    In my company, in depatament I work, there is like 20+ men hired and almost no woman. I think that adopting this naming convention would make our work maybe not more efficient, but at least more enjoyable.

    No quack for 'head bug'.

    Cheers, Hob.

  • deroby (unregistered) in reply to htg

    LOL, too bad he didn't overload so we'd have 'chromosome' instead of 'int', would have made it the most 'feminine-oriented-code' ever =)

    We had a colleague like that too (many, many, many years ago). He preferred things like the 'Hahaah()' and the 'Hihi()' function, still, this tops it, big-time.

  • (cs)

    OK guys, I'm gonna call Sally at 551-8932.

    Any tips on what to say to a girl? I'm a little nervous...I mean, I've seen one before, but I didn't talk to it.

  • Anonymous (unregistered) in reply to Anonononymous

    Best... Comment... Ever!

    Captcha: jiggles. I wonder if Sally does?

  • Ken (unregistered)

    Remember Jenny defaults to 867-5309

  • McCorvey (unregistered) in reply to Hobson
    Hobson:
    In my company, in depatament I work, there is like 20+ men hired and almost no woman. I think that adopting this naming convention would make our work maybe not more efficient, but at least more enjoyable.

    Another WTF might be the quality of grammar and spelling demonstrated above.

    captcha - stfu

  • (cs)

    The first C job I ever had was on a system that had originally been written in FORTRAN, and while it had been re-written rather than ported, much of the "utility" library had been ported. Our convention was that every function in a library had a name that contained a two letter prefix with the library name. When they were using FORTRAN, there was a pesky little limitation on the length of subroutine names, so the ones that had been directly ported all had names like "ut272" while the ones that had been written in C had names like "ut_point_in_polygon". So every now and then a developer (sometimes me, sometimes somebody else) would get annoyed at having to remember what "ut272" meant and would go on a search and destroy changing all the names of a given function, and then trimphantly announcing to the whole company what the new method name was. It was usually greeted by a round of applause except for the 4 or 5 developers left over from when it was in FORTRAN who had grown accustomed to the old names.

    I remember the day when I triumphantly removed the last vestige of Fortran from that program - the developers had wanted a VMS stack trace on various error conditions, so they had a "utNNN" function that was written in Fortran that did an intentional division by zero. That seemed stupid to me, and besides, it was in Fortran and I hated Fortran. So I attacked the "Orange Wall" and found sure enough there was a syscall I could make in C that would give me a stack trace without resorting to Fortran. I was so proud.

  • wiregoat (unregistered)

    You have to respect that it repeats until Trisha is done. Lucky Trisha.

  • (cs)

    Totally bad of him to use non-meaningful variable names x and y.

    And so, Sally can wait.

  • Fred Flintstone (unregistered) in reply to Earl Purple
    Earl Purple:
    Totally bad of him to use non-meaningful variable names x and y.

    And so, Sally can wait.

    Chromosomes, dude.

  • Rick (unregistered)

    I used to work with a guy named Shiv. All his variables, through his code, would be variants of his name: $Shiv1, $Shiv2, $Shiv3, $ShivTest, etc. Made future troubleshooting nearly impossible!

  • (cs)

    Function name like that are common in code obfuscation contests.

  • david (unregistered)

    Heh ... a company I worked for once had a religious publishing division ... and some of their programmers used religious references for goto tags.

    Fatal error routing: HELL

    Normal end of job routine: HEAVEN

    A co-worker told me about a another programmer he knew that LOVED trees ... so all his tags, variables, etc, were named after trees.

  • (unregistered) in reply to Stupidumb

    "I've seen one before, but I didn't talk to it."

    You forgot to inflate her first?

  • Tigress (unregistered)

    One just have to wonder what the function Paula does.

  • DanixDefcon5 (unregistered) in reply to david
    david:
    Heh ... a company I worked for once had a religious publishing division ... and some of their programmers used religious references for goto tags.

    Fatal error routing: HELL

    Normal end of job routine: HEAVEN

    A co-worker told me about a another programmer he knew that LOVED trees ... so all his tags, variables, etc, were named after trees.

    Ahh... Back in the college days, most of my variable naming schemas were made after movies, books or things like that. Specifically, I remember something like

    kwisatz_haderach.add(shai_hulud);

    or something like that. One of my friends told me that of course he would be the Kwisatz Haderach after ingesting that much spice!!!

    Or calling all my matrix instances "neo", "trinity", "morpheus" ...

    Of course, I have since moved on to real descriptive variable names, however some algorithmic code still bears some funny references...

  • Si (unregistered)

    He'd better pray to Demeter that Trisha doesn't discover all those calls to his harem while she's busy.

  • Chris (unregistered) in reply to McCorvey
    McCorvey:
    Hobson:
    In my company, in depatament I work, there is like 20+ men hired and almost no woman. I think that adopting this naming convention would make our work maybe not more efficient, but at least more enjoyable.

    Another WTF might be the quality of grammar and spelling demonstrated above.

    captcha - stfu

    Well, that's because it's Borat.

    Chris Mattern

  • nobody (unregistered)

    I think he gave the code VD.

  • (cs) in reply to Earl Purple
    Earl Purple:
    And so, Sally can wait.
    She knows it's too late
  • Jim (unregistered) in reply to Cirdan
    Cirdan:
    Earl Purple:
    And so, Sally can wait.
    She knows it's too late
    As we're walking on by
  • ewise (unregistered)

    Ouch, this WTF and some of the comments pain me right here...

    :: thumps chest ::

    Code is complex. We, as programmers, should use every single character to good effect to make understanding our code easier.

    This includes whitespace, comments, names, everything! To throw away your names, effectively, by using non-relevant naming schemes, is a CRIME! A crime, I say!

  • me (unregistered) in reply to Jim
    Jim:
    Cirdan:
    Earl Purple:
    And so, Sally can wait.
    She knows it's too late
    As we're walking on by
    Her soul slides away
  • (cs) in reply to Ken
    Ken:
    Remember Jenny defaults to 867-5309

    Hehe, you beat me to it.

    A funny aside to this though... I used to work with a guy who had the number 867-5309. He didn't use that phone anymore, and kept the number around for novelty purposes.

    He kept an answering machine attached to it.

    Every so often, he'd bring in the recordings from the machine so that we could all have a laugh at the drunken calls that he got.

  • RobertJohnK (unregistered) in reply to DanixDefcon5
    DanixDefcon5:
    Or calling all my matrix instances "neo", "trinity", "morpheus" ...

    I once did that for a listener socket instance. It handled most of it's stuff internally but one or two calls on it where necessary from main.cpp so I eventually just named it lisa and didn't care. Eventually there were two of those sockets so the second became bart.

    Indeed I usually avoid such nonsense these days.

    Captcha: foxtrot. I was rather thinking of Mambo 5.

  • (cs) in reply to Tigress
    Tigress:
    One just have to wonder what the function Paula does.

    Is it not obvious?

    return "brillant";
  • Cratig (unregistered) in reply to Anonononymous
    Anonononymous:
    The head bug is Sally doesn't give any on the first date. So you have to call her again.

    PMSL

    captcha: null

    mmmm

  • David Green (unregistered)

    Someone's been watching too much Scrubs

  • dan s. (unregistered) in reply to SchizoDuckie
    SchizoDuckie:
    People that use function names like this in production code should be shot, killed, shot again and then hung...

    I guess all this might stem from him actually being hung

  • Dave (unregistered) in reply to Rick
    Rick:
    I used to work with a guy named Shiv. All his variables, through his code, would be variants of his name: $Shiv1, $Shiv2, $Shiv3, $ShivTest, etc. Made future troubleshooting nearly impossible!

    I used to work with a guy who would call all his variables a1; a2; a3 etc., then have great globs of code along the lines of: a1 = a1 + 1; a2 = a2 + 1; a3 = a3 + 1; ... etc.

    I tried to introduce him to such modern concepts as meaningful names and even arrays, but it was no use!

  • Jim Lang (unregistered)

    So, if I wanted to date Sally, I'd have to get past Trish? Or can I call them both?
    No, wait, Cassie & Beth look like they're much more fun. Ah, my wife caught me in a fatal exception. She used a Shiv. "goto HELL." Thank God it's not Cobol

  • (cs) in reply to un.sined
    un.sined:
    Ken:
    Remember Jenny defaults to 867-5309

    Hehe, you beat me to it.

    A funny aside to this though... I used to work with a guy who had the number 867-5309. He didn't use that phone anymore, and kept the number around for novelty purposes.

    He kept an answering machine attached to it.

    Every so often, he'd bring in the recordings from the machine so that we could all have a laugh at the drunken calls that he got.

    Hmm... I actually have that song somewhere in my old cassette collection ...

  • PC Paul (unregistered) in reply to VAleks
    VAleks:
    Obfuscation by distraction... A whole new method...

    I wish... Have a look at Roedy Green's 'How to write unmaintainable code' essay.

    ============= 17. Names From Mathematics

    Choose variable names that masquerade as mathematical operators, e.g.:

    openParen = ( slash + asterix ) / equals;
    1. Bedazzling Names

    Choose variable names with irrelevant emotional connotation. e.g.:

    marypoppins = ( superman + starship ) / god;

    ============

    Captcha: genius

    Recognition at last!

  • (cs)

    (Hmm, am I missing something or is there no longer any way to quote the original post without manually copy-pasting?)

          return TrishaEnd( y );
    

    Check out that end on Trisha... is she wearing a thong?

  • Corporate Cog (unregistered)

    Worst wtf in a long time. Malicious intent is lacking in most wtfs.

  • greywar (unregistered) in reply to Dave
    Dave:
    Rick:
    I used to work with a guy named Shiv. All his variables, through his code, would be variants of his name: $Shiv1, $Shiv2, $Shiv3, $ShivTest, etc. Made future troubleshooting nearly impossible!

    I used to work with a guy who would call all his variables a1; a2; a3 etc., then have great globs of code along the lines of: a1 = a1 + 1; a2 = a2 + 1; a3 = a3 + 1; ... etc.

    I tried to introduce him to such modern concepts as meaningful names and even arrays, but it was no use!

    I'm attending the local college to actually get a degree in what I have been doing for over a decade. The teachers ingrain this behavior. They teach these poor students habits which will harm them long term.

    Making a struct called video, then doing this: video Videos[5];

    one character difference. arrgggh. ALL the variable names are a1, a2, etc. 300 lines of code-with one brief comment at the top of the function.

    Going to the classes for the credit is painful. I want to pour bleech into my eyes half the time.

  • (cs)

    Marginally better then function names like:

    X XX XXX XXXX XXXXX XXXXXX

  • patric (unregistered)

    Reminds me of an application I was working on which had this class to draw a certain kind of diagrams. The class was called ElseDiagram. For the longest time I thought the name of the class meant that the diagrams were not the standard diagrams, instead something else. It turned out that the programmer who developed the class was named Else, which is a common Norwegian female name.

  • foo (unregistered) in reply to elbaz
    elbaz:
    Marginally better then function names like:

    X XX XXX XXXX XXXXX XXXXXX

    Even those names are much better than: OOOOOOOO OOOOOOO0 OOOOOO0O OOOOOO00 OOOOO0OO OOOOO0O0 OOOOO00O OOOOO000
  • (cs) in reply to greywar
    greywar:
    video Videos[5];
    That annoys me almost as much as

    int myInt;

    That's REAL descriptive, thanks.

  • RobertJohnK (unregistered) in reply to elbaz

    I also remember code with wonderful variable names (within one iteration) of start, _start, __start, dstart, _dstart, __dstart and several more like those for end. And those were just "days"m obviously minutes, hours and week boundaries were named likewise. Still hurts my eyes.

  • (cs) in reply to Fred Flintstone
    Fred Flintstone:
    Earl Purple:
    Totally bad of him to use non-meaningful variable names x and y.

    And so, Sally can wait.

    Chromosomes, dude.

    If Sally has an X and Y chromosome, then I don't want any! (That's not relly Sally, it's Sammy)

  • dolo54 (unregistered)

    Well I generally try to make my names meaningful, however occasionally I do throw in the odd joke here and there. For instance I have something called a wordTextField... in my code this is abbreviated to "wTF" of course!

  • KattMan (unregistered) in reply to Saladin
    Saladin:
    greywar:
    video Videos[5];
    That annoys me almost as much as

    int myInt;

    That's REAL descriptive, thanks.

    I honestly do not see the problem with the video Videos[5] as it shows you that a video is a single instance but the plural is a collection or list of some sort. I agree it would be helpful to know which of these types of objects it was, but still it is descriptive without being verbose.

    As for the int myInt;
    That is a problem only if this int should be for something particular. If it is used later as simply a counter for iteration then I see no reason why you need a better name, of course int myCounter; might have been a better choice.

  • (cs) in reply to KattMan
    KattMan:
    As for the int myInt; That is a problem only if this int should be for something particular. If it is used later as simply a counter for iteration then I see no reason why you need a better name, of course int myCounter; might have been a better choice.
    I agree with that, my main beef is how so many instructors teach that as the "fallback" name to give anything if you don't know what to name it. Surely /something/ that at least gives some sort of insight into its purpose would be better than "myInt," if only to help readability and make things easier for a new reader to figure out. I mean, why "my" anything? If you're going for simple counters, just use "index" or "i" or something, not "myIndex" or whatever. You're the programmer, of COURSE it's "yours."

Leave a comment on “Little Black Book”

Log In or post as a guest

Replying to comment #:

« Return to Article