Programming
The Design of the Active-Grader system.
Aug 6th
The Active-Grader system (previously known as OpenGrader, but due name conflict with existing open-sourced project I can’t register that name on Google Code) is a system designed to be a unified grading system for programming contest.
From my last post, Aj. Jittat (more commonly known as Aj. Manow) gave me this valuable feedback:
I think that the problem is not about open-sourcing the grading system. It’s more about configuration and documentation. Different contests have different rules. Different task types need different grading methods and submission interfaces: think about output-only tasks or interactive tasks. These clearly make the grading systems some crazy beasts.
Very thanks to him, I finally come out with final design that suite all needs I can think of programming contests.
More >
Reinventing the Wheel — The Automated Grading System for Computer Contest
Jun 27th
There has been a paper, or more, about the automated grading system. The key point is that many, many automated system is invented, tested and use in contest and/or online judge environment — without releasing the source code.
See the problem?
There has been a try to create one, unified grading system (Mares, 2007) called MO-Eval. But due the complication of the system and lag of good documentation, it can be said that the project fail miserably. It is, though, success in establish as a Czech national grading system.
The main problem with MO-Eval system is the project is aimed with IOI-based contest, and it makes an extensive use of shell script, make it very had to migrate to other platform. Also, the interface isn’t very clear and the set of shell scripts is very complicated (at least for newer programming, who usually code in very clean Python, Java or C#). And most importantly, each module has very high coupling rate.
So far, I will introduce you to my new Active-Grader (previously OpenGrader, but due name conflict it was changed to this name). It will only provide the grading part with configurable interface. There is no UI, so you can write your own UI and connect them the the grader. The grader will read each evaluation request, process them and store the result for the UI.
Currently it is still under heavy development, but expected to make a first release before October.
PHP Framework : Lose-Lose situation
Apr 20th
Long time no update, huh? Well, I’m alive and well. After a couple of my love stories, now back to programming.
I have had some experience with PHP frameworks: CakePHP, CodeIgnitor and KohahaPHP. I never have used Zend Framework, though, but I think I can imagine what it like.
I know what is the propose of those frameworks: for rapid website developing. Sound good, eh? But actually it isn’t.
My Choice of SCM: Git vs. Mercurial
Feb 26th
If you Googled “Git vs. Mercurial”, you will see a long list of pages that compare Git and Mercurial. Well, I think I’m writing one of those too.
In past, normally when I was developing, I will just use local copy and backup and use diff/WinMerge utility to compare and merge files. My life change when I starting to know SCM/VCS.
I started using SCM for the first time when I start looking into Robocode’s source (as per Pavel Savara’s request to be a tester), which use Subversion. I know basic of the operation before (commit and checkout mostly), but I had never use any of it prior than that time. As I continue using SVN for Robocode’s source, I slowly learned more about SVN including what is branches, tags and trunk. I learned about patch later.
Since then, every time I develop some project, I need to have a VCS repository for my code (either local or hosted), all are SVN since I don’t know others. I knew that there is CVS, but its idea really confused me. I also knew that CVS is dated, and many projects that used to use CVS have already migrated/are migrating to SVN or other VCS.
My view of VCS changed when simple-php-framework moved to GitHub. I learned that there are also Git, Mercurial and Bazaar, which are DVCS. I still perfectly happy with SVN, so I didn’t really care about them, as long as GitHub provide a tarball link for me.
My first project which I use hosted SVN is napv-ce. I use Subversive plug-in for Eclipse as my SVN client. I hosted my project on Google Code. As I develop, the commit part really annoyed me since sometimes it just fails. And sometimes I don’t want to connect to the internet. The idea of DVCS starting to get back into my head.
OOP Learning Process
Feb 21st
Three years ago, I started to learn Java and OOP. That time, I found OOP quite interesting because it is a grouped functions. I slowly learn it from time to time.
Next year, when my teacher knew that I was into OOP, he told me to search about MVC, which I found it also quite interesting. I searched about PHP MVC and I found several PHP framework. The one which attracted my eyes the most is CakePHP, so I decided to give it a try.
At first everything seems to go well and I love it. Separation of design and code and all of it. But as I use it for a while, I started to think that by having to many DBALs to my database, I have to learn about it all. So later I use my own Module-View design for my relatively small web, which I have Module as Controller and Model together.
Recently, when I have to code real web and I use Module-View, my webpage get dirtier and dirtier with SQL request, so I remember the MVC and move things to Model. That’s how I know the real reason of MVC.
Second thing: ORM. I was never able to understand the need of ORM library until recently. I found that ORM make my life easier if I use it with light DBAL.
I wrote this all because I want ones who fall under the smiler route with me that in order to understand the reason behind each invented things, you have to use it yourself.
SCORE Computer : analysis on failure of the contest environment
Dec 15th
Well, firstly to whom doesn’t know yet, on the 4th of December my school hosted a programming contest called ‘SCORE Compute Contest’. It is just a basic programming contest that the competitor have to write a C program to solve given problems. To make this more fun and not IOI-like, the Head make an extra system for it, but that’s out of scope for this post.
I’ve been assigned to write a contest environment (i.e. grader). It is a system, mostly web-based, for the competitor to submit their solution to be compile and grade using the restricted environment (i.e., sandbox-ed). My code was MVC-based PHP code that I use very clear variable name, for I have little time and it must have as less bugs as possible.
A Contest Environment Writing – Part I
Nov 21st
OK, I know I’m lack of update. But that is because I have been busy writing the ‘Contest Environment‘.
This part I’ll explain what the contest environment is.
The Contest Environment is a system that allow you to upload a source code that solve tasks, compile your submission, run it with the test cases and grade the result. The one of the well-known contest environment around today is the Moe Contest Environment (formally known as mo-eval). This Moe system’s most famous is its sandbox, which is used in many competition around today, including many of the IOI (International Olympiad on Informatics) contests such as the recent POI (Plovdiv International Olympiad on Informatics: IOI2009) and also on Thai contest environment — the cafe grader.