PHP-Poem

Tags:, | Blog | Geschrieben von Nadja | 2 Kommentare
Jun 06 27

Ein kleines PHP-Gedicht von 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;

via Jad’s thoughts


« Dabble BDMehrsprachiges Wordpress »

2 Kommentare

Kommentieren | Diskussion verfolgen | Trackback URI
  1. Gravatar des Kommentierenden 1. am 29.06.06 um 22:57 von Hmm? » Blog Archiv » PHP- Poem |

    [...] … gefunden auf http://www.script-artists.de [...]

  2. Gravatar des Kommentierenden 2. am 01.07.06 um 21:12 von chris |

    bräuchte man nur noch eine Freundin, die das versteht.
    MfG
    Chris



Sag deine Meinung

Du kannst diese HTML-Tags benutzen:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

* Diese Felder müssen ausgefüllt werden.




Safari hates me