Songs in code: the logic behind emotions

Songs in code: the logic behind emotions

songsincode Rick Astley
Songsincode: Is nothing sacred? 😉

As WordPress users are often told by WordPress, “code is poetry“. But what happens when coders take a look at songs and determine the logic behind the songs? A geeky in-joke has now become one of Twitter’s funniest trends. Type #songsincode into the Twitter search engine and you’ll be bombarded by song titles and lines expressed as php or Apache code. Examples?

var i = {shot:{sheriff:true,deputy:false}}

That reads as “I shot the sheriff, but I didn’t shoot the deputy”. Or how about

load(int tons) { if (tons == 16) { older(days(1)); debt++ } }.

Yep, that’s “16 tons, and what do you get? Another day older and deeper in debt” (courtesy of @efficacy).

Personally, I find the whole idea a scream. But what hits the funny bone exactly? Is it like synthetic voices trying to express emotions? Or is it how easily complex personal thoughts can be reduced to code? Or the obvious comment that engineers are always analysing things?

Inevitably, someone has started a site with the better ones. This is unfolding as I type this, so I’m not sure what you’ll find. So check SongsinCode and put your left-hand brain to work on right-hand matter.

And my shot at it?

{ if (baby == left me) var i ={find:{place to dwell:target=”new”}}

Don’t tell me the syntax is shot. I know that. Throw me in a fix. As @robertham says, “Geeks just want to have fun”.

One thought on “Songs in code: the logic behind emotions

  1. Some of the #songsincode are fantastic, particularly those which use the structure of the programming language to define the song. This one by royvanrijn is my favourite:

    for(Leaf leaf:leafs)
    { leaf.setColor(new Color(139,69,19)); }
    sky.setColor(Color.GRAY);

Leave a Reply

Your email address will not be published. Required fields are marked *