Creating a High School Programming Competition?
goatmon asks: "A few high school computer teachers across Tennessee have organized an annual "Geek Games" competition. We started last year with a great competition in PC repair, patterned after the VICA competition. This year we are trying to expand to add a competition in computer programming. The question is, how do you create a language-independent computer programming competition? Is it fair to have a timed test if one group of kids is hacking in Python and the other in C++? And who wins, the one with the shortest code, the fastest programmer, the one with code that works? Can anyone offer insight from experience or a pattern that we might be able to follow?"
We had 3 hours to complete 4 problems. You work in teams of (at most) 4 people, and I think you can use any language you want (you could use a different language for each problem if you wanted). But you could only libraries that were included with the language (no add-on packages). We used QBasic (the only language all 4 of us knew), some people used Pascal or Visual Basic, and I think there were people using C and Turing. The problems were best suited to text-mode programming, so VB just made it harder (people had to create a form with a start button, and some labels for output). One team used a computer running GNOME on Linux (now that I think about it, that was when I first heard about Linux). I'm not sure what language they were using.
The programs usually used input from a file on disk, with given names (i.e. "A:\DATA31"), and output to the screen. We usually had sample input. When we finished any problem, the judges would come to our computer and give us a disk with new input. We'd run the program, they'd check if the output was correct, and give a mark out of 100.
Time bonuses were also assigned. The time bonus started at a given number, and decreased linearly to 0 by the end of the contest. When you submitted a problem, you'd get a time bonus. You could resubmit once, but you'd obviously get less of a time bonus, and if you got a lower score, you were stuck with it (only 2 tries were allowed). Of course, there was different input data for the second attempt. With 4 questions marked out of 100, some teams managed to get scores around 490 because of time bonuses.
Code quality was not a factor in judging. It's too subjective, the judges didn't have time to read code, and the judges can't be expected to understand every language students use. Efficiency was usually not a factor, but some languages (QBasic) did put limits on memory usage. There was also a limit on how long a program could run for, to prevent people from using purely brute-force solutions that take an hour to run. IIRC, the limit was around 1 minute (if it took longer, you got 0), but wasn't timed with a stopwatch or anything - I don't think anyone ever ran into that limit anyway.
I don't think it was unfair that students got to use different programming languages. The alternative is to force everyone to use one language, which isn't really fair either. However, there was a small problem one year. One of the questions was based on factoring numbers (or something like that), and one team had a library that could do this for them. The library was included with the language, so the judges ruled that this was legal. The other teams felt this gave them an unfair advantage, so you should probably say something like "you must write the factoring code yourself, don't use a library function" in the question. OTOH, you can't just ban libraries, because some languages (like C) are nearly useless without their libraries.