Follow Us

We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message

International Obfuscated C Code Contest returns

The IOCCC has returned to collect a fresh batch of mind-bogglingly difficult-to-understand C code

Article comments

The International Obfuscated C Code Contest (IOCCC), where programmers write bizarre and unncessarily complex C code, has been resurrected by its creators following a five-year hiatus.

"You can never say all the tricks have been done. Someone always shows you something you didn't know," said Landon Curt Noll, one of the founders of IOCCC. "Every year you think 'Gee, I didn't think you could do that'."

The goal of the contest, as in year's past, is to produce a batch of mind-bogglingly difficult-to-understand code, written in the C programming language. The group will begin accepting submissions for this year's contest from December 1. The deadling for submissions is January 12, 2012.

Perhaps ironically, the intent behind the contest is to stress to programmers the importance of good programming style. "One of the things that the contest emphasises is that having a working program is not enough," Noll said. "The code has to be maintainable and adaptable." This means that the code must be easily understandable by someone other than the author, so it can be easily updated and expanded upon by others.

Boundaries pushed

The contest also produces some secondary benefits as well, namely exposing both structural quirks of the C language and weaknesses of the standard compilers. Winning programs have "pushed the boundaries of the C language," Noll said. The Free Software Foundation, for instance, has used entries for regression testing its C compiler.

Noll and Larry Bassel conceived of this contest in 1984. They were both working at National Semiconductor at the time, and had commiserated with each other about the pitiful state of the code to some Unix programs they were updating. Both had complained that not only was the "code was poorly written, but it seemed like someone had put a lot of effort into writing bad code," Noll said.

The IOCCC is now the oldest still-running internet-based contest, Noll said. This year will be the IOCCC's 20th iteration. The keepers of the contest had taken a break to revamp the website so it can accept admissions online, an upgrade that took five years.

Deep understanding

The contest is not necessarily looking for badly written code. In fact, writing truly obfuscated code requires a "deep understanding of the language," Noll said, noting that winners in years past have actually been offered jobs (presumably to write non-obsfucated code) based on the expertise they demonstrated for the contest. It takes a good programmer to write bad code, Noll said.

Rather, the judges are looking for code written in such a way that another programmer would have extreme difficulty figuring out what the program actually does.

Noll did not define specifically what makes for winning obfuscated code. "It's like porn. You know it when you see it," he said. Many of the best entries have had multiple layers of obfuscation, where one feature is not only implemented in a completely unintuitive way, but also relies on additional layers obfuscated code.

Ritchie riddled

Past winners have been breathtaking in their sophistication. For instance, Brian Westley, the webmaster for the Firesign Theatre comedy troupe, submitted a program in 2001 that rearranged a line of input and then reorganised itself so that it completed the same task using a different algorithm the next time it ran. "It was a master stroke in understanding the C syntax," Noll said.

And not all programs have to be long. David Korn, author of the widely used Unix Korn Shell, wrote a one-line program for 1987's contest that fools many a C programmer into thinking it doesn't compile (below). Even the C creator Dennis Ritchie initially missed the program's subtle logic, Noll said.

Adding to the challenge is the fact that the rules themselves are not entirely straightforward, beyond a few basic principles, namely that the code must be able to be compiled on a standard ANSI C compiler and must come with documentation that clearly states what the program is supposed to do. Except for these basic principles, the rules change from year to year, in order to keep contestants from relying on proven techniques of obfuscation. "Hacking the contest rules is a tradition," he said.

"We don't do the same thing over and over again," Noll said.


More from Techworld

More relevant IT news


Send to a friend

Email this article to a friend or colleague:

PLEASE NOTE: Your name is used only to let the recipient know who sent the story, and in case of transmission error. Both your name and the recipient's name and address will not be used for any other purpose.

Techworld White Papers

Choose – and Choose Wisely – the Right MSP for Your SMB

End users need a technology partner that provides transparency, enables productivity, delivers...

Download Whitepaper

10 Effective Habits of Indispensable IT Departments

It’s no secret that responsibilities are growing while budgets continue to shrink. Download this...

Download Whitepaper

Gartner Magic Quadrant for Enterprise Information Archiving

Enterprise information archiving is contributing to organisational needs for e-discovery and...

Download Whitepaper

Advancing the state of virtualised backups

Dell Software’s vRanger is a veteran of the virtualisation specific backup market. It was the...

Download Whitepaper

Techworld UK - Technology - Business

Innovation, productivity, agility and profit

Watch this on demand webinar which explores IT innovation, managed print services and business agility.

Techworld Mobile Site

Access Techworld's content on the move

Get the latest news, product reviews and downloads on your mobile device with Techworld's mobile site.

Find out more...

From Wow to How : Making mobile and cloud work for you

On demand Biztech Briefing - Learn how to effectively deliver mobile work styles and cloud services together.

Watch now...

Site Map

* *