- 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 was going to post a comment, but then I kicked by dog and I wasn't allowed to post a comment anymore.
Admin
And do they check on the session when it goes back to the server or was this the only timeout code?
Admin
TRWTF is this:
Captcha facilisi, the Italian word for how easy it is to tell that whoever wrote this had no idea what they were doing.Admin
0!=0 ??????
Not much use of the code coverage tools, I gather.
Admin
Someone illuminate me: in what units is that timeout ? I mean the one that is set when 0!=0, or when the dog is kicked.
Admin
The original coder was referring to the watchdog, which is a common name for timers of a certain sort. It's not really wtf-worthy.
Admin
Admin
I doubt anyone's ever heard of a watchcat.
Admin
Admin
We're controlling session timeout on the client now? Why wasn't I told?
Admin
You're missing something else. In that same meeting we decided this should only work for people that actually own dogs. (There's a 200kb compressed hot-linkable javascript available that will do YQL lookups on any social network ever written to see if you own a dog)
Admin
Admin
TRWTF slow the lack of semicolons, along with 0!=0, along with the implied eval.
CAPTCHA: nulla, the number of semicolons in this code
Admin
Admin
WasDogKicked is obviously referring to a watchdog timer, which is commonly found on embedded systems.
Admin
Is 0!=0 also commonly found on embedded systems?
Admin
Admin
if (0!=0) is obviously just a typo, the original coder meant to type if (0!=O), as every coder should always test that the numeral 0 is not equal to the letter that looks most like it, to make sure this is the correct universe, so obviously this is not wtf-worthy and yes, my sense of humor is desperately in need of a tweaking, thank you very much.
Admin
Can't resist to post the captcha: appellatio, which rhymes with...
Admin
I have a similar function but mine is called WasBitchSlapped
and I don't have the if 0!=0
Admin
I write embedded code, and I have it kick watchdogs all the time. You have to, it's the way they work.
You see, a watchdog is a circuit that resembles a dog that runs around. The thing is, every now and then, if left unkicked, the dog will think its master (usually the main program) is friendly and attempt to hump its leg. This disturbs its master greatly, so much so that the master will drop everything, shoo off the dog, and start over whatever it was doing from the top.
So, if the master wants to keep going on being a productive little program, it has to kick the dog on a more or less regular basis, to keep the meme "I am your master and not that kind of friend" front and center in the watchdog's logic. And thus God's in his heaven, all's well with the world.
For the record, attempts to implement this system with cats have all ended in failure. The cat simply sits there. At best, it expresses displeasure that the main program doesn't serve it. Remember: dogs have masters and cats have staff.
Admin
Old meme is old
captcha: illum
Admin
Oh my god, I think I know that guy. Did he use to work for Turner? There was a guy there once whose every function or variable was something like "isDogDead","killDog()", or "beatDeadDog = true". It was kind of bizarre, and then one day he disappeared mysteriously.
Admin
...still, my favourite must be the usage of newline and tab, the only rule being that there are no\n\t\nrules\tunbroken\0
Admin
The comments section for this site would do well with two variables:
Admin
Just because there's client side code too doesn't mean server doesn't also check for it. For example one of the financial services I use has a javascript message box warning one minute before your session timeouts. This is obviously good since you notice the timeout before it happens.
Admin
I mean, get real!!
Admin
Different word if you clear cookies, so not a WTF. But, still, a terrible, terrible captcha. Their image library couldn't distort the text? Four letters?
transverbero: one of about a dozen captchas this stupid site uses.
Admin
Admin
As we all know engineers are crappy. They use crappy IDEs. Crappy IDEs can't uncomment. Even if they could, it would be awkward and crappy to use. Most likely it would be found after four clicks among some other crappy "refactoring" tools. Even if there was an IDE that wasn't crappy the crappy engineers wouldn't read the crappy manual. IDEs are the TRWTF.
Admin
Admin
Urk. Who writes IA-32 assembly in 2010, seriously.
CAPTCHA: verto (beep boop i am a robot)
Admin
Admin
Argh.
Not only the "funny" variable name is a WTF, this code contains a lot of other WTFs too. Looks like it was written by someone who does not have a lot of experience with JavaScript.
Ok, semi-colons are optional in JS, but use them and omit them so inconsistently? You'd better always use semi-colons because some browsers go crazy when you don't (that's a whole other kind of WTF...).
And then the stupid if (0!=0) code...
So, what was his conclusion? I hope "None of this code can be reused".
Admin
it's a Schrödinger's dog
Admin
Admin
This one is nice, too:
Tip o'my hat to the elite coders at pacu.com, they sure deserve it.
Admin
Who hasn't kicked something like this? [image]
Admin
Admin
Anyone who does bottom-level microprocessor validation. Seriously.
Admin
I once worked with an EE guy who told this joke:
Any working program can be converted to a non-working program by removing or changing one instruction. By induction, we know you can reduce any working program to a broken program containing only a single statement. Therefore, you can create a working program by starting with the statement "x=0" and then debugging it.
TRWTF was that his code looked like he really did it that way...
Admin
And security analysts on both sides of the Force. Seriously, almost all shellcode is written in assembler.
Admin
Still better than my bank
Admin
Admin
Sounds like a pretty good summary of "iterative development" to me.
Admin
Admin
Admin
In Soviet Russia, dog kick you!
Admin
Admin