Movies as code - Free your coding mind...

"Unfortunately, no one can be told what the Matrix is. You have to see it for yourself."

Morpheus, The Matrix

March 8, 2012 | Action | submitted by Niek de Gooijer

Cube

public class Cube
{
    public Cube(x, y, z)
    {
        if(!isPrime(x) && !isPrime(y) && !isPrime(z))
            this.add(Trap.random())
    }
}

| Comedy | submitted by ToYonos

Catch Me If You Can

public class AbagnaleJr extends Exception {}

public boolean CathMeIfYouCan()
{
    try
    {
        launchMovie();
        return false;
    }
    catch (AbagnaleJr Franck)
    {
        System.out.println("Caught !");
        return true;
    }
}

| Drama | submitted by ToYonos

Pi

public double Pi()
{
    return Math.PI;
}

| Mystery | submitted by Monkeystation

The Third Man

var men = ["man", "man", "man"];
return men[2];

| Adventure | submitted by Sandy

The Neverending Story

        public string Story()
        {
            return Story();
        }

| Action | submitted by Matt

Jaws

Public Function IsBoatBigEnough() as Boolean
    If Shark.Length => (Boat.Length / 2)
        Print("We're gonna need a bigger boat.")
        Return False
    Else
        Return True
    End If
End If

| Adventure | submitted by Ben Howdle

Back To The Future


    $speed = 0;
    function doc($great_scott){
        echo $great_scott;
    }
    while($speed <= 88){
        if($speed == 88){
            doc("We're sending you back, to the future");
        }
        $speed++;
    }
?>

| Comedy | submitted by LucP

The Big Lebowski

var lebowski:Character = new Character();
var walter:Character = new Character();
var donny:Character = new Character();
var whiteRussianCount = 1;
var roomTyingCarpet = true;

firstScene();

function firstScene(){

    var moneyLebowski = array("wheres the money lebowski?", "wheres the fucking money lebowski?", "where's the money lebowski?");

    for(var i:int = 0; i > moneyLebowski.length; i++){

        trace(moneyLebowski[i]);

        if(i == moneyLebowski.length){
             roomTypingCarpet = false;
        }else{
            lebowski.shoveFaceInToilet();
             whiteRussianCount -= .2;
             trace('watch the beverage, man!');
        }
    }

    if(whiteRussianCount > .3){
        goBowling();
    }
}


function goBowling(){
   
    if(donny.notListening){
        trace('shut the fuck up, donny');
    }

    whiteRussianCount++;
    if(walter.havingBadIdeas()){
        doCrazyAdventureWithRestOfCast();
    }
}

| Action | submitted by Sandy

Top Gun

SELECT TOP 1 *
FROM [Guns]

| Horror | submitted by Sandy

28 Days Later

var date = DateTime.Now.AddDays(28);