This evening I helped Baylor host a UIL programming competition for nine local high schools. Each high school brought one team of three students, and each team member took a written exam on various programming topics before coming together for a two-hour programming contest. Each team’s exam scores were combined with their contest score to determine their rank at the end of the night.

Five other students and I helped during the programming contest, which was identical in concept to the one in which I participated in November. Each team had one computer and twelve problems to attempt to solve, and each time they thought they had a solution, they would put it on a floppy disk — yes, a floppy — and give it to an assistant to be taken to the judges. One student assistant was needed to join a faculty member as a judge, and I volunteered. I checked teams’ submissions, making sure that their program gave the right output for various inputs. Each submission was marked as correct or incorrect and then returned to the team by a runner.

One of the funniest submissions was for a problem which required the students’ program to read a list of even numbers between 4 and 100 and for each number print each pair of prime numbers that could be added to form that number. For example, for the input “18″, the output would be “18 = 5 + 13 = 7 + 11″. Rather than make their program compute prime numbers, one team computed them by hand and hard-coded their list into the program. The funny part is that their code was entirely correct, but their list of primes was not, so they kept getting wrong answers. Eventually they removed a number which didn’t belong in the primes list (91, which is divisible by 7 and 13), but they were still missing one (89).

I guess not everyone might find mistakes in prime number calculation funny, but it’s comedy gold for a judges’ room full of computer science people.