- 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 Dead people.
Admin
They probably choose a random number.
Obligatory Dilbert reference:
http://dilbert.com/strips/comic/2001-10-25/
Admin
And the most important one, too!
Admin
You're confused because they snipped part of the code:
Admin
Well, every Warhammer 40K fan knows now, why the Imperium can't really figure out how stuff works, when studying old artifacts from Terra...
Admin
That's not 10^8 error codes. That's 10^308 - 10^300, which is at least 10^307 error codes. Still, better to just be on the safe side with possible error codes.
Admin
This is just a time limit of 9 brazillion seconds.
Admin
Admin
This is just shocking in every way. This is the closest I've ever come to calling BS on an article but I'm not going to because I've worked with people who would think this is a good idea. Admittedly it was a summer job caring for downs syndrome kids, but still.
If I ever saw this in my codebase I would be having serious words with the developer about his career prospects. The words "burger" and "king" would be involved.
Admin
I think brazillion comes after kabillion. And they do do it differently in South America. Oh yes.
Admin
Admin
I'm wondering whether there's a history behind this.
Suppose someone was set the task to increase the timeout because it kept timing out. "Want me to set it to infinite?" No, says PHB, infinity's scary, all we want to do is set it to bigger than ... etc.
The developer doubles the time from 1 minute to 2. Then to 4. And so on. Tired of the shouting, he sets it to 99999999999 or something that unfortunately breaks the 2^31 (or whatever it is) limit on int size, and wraps it to a neg number. Instant timeout again, but by this time the programmer has been fired for not having done the task that PHB has assigned.
But this time there's a rookie on the case. Rookie inherits the problem that 99999999999 still isn't enough, so keeps increasing it and increasing it by doubling the number of digits, having learned somewhere that if a parameter is not big enough, double it. Each time the actual int that is interpreted by the machine is smaller than adequate. This goes on and on till finally something evolves that actually works somehow.
Not saying it's likely, but it's possible.
Admin
Admin
Admin
My Question, why is the code resetting the timeout to that rediculous number for every insert, rather than one time at the beginning of the file. Does the simple SQL insert really take till the end of time?
And who's going to be around when this is done anyway?
Admin
It's not TRWTF, but it a nice little XTRAWTF.
Admin
How does that even (compile|get interpreted without a runtime error)?!
Admin
That's pretty impressive, but I wonder if that computer has the techmology to handle a timeout of
99999999999999999999999999999999999109999999...
Admin
In other news, get off my lawn you damn kids! But seriously, did I miss the memo on "rediculous" or what?
Admin
If you started working at age 18 and will retire at age 67 then 1,577,881,080 seconds would take you through retirement if you created this mess on the first day.
So put in 9999999999 and if it fails after that, why would you care?
Admin
Admin
If I'd spotted that his retirement wouldn't have been far away.
Admin
I'm waiting for Hear a Blog to narrate this post.
Admin
The strongest timeout.
I believe it.
Probably some "programmer" got frustrated with a timeout and just added as many nines as it took before he got bored.
His frustration may have been due to working on the wrong part of the code to begin with. I worked with a guy once who added a five-second delay into one of my scripts to avoid trying to use the results of an asynchronous HTTP request before it was done loading. (We were stuck doing some fairly complex things around a jqGrid that neither of us understood all that well.) It wouldn't have bothered me if he hadn't put it in an "else" branch that got executed INSTEAD of the request in question, tested exactly once (upon which, by chance, everything happened to work out), called it fixed, and stuck a comment above the delay that lambasted anyone reading the code for even thinking of removing it.
Admin
You just know that there was an argument in the coding cubicles that went something like this:
Norm: Your email parser isn't completing.
Harold: It's because your database server is too slow.
Norm: My know my database server is on a slow server, you have to work around that.
Harold: I am. I am giving the script plenty of time to complete.
Norm: No your not, it's timing out too quickly. Can't you prevent PHP from stopping the script?
Harold: I could, but I am NOT going to make it wait FOREVER. That's bad programming practice.
Norm: But 9 seconds? That's not enough time if the server is swamped. Make it wait longer.
Harold: Longer!?! How about 99 seconds? Or 999 seconds? I know, how about (holds down the 9 key while making angry faces at Norm...) THAT long! Will that make you happy!
Harold stomps off, exit stage left...
Admin
That's 131,008 9's... Took a bloody long time to count 'em all!! :D
More to the point, how would you express that many nines in words... How many centuries would that many seconds equal... To the supercomputer!
Admin
Admin
A long one, I think. To Rio de Janeiro, by preference
Admin
Oh yeah? MY timeout code used 131009 9's. That's more than 10 times as large!
-- Lyle
Admin
Maybe he thought that set_time_limit took the parameter in yocto-seconds? Even if he did, that's still a freakin' long-ass time limit.
Admin
Ignoring the first math error, 10^308 - 10^300 = 10^300 *(10^8 - 1), or still somewhere around 10^308, we're talking about floating points, of which there are not 308 or so significant digits stored.
Admin
I can see it too, looks like Guernica
Admin
That sets the timeout to about 10^131000 seconds. For perspective, the Sun will become a red giant and swallow the Earth in about 1.6*10^17 seconds
Admin
Original coder was probably a Yoko Ono fan.
Admin
Are ridiculing his spelling?
Admin
Not sure of the scale here, but the age of the universe is ~4.3 x 1017 seconds - or about 1061 planck moments.
10**300 seconds would be enough time to create and destroy about 6 universes in series.
Admin
Admin
Wo ist dein nein? LOL
Admin
Admin
Admin
Admin
(Yes it is. So is evar. Also borken. And sometimes teh, though that one's more frequently an actual typo.)
Admin
Because it would have popped out '42' after 10000000003 seconds.
Admin
Admin
No, we've already got 42. It would have popped out the question to which 42 is the answer.
Admin
captcha: damnum. Number of dams? Send the noncommittal response to hell?
Admin
'Rediculous' is probably the new 'prolly'. It's ridiculous.
Admin
This reminds me of the abomination known as MathCad. Numeric infinity is defined as 10^307. Numbers are, however, double values. This means that you can actually do something like this (if I can remember the syntax correctly): a := 10^308 (∞ < a) = true
Admin
No no, it's "Riddikulus". The Boggart-banishing spell.
Admin
I don't know what units that time limit is in, but the entire universe is only about 410240038000000000 seconds old.