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

May 19, 2013 | Action | submitted by SolidSnake

Cube

var humans = 6;
var Cube = function(humans) {

    if (humans>1) {
        if ( Math.round(Math.random()*3) === 0 ) {
            humans--;
            Cube(humans)
        }
    }
    else {
        End()
    }
}

Cube(humans)
Vote up this code2

| Action | submitted by SolidSnake

Time Out

var age;
function yourLife() {
    age = 0;

    while (age<25) {
        if (birthday) age++;
    }

    setTimeout(function() {
        delete yourLife;
    }, 365)
};

$(document).ready(function () {
    yourLife()
});
Vote up this code0

| Action | submitted by Leonardo

Men in Black 3

$black[3] = "men";
Vote up this code0

| Science Fiction | submitted by docjekyll

Ghost in the Shell (1995)

/*
 * Ghost-in-the-Shell.js
 * Author: Masamune Shirow, Kazunori Ito
 * Date: Oct 18, 1995
 */


var section9 = [
    aramaki, //chief
    kusanagi, //the major
    batou,
    togusa,
    ishikawa
];

console.log(typeof section9.kusanagi);      //"cyborg"
console.log(section9.kusanagi.isMan());     //true
console.log(section9.kusanagi.isMachine()); //true
console.log(section9.kusanagi.hasSoul());   //true

console.log(typeof section9.togusa);        //"human"
console.log(section9.togusa.isMan());       //true
console.log(section9.togusa.isMachine());   //false
console.log(section9.togusa.hasSoul());     //true

console.log(typeof the_puppet_master);      //"ai"
console.log(the_puppet_master.isMan());     //false
console.log(the_puppet_master.isMachine()); //true
console.log(the_puppet_master.hasSoul());   //undefined
Vote up this code0

| Comedy | submitted by David Trihy

Happy Gilmore

public class HappyGilmore throws BallNotInTheHoleException,
                                 BallStillNotInTheHoleException
{
    public static void main(String[] args)
    {
        HappyGilmore happyGilmore = new HappyGilmore();
        try
        {
            happyGilmore.holeInOne();
        }
        catch(BallNotInTheHoleException exception)
        {
            happyGilmore.getInTheHoleBall();
        }
        catch(BallStillNotInTheHoleException exception)
        {
            happyGilmore.whyWontYouGetInTheHoleBall();
        }
        finally
        {
            happyGilmore.suckMyWhiteAssBall();
            if(happyGilmore.isAngry())
            {
                happyGilmore.punchSomeone();
            }
        }
    }
}
Vote up this code1

| Action | submitted by Lee Gunn

Superman

   Base.prototype = xy;
Vote up this code1

| Adventure | submitted by Arran

A Bug’s Life

public class Bugs
{
    public int Life()
    {
        return 100;
    }
}
public class Program
{
    public static void Main(string[] args)
    {
        Console.Write(new Bugs().Life());
    }
}
Vote up this code0

| Action | submitted by Arran

Saving Private Ryan

private static void Main(string[] args)
{
    new Private("Ryan").Save();
}
Vote up this code2

| Science Fiction | submitted by

Inception

bool dead = false;

void goDeeper()
{
    if(dead == true)
        return;
   
    goDeeper();
}

int main(void)
{
    goDeeper();
}
Vote up this code2

March 23, 2013 | Family | submitted by Raki

Robot and Frank

puts(Robot && Frank);
Vote up this code1