carols in code

, , December 20th, 2010

Programmers (and all geeks) enjoy Christmas too, so here’s my seasonal take on the #songsincode Twitter hashtag game. How many can you get?

var wenceslas = new Person({
    rank: 'king',
    alignment: 'good'
});
$.bind(FeastOfStephen, function() {
    wenceslas.lookOut();
});
night.volume(0);
night.opacity(0.5);
night.objects.velocity(0.0,0.0);
night.objects.gamma(1.0);
foreach (Person ye: people) {
    if (ye.isFaithful() && ye.isJoyful() && ye.isTriumphant()) {
        bethlehem.add(ye);
    }
}
if (lord.isCome()) {
   $('*').addClass('joy');
   $.post('earth://', { king: lord });
   $('heart').each(function() { this.addCapacity(sizeof(lord)); }
}
class God {
   ...
   function rest() {
      foreach ($gentlemen as $man) {
         if ($man->merry) {
            $man->rest();
            $man->dismay = array();
         }
      }
   }
   ...
}
we.each { | one |
    one.wish(you, MERRY_CHRISTMAS);
    one.wish(you, HAPPY_NEW_YEAR)
}

Inspired by Retro Programming. Feel free to submit your own!

Merry Christmas, and may all your Christmases be #ffffff!

John Girvin

John Girvin is a software engineer, sci-fi buff, cyclist and retrocomputer fan (ie: nerd) from Belfast, Northern Ireland.

If you liked this article, why not subscribe to the RSS feed for more?

You may also enjoy these great related articles:

24 Comments:

  1. Ciaran (twitter: @)

    goose.get(fat);
    if (cashAvailable > penny)
    {
    oldman.getHat().add(penny);
    }
    else if (cashAvailable > hapenny);
    {
    oldman.getHat().add(hapenny);
    }
    else if (cashAvailable > farthing)
    {
    oldman.getHat().add(farthing);
    }
    else
    {
    God.bless(you);
    }

  2. Ciaran (twitter: @)

    Argh, misplaced semi-colon. I’ll hand my badge and my code gun in at the desk.

  3. John Girvin

    I don’t think much of your repeated oldman.getHat() method chaining either. Get out. ;)

  4. Ruth (twitter: @)

    Ciaran, I wouldn’t pass that oldMan.getHat() malarkey from a grad. Clearly there is only one solution: MANAGEMENT.

  5. Ciaran (twitter: @)

    Hey, I was attempting to mirror the repeated structure of the song. Fine, how’s this:

    ArrayList noels = getNoels();
    Collection shepherds = fields.getShepherds();
    angels.say(noels.get(0), shepherds);

  6. Ciaran (twitter: @)

    Hmmm, comment thing ate left and right chevrons.
    :-P to you all, and to all a good :-P

  7. Ruth (twitter: @)

    Better, assuming your ArrayList is already sorted. Unlike certain data I have seen lately :-)

  8. John Girvin

    …and also assuming you’re in pre-1.5 and / or not supposed to be using typed collections.

  9. Ruth (twitter: @)

    I was talking his word for it that your blog had eaten the types due to < and > #frontenddevknowsHTMLentities

  10. John Girvin

    Ah, stupid comment thing. Fair enough.

  11. Ciaran (twitter: @)

    No, data sanitazation is good.
    Otherwise some unscrupolous person could dump some javascript like:
    alert(“XSS”);
    into a comment and get it to fire.
    Could be done smarter though, and is a pain for trying to enter code stuff.

  12. Ciaran (twitter: @)

    And case in point, the script tags around that got et, rather than processed. (Which is what I was checking would happen ;-) )

  13. John Girvin

    Oi, quit trying to h@xx0r my comments!

  14. Ciaran (twitter: @)

    public Sleigh sleigh;

    public void dashThroughSnow()
    {

    int horses = 1;
    sleigh = new Sleigh(horses);

    for (Field field : fields)
    {
    laugh();
    }

    }

  15. Retro Programming (twitter: @)

    Fantastic, your Good King Wenceslas is among my favourites. :-)

  16. Justin (twitter: @)

    try {
    God.getInstance().rest(merryGentleman);
    } catch(TheologyError error) {
    log(“God not found”);
    Christmas.abort();
    }

  17. Dave Anderson

    your god class is an anti-pattern. -1

    func comeletusadorehim(){
    comeletusadorehim()
    //TODO Insert christ clause
    }

  18. John Girvin

    Which antipattern? A do-it-all class? That’s sort of the point of God though, isn’t it? Anyway, you have to expect things like this, it’s not like the universe was designed or anything.

    we.each { | one | one.wish(you, MERRY_CHRISTMAS); one.wish(you, HAPPY_NEW_YEAR) }

  19. Dave Anderson

    God the devine constructor.
    Enjoy the holidays!

  20. Samuel (twitter: @)

    The manager strattera prices 6. A. Reason For

  21. Deuikpcb (twitter: @)

    I’ve lost my bank card pornseksvideo
    nice….very sexy……

  22. Nhagndsp (twitter: @)

    A few months boobieblog
    Hammerfrau….für nen Fick mit ihr dürfte der Riesenpimmel mich auch durchnageln…

  23. Lltfkprw (twitter: @)

    Why did you come to ? http://community.parents.com/asumouooi/blog/2013/04/04/lolita_kingdom_nude_pics brazilian young girls lolita Not especially, honestly. He drinks a lot of water and he tries to eat relatively well, but that’s all. I just naturally love his taste, I guess. :)

  24. Fyudwirj (twitter: @)

    How much notice do you have to give? little nude lolita preeteens not such a nice looking girl..but i reckon she could scrub up well with a minor makeover..fabulous body. great set of tits and awesome areola.nice frontal riding sequence. cum to body would of been better than shooting the sofa!! lol.great clip.

Bang your doors:

Powered by Wordpress | Theme based on Deliciously Blue by j david macor.com
© Copyright 2013 John Girvin, All Rights Reserved.