CmYkRgB123 Online Grading System

January 2008

COGS (CmYkRgB123 Online Grading System) is an online judge system for students dedicated in Olympiad in Informatics or ACM/ICPC. It implements not only online compile and run, but also a community, competitions and user rank.

COGS derived from my previous internet name CmYkRgB123. It was inspired by USACO training system and PKU Judge Online. In the first half of 2008, I was a senior high school student, who had participated in NOIP so that knew how useful an OJ is. Therefore I started to develop COGS, my first web application. I learned ASP, Linux, PHP, SQL, HTML, JavaScript and even some knowledge about operating system and process. Then I decided to develop a new OJ from scratch using LAMP. The code below was the most primitive core of COGS:

$process = proc_open("./a.out", $descriptorspec, $pipes);
$time_start = getmicrotime();
do {
    $status = proc_get_status($process);
    if (!$status['running'])
    $time_now = getmicrotime();
    $rtime = $time_now-$time_start;
    if ($rtime > $timeout)
} while (true);

There was a time even I spent 6 hours at average a day developing my system. After about 2 months, the system was finally available (though with a lot of bugs). Then I recommended the system to my computer teacher. It was accepted and became the official OI training platform of my high school.

Two years later, after I had graduated from my high school, the system was still being used ( Now it has been modified and refactored by successors.

CmYkRgB123 Online Grading System