• John Doe (unregistered)

    I was thinking exactly the same ("What was I thinking), when I saw my code, written last week, 5 minutes ago.

    if (key exists in dictionary) {
      do stuff
    } else {
      get item from dictionary (!)
      do stuff
    }
    

    Anyways, it is some kind of chicken-and-egg problem for which I apparently haven't found a good solution...

  • (cs)

    ... that's just self-documenting code at its finest!

  • guy (unregistered)

    They where going to proofread, but they forger were they where.

  • 0x15e (unregistered)

    This literally made me laugh out loud. I've seen and even left comments like that ... usually following an extended multi-hour debugging session in the middle of the night. They usually don't stay there past the next time I see them, but it sure makes me feel better to leave them in the first place.

    I can completely feel where that guy was coming from there.

  • grammar-man (unregistered)

    The WTF is that it should be "fewer" than 20 pages. Programmers can't speak English properly!

  • (cs)

    I inherited a project once which had an agent called "UpdateTheStupidStatus" (with all the wonderful variable names like 'theDocument' and 'theTable'...but that's the topic of another rant.) I'm not sure if he was updating the status which happened to appear to be stupid to him or like an archive bit, setting the status to "Stupid." Only his hairdresser knows. Oh, wait...he's bald.

  • (cs)

    programming 8051 microcontrollers

    That's a lot of microcontrollers :)

  • Sgt. Preston (unregistered) in reply to guy
    guy:
    They where going to proofread, but they forger were they where.
    I haven't the slightest clue what this was supposed to mean.
  • (cs)

    I wonder if the curse word was ****'ed out in the actual comment.

  • (cs) in reply to Sgt. Preston
    Sgt. Preston:
    guy:
    They where going to proofread, but they forger were they where.
    I haven't the slightest clue what this was supposed to mean.
    Read the title of this WTF (What Where We Thinking?)
  • (cs)

    Short and to the point. The perfect comment.

  • Sgt. Preston (unregistered) in reply to akatherder
    akatherder:
    Sgt. Preston:
    guy:
    They where going to proofread, but they forger were they where.
    I haven't the slightest clue what this was supposed to mean.
    Read the title of this WTF (What Where We Thinking?)
    I grok the "were"/"where" thing, but "they forger"? Still mystified.
  • Martin V (unregistered)

    Whats wrong with this?

    DoNotEjectInInactiveMode EQU StatusFlags.7

  • Johnnie Cochran (unregistered)

    If it is not set, you mustn't eject!

  • Sgt. Preston (unregistered) in reply to Sgt. Preston
    Sgt. Preston:
    akatherder:
    Sgt. Preston:
    guy:
    They where going to proofread, but they forger were they where.
    I haven't the slightest clue what this was supposed to mean.
    Read the title of this WTF (What Where We Thinking?)
    I grok the "were"/"where" thing, but "they forger"? Still mystified.
    Okay, I gather it's a typo. "Forger" should have been "forgot".

    Lame pun + bad typing = failed humour

  • SpellChecker (unregistered) in reply to Sgt. Preston

    They WERE going to proofread but they FORGET (GOT) where they WERE.

  • cyberguy (unregistered) in reply to Sgt. Preston

    Ok, what guy was trying to do was make a funny by placing mis-spellings and grammatical errors throughout the entire line of his post. Come on, get with it.

  • Ben (unregistered)
    Comment held for moderation.
  • (cs) in reply to Ben
    Ben:
    That's NOTHING. What was I thinking ?!?

    [image] Keep an eye open for my stolen truck, please!

    What a beautiful truck! I'm sorry to hear that it was stolen. Good luck with that, it sounds like you've given the police some pretty decent leads already!

  • (cs) in reply to Ben
    Ben:
    That's NOTHING. What was I thinking ?!?

    [image] Keep an eye open for my stolen truck, please!

    you can always hope it was Overhaulin!

  • (cs)

    The WTF is in the "while emulating the exact behaviour of the previous hardware" ... Or at least, that's a wtf I have encountered many times. How many times has the requirement been to make it work "just like it did before" when the way it was before was the wrong way to do something? The smart clients are the ones who actually listen when I tell them that they don't really want to do that.

  • Gedoon (unregistered) in reply to grammar-man

    That's because in *NIX it's | less, not | fewer..

  • Drew (unregistered) in reply to Sgt. Preston
    Sgt. Preston:
    Sgt. Preston:
    akatherder:
    Sgt. Preston:
    guy:
    They where going to proofread, but they forger were they where.
    I haven't the slightest clue what this was supposed to mean.
    Read the title of this WTF (What Where We Thinking?)
    I grok the "were"/"where" thing, but "they forger"? Still mystified.
    Okay, I gather it's a typo. "Forger" should have been "forgot".

    Lame pun + bad typing = failed humour

    Probably an intentional stab at Alex for relying on a spell-checker. Those are all dumb spelling mistakes that would make it past spell-check.

  • Simetrical (unregistered)

    TRWTF is using an image with no alt text instead of styled text to display simple fixed-width styled code.

  • Sven (unregistered)

    "new jerry 29.8.95"

    Jerry Garcia died August 9, 1995 (9.8.95, to use that format). Somehow related?

  • (cs) in reply to Sven
    Sven:
    "new jerry 29.8.95"

    Jerry Garcia died August 9, 1995 (9.8.95, to use that format). Somehow related?

    The new Jerry is no longer grateful.
  • barfman (unregistered)

    heh, A buddy of mine who used to work at the company I work for was telling me a story quite a long time ago, and this story made me think of it...

    he worked for a company a while back that was doing video games for kids. I think one of them was for Disney. Anyways, another guy he worked with left the name of a button control as CantChangeThisYellowFuckingButton. Who knows what the hell was happening that caused such a naming convention... But what happened afterwards is worth its weight in gold. The application ended up throwing out an exception to the end users (somehow making it through to production!) with this wonderful bit... "CantChangeThisYellowFuckingButton".

    Doubtful that Disney (or whoever it was) was too happy about that...

    (hopefully the guy reads this and posts the more accurate rendition of the story... --telephone game, you lose some of the tasty details.. funny stuff tho, imho. And a good reason why it's best to leave the dirty words for the comments section, and even better not to do it at all.)

  • (cs) in reply to barfman
    barfman:
    heh, A buddy of mine who used to work at the company I work for was telling me a story quite a long time ago, and this story made me think of it...

    he worked for a company a while back that was doing video games for kids. I think one of them was for Disney. Anyways, another guy he worked with left the name of a button control as CantChangeThisYellowFuckingButton. Who knows what the hell was happening that caused such a naming convention... But what happened afterwards is worth its weight in gold. The application ended up throwing out an exception to the end users (somehow making it through to production!) with this wonderful bit... "CantChangeThisYellowFuckingButton".

    Doubtful that Disney (or whoever it was) was too happy about that...

    (hopefully the guy reads this and posts the more accurate rendition of the story... --telephone game, you lose some of the tasty details.. funny stuff tho, imho. And a good reason why it's best to leave the dirty words for the comments section, and even better not to do it at all.)

    Well I know a game company where they were creating a game for kids based on a popular (around here) comic strip. One of the mini-games was to get rid of a woman's cloths somehow, down to her bra & panties.

    Being the naughty perverts that we all are, the designer, programmers and artist decided to go all the way down, with graphics for the naked woman and each piece of cloth, and just block the game at the correct point. What had to happen, happened. During Q&A, some tester stumbled on a bug (or was it a forgotten backdoor/cheat code?) where you could undress the poor lady completely.

    Let it be said neither the client nor the company's boss were happy about that...

  • Old Wolf (unregistered) in reply to Denis Troller
    Being the naughty perverts that we all are, the designer, programmers and artist decided to go all the way down, with graphics for the naked woman and each piece of cloth, and just block the game at the correct point. What had to happen, happened. During Q&A, some tester stumbled on a bug (or was it a forgotten backdoor/cheat code?) where you could undress the poor lady completely.
    My old IBM XT had a strip poker game, but the images used were just stored as image files in the game directory (girl01.pcx, girl02.pcx, girl03.pcx, that sort of thing). Re-numbering them made the game a whole lot more fun :D
  • Nick (unregistered) in reply to Ben
    Comment held for moderation.
  • Hans (unregistered) in reply to Martin V
    Martin V:
    Whats wrong with this?

    DoNotEjectInInactiveMode EQU StatusFlags.7

    It is an improvement over the original, although I get the feeling there is probably much more to it and the lack of ejection is just one of its many side effects.

    However, can I raise one issue with your solution: I hate this kind of negative variable naming. Sure, it looks nice at this point, but soon enough you will be going

    if (!DoNotEjectInInactiveMode) { ... }

    ...and that kind of double negative logic is confusing at best. Lately I have found myself trying to remove all forms of negativity from my source code (only where it makes sense of course), changing negative variable and function names, and replacing things like

    if (!condition) { a; } else { b; }

    by

    if (condition) { b; } else { a; }

    etc. And I find it does help with readability and maintainability.

    Of course if you are a 'leet coder you won't not need no such anti-negative ideas...

  • Matthew Watson (unregistered) in reply to grammar-man
    grammar-man:
    The WTF is that it should be "fewer" than 20 pages. Programmers can't speak English properly!

    Don't you mean "Programmers cannot properly speak English"?

  • Asd (unregistered) in reply to grammar-man
    grammar-man:
    The WTF is that it should be "fewer" than 20 pages. Programmers can't speak English properly!

    Oh no! They didn't follow nonsensical and incorrect prescriptivist grammarian advice! The world is doomed.

  • (cs) in reply to SurfMan
    SurfMan:
    programming 8051 microcontrollers

    That's a lot of microcontrollers :)

    Oh yeah? Well, try programming 68302 processors. I've done that, and lived to tell about it!

    Bah!

  • jon (unregistered) in reply to grammar-man
    grammar-man:
    The WTF is that it should be "fewer" than 20 pages. Programmers can't speak English properly!

    He wasn't speaking.

  • Sgt. Preston (unregistered) in reply to Sven
    Sven:
    "new jerry 29.8.95"

    Jerry Garcia died August 9, 1995 (9.8.95, to use that format). Somehow related?

    Reminds me of my all-time favourite newspaper headline, appearing on the occasion of Jerry Garcia's death:

    Head Dead Head Dead

    Wish I could remember the publication.

  • (cs) in reply to RogerC

    Thats nothing, try programming 65C816 microprocessors!

  • Frenchier than thou (unregistered) in reply to barfman
    barfman:
    heh, A buddy of mine who used to work at the company I work for was telling me a story quite a long time ago, and this story made me think of it...

    he worked for a company a while back that was doing video games for kids. I think one of them was for Disney. Anyways, another guy he worked with left the name of a button control as CantChangeThisYellowFuckingButton. Who knows what the hell was happening that caused such a naming convention... But what happened afterwards is worth its weight in gold. The application ended up throwing out an exception to the end users (somehow making it through to production!) with this wonderful bit... "CantChangeThisYellowFuckingButton".

    Doubtful that Disney (or whoever it was) was too happy about that...

    (hopefully the guy reads this and posts the more accurate rendition of the story... --telephone game, you lose some of the tasty details.. funny stuff tho, imho. And a good reason why it's best to leave the dirty words for the comments section, and even better not to do it at all.)

    Once, long ago, I had this web application which was mostly a website with some lists and a nice "what's up" box on the front page. The What's Up was a nifty scrolling javascript which was generated on the fly when the editor added/removed a notice in the business side of the site.

    After testing, we sent the app to the public-facing server and by error the javascript for the test "What's Up" made it with the rest. Suffice it to say that ever since, nobody in the dev team ever included profanity (or sillyness) in their test sets again...

  • sir grammar (unregistered) in reply to Matthew Watson
    Matthew Watson:
    grammar-man:
    The WTF is that it should be "fewer" than 20 pages. Programmers can't speak English properly!

    Don't you mean "Programmers cannot properly speak English"?

    Ah, but don't you mean: "Most programmers cannot speak proper English"?

  • (cs) in reply to John Doe

    Sometimes unfortunate names are used and the programmer doesn't realize it's a bad name until later. In one program I maintained, the original programmer had a variable that held the transaction count. There are many ways to shorten "count", and most of them are polite. The original programmer hadn't noticed that what he typed wasn't polite until I pointed it out. Worst part: it was COBOL, so he didn't have to shorten it at all. He could have called it "TRANSACTION-COUNT".

  • Camden (unregistered) in reply to newfweiler

    Similarly, I worked on a program where a previous coder had needed a variable for the exact sigma value. Of course now you could use "ExactSigma" or "SigmaExact". That coder must have been trying for the latter, but it being some early flavor of Fortran she was limited to six characters, and all caps at that, so years later I was left to wonder at the variable named "SEXACT".

  • Me2 (unregistered) in reply to Matthew Watson

    Don't you mean "Programmers cannot properly speak English"?

    No - that implies it is improper for programmers to English, whereas we all know that programming should alwasy be done in English. Of course, if its not your native language, this might lead to meaningless comments, but WTF.

    captcha: Yeah, really!

  • Nelle (unregistered)
    Comment held for moderation.
  • Fermat (unregistered)

    I have a truly marvelous proof of the need for ExtraStupidFlag which this comment box is too small to contain.

  • (cs) in reply to Spacecoyote
    Spacecoyote:
    Thats nothing, try programming 65C816 microprocessors!

    I feel so inadequate; I've only programmed 6502 microprocessors!

  • ROb G (unregistered) in reply to Sgt. Preston

    Possibly "forger" is a typo for forget. Just possibly.

  • Rob G (unregistered)

    Brings back fond memories of trawling the source code for an old Text UI library called C-Scape, and encountering the comment "A squid eating dough in a polyethylene bag is vast and bulbous, got me?"

    (Odder still, I actually recognised the quote from Captain Beefheart's Trout Mask Replica album, but still had no idea how it applied to the code in question).

  • Minos (unregistered) in reply to Sgt. Preston
    Sgt. Preston:
    Sven:
    "new jerry 29.8.95"

    Jerry Garcia died August 9, 1995 (9.8.95, to use that format). Somehow related?

    Reminds me of my all-time favourite newspaper headline, appearing on the occasion of Jerry Garcia's death:

    Head Dead Head Dead

    Wish I could remember the publication.

    I believe that was in The Onion.

  • 855 (unregistered)
    Comment held for moderation.

Leave a comment on “What Where We Thinking?”

Log In or post as a guest

Replying to comment #:

« Return to Article