• jim (unregistered) in reply to b0ttomfeeder
    the Database 'guru' showcased the db structure he'd been working on for the last month.

    The db layout the guy had produced had iirc 1 table for shops AND products. The field list was something like:

    shopname product1name product1price product2name product2price product3name product3price product4name product4price . .

    All I remember clearly was a) the look of horror from the techies in the meeting and b) the closing of ranks as his management tried to shift the blame to the spec which had only listed 7 products on the example shop page...

    He 'worked' on that for a month?? & his management defended him????????

  • Addison (unregistered)

    What makes this an even better WTF is that the guy in charge of changing it was intelligent enough to take just an afternoon to fix it. That's the amazing part.

  • (cs) 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.

    The real WTF there is that the original "programmer" did not write a script of some sort to generate the table.

    OTOH, if it were scripted, the program would work for all values thru 999.99, and then he would be out of a maintenance contract

  • (cs) in reply to Jason McMullan
    Jason McMullan:
    I've seen this before in IBM What's cargo-cult? Look it up on Wikipedia. Fascinating stuff.
    Let me Google that for you
  • (cs) in reply to Duke of New York
    Duke of New York:
    chrismcb:
    I mean round about entering $2.03 into the table wouldn't most sane people be thinking "There has to be a better way?"
    Not if they're getting paid $100 per hour to do it.
    Too if your therapist's bill is $150 an hour.
  • Schmitter (unregistered)

    It all makes sense to me. If you sell point of sale hardware, you want the crappiest software running on it so that you can make your money "maintaining" it.

  • (cs) in reply to daqq
    daqq:
    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.
    That's what my first reaction was too, but going over many of my past projects I realized the position of the client is usually very difficult in these cases.

    Clients who don't have any in-house technological knowledge have to rely on the dev-team and, if they can find them, second opinions from other techs.

    Their main concern is their money/time investment and they usually are very hesitant in taking their loss over bad architecture/development. And quite understandably so.

    One thing I noticed is that they never seem to take good advise as being applicable to their situation. Most clients I've worked with have this "but we're different" kind of attitude and believe sincerely that their checks-and-balances are sufficient to prevent any kind of technological disaster - even when they have no experience with software dev projects at all.

    Sometimes it's almost as if best practises are a challenge to their manegerial savvy and they have to prove them wrong in order to be considered a good project manager.

    Of course it always ends in tragedy where the money and time budgets are broken multiple times over and top level managment decides to take whatever is produced into production until a new team delivers a totally rebuilt version of the same system.

  • Ken (unregistered) in reply to Code Dependent
    Code Dependent:
    VacuumHead:
    You young guys/gals don’t know how easy you have it.
    G'day, Top Cod3r
    No, he's right. Look up ENIAC, UNIVAC, and a few others. Not trolling, just knows early computing history.
  • (cs) in reply to amischiefr
    amischiefr:
    Your fuzzy Bush math is nauseating. You are not calculating in poop breaks...

    We poop over there so we don't have to poop over here.

    When we do poop, we'll be greeted as liberators.

    Poop accomplished!

    CAPTCHA: NucularPoop. (Not really, but would that be an awesome captcha?)

  • Buddy (unregistered) in reply to hexatron
    hexatron:
    ...Assembly code has been useless for mortals for at least 10 years.

    It creeps in once and a while.

    If you want to calculate x = a * b / c, where x, a, b, c are all short, but (a * b) will cause an overflow, then the correct C/C++ way by casting to long can be very slow, and critical if speed is important, e.g. real time image processing.

    For perhaps half a dozen processors and counting, my approach has been to output that function to assembler, then comment out the line where it silently casts (a * b) to a short, then replace the source code with assembly. Never had to crack open an assembler manual yet.

    Smart compilers "know" to inline short functions like these for extra speediness.

  • (cs) in reply to Ken
    Ken:
    Code Dependent:
    VacuumHead:
    You young guys/gals don’t know how easy you have it.
    G'day, Top Cod3r
    No, he's right. Look up ENIAC, UNIVAC, and a few others. Not trolling, just knows early computing history.

    Yep, you beat me to it. There are some really neat stories about what computing was like in those early days.

    Including the origin of why we call computer glitches "bugs".

  • Virtually Brillant (unregistered) in reply to WhiskeyJack
    WhiskeyJack:
    Ken:
    Code Dependent:
    VacuumHead:
    You young guys/gals don’t know how easy you have it.
    G'day, Top Cod3r
    No, he's right. Look up ENIAC, UNIVAC, and a few others. Not trolling, just knows early computing history.

    Yep, you beat me to it. There are some really neat stories about what computing was like in those early days.

    Including the origin of why we call computer glitches "bugs".

    sigh I just hope you don't mean the Grace Hopper "first example of actual bug being found" story.

  • (cs) in reply to emurphy

    I got a 3 month contract once, back when I was a developer. Their flagship system was an oracle database, which got updated by a load of CSV data files sent over a modem (yes, it was THAT long ago) by around 1,000 client laptops on a Freephone number, the Oracle DB dumped then some updates and these updated the Access database on the client's machine. The specs had demanded that the freephone call took less than 1 minute, and it seemed to in the 'user acceptance' demo. However when used in real life it was taking more like 30 mins. Times that 29 mins by 1,000 and 5 days a week, and that's a lot of money.

    The developer, who'd meantime been promoted to management had gone off to head office in the US washed his hands of it. Their best minds had pored over the application apparently and couldn't find out how to fix it.

    My 3 month task was to do whatever necessary to fix it, including if necessary re-writing the whole application.

    I found the problem within the first 15 mins, when I looked at his update SQL code. Instead of one single update - for some reason I still can't fathom - he imported the table then went through it one row at a time updating the master table instead of just running one single SQL update statement. The modem was connected all this time to make sure there were no problems. It took me 15 mins more to fix that, and then I'd done myself out of a job.

    Which just goes to show you: There's all kinds of stupid.

  • (cs) in reply to fuffuf
    fuffuf:
    Jason McMullan:
    I've seen this before in IBM What's cargo-cult? Look it up on Wikipedia. Fascinating stuff.
    Let me Google that for you
    Needs more "letmewikipediathatforyou.com"...

    np: Shalom - We Been Troddin (Rhythm & Sound - With The Artists)

  • (cs)

    TRWTF are prices like ¤699.99.

  • MarkG (unregistered)

    Kent,

    Great job and I feel your pain! You sure that wasn't a GE application?

  • (cs) in reply to scruffy
    scruffy:
    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.

    Sounds like you're not aware that using tables in the ALU/FPU is actually quite common. Remember the Pentium bug? That, like today's WTF, was caused by errors in the lookup tables.

  • boogaboo (unregistered) in reply to emurphy

    Tss, that wouldn't be a wtf now would it?

  • Edward Royce (unregistered) in reply to lolwtf
    lolwtf:
    Let this be a lesson: Even when you're writing assembler, you can still be completely stupid.

    T-Shirt material!

  • (cs) in reply to b0ttomfeeder
    b0ttomfeeder:
    The highest price they could have was $999.99, because as the previous developer had told them, the hardware wasn't powerful enough for a thousands digit.

    That line keeps making me think of a summer job I had in 1997 I keep trying to forget...

    To cut a long story short, a massively failed attempt at an online shopping mall featuring high street shops (who thought that would ever work!) was given its final death knell when the Database 'guru' showcased the db structure he'd been working on for the last month. Sadly the specifics escape me (read "scourged from my mind") but the highlight was each shop in the mall being allowed a maximum of 7 products as that was the "limitation of the database".

    Ah, yes.

    Whenever I'm meetinged by a "Database Expert/Guru" (and for reasons too complicated to explain, I'd bet my ugly step-sister's life that they're not an expert/guru, and they don't understand databases), I just ask them to email me a copy of the schema.

    I never get a copy of the schema, of course, because the schema is "politically sensitive."

    This is, however, generally a good point at which to canvas the Web for a new contract.

    Fuck these donkeys and the Christ they rode in under.

  • (cs) in reply to ChrisSamsDad
    ChrisSamsDad:
    I got a 3 month contract once, back when I was a developer. Their flagship system was an oracle database, which got updated by a load of CSV data files sent over a modem (yes, it was THAT long ago) by around 1,000 client laptops on a Freephone number, the Oracle DB dumped then some updates and these updated the Access database on the client's machine. The specs had demanded that the freephone call took less than 1 minute, and it seemed to in the 'user acceptance' demo. However when used in real life it was taking more like 30 mins. Times that 29 mins by 1,000 and 5 days a week, and that's a lot of money.

    The developer, who'd meantime been promoted to management had gone off to head office in the US washed his hands of it. Their best minds had pored over the application apparently and couldn't find out how to fix it.

    My 3 month task was to do whatever necessary to fix it, including if necessary re-writing the whole application.

    I found the problem within the first 15 mins, when I looked at his update SQL code. Instead of one single update - for some reason I still can't fathom - he imported the table then went through it one row at a time updating the master table instead of just running one single SQL update statement. The modem was connected all this time to make sure there were no problems. It took me 15 mins more to fix that, and then I'd done myself out of a job.

    Which just goes to show you: There's all kinds of stupid.

    Yes, but that's the good kind of stupid.

    I think it's a bit like being an entrepreneur -- nine times out of ten you'll fail miserably, even though you know you're doing the right thing.

    The tenth time, you're a God.

    But what would I know? I've only been called a God twice. And one of those was a monumental error in judgement.

  • Dr_Barnowl (unregistered) in reply to alegr
    alegr:
    nixar:
    exclusive access to the subversion repository.

    How about setting your own source control

    I concur ; grab a copy of one of the modern DVCS that can schlurp SVN repositories into themselves (Bazaar, git), make your own branches, and work amongst the five of you.

  • John Roth (unregistered) in reply to Jason McMullan

    I'm not sure I'd call it cargo-cult, because I saw something equally insane around 40 years ago on an IBM 1410. The programmer had a simple 3 dimensional report to do. Whang out a 3-d table, throw a bit of code at it, an afternoon. Right?

    Wrong. He didn't know (or didn't trust) index registers, and wasn't bright enough to do an address calculation either. So he took three whole months to do the most horrorific equivalent of a nested if where each cell in the table was its own named variable.

    To top it all off, he used a little known feature of the 1410 assembler called named literals. That's right - he used literals as accumulators.

    Well, it ran. Slowly, but it ran. He left or was fired, and then the change request came in. The guy it was assigned to took one look and yelled for help. The two lead programmers (they usually worked together - 40 years ago we had pair programming!) looked it over, had a good laugh and managed to patch the thing to put in the extra dimension. In one afternoon; it ran that same night.

    Then they spent a day or so rewriting it so it was sane.

    How'd they do it? They wound up indexing through the literal pool.

    John Roth

  • John (unregistered) in reply to maniek
    maniek:
    I don`t 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 manu

    Where I work there is a programmer a little like a programmer of this story. He spent countless number of hours applying URL encoding to various sensitive columns of a database. Of course, everywhere the data is needed, it must be ULR decoded again. 'Unfortunately' (from a twisted point of view) not all columns are URL encoded, so the application code has to remember when a column is encoded and when not. The amount of hours that must have gone into all of this is truly insane.

    The thing is, this programmer simply didn't knew something like a prepared statement existed. After years of feverishly encoding everything and decoding it again, with all of the associated bugs and crashes when code tried to URL decode something which happened to be not-URL encoded, or URL encoding data that appeared to already been URL encoded, all this guy had to do was simply send his queries prepared to the DB and the problem (SQL injection) he tried to prevent had never been a problem.

  • z f k (unregistered) in reply to ThomsonsPier
    ThomsonsPier:
    dbugger:
    priceless
    And cents-less.
    Quite sense-less
  • John (unregistered) in reply to Dan
    daqq:
    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

    I used to think just like you, that stories like these were either made up or just gross exaggerations of reality. Until I started working at this company X where this guy called D worked. Compared to some of the stuff he got away with a lot of stories here -pale- in comparison. Okay, I have to admit, the story of this WTF!? is legendary and even the Mr. D I know didn't pull of something like this, although he did sh*t that actually was pretty close.

    What about looping over a HashMap containing 50.000+ entries, doing a String compare on each key, while map.get(key) would have been enough? What if this was done in business critical code where performance is of the uttermost importance (online transaction processing). What if this 'simple' looping was implemented using close to a hundred lines of Java code, with several levels of recursion? What if this HashMap was called "cars" but actually contained houses? What if this guy, when I confronted him with this folly actually got mad and reported to his boss that I was harassing him?

    Would you think I was making stuff like that up?

    Believe, IT can be a sad world...

  • Shuryno (unregistered)
  • Shuryno (unregistered)
    [image]

    Level 19 once you get out of testing area, you can see this presentation in a room. I just laugh, thinking about this story.

    Wonder if it means anything...pretty sure the original coder doesn't work for valve, their code is just too functional.

  • (cs) in reply to John
    John:
    Would you think I was making stuff like that up?
    I'm too cynical for that; it has the painful hallmarks of truth. Why aren't you submitting that sort of thing to form the basis of an article?
  • scruffy (unregistered) in reply to Zylon

    Well I was a hardware engineer at one point...

    Firstly there's a difference between results coming from a lookup table, and microcode coming from a lookup table. Secondly there's a difference between a table in programmer visible memory and a table buried in a device somewhere.

    I've been thinking about this WTF over the weekend. It's actually quite feasible for certain types of graduate to pull this off, those with more knowledge than experience.

    I once saw a graduate code a 16bit by 4bit multiplier by coding fifteen separate sixteen bit addition terms in verilog, with a multiplexer tree selecting the appropriately multiplied result. He was then surprised that it wouldn't fit on the FPGA and declared that the task was impossible.

    This was to accomplish 50K multiplications per second, and ran with a 10MHz clock, with the data already available in big-endian serial format. The guy could write verilog very well, I.E. he could express his ideas, but he couldn't think of a good way of doing this multiplication. (I can think of at least three ways off the top of my head, using between 100 and 10K gates on the target FPGA.)

    Still, he gets paid, and some of his work is out in th wild!

  • anon (unregistered) in reply to Shuryno
    Shuryno:
    [image]

    Level 19 once you get out of testing area, you can see this presentation in a room. I just laugh, thinking about this story.

    Wonder if it means anything...pretty sure the original coder doesn't work for valve, their code is just too functional.

    Dollars and sense is a pun. And the cake is a lie.

  • Andrea D'Alessandro (unregistered)

    Something reminds me of the Story of Mel (see Hacker's Dictionary). But Mel was writing the fastest possible assembly code on Royal McBee...

  • Tim (unregistered)

    This article is beautiful. I have not had the pleasure of going over someone else's code yet, but have occasionally stumbled over some of my own old code and thought "what was I thinking?"

  • Rhialto (unregistered) in reply to Beat by the system
    Beat by the system:
    In College I tried to beat the system by taking Assembly Language classes in the Computer Science department and in the Electrical Engineering department at the same time.

    Turned out one of the classes was for Intel processors and the other was for Motorola.

    Naturally everything would be exactly the opposite for both processor types; To this day I still wake up crying every now and then.

    Which one taught the sensible one (Motorola)?

  • Random832 (unregistered) in reply to Bizerk
    Bizerk:
    Granted it's only psuedocode, but would the app even come up with the correct price?

    If you're trying to display $2.05, you're going to increment 205 times. If you assume only one entry is missing between $0.00 and $2.05, won't incrementing 205 times get you to $2.06?

    My understanding is, if the price is $2.05 and one entry is missing between $0.00 and $2.05, then your stored value will be DOLLARS = 2 SENSE = 4.

  • NDA-signed Anonymous (unregistered) in reply to nixar

    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.

    Ah yes, the good old "Work harder, not smarter" philosophy.

  • Will (unregistered) in reply to emurphy

    Ah yes, my boss is the CEO's nephew... Good thing he shares my sarcastic sense of humor or I'd be out of a job many times over.

  • Martijn (unregistered) in reply to jfp
    jfp:
    This one's up their with Paula Bean for me.

    Not at all. Paula Bean was lazy, stupid and harmless. She didn't do anything, so she didn't do any real damage either. She just cost lots of money and time. In a way she's kinda smart because she manages to get paid for doing nothing. (But the real artists do it without getting caught.)

    This guy worked amazingly hard (typing a 100x1000 table by hand!) to write something mindbogglingly insane that by some miracle still manages to sort-of work.

    My guess is the previous developer was a Cthulhu cultist.

    Also, it's a lie that assembly is faster. It's only faster when it's written by someone who could write a C compiler during breakfast.

  • airdrummer (unregistered) in reply to VacuumHead

    yup, now all we have 2 worry about is cosmic rays randomly flipping bits;-)

  • airdrummer (unregistered) in reply to John

    did u show ur boss his code? did ur boss even understand how bad it was? so many ways 4 it 2 go from bad 2 worse;-}

  • Obloodyhell (unregistered)

    As far as I'm concerned, the ability to write assembly code requires some kind of superhuman intelligence.

    Thanks.

    :oP

    It's good to be the dinosaur.

  • Obloodyhell (unregistered) in reply to biffby9
    biffby9:
    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.

    That's far from atypical of all humans, though in some it's much worse than others.

    It's the genesis for Zen and the Art of Motorcycle Maintenance, which, at its heart, is about, among other things, the tendency of romantic thinkers to forcefit all problems into their mode ("You should just be able to, like groooooove on it, mannnn!"), and for classic (i.e., engineers) thinkers to overanalyze everything, including things not subjectable to rational analysis ("This dance makes no sense. Why would you put your foot there rather than over there? Or there? And what's the point of that spin move right there? It just gives you a chance to get dizzy for no purpose I can see... As a matter of fact, why dance at all?"

    People try to go with what works. We're pattern matchers. Even when there's no pattern, we try and forcefit all things into a pattern of some kind. And most people learned one of those two patterns as a prime example, and spend our lives ramming everything into it, instead of choosing the one which is best suited for the situation at hand.

  • Misha (unregistered)

    I'm starting to wonder if the dude who wrote the original app wasn't a moron at all, but some kind of evil genius. I mean think about it. Not only to write an application so totally wrong-headed, but to somehow convince the clients to accept it, presumably pay for it, and use it, that takes a special kind of mind. That one developer was personally responsible for untold hours of lost productivity and human misery. It's like the coding version of gluing coins to the pavement or becoming Home Secretary. There are people out there who just get a sick thrill from making everyone else suffer.

  • Martin (unregistered) in reply to Jason McMullan

    My father worked on mainframes at IBM and reported exactly that kind of stupidity being something he would have to routinely fix. In fact this whole story sounds hauntingly like one he's told me, except he was optimizing a payroll system instead of a billing system.

  • Printf (unregistered) in reply to amischiefr

    you didnt expect him to write more code to write the array did you else the sales team need to wait half year for 1 invoice :D hehe

  • litterboxfurniture (unregistered)

    Hello guys here are some links that contains information that you may find useful yourselves. It’s Worth Checking out…. Very educating story, saved your site for hopes to read more! Really nice style and design and excellent content , nothing at all else we need : D. Some times its a pain in the ass to read what people wrote but this web site is very user friendly ! .

  • seo tools group buy (unregistered)

    The electronic cigarette uses a battery and a small heating factor the vaporize the e-liquid. This vapor can then be inhaled and exhaled seo tools group buy

Leave a comment on “DOLLARS and SENSE”

Log In or post as a guest

Replying to comment #:

« Return to Article