/home /blog 26 Aug 2015 |


Recently I made available on PyPi, openjudge. This post is about that library.

Programming contests are popular among engineering colleges in India. Even in other colleges, wherever there happens to be a Computer Science department, a programming contest is sure to happen at least once a year.

Attending various contests in my graduation, I fell in love with them. There was no influence, no underhand tricks. Your code spoke for you. In the University of Delhi, there were contests happening left right and all across. Over the course of two years I began to like programming contests.

The cracks began to appear only once we hosted our own. Checking code was a pain. The accepted method was that contestants were asked to write code on paper for the preliminary rounds. They were simple programs and were designed to be easy to check. This was a huge bottleneck. The main rounds were held after about an hour of the preliminary rounds happening.

In the main rounds the institute provided machines and a compiler (sometimes an IDE) for an already declared language. That was a big handicap for us. We had to send teams proficient in multiple languages. This made life horrible and sometimes limited contests for us.

Then came codechef.com

This website had removed everything we had resented and gone on to produce the perfect mechanism for hosting programming contests. Using the codechef platform however required authority from the Principal and so on. I did not bother.

Being bitten by the 'roll-your-own' bug, I decided to build my own judge. Hence openjudge.

First I had to set up an interface. For that I learnt Django. Then came communication over sockets. After that the problem of multiprogramming and sub processes.

Recently I am struggling with the ability to run these programs in a sandboxed mode. It is an experience which allowed me to grow with the project.

The software now boasts of a capability of handling ~200 participants at the same time. The format we now follow is:
  • Participants get their own machines. If they don't we provide and they cannot complain.
  • No language bars. We support all major languages.
  • A single round of competition. No preliminary and finals. One big code fight
  • A leaderboard for everyone to know who is winning.
Here are a few screenshots.