I am fascinated by obfuscated code. I hope one day to win the International Obfuscated C Code Contest, but I have a long long ways to go. I entered in the 2004 contest, without any intention (or hope :) to win. For now, I just enjoy watching other programmers recoil in horror when they see my lesser evils.
My first try was basically bad.c, but much, /much/ less sophisticated. Bad was updated and upgraded and modified and mangled so many times I've lost track.
fibo.c is my first attempt at a larger obfuscated program, and besides the fact that splitting the code takes longer, it's not all that different. superscript.c is the only one that survived my last few laptop deaths. It's an oldie, and kind of dull. It's kind of like hacker.c.
boyscout.c is made using a different style, not only writing it but also in terms of layout. The original was 221/4839 lines/bytes, and the final obfuscated version is about 43/1344. This program, unlike some I've written, contains absolutely /no/ implementation-specific code. Therefore it /should/ run on any platform imaginable.
minotaur.c is boyscout's little brother. Boyscouts solve mazes, the minotaur had one of his own. It's bound he knew a lot of mazes, maybe he could even build one of his own! Well, this one can. Feed it 0, 1 or 2 number arguments (>0). It will generate a maze with those dimensions (measured in cells, not characters). Things to notice: - No loops or recursive function calls.
Preprocessor abuse. Could be sculpted, but can't be bothered. Strips comments from C code.
Another boring C HACKER program.
Another C HACKER program. Yes, it's lacking prototypes. Bite me. At least it'll exit() before falling off the end.
A boyscout simulator. It will find the quickest path from 'i' to 'o' across ' '.Try it out with this maze.
A minotaur simulator. It will generate a random maze of the specified dimensions, with only one solution.
Prints "Bye" on a several very different architectures. How does that work? Hint: Keep K&R2 Section 2.12 handy.
Prints a diamond the size of the program's first argument. Made because of a challenge by Richard Heathfield: No recursion and only one loop. An extremely simple one. Hardly worth putting up here.
Give this one a numeric argument and see what comes out.
A nice three-liner which served as my signature for some time.
A very bad signature, using a few very bad conventions.
One of my first tries. It's an oldie, and not very impressive.



