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).
Get the TNW newsletter
Get the most important tech news in your inbox each week.