You won't want to miss out on the world-class speakers at TNW Conference this year 🎟 Book your 2 for 1 tickets now! This offer ends on April 22 →

This article was published on March 5, 2012

Movies are way more interesting when they’re rewritten with code


Movies are way more interesting when they’re rewritten with code

Me? Watch movies? Psh. Why pay good money watching a movie when I could just find out what happens by reading code? It’s time to give in to your inner geek, my friends.

Created by Ben Howdle, Movies as Code is exactly what you think it is: Popular movies rewritten in a programming / markup language. Somehow, the plot of a multi-million dollar motion picture can actually be more enticing when written sarcastically as a CSS pun (Read: Titanic). Check out Die Hard:

<?php
$characters = array();

$characters[‘good’] = ‘John McClane’;
$characters[‘bad’] = ‘Hans Gruber’;

$situation = ‘Hostage situation’;

if($situation == “Hostage situation”){
echo “Winner = ” . $characters[‘good’];
echo “Loser = ” . $characters[‘bad’];
}
else {
$didNotFallOfARoof = $characters[‘bad’];
}

?>

Maybe you’d rather just sit down and watch the films, but if you’re a programmer, Web designer or just have an uncontrollable geek side, you’re sure to get a kick out of this. If not, then I’ll have to revoke your nerd street cred. Here’s another movie, Speed:

<?php
$minSpeed = 50;
$busMph = 70;
while ($busMph => 49):
$busMph–;
if($busMph < $minSpeed) die();
endwhile;
?>

You can see all of the movies here, including Ace Ventura: Pet Detective and Memento. The site only has a few selections so far, so if you’re captivated by the idea, you should definitely submit your own (so long as the code actually runs).

The <3 of EU tech

The latest rumblings from the EU tech scene, a story from our wise ol' founder Boris, and some questionable AI art. It's free, every week, in your inbox. Sign up now!

➤  Movies as Code

Get the TNW newsletter

Get the most important tech news in your inbox each week.