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 27, 2012 | Science Fiction | submitted by Fred Baa

The Butterfly Effect

jQuery('#butterfly').effect(1000)
Vote up this code1

| Action | submitted by shiela chan

Hunger Games

def rand(district)
  case district
    when 12
      "Primrose Everdeen"
     end
end
Vote up this code0

March 26, 2012 | Action | submitted by

Inception

import Data.Maybe

data Person = Person { name :: String
                     , idea :: Maybe String } deriving Show

data Plan = Target Person | Dream Plan deriving Show

fischer = Person "Robert Fischer" Nothing

needToGoDeeper :: Person -> Plan
needToGoDeeper = Dream . Dream . Dream . Target

implant :: Plan -> String -> Plan
implant (Target person) idea = Target $ Person (name person) $ Just idea
implant (Dream plan)    idea = Dream $ implant plan idea

inception = (needToGoDeeper fischer) `implant` "Let's split the company!"

--afterwards

extract :: Plan -> Person
extract (Dream plan)    = extract plan
extract (Target person) = person
Vote up this code2

| Drama | submitted by flashopen

Doubt

var bronx = {New:Boolean,York:Boolean};
for each(var kid in bronx){
    var select:uint = Math.floor(Math.random()*(("Streep").length))/2;
    trace(kid = select==1?true:false);
}
Vote up this code0

| Action | submitted by automata

No Country for Old Men

import random as r

class Killer:
    def call_it(self, ppl):
        return r.choice(['heads', 'tails'])

    def coin(self):
        return r.choice(['heads', 'tails'])

    def kill(self, ppl):
        ppl = None

class People:
    pass

chigurh = Killer()
fat_man = People()

choice = sugar.call_it(fat_man)

destiny = sugar.coin()

if choice == destiny:
    sugar.kill(fat_man)
Vote up this code0

| Comedy | submitted by Luke

This Means War

#include "HotGirl.h"
#include "SpyGuy.h"

-(SpyGuy *)playMovie() {
        HotGirl *hotGirl = [[HotGirl alloc] initWithActress:@"Reese Witherspoon"];
        SpyGuy *spy1 = [[SpyGuy alloc] initWithActor:@"Chris Pine"];
        SpyGuy *spy2 = [[SpyGuy alloc] initWithActor:@"Tom Hardy"];

        while (![hotGirl  hasChosenDate]) {
                if ([hotGirl  isOnDateWith:spy1]) {
                        [spy2 performPrankOn:spy1];
                } else {
                        [spy1 performPrankOn:spy2];
                }
        }

        return spy1;
}
Vote up this code0

| Action | submitted by automata

Run Lola Run

class Woman:
   def run(self):
      print ' o n<|Vn/>n'

lola = Woman()

while True:
   lola.run()
Vote up this code0

| Science Fiction | submitted by

Tron

#tron {
background-color: black;
color: blue;
}
Vote up this code1

| Fantasy | submitted by

The Princess Bride

public class MontoyaTestSuite {
  @Test
  public void testEnemyChase(Person enemy) {
    if(enemy.getLastName().equals("Ruben")) {
       while(enemy.isAlive()) {
           assertEquals(this.getName(), "Inigo Montoya");
           assertEquals(this.getFather().getKiller(), enemy);
           enemy.setLifeCycle(LifeCycle.DIE);
       }
    }
}
Vote up this code0

| Comedy | submitted by Francesco Bertelli

When Harry Met Sally

var sally;
var harry;
var lady =  women.rand();

class Katz{
   if (lady.get() == sally.get()){
      result Orgasm();
  }
}
Vote up this code1