The story of an Online Judge

It was fun organising a Coding Marathon in our college this year, and is a kind of sense of happiness that resurfaces from time to time looking at the success of the event. It is interesting to watch how all of the students from all the years of study come together to solve algorithmic programming problems. But the actual twist was in the online judge that was used to hold the competition online and to judge all the submissions automatically.

The motivation behind building the online judge came from the event format last year. Participants had to submit solutions to the problems via email and then they had to check manually by compiling and testing the output against input data. This process was not good. It was a kind of overwork on the part of the person who was checking the solutions. So this summers I started on building an online judge as a leisure project to automate this whole process.

Challenges were there. The programs would compile on a server and participants need to submit programs through a web interface. Security was also a big challenge. Running a server meant I could not allow people to hack into the server to tamper around with the data nor the full system by submitting malicious programs, nor could they overload the server by running programs that take up too much time. Additionally I wanted an universally accessible site, that would also fit well on tablets and mobile devices. Hence I decided go forward with the Twitter Bootstrap Framework. I also open-sourced the code on Github. Things went well and the next semester started. It was time to put this thing on test.

I installed this in one of the computers of our Computer Center, and ran it for a trial run period. And as expected people came and hacked on it. Quite a few problems and security flaws were found and fixed. I iterated this process, till those flaws were eliminated. So came the time when I had to put thing to a real test.

I organised a contest under Programming Club. A six hour coding marathon to solve algorithmic programming problems. But all solutions were to be submitted on the online judge, where it will run and tested to give the results immediately. Amongst all this the biggest dilemma was whether the system would be able to bear the load when multiple submissions came and were compiled and run at the same time. But all went well, it didn’t disappoint. It run successfully through all the solutions, running and testing each under its time limit.

This was a kind of an achievement. The first product of the Programming Club of IIT Rajasthan was used by the Programming Club to hold some constructive event. And I always give my deepest heartfelt thanks to those seniors who helped me figure out the security flaws in the system (Shashank and Chintan), deploy it as a server (Ashayam) and largely to them who so enthusiastically helped organise the competition by providing the questions and test cases even on such a short notice of only 12 hours (Rohit and Nishchay).

Congratulations to the winners!

The judge lives open-sourced as Codejudge on Github. It even has a homepage for easy access at Also my I am thankful to people who gave their valuable suggestions after the event to improve Codejudge. Those features will also be coming soon to Codejudge.


One thought on “The story of an Online Judge

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s