• biffby9 (unregistered)

    How utterly insane! Nothing like getting hung up on your pet way of doing things and making life both more complicated and worse than miserable for everyone else.

  • eyescream (unregistered)

    Oh my $deity.

    I'm speechless. Epic fail. A great story, I had hard time to remain calm at work. Wow.

  • dbugger (cs)

    priceless

  • ThomsonsPier (cs) in reply to dbugger
    dbugger:
    priceless
    And cents-less.
  • alter3d (unregistered)

    This is one of the best WTFs in a while. Truly epic (epic fail, that is).

  • snoofle (cs) in reply to ThomsonsPier
    ThomsonsPier:
    dbugger:
    priceless
    And cents-less.
    Blue color, now ^^^^^^^^^^^^^^^^^^^^^^^^^^
  • anonym (unregistered)

    wtf

  • InsanityCubed (unregistered) in reply to ThomsonsPier

    That's "Senseless" thank you.!

  • hikari (cs)

    How someone can so utterly fail at writing something in ASM, yet still managing to create a program which actually ran - for varying degrees of ran - is quite incredible.

    I think that has to be the biggest wtf I have ever seen.

  • snoofle (cs) in reply to hikari
    hikari:
    How someone can so utterly fail at writing something in ASM, yet still managing to create a program which actually ran - for varying degrees of ran - is quite incredible.

    I think that has to be the biggest wtf I have ever seen.

    We've all seen this before. Someone doesn't know how to do things in language x and so rather than ask someone how to do it, they rig some horror that makes sense to them just to get it to work.

    Still, awesome story!

  • Zeal_ (unregistered)

    How on earth could he possibly go on to write "SENSE" when he clearly ment "PENCE"

  • DN (unregistered)

    This is the worst WTF I've ever seen on this site (and I've been here about 5 years)!

  • Jason McMullan (unregistered)

    I've seen this before in IBM Mainframe programmers.

    They were told that 'tables are fast', and 'the CPU is slow', so they try to use tables for everything that would bog up the CPU.

    These guidelines work well for things like logarithms, sin/cos tables, etc. The problem lies when a junior developer gets told what to do without why it's done.

    However, this is the most extreme example of cargo-cult thinking I've ever heard of.

    What's cargo-cult? Look it up on Wikipedia. Fascinating stuff.

  • emurphy (cs)

    But where's the part where Kent's predecessor turned out to be the CEO's nephew, and Kent got fired for showing him up?

  • Old Coder (unregistered) in reply to Zeal_
    Zeal_:
    How on earth could he possibly go on to write "SENSE" when he clearly ment "PENCE"
    Because he couldn't spell "cents", of course.
  • amischiefr (cs)

    "That's right, all 100,000 (0-999 dollars, 0-99 cents) entries in the array were entered manually by the previous developer."

    Wow, just wow. I can't even imagine sitting there typing in that many entries. Must have been 6 months of job security.

  • halcyon1234 (cs)
    the hardware wasn't powerful enough for a thousands digit.
    I was blowing my nose when I read this line, and I burst out laughing. As a result I think I blew a synapses and gave myself brain damage.

    The good news is now at least some of my future code might be featured here.

  • dpm (cs) in reply to halcyon1234
    the hardware wasn't powerful enough for a thousands digit.
    That's almost true. Think about how much room the table would require --- one hundred times over, remember --- if it was ten times bigger to accomodate prices up to $9,999.99. The original programmer was actually being honest, from his point of view.
  • Leeroy Jenkins! (unregistered) in reply to halcyon1234

    Halcyon1234, it's a good thing I'd already swallowed my coffee before reading your response or it'd have been all over my keyboard and monitor!

  • jaspax (cs)

    Truly, this is an epic WTF. The worst I've seen in a very long time. But happy ending!

  • cparker (cs) in reply to jaspax
    jaspax:
    Truly, this is an epic WTF. The worst I've seen in a very long time. But happy ending!
    Awwwriiiight! Giggity gig!
  • Ape Monkey (unregistered) in reply to amischiefr
    amischiefr:
    "That's right, all 100,000 (0-999 dollars, 0-99 cents) entries in the array were entered manually by the previous developer."

    Wow, just wow. I can't even imagine sitting there typing in that many entries. Must have been 6 months of job security.

    Hmm, that would be, assuming 21 days of work per month, approximately 800 numbers per day, or (assuming 8hrs/day, rounded up) 2 numbers per minute. A bit too well paid, then.

  • scruffy (unregistered)

    This reminds me of an ancient machine known as the CADET, which earned the backronym "Can't Add, Doesn't Even Try".

    That machine did actually use tables for addition! It sounds like the original developer here got hung up on that kind of thinking.

    Nice to see a WTF end with the WTF being fixed!

  • Marc B (unregistered)

    My hardware is not powerful enough to type messages of more than 75 charact

  • zolf (cs)

    Nice one!

  • kennytm (cs) in reply to snoofle
    snoofle:
    ThomsonsPier:
    dbugger:
    priceless
    And cents-less.
    Blue color, now ^^^^^^^^^^^^^^^^^^^^^^^^^^
    And cents-less.
  • Kent's Predecessor (unregistered)

    See, this is what happens when you code in a high-level language like assembly, and don't drop right down to machine code, which performs far better.

    I've learned my lesson.

  • Arancaytar (cs)

    Hey, I know the real problem: The sense column was full of null values. :P

  • jkupski (unregistered) in reply to Jason McMullan
    Jason McMullan:
    However, this is the most extreme example of cargo-cult thinking I've ever heard of.

    What's cargo-cult? Look it up on Wikipedia. Fascinating stuff.

    FWIW, Feynman's autobiography, "Surely You're Joking, Mr. Feynman!" is a really good read, and is the source of the "Cargo Cult" idea (well, I'm sure it's in some of his lectures, too, but you know what I mean.)

  • maniek (unregistered)

    OTOH: I dont know if I would have the heart to tell the original developer about the label statement if I was working there - this could be too much shock after presumably years spent calculating offsets manually. And definitely I would not want the application to get on my head, so Id have to think twice before reporting the mess to the Upper Forces.

  • lolwtf (cs)

    Let this be a lesson: Even when you're writing assembler, you can still be completely stupid.

  • campkev (cs) in reply to dpm
    the hardware wasn't powerful enough for a thousands digit.
    I can see the scene now:

    Bob: Hey Kent, is there anyway we can get the prices to go up to $9999.99? Kent: Um.. Kent's hands in a silent message to his brain: Dude, we almost fell off the last time. We will kill you, choke you to death right here in front of Bob, if you try to make us do that many numbers. Kent: ...sorry Bob, the hardware just doesn't support it.

  • daqq (unregistered)

    Sorry, but I simply don't believe this one.

    1. There's just NO WAY someone would accept such a system if they got it.
    2. There's no way a combination of a person that can code a billing system in assembly and a person that will use the mentioned aproach can be the same person.
    3. Even if the system actually was created, and accepted, and bizzare as told, it would still be impossible to know the story, as the person who would look through the code would go insane, die of laughter or be met with some other gruesome fate
  • obediah (cs) in reply to Ape Monkey
    Ape Monkey:
    amischiefr:
    "That's right, all 100,000 (0-999 dollars, 0-99 cents) entries in the array were entered manually by the previous developer."

    Wow, just wow. I can't even imagine sitting there typing in that many entries. Must have been 6 months of job security.

    Hmm, that would be, assuming 21 days of work per month, approximately 800 numbers per day, or (assuming 8hrs/day, rounded up) 2 numbers per minute. A bit too well paid, then.

    Ah, you must follow the Jeff Atwood philosophy of programmer value. :) Where he would fire the person for being a slow typist, I would fire them for not using a scripting language to write the assembly code ( assuming we can't just fire them for deciding on the giant structure in the first place ).

  • vt_mruhlin (cs)

    Posts like this are why I read TheDailyWTF. No matter how down on myself I'm feeling about my own latest screwup, I know that there's always room out there for me to be hired as an "optimization expert" and actually get results.

    Barring that, there's plenty of opportunities for me to get hired as the guy who writes code that is later reserved for the optimization expert.

  • mauhiz (unregistered)

    That guy (one who can code an almost working billing system in a language it would take me a whole day to do hello world with) wrote ~100000 (predictable) entries by hand... this is truly the biggest wtf ever.

  • NameNotFoundException (unregistered)

    Cool, C as pseudocode for assembler ;-)

    Alas, ugly C. Well, wth, it's a wtf.

  • jfp (unregistered)

    This one's up their with Paula Bean for me. It's so bad that even the term "epic fail" doesn't do it justice. It's the sort of failure that's powerful enough to haunt and shame your family for generations, long after the exact details of that failure have been forgotten. I want to say this story is fake and that there's no way it really happened, but that's just because it would help me sleep at night.

  • nixar (cs)

    I'm reading this post, and I'm thinking, "wow, that's outrageous, nobody would ever program something that bad, he's making sh!t up." And then I pause, and I remember the steaming piece of syphillytic donkey dung I have to deal with. And I weep.

    Bonus: I have to deal with the actual lead programmer. He's a nutjob. 3 fresh hires have resigned within a month since this summer.

    He keeps exclusive access to the subversion repository. That's right. He doesn't let the other 5 programmers commit. 'cause, you know, they could DELETE STUFF by mistake. I asked him about branches; he panicked briefly and then started mumbling a quick excuse.

    He doesn't know about 'void *'.

    His code is full of crap like:

    struct thing {...};
    (...)
    int dosomething(char *a) {
    struct thing *thing5;
    thing5 = (struct thing *)a;
    (...)
    }
    (...)
    struct thing thing01;
    char *thingchar = (char *)&thing01;
    dosomething(thingchar);
    (...)
    

    I told him about void *; not a cure for this madness but at least a modicum of decency. He retorted that I was waxing philosophical instead of doing actual work.

  • Covarr (unregistered)

    I'm surprised the original programmer had the patience to input nearly 10,000 numbers by hand. I'm doubly surprised that it didn't occur to him, while doing it, that at the very least he could write another program to input the numbers for him; it would still be a crap program, but it would have been a lot faster to write and wouldn't have been missing any numbers in the middle.

  • Dirk Diggler (unregistered) in reply to Covarr
    Covarr:
    I'm surprised the original programmer had the patience to input nearly 10,000 numbers by hand. I'm doubly surprised that it didn't occur to him, while doing it, that at the very least he could write another program to input the numbers for him; it would still be a crap program, but it would have been a lot faster to write and wouldn't have been missing any numbers in the middle.
    But wouldn't he still have to enter all 10,000 entries in the code generator too? How can a program generate a sequential list of numbers?
  • K (unregistered) in reply to Jason McMullan
    Jason McMullan:
    I've seen this before in IBM Mainframe programmers.

    They were told that 'tables are fast', and 'the CPU is slow', so they try to use tables for everything that would bog up the CPU.

    These guidelines work well for things like logarithms, sin/cos tables, etc. The problem lies when a junior developer gets told what to do without why it's done.

    However, this is the most extreme example of cargo-cult thinking I've ever heard of.

    What's cargo-cult? Look it up on Wikipedia. Fascinating stuff.

    It reminds me of the web developers who read "tables are bad for layout" and tries to display tabular data using nothing but

    's and CSS... They just don't get it. It's like they have read "Tables are bad", and just ignored the " for non-tabular data".

    So I have to say this to get it off my chest:

    When you have tables of tabular data don't try to reinvent the table display, but use actual tables... That's why they call it semantic HTML.

  • Dirk Diggler (unregistered) in reply to Kent's Predecessor
    Kent's Predecessor:
    See, this is what happens when you code in a high-level language like assembly, and don't drop right down to machine code, which performs far better.

    I've learned my lesson.

    Plus you don't get a bunch of 'I know a better way' comments from back seat programmers.

  • amischiefr (cs) in reply to Ape Monkey
    Ape Monkey:
    amischiefr:
    "That's right, all 100,000 (0-999 dollars, 0-99 cents) entries in the array were entered manually by the previous developer."

    Wow, just wow. I can't even imagine sitting there typing in that many entries. Must have been 6 months of job security.

    Hmm, that would be, assuming 21 days of work per month, approximately 800 numbers per day, or (assuming 8hrs/day, rounded up) 2 numbers per minute. A bit too well paid, then.

    Your fuzzy Bush math is nauseating. You are not calculating in poop breaks, coffee breaks and of course the standing-around-talking-about-your-weekend breaks. Please create a large 2d array to accommodate for all possibilities.

  • SomeCoder (unregistered)

    What.... The.... Fuck???

    I'm astounded that someone could be "smart enough" to write an entire application in assembly, yet still do shit like this. I just... I just can't imagine it.

    Either this is fake or.... well... dear god, help us all.

  • iToad (unregistered)

    This is what happens when you have an Army Of One programming shop. The original programmer used a rare or difficult programming language (such as assembler), and there probably wasn't another person in the company qualified to check his code. Without adult supervision, he took his best shot at getting the application running, with results described in the story.

  • VacuumHead (unregistered)

    This reminds me of stories an uncle of mine tells about programming in the beginning of time, on old computers. Old as in "not solid state". The hardware was vacuum tube based.

    At the time you coded in machine language as they did not have assemblers yet. So of course all jumps where hard coded to some address. Removing code was easy: just NOP it out. Adding code is easy to: replace an instruction or two by a jump to the code you want to add, and jump back when you are finished. Now that's real spaghetti coding.

    An interesting side effect of using vacuum tubes is that they have a finite lifetime. It's long, but they are many of them. So every few days your program would start to behave weirdly, and you would run a special program that would make computations and compare them to hard coded results, trying to locate the defective vacuum tube. And you hope and pray that you find the culprit before an other vacuum tube or two blow up because if the computer completely crashes you have to manually inspect all the tens of thousands tube.

    You young guys/gals don’t know how easy you have it.

  • AC (unregistered) in reply to Dirk Diggler
    Dirk Diggler:
    Covarr:
    I'm surprised the original programmer had the patience to input nearly 10,000 numbers by hand. I'm doubly surprised that it didn't occur to him, while doing it, that at the very least he could write another program to input the numbers for him; it would still be a crap program, but it would have been a lot faster to write and wouldn't have been missing any numbers in the middle.
    But wouldn't he still have to enter all 10,000 entries in the code generator too? How can a program generate a sequential list of numbers?

    To remedy this unsolvable problem, let us summon the Highly Paid Consultants!

  • Jim Weir (unregistered)

    What really gets me is that if you know the offsets you want into that table, then you already know your damned price.

  • wrtlprnft (unregistered)
    Comment held for moderation.

Leave a comment on “DOLLARS and SENSE”

Log In or post as a guest

Replying to comment #:

« Return to Article