PHP: Sad Poem :(
PHP-General – Martin Alterisio
A sad poem of an algorithm where solitude brought excessive use of cpu
cycles and memory allocation for redundant data (it copied over and over
again the same image till all memory was filled with it)
$timeWaiting = 0;
while (!$you->near($me)) {
$me->thinkAbout($you);
switch (true) {
case $timeWaiting < 5:
$me->wait($you);
break;
case $timeWaiting < 10:
$me->worry();
break;
case $timeWaiting < 20:
$me->lookFor($you);
break;
case $timeWaiting < 40:
$me->worry();
$me->lookFor($you);
break;
case $timeWaiting < 80:
$me->worry();
$me->cry();
$me->lookFor($you);
$me->lookFor($you);
$me->lookFor($you);
break;
case $timeWaiting < 160:
$me->worry();
$me->cry();
$me->drink();
$me->lookFor($you);
$me->lookFor($you);
$me->lookFor($you);
$me->thinkAbout($you);
$me->thinkAbout($you);
$me->cry();
$me->lookFor($you);
$me->lookFor($you);
$me->drink();
$me->drink();
break;
default:
throw new CantLiveWithoutYou();
die("alone");
}
$timeWaiting++;
}
$me->happy = true;
Related Websites 









June 26th, 2006 at 11:00 AM
Only a geek would think of this
and let me assure you. If this is the kind of poetry he writes… then I gaurantee you. The closest he ever was to the other gender was when he was born
June 26th, 2006 at 5:21 PM
Wow. Amazing good! =o) Read it, loved it, passed it on to my fellow coders. Let Geektom Ring!
June 26th, 2006 at 8:31 PM
Wow, very nice.
I think you’re in love… aren’t you?
June 26th, 2006 at 9:08 PM
most of the time i dont know what ur talking about :S
June 26th, 2006 at 9:10 PM
but this thing seem funny heh!
June 27th, 2006 at 12:03 AM
loooool nahfeh
7abbait.ha
June 27th, 2006 at 6:57 AM
Watchout! The Geek2.0 ™ revolution is coming! The geeks are on the loose.
I don’t understand why people believes us coders can’t be creative in nothing else than coding. This “poem” was first posted on a spanish forum where I’m an habitue. Paradoxically many users from this forum who frequent the programming subforum are also habitues of the literacy subforum.
In the spirit of this paradox I ussually give a little more life to my posts combining creative literature work and computer science theory, for example, introducing the Smarty template engine I referred to the once popular tv series “Get Smart” and combined it to the name of the library, “Get Smarty”, and a ficticious narrative using gags from the tv serie (not many caught the irony but… what the hell, if I make one laugh while learning something new then my job is done).
This poem came to life in the same way, just a joke to make the life of us developers a little more “human”. Tomorrow, clients will ask for all the same boring stuff.
June 27th, 2006 at 7:02 AM
Tudy,
If you’re asking the author if he’s in love he would say:
Yeah, I’m always in love, they may have hurt me in the past but I can’t live without loving at least one of them.
June 27th, 2006 at 10:33 PM
[...] via Jad’s thoughts [...]
June 27th, 2006 at 11:50 PM
these things make me feel like an alien for not being a computer freek!!
loooool
June 28th, 2006 at 12:09 PM
[...] Fusilado de Jad’s Thoughts. [...]
June 29th, 2006 at 11:17 AM
Im not really good with PHP, but since when does it have Throw??
Anyways, this is so sad. This guy will never be truly happy. Or This guy is never breaking out of this loop, and will die(”alone”).
Unless of course one the following:
$me->thinkAbout($you);
$me->wait($you);
$me->worry();
$me->lookFor($you);
$me->cry();
$me->drink();
May change a parameter that would make $you->near($me) return a true.
Alternatively, the die(”alone”) function would throw before excuting the exit. Of course, assuming of course, that the “throw new CantLiveWithoutYou();” actyally alows the execution to get to die(”alone”);.
SUPER GEEK HERE!! Still got it!
June 29th, 2006 at 11:23 AM
hahais
and yes php have throw
June 29th, 2006 at 6:42 PM
Guys,
you forgot to digg it
June 29th, 2006 at 7:52 PM
Well, he will never die(’alone’);
He will have a Fatal Error from an Uncaught Exception, and die in the hospital.
September 16th, 2006 at 11:34 AM
[...] Fik tilsendt nedenstående vers af en medarbejder, og syntes da at jeg ville dele denne algoritmes triste skæbne, med jer alle. Det kan findes på http://jadmadi.net/2006/06/26/php-sad-poem/ hvis du er interesseret [...]