Slashdot Mirror


IOCCC Winners Announced

Arachn1d writes "The IOCCC has finally announced the winners of the 2004 contest.
With winners this year including a mini-OS and a ray-tracer, the submissions should be interesting indeed - if you can make sense of them. According to the page, the actual code for the winners should be up mid-october."

18 of 175 comments (clear)

  1. Much better than the last 2 years by dtfinch · · Score: 3, Insightful

    When there was no contest at all. "Yeah, everyone send in your entries. Oh, nevermind, maybe next year."

    Of course it looks like those extra 2 years paid off. This year's winners look very interesting.

  2. Funny, but sickening by Anonymous Coward · · Score: 5, Insightful

    I always though this contest was funny, but in a dark and sinister way. I can't tell you how many times I've looked at someone else's code and spent hours trying to figure it out. In the real world, it's not funny.
    I'm amazed at how someone can acheive such obfuscated code without really trying.

    1. Re:Funny, but sickening by Ignignot · · Score: 2, Insightful

      I'm amazed at how someone can acheive such obfuscated code without really trying.

      I'm not amazed at all - I pay special attention to my code so that someone else could come in and use it. That doesn't mean they'll be able to just step in and understand everything, it'll be hard no matter what. But if I didn't try, I think everything I made would be unusable by anyone else. In my mind that makes the code worth very little - it is the ability to reuse code that makes it valuable. I've debugged or added features to other people's programs (once in VB / Access, [shudder]) and it can be a nightmare even with comments. I think that most of the time people get into a coding zone and they're able to just chug through 100 lines or more at once, holding the entire program in their head for awhile. The problem is, if you do that you usually don't comment well (if at all). I try to proofread everything I write, putting comments back in, but for most people it isn't worth the effort. "It compiles, runs correctly, I'm done! Time to surf slashdot!"

      --
      I submitted this story last night, and it didn't get posted.
    2. Re:Funny, but sickening by Anonymous Coward · · Score: 3, Insightful

      Somebody mod this prick down, he's in desperate need of a sense of humour.

      The whole point of the IOCCC is to demonstrate how ridiculously unreadable C programs can get if you really try. And if you don't think writing a raytracer or whatever within the guidelines set in the competition rules is worthy of admiration then you've never picked up a C compiler in your life.

      I see you have a job that requires you to read CVs and presumably hire people. Please tell us which company this is so we can avoid this miserable establishment.

    3. Re:Funny, but sickening by micromoog · · Score: 2, Insightful

      People do this for fun. This has nothing to do with productivity, the bottom line, or actualizing organizational synergy.

    4. Re:Funny, but sickening by groomed · · Score: 4, Insightful

      Yes, I suppose, but what does any of that have to do with the IOCCC?

      It's just a competition, and like most competitions, the results are fairly pointless outside the intended domain.

      Reading your rant is like watching a spectator in the Tour de France yell "learn how to drive a car you idiot!" at Lance Armstrong.

    5. Re:Funny, but sickening by Urkki · · Score: 4, Insightful
      • With recursion you get 20 function calls with all their associated overhead. A for loop is a much better solution.

      Except a properly written recursive function, and a loop end up being exactly the same thing once compiled... Even with a C compiler

      Of course anybody putting purposefully obfuscated code into any real software should be shot... All the unpurposefully obfuscated bad code is bad enough, when maintaining it falls on you.

      • You know the shit I'm talking about, jamming all kinds of operations into a for() declaration, badly chosen one-letter variable names, etc..

      That's not the point IMHO, though admittedly a lot of the stuff is just that without any real content. But the real pearls would still be devious to decipher even if all identifier names were clear, and any unnecessary structural obfuscations were written in more clear way.

      • Those suckers never even got their foot in the door. I don't care how smart they think they are, we have to get products out fast, and realistically be able to maintain/upgrade them 10+ years or so.

      You need to lighten up. Some get their kicks from polisihing their car over and over, some get theirs from standing in a river in long ridiculous boots and waving a rod around, and some get it from twisting their brains around a piece of C mumbo jumbo... Nothing wrong with any of that.
    6. Re:Funny, but sickening by Cygnus78 · · Score: 2, Insightful

      Calm down, it's all about having fun. They do not do this because they want to use it in production code.

    7. Re:Funny, but sickening by dubious9 · · Score: 4, Insightful

      I'd be more impressed with people who can prove they have the discipline to avoid obfuscations.

      Have you ever read any of the code? Besides formatting, (you can run stuff through indent), this stuff is *very careful* obfuscation. It's not just nonsensical variable names and lack of comments. It's using constructs in novel ways, and comming up with non-trivial solutions to what are quite often complex problems.

      If you can win this contest you know exactly what makes programs hard to read, and thereby in real situations, avoid them. Furthermore, some of the stuff is beautifully arranged and may be faster or more elegant than the easy to read version. It's not a mockery of the language, it's "art in c", and I would happily hire any of the winners as most probably they are masters of the nuances of c.

      --
      Why, o why must the sky fall when I've learned to fly?
  3. Re:Time to turn in your geek card... by lachlan76 · · Score: 4, Insightful

    Not only that, I don't consider the ability to churn out unreadable code a good trait in a programmer

    To be able to make something like that, you need to be able to understand the language well, which is a good thing.

  4. Re:Time to turn in your geek card... by Emil+Brink · · Score: 5, Insightful

    Whoa there, turn up the humour and creativity-appreciation knobs a couple of notches please. I don't think anyone likes to see obfuscated code in production environments, but if you haven't read any IOCCC entries, you should. They can be real eye-openers when it comes to realizing what you can do with the C language (and preprocessor) when put in the right hands. Plus, it's just plain fun! :)

    --
    main(O){10<putchar(4^--O?77-(15&5128 >>4*O):10)&&main(2+O);}
  5. Re:Time to turn in your geek card... by Anonymous Coward · · Score: 4, Insightful

    As I understand it, this contest is basically "who can turn out the shittiest code that still runs?"

    (1) It's for fun.
    (2) It's a famous tradition.
    (3) There is a great elegance in the entries which win; they are far from shitty.
    (4) Chill out.

  6. Re:Time to turn in your geek card... by Bastian · · Score: 3, Insightful

    Depending on where I'm applying, I would put winning the IOCCC on my resume. If you are looking at an employer who would know what it is, it shows that you have more knowledge of how computers and (at least) the C programming language work than most people. It doesn't show that you always turn out crappy code - those in the know also know that the IOCCC got its start with a bunch of skilled programmers ridiculing people who turn out crappy code.

    If they don't know, hey, it says you won a fairly well-known programming contenst.

  7. Re:Time to turn in your geek card... by ComaVN · · Score: 4, Insightful

    Leave the obfuscation to the marketing department. We have one who actually listed double-ROT13 encryption as a "feature" of our product. Ok, he asked me what encryption we supported by default, and I told him double-ROT13 not realizing just how dense he was. The story gets better! The marketing shpiel he put together was going to the IT security folks at the NSA! One of them called me up, in tears from laughing. He asked if I could implement quad-ROT13. I told him I could implement 2^n-ROT13, iff n>0.

    Actually, I think you're the one who's dense, when you think someone from marketing who asks you a straightforward question about your product is supposed to understand a geek-joke.

    It's not his job to check or even understand all the technical info. It's (presumably) yours.

    --
    Be wary of any facts that confirm your opinion.
  8. You should try Pascal instead of C by mangu · · Score: 1, Insightful
    If you think "if (year%4 == 0) { days_in_feb=29; }" is easier to read and understand at a glance than "if (!(year%4)) { days_in_feb=29; }" then the easiest for you to understand would be:


    if (year mod 4) = 0

    then

    days_in_feb := 29;

    endif

    or something like that, it has been 20+ years since I last wrote Pascal, I'm not so familiar with the syntax anymore. Or try COBOL for the true detailed syntax you seem to adore. But one of the many advantages of C that make it so great is the concise syntax. After reading a few millions of lines of code, one gets tired from so much redundancy. If you really have experience with C, things like treating integers as boolean have become second nature.

    I suggest that you trust your programmers more. The fact that you have problems understanding C code means that you should concentrate on management, rather than trying to micro-manage programmers.

  9. missing the point by Speare · · Score: 2, Insightful

    Anyone can write unreadable code.

    It takes an artist to write code that is both unreadable and beautiful at the same time.

    If your entry isn't beautiful, you're just a bad programmer.

    --
    [ .sig file not found ]
  10. You've passed over many good people then... by rarose · · Score: 4, Insightful

    Those suckers never even got their foot in the door. I don't care how smart they think they are, we have to get products out fast, and realistically be able to maintain/upgrade them 10+ years or so.

    At a couple of the companies I've been with we'd have after-hours informal little "Who can optimize this code the most" contests and they were amazingly instructive. They force you to think about solutions in new and creative ways, and to really understand an algorithm or CPU at a far deeper level than a simple straightforward implementation.

    And while those obscenely optimized implementations may never get near the shipping product, you always walk away with a far far better grasp of how the shipping code really does work. (And yes, we've discovered bugs by inspection... because the little optimization contest had us questioning assumptions that the shipping code relied upon)

    --
    --Rob
  11. Re:Obfuscation by Anonymous Coward · · Score: 1, Insightful

    Of course to be fair, I don't know of any language that's readable once you strip out all the end-of-line characters...