On Saturday, I volunteered a few hours of my time at the University of Victoria to help organize a Programming Competition. The office mate I had throughout my PhD, Sean, did the real work, but I put together a few problems, helped with the judging, and debugged a few technical problems.
If you haven’t seen (or heard of) a programming competition, it’s pretty interesting. Students are given word problems and some sample input / output files. The have to code solutions to the problems and pass the automated tests. (The real tests are run on a server so the students can’t see the test cases). Many readers of this blog may think the problems are easy (shortest path between cities with constraints such as gas station locations, intersecting shapes, and sub-string matching, are a few examples), but in the atmosphere of a competition, these can be quite challenging. Especially since:
- Output must match exactly. There is no room for misspelled words, capitalization inconsistencies or even extra white space. In fact, the server just runs a diff, and you are either right or wrong.
- The students don’t have Internet access. You either know how to code Dijkstra’s algorithm, or you don’t.
- Once you submit your solution, the server either returns Correct or Wrong Answer. No stack trace, no explanation of what went wrong, no bugzilla with steps to reproduce.
Overall I thought the competition was a success. Everyone (even those that have only been coding for a few months) solved a problem, and one student (a second year) solved all 7 problems in the 5 hour time limit.
But something caught my eye during the competition. Nobody uses the Eclipse IDE. In fact, most students just us VI and the command line. Aside from the obvious reason (real programmers don’t use IDEs 🙂 ), Eclipse actually gets in the way during these competitions. Students are constantly checking their problems by re-directing input and output through their programs, and then running diffs on the results. Doing this in the Eclipse IDE is not simple, and simplicity is key.
Of course, it would be pretty easy to write a plug-in that would do this. You could even bring up the synchronize view if the output is not correct. As well, we could probably integrate the server software (A Java application that runs the test cases) with Eclipse, so students could submit their programs right from the IDE. Maybe these plug-ins already exist, I don’t know. These might be good candidates for the Eclipse SOC project (an Eclipse project intended to bring students together).
As for those of you who believe that ‘editing is still the way to code’, there is always the VI plugin for Eclipse. I wouldn’t last 10 minutes in Eclipse without this tool.