Thread: Coding Contest....

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    106

    Coding Contest....

    A while back we discussed having a contest. I believe we should revisit this idea, here are some of the concepts that I have thought about.



    C coding compitition, related to most usefull program

    C++ ditto

    C coding competiton, most intresting program

    C++ ditto

    C++ competition, best oop techniques

    C coding competiton, fastest algorithm

    C coding competition smallest usefull program


    all programs would be limited by the number of evaluation statements, function calls, arrays, classes, variables, loops, etc . This would work better then the amount of lines of code since....

    if ( functionx( z ) == functiony( m ) || (x == 6 && functionz() == 7)

    is 3 evaluation statements, and 3 function calls


    all programs would be standard ISO C/C++, use of goto will be illegal since we all hate it. The program must be created by you and it must also be created specifically for this competiton.



    1. Evaluation statements = switch, if/else, pointer array function calls

    2. loops = function recursion, switch loops, while/do while, for.

    3. variables do not include constants, or enumerations.

    4. infinite mathematicall operations.

    5. all C++ programs will use IOstreams, all C programs will use printf etc...


    any other ideas?
    Men like me strive to be an inferior rock, rather than superior dust.
    - in response to X10

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    Sounds cool, except I'd nix #5, just because some people write C++ w/o using iostream...

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    106
    yeah, i thought that too, it would be a good idea, I was just stressing that it should not be a windows/linux/etc program only.
    Men like me strive to be an inferior rock, rather than superior dust.
    - in response to X10

  4. #4
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    Well, if it's ANSI compliant (totally), wouldn't it be totally platform independant? (yes, this is a serious question)

  5. #5
    Registered User
    Join Date
    Aug 2001
    Posts
    106
    yeah...
    Men like me strive to be an inferior rock, rather than superior dust.
    - in response to X10

  6. #6
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    leave in goto, i like goto.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  7. #7
    Registered User Generator's Avatar
    Join Date
    Aug 2001
    Posts
    238
    No need to make a contest to find out that Im the best programmer on the board.
    What's a matter you no like peppi?

  8. #8
    Registered User
    Join Date
    Aug 2001
    Posts
    106
    ok, to make it fair, you are automatically disqualified, and get an honorary winner sticker!
    Men like me strive to be an inferior rock, rather than superior dust.
    - in response to X10

  9. #9
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,227
    leave in goto, just because sometimes using it lessens the amount of code. (AAAA!! my VB class made me say that!! *sobs* if only they'd let me test out...)

    but it does sound like a good idea...hey - where's kooma and what ever happened to the CDB project?

  10. #10
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    >C coding competiton, most intresting program

    sounds great!
    hasafraggin shizigishin oppashigger...

  11. #11
    Registered User
    Join Date
    Aug 2001
    Posts
    106
    ok, I thought about what should be the fastest algorithm, I think the fastest program should be to calculate the fibonci series to the 1 billionth decimal place.

    oh, and since All people dont hate goto, I think we can let it stay.


    I was thinking of who/how to judge, obviously algorithms will be the easiest since we will just count the speed of the program.

    How about we have a vote, each person cannot vote for their own thing...


    I was thinking of how big the programs should be, and came up with

    1. 50 evaluation statements - any form of making decisions
    2. 10 loops - any form of doing the same thing over
    3. 50 variables - including arrays
    4. 5 Char arrays of 10, these arrays are to be used for words only, no mathematical/ direct binary operations allowed (unless you want to do something like convert to all lowercase...)
    5. 15 function calls
    6. infinite Display (cout/ printf)
    7. infinite mathematical operations
    8. infinite input
    9. infinite pointers
    and for C++, same rules only
    1. 4 classes
    2. 10 objects within main
    3. 5 strings instead of char arrays

    is this too much/ to little?

    once we have all the rules and everything else hammered out I will start working on a document book...

    maybe we can do a monthly thing, that would be neat.

    the smallest program competition will be judged by both the size and quality, and limits will be imposed, only that people should attempt for VERY small programs.
    Men like me strive to be an inferior rock, rather than superior dust.
    - in response to X10

  12. #12
    "The Oldest Member Here" Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,039
    ewwwwwww....ken you take a VB class???!?!? ewwwwwwwwwwwwwwwwwwwwww! everyone point and laugh

  13. #13
    .
    Join Date
    Aug 2001
    Posts
    598
    Heres my program

    Code:
    #include <needed.h>//the needed header files
    
    int main ()
    {
    
    WebSite (http, http://www.cprogramming.com/cboard/newthread.php?s=&action=newthread&forumid=10); //goes to correct site
    
    Subject (oneLine, "Long post"); //gives a subject of long post
    
    Message (muiltiline, "This is the first post"); // gives message of first post
    
    for (a =2; a <6000; a++)
      { 
      wait (seconds, 20); //waits 20 secondes before contiuing
      
      WebSite (http, http://www.cprogramming.com/cboard/newreply.php?s=&action=newreply&threadid=2477); //goes to correct site
    
      Message (multiline, a);//prints post number in message box
    
      }//ends for loop
    
    return 0;
    }//ends program
    To Err Is To Be Human. To Game Is Divine!"

  14. #14
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    unfortunately, the unholy vb class is the only option. IF YOU'RE LUCKY THEY WILL COVER "BINARY SORT" ON A STATIC ARRAY!!!?@!>@ hoorj

    somehow I doubt we'll get that far into the text...

    limits should be imposed by problem, and should be at least 2x what the most efficient solution needs (or what the author of the problem thinks it is).

    as for the CDB, kooma just disappeared... stopped replying.
    .sect signature

  15. #15
    Registered User
    Join Date
    Aug 2001
    Posts
    106
    the reason why I want a limit is so that the programs are highly efficient, and coded well.

    or, we could have very high limits on the programs, and make efficieny and quality/size/reusibility/readablity of code decided in the vote.

    anyway I am about to start on the document that I will put up for you guys to read...
    Men like me strive to be an inferior rock, rather than superior dust.
    - in response to X10

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Expression Evaluator Contest
    By Stack Overflow in forum Contests Board
    Replies: 20
    Last Post: 03-29-2005, 10:34 AM
  2. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  3. WANTED: Contest Master
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-23-2003, 10:15 PM