- 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
I see nothing wrong here. This is Geeeeeeeeennniuuuuusssss code!
Admin
I thought they used desktop applications in the mid-nineties to simulate AJAX-like behavior.
Admin
This reminded me of the SouthPark Human Cent-IPad episode.
"You're gonna have to speak with one of our Geeeennniuussssseeess"
Which, ironically, is the exact same thing that happended to me the one and only time I ever went into an Apple Store.
Admin
Admin
frist to write frist
also since when did they start posting this early
Admin
Ya' gotta love the number padding function: 1, 2, 3, .., 9, 010, 011, 012, .., 0100, 0101, etc
(I find doing what I'm about to do annoying, but somehow it is relevant this time.) captcha: opto. This was some opto coding!
Admin
Admin
I do not know whether I should say this is brilant or genus.
Addendum (2011-10-17 09:39): As for the last thing with the formating. When I am in a file with poorly formated code I just hit Ctrl+E, D (Format Document), and poof all the indenting, spacing, and {} are fixed. So poorly formatted code does not WTF me since I can fix it so easily.
Admin
I am having Suuuuuuuuuupppperrrrr fuuunnnnnnn today double clicking in the middle of super genius part in firefox. So much selecting with so little effort!
Admin
I suspect that he gave himself that accolade when he had finally managed (after three days hard slog and sweating blood) to design a "Heeeeeelllllllllloooooooooo wwoooooooooorrrrrrrrrrllllllllllldddddddddddd" app ...
Admin
Paula is briiiiiiiiiiiiiiilllllllllllllllllaaaaaaaaaaaannnnnnnnnnnnt!
Admin
Early? It's 7:13 PM in Mumbai.
Admin
This guy made me think to Leeeeeeeeeeerooooooooooooooooooy Jeeeeeeeeeeenkiiiiiiiiiiiiiins, but without the tabs.
Admin
Had another idea. Maybe he thought and acted and moved incrreeediiiblllyyy sssslllloooowwwwllllyyy ... and, having finally got to the end of reading the story of the hare and the tortoise story, thought that being slow equated to being clever.
I had to work with someone like that. After approximately 40 years in the industry he still did his programming by the hunt-and-peck technique. And in order to put in place the de rigueur house-style lines of delimiters (another WTF, but that's another story) above and below his comments, he did it by the technique:
I got impatient with him once and elbowed him out of the way, pressing the F1 key, which had been programmed to automatically put the comment delimiter line in place.
"Goodness! What did you do?" he asked. "Pressed the F1 key." "What did you do that for?" "It's quicker than typing it character by character." "I'll have to learn how to do that one day," he replied, and proceeded to type the next comment-delimiter line by means of his tried-and-tested technique as described above.
Admin
Tabs when coding are fine, so long as everyone who uses the file uses them and they all use the same tab width. (That code looks like it needs a tab width of 4, but it's surely not hard to experiment.) But an auto-reformat would clear all that into whatever style is in use, so it's not too serious unless you've got two developers warring over it.
OTOH, anyone who mixes tabs and either Python or Haskell is evil. If that's you, I salute you! Your opportunities for obfuscation are far beyond those of normal mortals!
Admin
example 1. Ugh. example 2. It has an easily fixable typo. Not a huge WTF. I've used y = (x<10)?"0"+x:x before in JS because, first, there is no pad function, and second, it's usually for formatting a month number which will only be 1-12 anyway. So, meh. example 3. It's debug code, so no big deal. He was passing in a window or iframe designated for debugging and writing junk to it... Of course, I don't see the code that actually writes anything to the document, but whatever... it's debug code example 4. So, he didn't know that other people's tabs may not be the same width as his. Fairly common rookie mistake, but easily fixable in many code editors.
As for the IFRAME/cookie/JS thing... well, that's how we did asynchronous http requests before we had XMLHttpRequest. Either that's code that was written before XMLHttpRequest was commonplace or it's a guy that REALLY wants to ensure compatibility with REALLY old browsers. Not really necessarily anymore, but not the biggest WTF either.
Admin
Just in case anyone missed the reference: Wile E. Coyote used to do this in the Roadrunner cartoons. His business card even said:
WILE E. COYOTE SUPER GENIUS
This specimen of developer, Programmus Ignoramus, should run (or be run, as the case may be) off a cliff. A sign saying print("Goodbye, World!"); would be a nice touch.
Admin
Still far more distributed than Haskell in the wild.
Admin
Youtube "Operation: Rabbit" and watch the awesomeness.
Looney Tunes are still funny even after all these years.
Admin
So he's a Supper Gennius? Never heard of it.
Admin
Why didn't he use double line breaks for a truly Zen experience? Imagine getting twice the lines of code with the same readability. Also, the ability to put a Su^10p^4er^5 Ge^9n^3iu^5s^5 before or after any line, as desired.
Admin
I agree. I think the main problem here was that he didn't really take his job very seriously. The ‘It's just silly web stuff.’ attitude. I've seen very good coders churn out ultra-crappy code because they didn't take it seriously. The reasons varied. Sometimes it was too simple and they didn't feel challenged enough, sometimes they didn't feel the work was important enough.
Admin
I've just paid attention to the TwoPlaces function.
Presumably it's an integer that comes in.
Going out from this function is: a) An integer if it's below 10 b) A string if it's above 10.
Or round the other way if the greater-than / less-than typo is corrected.
I understand the delights of weakly-typed languages, but unless it's used in strictly limited contexts, this function looks a bit dangerous to me.
Or is this so stupidly obvious that I have just set myself up for the inevitable ridicule?
Admin
Admin
Best comment today. Endorsed by Acme Anvil Company
Admin
It would actually be 9, 10, 011, ... (num > 10)
10 is not good enough for an extra zero, apparently.
Admin
"Human Cent-IPad"? Really? Is it too hard to write "HUMANCENTiPAD"? Or is this some 2-cents inside joke?
Admin
that's paula bean's husband.
Admin
That'th juth't thuuuper!
Admin
For immortal obfuscation, you need a postmodern language like Befunge or Whitespace.
Admin
Admin
The way those comments are written, I get the impression that they were written mockingly by someone after the fact.
Admin
Get real, pillocks. Write in Ook.
Admin
I confess I'm still waiting with bated breath and feverish anticipation for the first usable computer written in Life.
Admin
I don't know what weirdo editor you use, but in mine Ctrl+E, D takes me to the last line in the file - at least it does in command mode, in edit mode it doesn't do anything - so what version of vi are you running?
Admin
In Visual Studio, ctrl+K, D formats documents. Maybe that's what he meant?
Admin
Visual Studio? Never heard of it. Is it some variant of that spawn of Satan which calls itself emacs?
Admin
I know it starts with "vi", but that doesn't make it an editor...
Admin
I once worked at a place where a new guy started trying to demand that everyone else follow his "professional" style, which included things such as spaces before commas, extra spaces at the parens, curly brace on the same line, etc. We already had a defacto style that pretty much matched the .NET framework style, but didn't have anything written. I told him we wouldn't be doing that and that developers could style the code however they wanted.
So, to prove he's "right", this guy spends all day reformatting a piece of code and checks it in and then comes over and proudly announces his victory. I ignored him, but the next time I needed to edit it, I simply hit Ctrl-K, Ctrl-D to format it, added my 1 line and checked it back in.
I walk by his desk the next day and he is feverishly reformatting the same piece of code. He says, "I will beat you at this. I'm more determined. You can't win. There, I fixed it again and I will keep fixing it until you give up."
I went back to my desk, checked it out, hit Ctrl-K, Ctrl-D, and checked it in, one minute after he checked it in. He comes by later and accuses me of losing his changes because I'm keeping a copy around to check back in over his. Finally, now that he's ready to listen, I show him that he can set his settings however he likes in Visual Studio and work in whatever way suits him. All of us can do the same.
Strangely enough, broken code always seemed to have the same characteristics... Extra spaces around the parens and commas and curly braces on the same line as the function name.
Admin
Yea, I'll admit to having done something like that at some time (I got the < thing right though) before I switched to the sprintf way of displaying leading zeroes.... (And the numbers I was formatting was known to be below 100!).
Yours Yazeran
Plan: To go to Mars one day with a hammer.
Admin
vi is the number six, which as you will recall is the number of the beast. vi is the true spawn of Satan.
Admin
I've got go tell my friend 66an about your interesting theory.
Admin
Admin
Are you hiring?
Admin
Why am I just now hearing about this? It would have been helpful to have had a reference.
Admin
Admin
Admin
I think the problem is that he is trying to build on the shoulders of giants when he should be standing on the shoulders of giants and working from there.
Admin
Admin
This isn't a joking matter. My son, who has gigantism, was seriously injured when some fat (but short) programmer stood on his shoulders and tried to do some work. His chiropractor bills were horrendous. Please be more sensitive.