High Programmer > Alan De Smet > Alan's IOCCC Entry

Alan's IOCCC Entry

This is a little supporting page for my winning IOCCC entry in 1998. It is intended for two groups of people: a) people who find out about me because of my IOCCC entry and want more information, and b) people who know me and remember this segment of my life.

For those not familiar with the IOCCC, it's the International Obfuscated C Code Contest. If you're a programming sort, you'll be best served by visiting the IOCCC home page for more information.

If you're not a programming sort, in summary, C is a programming language. One of the most popular. The goal of the contest is to write a very short C program that is very hard for a programmer to read, but does something interesting. More simply, a programmer makes a Rube Goldberg contraption for other programmers to enjoy.

Quick highlights

Why this got written

In short, because I was very angry at a professor. Not a very good reason.

In the spring of 1997, I was taking a very unpleasant computer science class. In hindsite, I'm no longer certain why it was so terrible. Likely causes included a professor whose communications skills lacked, a textbook that took an interesting field of study and sucked the life out of it, and the fact that it was my eighth and final semester and I was darn well ready to be gone. The most likely cause, however, was that I didn't program much for the class.

I love to program. It's why I went into computer science, it's why I'm a "software engineer." Programming is fun. Not-programming is not fun. Reading a dry book and struggling with dull theory instead of programming is very not fun.

Being a bitter ball of frustation, I did what any college student does, I skipped class. Lots of class. I had not skipped much class in my previous seven semesters, but I probably skipped over half of this particular class. While it probably didn't help my grade, it did lower my stress. I got a passing grade and my degree, so I guess I went "enough."

So, to remind myself why I wanted a computer science degree, I spent my time "more productively" in the Undergraduate Projects Lab, and wrote lots of very strange code.

Direct inspiration

I've been a fan of ASCII art for years. With ASCII art, you use regular letters, numbers, and punctuation to create art. I spent parts of college drawing the stuff by hand. You can see some of my work. By 1997 I wasn't directly doing ASCII art any more, but the area still interested me.

So, during my semester of frustration, I wrote several systems for automatically generating ASCII art. One program took black and white art and turned it into ASCII art. You can see one such conversion. (The hard to read text at the top reads "Outrageous fantasy warriors battle the limitations of their computers in... Warhammer 640K." It's a wargamer and computer geek joke, originally drawn from Murphy's Rules by John Kovalic.)

I'd previously been working with Peter Keller on a 3D engine entitled XAscent. The engine was never really used for much, but provided me with a basic understanding of 3D engines.

Armed with an ASCII art graphics system and basic knowledge of 3D, I combined the two into a strange program would let you spin 3D shapes in ASCII art. I took that program, twisted into a mess, and had an IOCCC entry ready.

The program

The program, in it's default mode, spins a cube. It looks something like:

                         ...``````       :        ...:``:                      
                         `.``...         :....````      :
                          :     ``....````.            .`
                          `.       :      :            :   
                           :       `.     :            :   
                           `.       :     :            : 
                            :       :  ..``..          : 
                            `.   ...:``      ``.      .`
                             :.``   `.          ``..  :  
                              `.     :              ``:
                               `.    :             .``
                                 `.  :         ..`` 
                                  `. `.     ..`     
                                    `.:  ..`      

If you're not interested enough to download and try the code, you can see an animation of the program running

The IOCCC generally times itself with the Usenix conference. When the conference moved seasons, the contest got delayed. Problems getting judges delayed the contest again. The next IOCCC didn't start until November 1998. I used the time to tweak the code and make it slightly harder to read, but it was basically done. When the contest opened, I submitted by entry.

Sure enough, I won "Best Object Orientation." The name of the award (and most of the awards in the IOCCC) is a joke, and a fairly programmer geeky joke at that. "Object Orientation" refers to a programming paradigm that my program most certainly doesn't use. (Interestingly, I generally like the paradigm...) It also refers my program's behavior. Sure enough, it orients objects.

If you're interested, you can look at the source code. You might want to download the notes and data files for it. Without the data files, the program just spins a cube. The data files let you spin whatever you want.

As the result of an email request, I've quickly hacked together a slightly less obfuscated version. It's still cryptic, but it's a bit less cryptic and may be interesting.

Contact webmaster