Avtok

Coatl

Coatl, Aztec for “snake,” is the codename for the Harvard-MIT Mathematics Tournament's registration site. It's written in Python (get it?), using Django.

HMMT has the not-so-uncommon problem of having a lot of legacy code. In particular, on tournament day, HMMT uses a decade-old Java applet called “Abacus” to enter scores. Since Abacus plays such a crucial role in the tournament itself, but has been largely left unchanged since it was originally written, it was important to ensure that the database schema (or at the very least, the parts that Abacus touched) remained identical to the old schema. Unfortunately, the "old schema" was only nebulously defined, and changed slightly year-to-year. Coatl was therefore also an attempt to formalize this schema and to ensure Abacus would continue to work for years to come (or at least until some enterprising young soul decides to rewrite it).

Working with Django was a mixed blessing. On the one hand, it was vastly superior to the old TurboGears based site. The admin site proved to be most useful, and in fact completely replaced Abacus for tournament-day registration. Django's models were also very useful, as they provided a very nice, easy-to-use DSL for representing and codifying a database schema (including all the wonkiness required to support our crufty code). However, other parts of Django felt like they were cobbled together from bad abstractions. The Django templating language, for instance, is an example of a good idea gone terribly wrong, as it lacked the usefulness of inline code while gaining precious little.

The code for Coatl can be found on github at github.com/zenazn/coatl.