Skip to content
Culture

The World’s Weirdest Coding Contest Honors the Most Unreadable Programs

Welcome to your nightmare, Claude.
By

Reading time 3 minutes

Comments (4)

In an age of vibecoding and AI assistants, there’s something admirable about the desire to work within a set of limitations when coding. Last week, we covered an assembly program that managed to generate both visuals and music within only 16 bytes of code, and this week we’ve got something even more arcane: the results of the 29th International Obfuscated C Contest, which may well be the world’s strangest and most esoteric programming competition.

The basic idea is simple: write a program in C that compiles and runs properly, but whose purpose and means of operation are as difficult as possible to figure out by looking at the program’s source code. And boy, do people write some crazy-looking code. Here’s an example from this year’s competition:

IOCCC Endoh2
© IOCCC

The above is one of this year’s winners, and if you can take a look at it and figure out what it does, you get all the gold stars. So what does it do? Glad you asked! It creates a pretty nifty simulation of a Lichtenberg figure:

IOCCC Endoh2 output
© Gizmodo

A few months back, security researcher and YouTuber LaurieWired posted a video about last year’s competition in which she used a decompiler to pull apart the binaries of various entries and then tried to predict what they actually did. Her success rate was about 50%, and that’s working from the decompiled programs, not the actual code. If she’s only batting .500, you can bet that the rest of us are going to be hovering around .000.

The inaugural contest was held way back in 1984, and the competition has been running on and off ever since. This most recent set of winners was announced on a livestream on YouTube that gives a pretty good sense of the sort of insanity with which we’re dealing here:

While writing obfuscated code is the competition’s raison d’etre, entrants also have a penchant for writing code that combines being incomprehensible with looking cool. Here’s an example, which creates five minutes of soothing white noise, accompanied by the sort of generative music of which Brian Eno would be proud:

Ioccc Tompng
© IOCCC

And another, which simulates digging a hole straight down through the earth to see whereabouts on the other side of the globe you’d end up:

IOCCC Ferguson
© IOCCC

These programs make use of the fact that C doesn’t register whitespace characters—spaces, tabs, and newlines—when parsing code. That means you can indent and move your code around however you like—allowing you, for example, to place the word “RELAX” in the middle of your program’s source code. Some also make use of comments to artistic effect.

Others get way crazier. This one, for example, renders its own source code as a game of Pong. Wait, what? Well, here’s the source code (note: that last line goes on for wayyyy longer than would fit on my screen for a screenshot):

IOCCC Uellenberg
© IOCCC

…and here’s the output. This is a single screencap, but the two longer spaces on each side move up and down with user input, while the smaller one bounces back and forth:

IOCCC Uellenberg output
© Gizmodo

If you’re wondering how one codes something like this, there’s a long explanation on the entry’s page at the IOCCC website. The site also hosts all this year’s winning entries, which you can download and compile yourself. Have fun, and if you can actually figure out how any of these work… consider a career in computer science?

Explore more on these topics

Share this story

Sign up for our newsletters

Subscribe and interact with our community, get up to date with our customised Newsletters and much more.