Monday, June 26, 2006

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;


[tags] php, sad, poem, php-general, mailing, list, funny [/tags]

16 comments:

  1. 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 :D

    ReplyDelete
  2. Wow. Amazing good! =o) Read it, loved it, passed it on to my fellow coders. Let Geektom Ring!

    ReplyDelete
  3. Wow, very nice.
    I think you're in love... aren't you?

    ReplyDelete
  4. most of the time i dont know what ur talking about :S

    ReplyDelete
  5. loooool nahfeh :D 7abbait.ha

    ReplyDelete
  6. El Hombre Gris (Martin Alterisio)June 27, 2006 at 9:57 AM

    Watchout! The Geek2.0 (tm) 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.

    ReplyDelete
  7. El Hombre Gris (Martin Alterisio)June 27, 2006 at 10: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.

    ReplyDelete
  8. these things make me feel like an alien for not being a computer freek!!
    loooool

    ReplyDelete
  9. 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!

    ReplyDelete
  10. Well, he will never die('alone');
    He will have a Fatal Error from an Uncaught Exception, and die in the hospital.

    ReplyDelete
  11. S?ɬ?ren Malling : PHP PoesiSeptember 16, 2006 at 2:34 PM

    [...] 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 [...]

    ReplyDelete