This post starts with a short and terrifying story followed by a unique anecdote that I’m sure will be worth your while reading.
Damn! Malbolge Again!
We recently took on a maintenance project which was supposed to be a stroll in the park. Just add a couple of new features to the existing system (PHP, Laravel, WordPress in case you care) and then design and implement the next generation one.
However as soon as we peeked under the hood and started scanning the code it became evident that our stroll in the park has turned into a crawl in the dark.
Now I’ve seen some bad code before, but whoever implemented this system (we know who you are by the way!) has brought the word “bad” to artistry level. The web framework was abused in ways unimaginable, the data schema was a disaster, code was entirely unreadable and unmaintainable, and the only convention that was maintained was that there was no convention at all. We looked at each other in terror and simultaneously screamed “Damn! Malbolge again!”.
Malbolge is the nickname that CodeByZ gives to extremely bad code. The kind that makes you cry tears when you see it and even more so when you have to maintain it. But why the hell “Malbolge”? well, apparently hell has everything to do with it, as I will dispense immediately.
So, What Is Malbolge Anyway?
Malbolge is a programming language developed in 1998 with a very simple goal in mind: make it almost impossible to write programs in. Pretty straightforward so far.
Unfortunately around the year 2000, only two years after it was introduced, someone actually succeeded writing the first program in Malbolge, and then along time few more programs became available (although strictly speaking you could probably count them on one hand and none of these programs are actually useful in any way).
Now as it turns out, writing Malbolge programs is truly hell, which is why its esoteric inventor, Ben Olmstead, named it after the eighth circle of hell. In other words, Malbolge is hell by design. For the tough readers amongst you who want to read more about Ben – he has recently been interviewed and shed yet some more light on this obscure language.
Are You Kidding Us?
No, honestly I’m not. Everything is legit.
Give Us Some Proof!
Okay. So here is the famous “Hello World” in Malbolge:
('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#" `CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>
As you can see right away the code above could be improved, so here is an optimized version:
(=<`#9]~6ZY32Vx/4Rs+0No-&Jk)"Fh}|Bcy?`=*z]Kw%oG4UUS0/@-ejc(:'8dc
Now if you don’t believe me this code is real just check out this online Malbolge debugger right here, where you can actually run Malbolge programs.
Believe it or not, someone has even written “99 Bottle of Beer” in this language. It’s a real classic code snippet and I do urge you to check it out here.
Finally, I’m not 100% certain Malbolge should be in the top 10 programming languages to learn in 2015, but in case someone is willing to take a gamble then the Introduction to Malbolge is probably an essential read.
There Is Always Someone Willing To Do It Cheaper
In the case presented in the intro above our client simply wanted cheap development an ended up with Malbolge code that by now cost them 10 times more to maintain.
And the Malbolge developer? well he’s still at large and by now probably writing obfuscated code for another temporarily happy client who simply looked for someone who would do it cheaper.
And as my dear friend Amit says:
Peace.
Leave A Comment