Thread: Feedback on My Idea for a New Obfuscated C Contest

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    33

    Feedback on My Idea for a New Obfuscated C Contest

    As you probably know, there used to be an "International Obfuscated C Code Contest", where the goal was to explore the subtleties of the C language by seeing who could write the most obfuscated code.

    That contest, however, ended in 2006, and I believe the organizers completely lost interest in it, since the winning code of the 2006 edition has yet to be released! You can read more about it on its Wikipedia entry -> International Obfuscated C Code Contest - Wikipedia, the free encyclopedia

    I think that such a contest is a great idea for several reasons. It's fun, it helps intermediate/advanced C programmers to explore the language even further, it helps beginner C programmers to learn complex aspects of the C language and so on.

    That is why I want to give a shot at reviving that contest (with a different name and different rules). The main idea is to make the contest a lot simpler than what it used to be.

    Basically I think that competitors should write a simple and small C program that prints out something, and the goal is to make it so obscure that other C programmers won't be able to understand what is going to be printed just by looking at the code.

    ----------------------------------------------------------------------

    Here's a draft of the rules:

    1. The contest would be held online, so all the information, submissions and entries would be available on the contest's website.

    2. Submissions would need to be a single C file, with a single int main() function that prints out something (for the sake of simplicity, as explained above).

    3. The file should have 200 or fewer characters (for the sake of forcing people to be concise and to focus on specific aspects of the language).

    4. Only stdio.h and stdlib.h would be allowed (for the sake of focusing on the core aspects of C).

    5. The code would need to be formatted correctly, with one statement per line (i.e., making ASCII art with the code to make it difficult to read is not allowed).

    6. All the submissions would be given to a group of 20 judges (experienced C programmers), and the winners would be based on how many of the judges failed to correctly guess what the program prints (without running it, obviously).

    ----------------------------------------------------------------------------

    What do you guys think about the general idea, and about the draft set of rules?

    Any feedback is appreciated, and if you want to volunteer to be a judge please let me know as well.

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Well, as for some feedback, I completely disagree with this:

    Quote Originally Posted by envec83 View Post
    I think that such a contest is a great idea for several reasons. It's fun, it helps intermediate/advanced C programmers to explore the language even further, it helps beginner C programmers to learn complex aspects of the C language and so on.
    except for the subjective "fun" part. Maybe it is. I've gotten a kick out of some obfuscated code before, but I don't believe learning to do it "well" is going to be a good way to improve your skills generally. AFAICT, the people who excel at this excel because they have already "forgotten more about C than most of us will ever know", kind of thing, and enjoy being clever, which is fine and dandy. I ain't one of them, tho.

    Your rules look good except for these two:

    5. The code would need to be formatted correctly, with one statement per line (i.e., making ASCII art with the code to make it difficult to read is not allowed).
    Now that's no fun. I thought it was an obfuscated code contest?

    6. All the submissions would be given to a group of 20 judges (experienced C programmers), and the winners would be based on how many of the judges failed to correctly guess what the program prints (without running it, obviously).
    Nah. I think you should consider yourself lucky if you get 20 contestants at this point. A better idea would be to make all the submissions public, and allow all the contestants to vote for the winner (with the restriction that you cannot vote for yourself).
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  3. #3
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    I think the more rules you give an obfuscated code contest, the less fun it is and the less weird crap you see. It looks pretty inept to me.

    3. Sometimes concise is not obfuscated and 200 characters seems like a very arbitrary number considering you haven't even thought of a problem for the entries.

    4. Why is I/O the "core" of C? So much for angles and things of that nature. Basically if you stick to this rule future contests will be boring and hamstrung by how little those headers do.

    Other than that, good luck replacing something that died like an old media franchise.
    Last edited by whiteflags; 10-07-2011 at 11:57 AM.

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by envec83 View Post
    I think that such a contest is a great idea for several reasons. It's fun, it helps intermediate/advanced C programmers to explore the language even further, it helps beginner C programmers to learn complex aspects of the C language and so on.
    I'm with MK27 in disagreeing with this.

    I have had team members who tried to use techniques they picked up from the Obfuscated C Contest site in a production environment. They had fun, certainly, while doing it. The team had less fun when they were required to fix urgent problems that later came up associated with that code, because they no longer understood it.

    I can accept a premise which, IIRC, was part of the philosophy in the original contest. One goal might be to show the benefits of good coding practices through irony.

    Part of the reason the folks behind the original contest lost interest, I suspect, is that the number of dark corners of the language is finite. Examples in later years increasingly just repackaged techniques used in previous competitions.

    If you were to include a requirement that the obfuscated sample be accompanied by well-crafted code that produces the same effect. Not only explore the subtler corners of the language through irony, but also show how obfuscation might be avoided.

    Quote Originally Posted by envec83 View Post
    That is why I want to give a shot at reviving that contest (with a different name and different rules). The main idea is to make the contest a lot simpler than what it used to be.
    On one hand, you want to use this to explore the subtle complexities of the language. And on the other hand you want to make the competition simpler. At some point, those ideas are in conflict.
    Quote Originally Posted by envec83 View Post
    6. All the submissions would be given to a group of 20 judges (experienced C programmers), and the winners would be based on how many of the judges failed to correctly guess what the program prints (without running it, obviously).
    How do you propose to attract these 20 experienced programmers into being judges? Most experienced C programmers have pored over some very ugly code in their times and, if they are sane, have little desire to look at more.

    This is probably a factor in the slowing down of the previous contest. Another factor is that there are only so many dark corners of the language that are actually interesting. A lot of contest entries, in later years, would have simply been mixing and matching techniques from past years. Which simultaneously increases the boredom factor for judges and means it takes more effort to craft an original or novel winning entry in later years.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  5. #5
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Some of the best IOCCC entries, in my opinion, were ones where the code itself made a picture or something. I don't think restricting what you can put per line is a good idea. It goes against the very nature of the contest.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Obfuscated Code Contest: The Results
    By Stack Overflow in forum Contests Board
    Replies: 29
    Last Post: 02-18-2005, 05:39 PM
  2. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  3. Contest idea
    By The Brain in forum Contests Board
    Replies: 3
    Last Post: 10-23-2004, 06:38 AM
  4. Obfuscated CODE
    By chinux in forum C Programming
    Replies: 3
    Last Post: 10-02-2004, 01:31 PM
  5. A better contest idea...
    By minime6696 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-14-2001, 02:13 PM

Tags for this Thread