Slashdot Mirror


15th IOCCC Results Posted

leob writes: "FWIW, the 15th International Obfuscated C Code Contest finally came to a conclusion. Read the main page, or, get one big tarball." The contest took a little longer than expected, but the results are fine example of their craft.

27 of 69 comments (clear)

  1. Re:Why bother? by tonyPick · · Score: 3

    What use is this? Surely winning this competition is a sign you should never work again? Obfuscated code (aka elegant) is no faster, even if it is shorter, and may even compile into worse code.

    Well, (IMO) you're completely wrong. IOCC code isn't just "bad code getting awards". the winners of the IOCC show an understanding of the subtleties of the way the C language work far beyond that of your average C programmer, or even your pretty good C programmer. Or, to quote Peter Van Der Linden, "..[The IOCC] is a lot of fun and can extend your knowledge in surprising ways".
    Spend a few hours or looking through the archives at things like "best one liners" and try and figure out what they do without reading the description - or maybe look through gems like the 1500 character BASIC interpreter. Deobfuscate some entries to figure out how they work and you might find you learn something about what the language can do and it might improve your day to day programming.

    For me this shows the problm with open source - people are more interested in playing silly games than actually getting something constructive done.
    Yuk, Trollish.

  2. Books by i_know_it · · Score: 2

    I wonder if they'll make a translation of The Bible in c code syntax? ... while(1) hangOnCross(); .. Or The Iceman Cometh: ... while(!ANY_HOPE) { if(have_coin || bartender_will_put_on_tab) { getDrink(); } if(HUGO) say("DON'T BE A FOOL! BUY ME A TRINK!"); else ignoreHugo(); have_coin = begPatronsForADollar(); bartender_will_put_on_tab = begHarryForADrink(); } ...

  3. Obfuscated != Well crafted (was Re:Why bother?) by Simon+Brooke · · Score: 3
    Uhhmmm...

    I really enjoy the IOCCC, and every year I download the results and play with them. Some are startlingly clever, like the flight simulator a couple of years ago. Writing these obfuscated programs is a special skill, and, yes, it is a form of craftsmanship within the context of the competition. And, of course, the people who can write these little gems have to be brilliant programmers first.

    But in all normal circumstances, obfuscated code in any language is bad code . The whole purpose of highlevel languages is to communicate with human beings, not to communicate with the machine: to communicate with the programmer who is to come after you, who has to debug your code, or port it, or update it because some library it uses is obsolete and some of the API has been deprecated or dropped. That programmer may of course be you.

    Code that can't be picked up by someone else in six months time - someone possibly less skilled than yourself, and read, and understood, and modified, is poorly crafted. Bad workmanship. If you can't understand this, you aren't going to be a successful member of any development team, either commercial or open source.

    Enjoy the IOCCC as a cort of cross between puzzle games, satire, and poetry. A very special kind of programming - a very skilled kind of programming - but one which has virtually no carry-over into the real world.

    --
    I'm old enough to remember when discussions on Slashdot were well informed.
    1. Re:Obfuscated != Well crafted (was Re:Why bother?) by webrunner · · Score: 2

      One could say the Pyramids are Obfuscated rock. We can't understand them thousands of years later.. but they are certianly intersting and a very amazing feat.
      ----

      --
      ADVENTURERS! - ANTIHERO FOR HIRE - CARDMASTER CONFLICT
  4. Interesting. . . by Bastian · · Score: 2

    but obfuscated code still doesn't seem as impressive to me as a good ol' 4k intro.

    Maybe it's the pretty pictures. . .

  5. I am a winner by codemonkey_uk · · Score: 2
    I am one of the co-authors of this entry. A binary (DOS/WIN32) can be downloaded from here.

    Comments? Questions?

    Thad

    --

    Thad

  6. Re:Here's Yet Another Contest! by f5426 · · Score: 3

    Oops. Forgot to answer the question. The thing uses the Spigot Algorithm, by Stanley Rabinowitz and Stan Wagon.

    See (for instance) <http://www.physik.tu-muenchen.de/lehrstuehle/T 32/matpack/html/Mathematics/Pi.html> to get a description. Remove slashdot added spaces from the URL.

    So, definitively, no. You won't be a contender with an extremly common stolen program.

    Cheers,

    --fred

    --

    1 reply beneath your current threshold.

  7. Obfuscating vs. AscII art by Glowing+Fish · · Score: 2

    I would have to agree that simply rendering a program into ascii art is not itself obfuscation, and therefore, does not properly belong in this contest. On the other hand, I would tip my hat (if I had one handy) to anyone who can write a workable C program that doubles as ASCII art. This probably deserves a contest all of its own.
    Remember, you saw it on Slashdot first.

    --
    Hopefully I didn't put any [] around my words.
  8. Re:Why bother? by Howie · · Score: 2

    I know you just wanted a cheap shot, and hey, this is the audience for it, but I would suggest you read either Writing Solid Code or Code Complete, both published by Microsoft Press, and both supposedly based on internal MS coding practice. They are very good examples of the ways in which you can write easy-to-read, easy-to-debug, easy-to-maintain code.

    Regardless of what the front office does and decides as a direction, there are some pretty clever people at Microsoft (not to mention Microsoft Research - Blinn, Kajiya, Gray, and many others).

    (of course, feel free to add a more illuminating comment if it wasn't just the usual MS==BAD)

    --
    "don't fall into the fallacy of believing that Perl can solve social problems. Maybe Perl 6 can, but that's a ways off"
  9. Re:Well... by istartedi · · Score: 2

    And only later did a good answer occur to me--a high tech twist on an old proverb. "There is one beautiful program, and every programmer has written it."

    The original of course is, "There is one perfect child, and every mother has it."

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  10. Re:Why bother? by acroyear · · Score: 3

    Hey, try actually having a boss who won the IOCCC...three times, even...

    --
    "But remember, most lynch mobs aren't this nice." (H.Simpson)
    -- Joe
  11. Well... by pallex · · Score: 5

    ..people were asking for elegant code yesterday!

  12. Why bother? by Metal+Machine+Music · · Score: 2

    Very cool but...

    What use is this? Surely winning this competition is a sign you should never work again? Obfuscated code (aka elegant) is no faster, even if it is shorter, and may even compile into worse code.

    For me this shows the problm with open source - people are more interested in playing silly games than actually getting something constructive done.

    Microsoft didn't get to be as successful as it did by creating obfuscated code you know.

    1. Re:Why bother? by ratbag · · Score: 2

      Microsoft didn't get to be as successful as it did by creating obfuscated code you know.

      No, they did it by putting Easter egg flight sims in their Office apps.

      Rob.

    2. Re:Why bother? by foistboinder · · Score: 2

      Microsoft didn't get to be as successful as it did by creating obfuscated code you know.

      Based on what I've seen of Microsoft Code, I have to disagree.

    3. Re:Why bother? by Psiren · · Score: 3

      For me this shows the problm with open source - people are more interested in playing silly games than actually getting something constructive done.

      I can just see Kryten now... "Fun? Ah, yes. The employment of time in a profitless and non-practicable way." So what if it's pointless. It's nice to do seomthing for fun every now and then. We aren't supposed to be writing top-notch code 24/7.

    4. Re:Why bother? by jallen02 · · Score: 2

      That is very true.. One of the first things you are going to do if you dream of entering a obfuscated program in this contest is totally read front back and carry with you for days on end a reference about how an ANSI C Compiler behaves. *exactly* How the preprocessor behaves and what its precise behavior is supposed to be, then your going to actually test it to find out if its really all true. A great book like "C A reference manual" It goes over excruiciating detail on how various parts of the language work.

      Just by virtue of spending *so* much time figuring out how to push the language you are going to learn a whole lot.

      Going reverse and actually reverse engineering one of these programs you may or may not learn as much, but chances are good you will be gifted with a good deal of insight about C :)

      Ive tried and managed to undo several but some of these programs are truly works of art in the truest sense of the word art.

      Okay so it may not be valuable in the sense regular art is however the sheer intelligence and amount of effort some people put into this the only word that comes to mind to express elegantly exactly what these programs are to a programmer is art :)

      My two cents..

      Jeremy

    5. Re:Why bother? by Aunt+Mable · · Score: 2
      Lovely TRoLL BTW, the little tacked on MS jab, neato.

      Understanding obfuscated code is difficult - that's the whole point - therefore those who understand it (especially those that write it) have a firm grasp of the language - moreso than programmers that don't.

      Also obfuscated code is usually about short snippets of well crafted code rather than worrying about a greater architecture. Competitions like this let people show off clever algorithms, or just clever syntax. Useful, as programmers can use the obfuscated code rather than typing a dozen lines.

      Perl has been called the obfuscated programming language because of it's many short-hand syntaxes that reward those that know the language by not forcing them to be verbose - this can show off similar techniques.

      -- Eat your greens or I'll hit you!

      --

      -- Eat your greens or I'll hit you!

    6. Re:Why bother? by rincefysh · · Score: 5

      I couldn't disagree more. I won in 1991 (and later - eg 2000 ;-)), just about the time that I was applying for a job. I put 'winning the IOCCC' in my CV, which may sound like suicide to some.

      However consider this. Would you like to work for a boss who feels that winning the IOCCC is something to be ashamed from? Or would you rather work for a boss who feels it's a decent bit of fun?

      I later found out that after dwindling the job candidates down there were just two suitable people left - I was one of them. My boss told me that winning the IOCCC was one of the factors that helped him to pick me over the other candidate.

      So in conclusion - it can actuall _help_ your job prospects!

      (Yes I know it's a troll, but who cares.)

    7. Re:Why bother? by Reality+Master+101 · · Score: 2

      And you know, just because you paid more for something, doesn't mean it's any better. [...] Only under a deranged, half-baked system like capitalism would this be true.

      Versus socialism? The difference is that under socialism, the government attempts to cheat the citizens as a matter of course. The difference is that there is only one government, and under capitalism, you can choose whichever company you percieve to cheat you the least.

      And if you think socialistic government are paragons of virtue and efficiency with only the best interests of the citizens at heart, then I feel sorry for you and your naivete.


      --

      --
      Sometimes it's best to just let stupid people be stupid.
    8. Re:Why bother? by bencc99 · · Score: 2

      No, Microsoft became successful because the american public by and large wouldn't know good software if it jumped up and bit them on the ass.

      Wrong. Even by fluke they should have turned out something reasonable. For microsoft to consistently turn out products as bad as they do, they have to know *exactly* what a good product is, and work hard to make their software as unlike it as possible ;)

  13. Re:Here's Yet Another Contest! by Y-Leen · · Score: 2

    It calculates PI and the AC poster ripped it off from post #3, by crovax, in the IOCC delayed" story.

  14. Re:Here's Yet Another Contest! by seebs · · Score: 2

    I think we let a couple of void main()'s through, but I don't know that we will next time; we may even just point it out in the rules.

    --
    My blog: http://www.seebs.net/log/ --- My iPhone/iPad app: http://www.seebs.net/seebsfrac/
  15. Pascal? by GregWebb · · Score: 2

    I'm a Pascal (and Pascal derivatives) lover, personally. I don't like C even slightly, I'm afraid. Might be fine for what other people want to do but definitely isn't for what I want to do.

    So. My first instinct when I saw this was Ha! More examples of just why C is horrible! You couldn't do this if in Pascal if you tried!

    I then thought about the ingenuity of these authors...

    So, does any such resource exist for Pascal code? Beyond simply putting the thing as ASCII art and giving it meaningless variable names, neither of which seem truly worthy to me.

    --

    Greg

    (Inside a nuclear plant)
    Aaaarrrggh! Run! The canary has mutated!

  16. obfuscating not all, though... by mirko · · Score: 3

    A few entries that I saw were mostly c programs converted to ascii art, which I believe is a pity as if reindented correctly this would not look as obfuscated as in previous contests.
    I however enjoyed some entries, like PrimeNum which is an example of clean obfuscated code, despite its heavy use of preprocessing directives (BTW, even its own name is obfuscating as it has not much to do with prime numbers, even though its apparent algorithm is ;-).
    Tomx is also interesting as it is a Makefile and a source file at the same time.
    --

    --
    Trolling using another account since 2005.
  17. Slashdotted. by shippo · · Score: 2
    Of course it is slashdotted.

    What is the point of this? Most of the code I've seen in the past uses some pre-processor tricks to un-obfusticate the source.

    I once saw some obfusticated Perl which appeared to be no more than a standard perl program with all whitespace removed, no comments (naturally), and over-use of $_.

    Then again I was attempting to revise one of the sound drivers in the current Linux kernel recently, and that was pretty well obfusticated!

  18. Re:Here's Yet Another Contest! by f5426 · · Score: 2

    > Think I could have be a contender?

    Nope. Even in obfuscated C, main cannot be declared void.

    Btw, you should give credit to the original author of this program, Dick T Winter. (Which btw, did not put the 'void' before main())

    Cheers,

    --fred

    --

    1 reply beneath your current threshold.