Pseudocoded

$brain->viewSource()

Archive for June, 2007


The Paris Hilton saga

function onRelease() {
 
    if ($time->served < $time->sentenced)
 
        start ( new Riot() );
}

Last season of Sopranos

#!/bin/bash
 
for character in $(ps -o pid= -G sopranos); do
    kill -9 $character;
done

Diagnosing my symptoms

if ( in_array( $symptoms, 'cough' ) ) {
 
    if ( watch( 'House' ) ) {
 
        return select_one(array( 
            'african sleeping sickness', 
            'arteriovenous malformation', 
            'brain cancer', 
            'epstein-barr',
            'gout',
            'leprosy',
            'ornithine transcarbamylase deficiency',
            'rabies',
            'subdural hematoma',
            'tapeworm',
        ));
    }
    else {
 
        return 'common cold';
    }
}

The Digg algorithm revealed

$story->diggs = 0;
 
for ( $i = 0; $i < $story->title->exclamation_points; $i++ )
    $story->diggs += 500;
 
if ( preg_match('/^The Best .* Ever!$/', $story->title) )
    $story->diggs += 1000;
 
if ( $story->opinion == 'is cool' && $story->contains(
  'Kevin Rose', 'iPhone', 'FireFox', 'Wii' ))    
    $story->diggs += 2500;
 
if ( $story->opinion == 'sucks' && $story->contains(
  'RIAA', 'Zune', 'Netscape', 'Bill Gates' ))    
    $story->diggs += 5000;

Rain, rain go away

$days_between_mows = 7;
 
while ( $today->rain == 0 ) {
 
    $days_between_mows += 1;
}

Microsoft Surface

while ( ! $surface->released ) {
 
    if ( $surface->creator == $zune->creator ) {
 
        $skeptical = TRUE;
    }
}

What I ate as a bachelor

if ( ! smellsFunny( $milk ) ) {
 
    return combine( $milk, $cereal );
}
else if ( ! looksFuzzy( $bread ) ) {
 
    return combine( $bread, $peanut_butter, $jelly );
}
else {
 
    return combine( $hot_water, $ramen_noodles );
}