Slashdot Mirror


2004 IOCCC Winners Source Code Released

Langly writes "The IOCCC have finally released their source code for 2004. My thoughts goes out to the poor guys that actually wrote this code. Reader discretion is advised." Every time I see an obfuscated code contest, I wonder if 'Winner' is the right word to describe the victor ;)

31 of 175 comments (clear)

  1. frist? by Anonymous Coward · · Score: 5, Funny

    void main(void) {
    printf("frist prost");
    }

    1. Re:frist? by gorre · · Score: 3, Insightful

      Arrggh, main returns an int god dammit!

      --
      "Madness is something rare in individuals - but in groups, parties, peoples, ages it is the rule." -- Nietzsche
    2. Re:frist? by pchan- · · Score: 4, Insightful
      It also doesn't take a void argument.

      sure it does. int main(void) is completely legitimate. there's no reason why your program needs to take in commandline arguments. the loader will probably pass them to you anyway, but you don't need to acknowledge their existance.
      $ cat x.c
      #include <stdio.h>

      int main(void)
      {
      printf("sweet\n");
      return 0;
      }

      $ gcc -Wall -std=c99 x.c
      $
    3. Re:frist? by BreadMan · · Score: 3, Informative

      For GCC, at least, the entry point as far as Linux is concerned is _init, defined in /usr/lib/crti.o.

      _init opens the standard file descriptors, gathers the command line arguments and does a but of housekeeping before calling main, your program's entry point. GCC links to this by default; but you can change this if necessary, for instance an embedded project running without an OS would need very different initialization code, and for that matter it could define the entry point of the application as something other than main().

      If you want to see what GCC is doing for a compilation, try

      gcc =### x.c

      And you'll be able to see what gcc passes to the underlying tools to pre-process, compile, assemble and link.

  2. obfuscated server by LiquidCoooled · · Score: 5, Funny

    The code running on the webserver must be AMAZING.
    Its so obfuscated that I cant even see it!

    ahhhhhh its finally shown up.

    Doesnt bode well though.

    --
    liqbase :: faster than paper
  3. ouch by mpost4 · · Score: 3, Interesting

    I would hate to have to be the one that either updates that code or has to read it. Some nice ASCII art in there, I am not brave enough to test to see if the programs do what they say they do. I went to the spoiler page so I could get the synopsis of them. That code would be a good Halloween costume it is just scary.

    1. Re:ouch by ajs · · Score: 5, Insightful

      I'm so tired of this. Every time the IOCCC winners are announced someone has to go off on how unmaintainable the code is.

      For those who are unable to grasp the point, I'll say it slowly: this code is written by people who understand C well enough to twist it into any shape they please. Of course, they could write clean, maintainable code, but then they would LOSE the competition. The goal is to write obfuscated code.

      The IOCCC is an expression of source-code as art in a compettitive forum. If that isn't your cup of tea, don't hurt your brain by reading the submissions.

  4. Big deal by Anonymous Coward · · Score: 5, Funny

    When I was learning programming, I would obfuscate code so bad that even the compiler couldn't understand it, let alone humans...

  5. Follow up story. by AtariAmarok · · Score: 5, Funny

    "Within 20 minutes of the code release, SCO sued claiming that it contained something of theirs".

    --
    Don't blame Durga. I voted for Centauri.
  6. Oh the irony by agent+dero · · Score: 5, Funny

    An obfuscated code contest article has a Microsoft "Get the Facts" ad beneath it.

    Does the OSTG try to be subtle or what? :-P

    --
    Error 407 - No creative sig found
  7. Mirrors by mozingod · · Score: 5, Informative

    Google cache with different mirrors across the globe: http://64.233.167.104/search?q=cache:LAIfxt7dfOEJ: www.ioccc.org/+ioccc&hl=en

  8. clueless submitters by jbellis · · Score: 3, Interesting

    I wish the submitters for these things understood that 90% of the obfuscation is done post-debugging with perl scripts... (The remaining 10% is the clever part.)

    1. Re:clueless submitters by RangerRick98 · · Score: 5, Funny

      Actually, 90% of obfuscation is perl scripts. :)

      <runs>

      --
      "You're older than you've ever been, and now you're even older."
    2. Re:clueless submitters by willisachimp · · Score: 5, Interesting
      Actually, I work with the guy who wrote the 'gavin' (the best of show this year), and know for a fact that the final version you see is *very* similar to his development version. Pretty much the only difference is shorter, meaningless variable names and running it through indent (thus giving no information in the indentation, by using a standard indentation tool)

      What you see is how he wrote it - he really is that sick :-D

      I'm so glad he doesn't write like this when he's working. Well, not often, anyway.

  9. Time to brush up on your l33t coding skills by GillBates0 · · Score: 5, Funny
    How to write unmaintainable code

    Some gems:
    Naming variables :
    #1 Baby names: Buy a copy of a baby naming book and you'll never be at a loss for variable names. Fred is a wonderful name, and easy to type. If you're looking for easy-to-type variable names, try adsf or aoeu if you type with a DSK keyboard.

    #17 Bedazzling Names: Choose variable names with irrelevant emotional connotation. e.g.:
    marypoppins = ( superman + starship ) / god;
    This confuses the reader because they have difficulty disassociating the emotional connotations of the words from the logic they're trying to think about.

    #26 Misleading names: Make sure that every method does a little bit more (or less) than its name suggests. As a simple example, a method named isValid(x) should as a side effect convert x to binary and store the result in a database.

    --
    An Indian-American Hindu committed to non-violent thought/speech/action alarmed by the global explosion of radical Islam
  10. The value of not being seen by downward+dog · · Score: 5, Funny

    In this film we hope to show how not to be seen. This is "Hello World" by Mr. E. R. Bradshaw of Cambridge, MA. It can not be seen. Now I am going to ask the code to stand up. "Hello World," will you stand up please. This demonstrates the value of not being seen.

  11. Obfuscated webserver by dk.r*nger · · Score: 3, Funny

    Their webserver is actually written in obfuscated c++ .. Sure, it's slow, but the binary plays a technoversion of Star Sprangled Banner when piped through /dev/dsp ..

    1. Re:Obfuscated webserver by achowe · · Score: 3, Informative
      Yes. I wrote it and I'm rather proud of that entry. You can see it working here:
      http://hibachi.snert.org:8008/
      Version 2.1, the Unobfuscated Posix Windows threaded version will be released sometime soon. If anyone is interested in testing it, email me.
  12. Every day by 3770 · · Score: 5, Funny

    Hey,

    I write code like that every day for a living.

    I'm just about to finish a world wide, 3-tier, trouble ticketing system in the shape of a Maze.

    --
    The Internet is full. Go Away!!!
  13. Official IOCCC mirrors by Anonymous Coward · · Score: 3, Informative
    IOCCC Mirrors

    Asia


    Europe

    North America
  14. Re:Mirror this already! by Anonymous Coward · · Score: 5, Informative

    There are several mirrors. I know, I run one of them. Why the submitter hardcoded the us one is beyond me.

    • Antarctica
      none yet :-)
    • Africa
      none
    • Australia and other Pacific
    • www.au.ioccc.org - Sydney, Australia (34 0' S 151 0' E)
    • Extraterrestrial
      SETI is looking for some sites :-)
    • South America
      none
  15. Mirrors ... by foobsr · · Score: 4, Informative

    http://www.de.ioccc.org/years.html#2004

    also tw, au, es, www1.us

    CC.

    --
    TaijiQuan (Huang, 5 loosenings)
  16. OK Mr Supar Comuputar by stratjakt · · Score: 5, Funny

    I wonder if 'Winner' is the right word to describe the victor

    This is coming from the dingus behind slashcode.

    --
    I don't need no instructions to know how to rock!!!!
  17. Another mirror by DoctorEternal · · Score: 3, Informative
  18. Simple trick for beginners by grungeman · · Score: 4, Funny

    Name your variables A1, Al, B1, Bl, and so on. With some fonts (especially those fixed width fonts in code editors) a "l" (small "L") looks exactly the same as a "1" (a one), which makes sure that the guy maintaining the code will have fun a-plenty.

    --

    Signature deleted by lameness filter.
    1. Re:Simple trick for beginners by mopslik · · Score: 5, Interesting
      Bah, why use "A" and "B" when "I" (capital i) will do the trick even better?

      Examples:
      I1I1 (eye one eye one)
      IlIl (eye ell eye ell)
      lIll (ell eye ell ell)
      etc.
  19. Is This Necessary? by Mignon · · Score: 4, Funny

    Hasn't obfuscated C already been perfected?

  20. Gotta love it. by jcuervo · · Score: 4, Funny
    Check out vik1.c:
    /* Some more code */
    I think they gave him extra points for the comment.
    --
    Assume I was drunk when I posted this.
  21. Re:Great article summaries lately... by Scarblac · · Score: 4, Interesting

    And best of all, that ridiculous code is REALLY AMAZINGLY POWERFUL in many cases.

    I only looked at the first entry, anonymous.c. It's 47 utterly incomprehensible lines. What it does is convert text into one of Tolkien's Elvish fonts - and the result looks rather nice, for such a tiny C program (that doesn't use any libraries apart from stdlib, stdio and string).

    I took the example from the hint file, pasted only the first half ("ash nazg durhbatuluhk, ash nazg gimbatul") and created a picture, then converted it to PNG with ImageMagick. The result is here. I think that's rather good.

    And that's just the first one of this year. Many of the entries of earlier years were stunning.

    --
    I believe posters are recognized by their sig. So I made one.
  22. Size does matter! by mwvdlee · · Score: 5, Interesting

    Why not just differentiate by varying the length of the names?

    xxxxxxxxxxxxxx = xxxxxxxxxxxx + xxxxxxxxxxxxxxxxxxxxx / xxxxxxxxxxxxxxxx;

    Makes sense, doesn't it? And it works with every letter of the alphabet too!

    --
    Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
  23. Even more obfuscated code by Anonymous Coward · · Score: 3, Funny

    If you want to take a look at some code that's a real mess, try this code here.

    Ugh.