Movies {as code} ⇒

Ben Howdle has a blog called “Movies {as code}.” Here’s the gist1 of it:

boolean foundLove = false;
Man phil = new Man();
Woman rita = new Woman();

while (!foundLove)
{
    Day today = new Day();
    new Song("I Got You Babe").play();
    today.wakeTheGroundhog();
    switch (phil.getMood(today))
    {
        case "love" :
            foundLove = phil.triesToGet(rita);
            break;

        case "joyful" :
            phil.helpsPeople();
            break;

        case "sexual" :
            phil.tricksAWomanToSleepWithHer();
            break;

        case "thirstForKnowledge" :
            phil.learnsSomeStuff();
            break;

        case "suicidal" :
            phil.killsHimself();
            continue;
    }
    phil.goesToBed();
}

Many of the snippets of “movie code” are overly simplistic2, but some, like this one, use basic coding concepts to break down a film from a particular angle, offering a sort of exploded view of the plot. Neat.

Added to the RSS routine.


  1. Pun intended, nerds. ↩︎

  2. The post for Trainspotting simply says using;↩︎