I was at university with Steve, the author of this program. A couple of years ago, when I wrote "The hacker, the architect and the superhero: three completely different ways to be an excellent programmer" [1] he was the one I wrote about as The Hacker. So it seems more than appropriate that his work is now on Hacker News.
It used to have an evil twin, the Underhanded C Contest [1] where the aim was to make an innocent program also do something evil in such a way that that it can be plausibly denied as accidental when the 'bug' is detected in a code review.
I'd love to see the converse, where the goal is to write code that looks really malicious but is actually a useful and helpful program -- like an apparent rootkit that actually implements a full webserver.
I have an ancient blog on my ancient website, not much about ioccc though - but you can at least find links to my previous entries here http://stephensykes.com
What really irks me is that this question [1], asking word-for-word the same question for a different year entry, that was posted two days later was closed as "too localized" and has -10 points, while this one has +452.
It happens more and more often that a Google search for some problem sends me to a potentially useful Stsckoverflow question that has been closed for a ridiculous reason. At least, sometimes there are already answers or comments there that turn out being useful.
Taking a cue from reddit, it would be cool if someone started casualstackoverflow, with less strict moderation. Bonus points if closed questions can be imported.
Whoa, thanks! This must be some kind of copy-paste error. One problem with obfuscated code is obviously that it's way harder to spot those than in regular code. :)
I had to double-check that it's right in my profile on Stack overflow (which is where I copied it from for the above comment), but it is. That's even stranger.
It's perfectly possible to run this on e.g. Ideone (http://ideone.com).
Essentially, it's a loop that unpacks my name and prints it, letter by letter, from the constant 5128. Four bits is being used per letter, and I tried to compress the number by subtracting an offset from the ASCII codes of each letter (that's the 77).
It's been ~14 years or something since I first wrote this, and I'm pretty sure I was inspired by an Obfuscated C contest entry then, too. :)
I used to avidly reverse engineer the IOCCC entries when announced. It was a wonderful learning experience that teaches you quite a bit about C that you don't get from a mainstream book. Time well spent.
Neither are recent, but the following are both good:
"Obfuscated C and Other Mysteries" by Don Libes
"C Companion" by Allen Holub
Don Libes' book actually uses Obfuscated C code entries as interesting instructional examples and Holub's book is a nice intermediate book between K&R and "Expert C Programming".
I never see Holub mentioned much by other C programmers but I think his books are awesome. He actually also has a really good compiler book called "Compiler Design in C" that showed how to build a C compiler from the ground up - with a lot of practical details I never really see in other books in that area. He even had a cool curses implementation to go along with it where you could watch the parsing occur visually, and wrote a curses-like library in assembly so you could run it all on DOS too. He used to write the C Chest columns for Dr Dobbs back in the day and the book "C Chest and Other C Treasures" contains a collection of those articles and other code that C programmers would find interesting. But that book is harder to find these days.
[1] http://reprog.wordpress.com/2010/03/21/the-hacker-the-archit...