- 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
Frist!
You missed TRWRTF: $valor = $valor;
Admin
If you stare at it long enough you can see the hidden 3D image.
Admin
OMG... what an absolute and genuine idiot.
IIRC, set_time_limit takes a number of seconds as argument.
thus, a value of 473040000000000000 (=4.7304e+17) seconds = 15 billion years roughly equals the lifetime of the universe so far.
still not enough for some, apparently...
people who do something like that should be subject to an occupational ban for every carreer except sweeping pavements.
Admin
Admin
Count the time left before you would retire from the company. Add 1 second to it. The number you get is "freaking huge enough". Don't waste your time.
Admin
Oh well, I really didn't believe people posted fake WTFs in here but this thing is just too bad. I refuse to believe this really happened.
Admin
It's a good thing they set a time limit. Anything longer than that amount would be just too long.
Admin
Not to mention the fact that set_time_limit() restarts the timeout counter from zero. So given that this is executed each iteration of the loop, even if it took 100 billion years to execute there would still be plenty of time left over.
Admin
My mouse wheel seems to be stuck in an infinite loop.
Admin
Perhaps an introduction to scientific notation is in order here.
Admin
You know, that's 64 9's short of being exactly 128 KB (not counting the newlines). Couldn't they at least add 64 more 9's to round it out??
My guess is whoever wrote this... abomination typed a 9, selected all, copied and pasted, and then repeated that 16 more times, thereby doubling it each cycle up to 2^17 9's, more or less.
Admin
"You know, that's 64 9's short of being exactly 128 KB (not counting the newlines). Couldn't they at least add 64 more 9's to round it out?? " TWTF is that you actually did the math. TRWTF is that I verified your math, pray that I don't verify it further.
Admin
au contraire, I do pray that you verify the math even further. After all, peer reviewed comments are all that stands between making the craziness of commenting into the mad science of commenting.
Admin
Are you really sure that it was between 10^250 and 10^300? The maximum value double precision floating point numbers can hold is on the order of 10^308, and I don't see why PHP would use something else.
Of course, it is PHP, so it might use something else...
Admin
Hey, look - there is a sailboat!
Admin
Good thing that the dev didn't waste his time with useless zeros and used nines instead.
Captcha: populus, like the set_time_limit config
Admin
Wow It's a schooner!
Admin
The real WTF is the lack of imagination of the person who wrote this. Suppose the value is in miliseconds:
One day is +- 8,64 * 10^7 One year is +- 3,15 * 10^10 THE AGE OF THE UNIVERSE is +- 4,33 * 10^23
I guess this program was meant to last till the end of the world.
Admin
131,008 digits. Thats...excessive. Its approximately 10^130985 times the pf instructions you execute if you had a 8-core 3Mhz processor running for the length of the universe. This number is so large, that even in comparison to ridiculous numbers like that it is still unfathomably large.
Admin
Admin
I have seen something similar where they at least put the huge number into an external file and included it everywhere. Even where it wasn't needed. They were wondering why their application always took so much ram, even on things where not much was happening... Well, there's your problem...
Admin
Isn't it obvious? This is the decimal representation of FILE_NOT_FOUND.
Admin
This code could use some serious refactoring!
There I FTFY
Admin
I thought I saw a two
Admin
Michael J. "Crocodile" Dundee: [chuckles] That's not a time limit. [he pulls out 999999999999999999999999999999999999999999999...] Michael J. "Crocodile" Dundee: Now THAT's a time limit!
Admin
If you're going to refactor, you may as well do it "properly".
Admin
Don't worry, there's no such thing as two.
Admin
Maybe it's in uninonary system, where the only digit is "9" and thus numbers written in it have a just a cardinality value based on their length, rather than a semantic. So the time limit is close to 128K...in whatever units.
Admin
Is it longer than universe will (probably) last?
Admin
TRWTF is the sloppy writing in the remainder of the article.
Admin
Actually, there is a bug in this code, its missing one '9' !!
Admin
I thought TRWTF was that there is no "mysql_query_params" in PHP.
Admin
I think I found that hidden image, you can see it here:
http://ruigekonijnen.nl/hiddenimage.html
Admin
As the other commenter mentioned, when scrolling up and down the page on my Android Galaxy S it does look slightly 3d. Makes me want to sleep.
Admin
"Setting the time limit to 0 will give no limit" - this means checking the documentation to make sure that that's what happens, and testing to make sure that the implementer read the documentation the same way.
Quicker to enter a gigantic number and not worry about the documentation.
Though admittedly there's gigantic and there's gigantic. Presumably the number was thought of by someone who loses the more normal games of "mine is bigger than yours".
Admin
Admin
Which, for a Brazilian, is very unusual indeed.
Admin
To boldly go where no set_time_limit has gone before!!!!! wooooooooooosh
Admin
Maybe the PHP parser overflows the mantissa and chooses to use +-INF instead. As you said, it is PHP... Maybe it parses the number as a boolean, and gets INF when converting it to a double.
Anyway, hey, a Brazilian WTF!!! I've tried to submit things to it before, but having the important thing written in portuguese don't help.
Admin
Obviously, the boss told him "I'm sick of this thing timing out. Set it to the highest possible number you can!"
Values between 10^300 and 10^308 in PHP are reserved for error codes.Admin
I would so love that to be true :)
Stereoscopic images using only a few px difference in characters - surely there's a library that does that somewhere?
Admin
Considering the universe is not even that old.....
Admin
Admin
Admin
Portuguese! Brazilian! Wow!
Admin
How about instead, write some code that goes back in time, computes, then is ready when time to execute?
Admin
or Dog catching.
Admin
Admin
There is a logical but boring explanation for this. Someone got fed up with fixing the same shitty time-out problem for the 7th time after sitting in 10 meetings with the lead-architect-gury who proudly claimed millisecond response time. Instead of just writing 1e100 or something simple, he/she spent the next 5 mins pressing 999999999999... out of frustration.
This is a cry for help.
Admin
I find it hard to believe that at no point did the person who copy-pasted umpteen lines of 9's say to themselves "hm, is there a better way to do what I'm trying to do here?" Then again, I see that kind of behavior every day.
You dumb bastard. It's a sailboat!