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 coding competiton, most intresting program
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?
Sounds cool, except I'd nix #5, just because some people write C++ w/o using iostream...
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.
Well, if it's ANSI compliant (totally), wouldn't it be totally platform independant? (yes, this is a serious question)
leave in goto, i like goto.
No need to make a contest to find out that Im the best programmer on the board. :p
ok, to make it fair, you are automatically disqualified, and get an honorary winner sticker!
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?
>C coding competiton, most intresting program
sounds great! :p
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.
ewwwwwww....ken you take a VB class???!?!? ewwwwwwwwwwwwwwwwwwwwww! everyone point and laugh
Heres my program
#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
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.
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...