BB Obfuscated Code/Safari Books Online contest winner!

Last week, we announced an Obfuscated code contest with a geektastic prize provided by our sponsor, Safari Books Online, who also offered BB readers one month free online access to any of the following books: JavaScript: The Definitive Guide, Learning Perl, and Head First HTML with CSS & XHTML. The goal was to write a wonderfully obfuscated code snippet that prints out the phrase "Boing Boing." The prize: one year of access to the complete Safari Books Online Library, a digital library of technical books from the likes of O'Reilly, Apress, and Addison-Wesley.

 Images Safari Logo-1 We were absolutely amazed by the entries. There are some incredible bits of code in there. But we had to pick one, so we did. Or rather Joel Johnson did, because this whole thing was his idea to begin with. So we are pleased to announce that the winner of the inaugural Boing Boing/Safari Books Online: MCD. The entry was pithy, clever, and got the job done (see above). Congratulations, MCD! And thanks to Safari Books Online for sponsoring the contest!



  1. This must be a sign. I just found Safari Books Online yesterday, they have a large selection at an OK-ish price. It was almost too good to be true, there had to be a catch, like some sort of DRM or something. But I trust BoingBoing not to be sponsored by some scam.

  2. Ha! That’s pretty good: Simplicity itself if you know that you can ‘++’ a string, but very difficult to work out what it will print in advance without actually running it.

  3. Well, let me be the first to point out that the program doesn’t print out the string “Boing Boing.” and should thus be ineligible for the contest… but hey, you guys make the rules.

  4. It was close enough. :)

    And honestly, almost every entry was amazing. You guys should really go check out the other ones.

  5. That looks really cool. Could one of you Perl coders kindly explain how this script works? Inquiring minds want to know.

  6. A tech writer I know once referred to these obfuscation contests as “carrying coals to Newcastle.”

    As a working coder confronted with Perl and even COBOL on a regular basis, I can only concur.

  7. I’m sorry, but compared to the winner of the 2000 Obfuscated Perl contest, this is not especially wonderful. According to Les Peters, the author, this program comprises:

    two lines of code that parses two lines of embedded comments in the code to read the Mayan numbers representing the individual ASCII characters that make up the magazine title, rendered in 90-degree rotated ASCII art.

    Here it is in all its beauty. Bow down before it. C’mon, these are ASCII characters representing Mayan numbers representing ASCII characters! The man is an insane genius!

    #:: ::-| ::-| .-. :||-:: 0-| .-| ::||-| .:|-. :||
    /:.:/xg;s/:/../g;$Q=$_?length:$_;$q+=$q?$Q:$Q*20;}print chr($q);}}}print"\n";
    #.: ::||-| .||-| :|||-| ::||-| ||-:: :|||-| .:|

    It prints out … Well, why spoil it? Run the code, but have a guess first. Do you get it? Do you really get it?

  8. C’mon, there should be a total mental disconnect in obfuscated code competitions between what you read in the code itself and what appears on the screen when you run it. Pithy and terse do not necessarily an obfuscated code winner make. There should ideally be hours of head-scratching and debugger work in figuring out how a three-line obfuscated C program can possibly print “Bloom County” in an elegant cursive ASCII art font, alongside versions of the strip’s main characters, with the O’s for Opus’s eyes. You should go blind and/or mad with frustration after picking apart the keyboard salad of obfuscated Perl that turns out to be a fully featured Atari 800 emulator, including the POKEY chip and joysticks. And so on. These kind of programs should look like invocation rites for some kind of demonic entity rather than an exercise in well structured code, and should leave you feeling as equally awestruck as if you had been in the Dark One’s presence, if not necessarily by virtue of the result then in the execution.

    I have said my piece.

    Congratulations to the winner, in traditional sour-grapes loser fashion.

  9. Dude,

    You didn’t even enter the contest. That’s not sour grapes. That’s just a big steaming pile of fail.

  10. Ahem. W00T! :-)

    Daen – you’re right, this doesn’t hold a candle to most obfuscated Perl. (Shoot, it’s cleaner than some production code.) But the original call was for “…the shortest, most elegant, or creative bit of code” – and to that end, I thought this fit the bill perfectly. Brevity being the soul of wit, and all that, you know.

    And for Naomind, the code simply takes advantage of an obscure feature of Perl that SamSam noticed, documented here. If you increment a non-numeric string, you get a “string increment” with carry. So you can get from “McD” to “BOInG” just by incrementing a number of times – but (as in so much of life), the real trick is knowing when to stop.

    Congratulations to all the competitors, there’s some truly baffling code in there. I’ll leave you with a quick link to my favorite obfuscated Perl of all time, Erudil’s classic Camel Code.


  11. My feed reader didn’t show the .jpg, so I couldn’t read the code until I came here directly. But as soon as I saw that Joel chose MCD’s entry I immediately thought, “Oh, the memorable one!”

    Great choice. Congrats, McD.

    Joel, I give up. What does “lureour” (the <alt> text) mean?

  12. I guess I’ve been in the mines too long; it seems like pretty straightforward perl to me.

    I was playing games with I/O buffer width and ephemeral pseudo-devices in mine, but I suppose nobody else found it amusing. Such things are most likely taken for granted in the post-x86 world… Oh well.

    Congratulations, McD! Well played!


  13. I thought this was great!

    Well done all and MCD. I am not quite the obfuscation-connessiur that some here seem to be, but when I ran MCD’s code and BOInGBOInG popped out, I burst into a grin.

    Well done again! I will have to check out some other examples in the thread (which I somehow missed the first time).

Comments are closed.