Eclipse Yoxos Services Downloads Blogs About
Home > Blogs >

on Feb 1st, 2009Programming Competition in Eclipse

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:

  1. 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.
  2. The students don’t have Internet access.  You either know how to code Dijkstra’s  algorithm, or you don’t.
  3. 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 icon smile Programming Competition in Eclipse ), 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.

Related posts:

3 Responses to “Programming Competition in Eclipse”

  1. Jacek says:

    yea time really counts in such contests. the same, if you look at winners e.g. in topcoder, I think you should be able to see their winning submissions – full of macros to reduce amount of written code.. crazy

  2. murphee says:

    > Students are constantly checking their problems by
    > re-directing input and output through their programs,
    > and then running diffs on the results.

    Hmm… sounds like a Job for an “External Tools Launch Configuration”; just set up one of them to run the app, maybe call a shell script that does all the diffing, etc.
    It’s a few clicks more than “:!runprogram” in vim, but once it’s set up, rerunning the program’s just an F11 away (or whatever the shortcut is for “Run last launched external tools config”).

  3. It’s not strictly true that no one uses Eclipse. Some of the Java people make use of Eclipse, it’s just that most of the students are coding in C or C++ and the CDE is not installed. A lot in the specific competition you are talking about are in first year, so they haven’t really been exposed to IDEs.

    I actually think Eclipse or for TopCoder, Visual Studio, gives you an advantage if you’re coding in Java or C# over Vi with C++. The IDE constantly compiles so you don’t have to really debug typos, you have an interactive debugger, and term completion. If you watch the screen casts of the top guy on Top Coder, it hardly looks like he is typing because of his IDE support. (http://petr-mitrichev.blogspot.com/)

© EclipseSource 2008 - 2011