Artikel-Schlagworte: „Poem“

‘The Daily Ritual’

<?php
/**
 * 'The Daily Ritual' - A code poem by Sebastiaan de Jonge
 *
 * @author Sebastiaan de Jonge
 * @since 2010.03.01
 * @see http://www.identum.at/blog
 */
 
// Settings
$location = 'Sopron, Home';
 
// Sleeping
$alarm->buzz();
grmbl('..');
flipOver(RIGHT);
 
// If there is time we can sleep a little more
$alarm->buzz();
while(time() < (26400 + mktime(0,0,0,date('m'),date('d'),date('Y')))) {
	grmbl('Five more minutes..');
	snooze();
	sleep(300);
}
 
// Sleeping time is over, time to get up!
$alarm->buzz();
turnOffTheAlarm();
echo 'Hello world!';
 
// Get ready to go to work
freshenUp();
dressUp();
echo 'Woohoo!';
 
// Grab some cookies
$cookies = getCookies();
foreach($cookies as $cookie) {
	eat($cookie);
	echo '*yumyum*';
 
	// Check if there is time to eat more cookies
	if(time()  (28680 + mktime(0,0,0,date('m'),date('d'),date('Y')))) {
		run(array('direction' => 'Train'));
	}
}
 
// Get on the train and travel to Vienna
getOnTheTrain();
$seated = sitDown();
while($seated) {
	work();
	$location = checkLocation();
 	if($location == 'Vienna, Wien Meidling') break;
}
walkToSubway('U6');
 
// Take the subway
$trainIsThere = seeIfSubwayIsThereAlready(array('direction' => 'Florisdorf'));
if($trainIsThere) {
	run(array('direction' => 'Subway'));
}
else {
	waitUntilSubwayIsThere();
}
 
getOnSubway(array('direction' => 'Florisdorf'));
while($location != 'Vienna, Westbahnhof') {
	$location = checkLocation();
}
getOffSubway();
 
// Switch at Westbahnhof to the U3, direction Ottakring
walkToSubway('U3');
$trainIsThere = seeIfSubwayIsThereAlready(array('direction' => 'Ottakring'));
if($trainIsThere) {
	run(array('direction' => 'Subway'));
}
else {
	waitUntilSubwayIsThere();
}
getOnSubway(array('direction' => 'Ottakring'));
while($location != 'Vienna, Ottakring') {
	$location = checkLocation();
}
getOffSubway();
 
// Finally, the last walk towards Identum
if(itsRaining()) getUmbrella();
while($location != 'Vienna, Sandleitengasse 32') {
	walk(array('direction' => 'Sandleitengasse 32'));
}
 
// Arrived at work!
echo 'Woohoo!';
getCoffee('strong');
sitDown();
echo '*Pfew*';
?>