- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
He 'worked' on that for a month?? & his management defended him????????
Admin
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.
Admin
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
Admin
Admin
Admin
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.
Admin
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.
Admin
Admin
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?)
Admin
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.
Admin
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".
Admin
sigh I just hope you don't mean the Grace Hopper "first example of actual bug being found" story.
Admin
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.
Admin
np: Shalom - We Been Troddin (Rhythm & Sound - With The Artists)
Admin
TRWTF are prices like ¤699.99.
Admin
Kent,
Great job and I feel your pain! You sure that wasn't a GE application?
Admin
Admin
Tss, that wouldn't be a wtf now would it?
Admin
T-Shirt material!
Admin
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.
Admin
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.
Admin
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.
Admin
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
Admin
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.
Admin
Admin
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...
Admin
Admin
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.
Admin
Admin
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!
Admin
Dollars and sense is a pun. And the cake is a lie.
Admin
Something reminds me of the Story of Mel (see Hacker's Dictionary). But Mel was writing the fastest possible assembly code on Royal McBee...
Admin
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?"
Admin
Admin
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.
Admin
Ah yes, the good old "Work harder, not smarter" philosophy.
Admin
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.
Admin
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.
Admin
yup, now all we have 2 worry about is cosmic rays randomly flipping bits;-)
Admin
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;-}
Admin
Thanks.
:oP
It's good to be the dinosaur.
Admin
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.
Admin
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.
Admin
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.
Admin
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
Admin
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 ! .
Admin
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