Archive for July, 2008

ICFP 2008 Postmortem (Belated)

Wednesday, July 30th, 2008

Drew, Dion and I participated in the ICFP contest this year. It’s a 72 hour programming contest with something interesting to do every year. This year’s project was based on steering a rover around on Mars.


On the couple of days before the contest, I set up a trac instance. Not actually what my “secret project” I was working on in prior posts. Drew and Dion also created some sort of thing that they thought might be useful based on some of the things in recent contests but we didn’t end up using at all.


We were all at work at 12:00 PM Pacific time, so we didn’t start working right away. None of us were completely swamped at work, so we did take a little look at the project. After work, we discussed things a bit more and then got together with our associated ladyfriends/wives and watched Hellboy 2 together and went to Bertucci’s. Over food, we divided up tasks a little bit and then went home.

We started working that night and shortly after midnight Drew checked in a basic framework and we all went to bed.


Drew came over to my house the next morning and we started churning away at getting things rolling. The morning was mostly made up of parsing all the information we got from the server and some basic data structures.

In the afternoon we started doing the necessary math to determine obstacles in the way of the rover so that we could calculate a path to the goal that doesn’t involve running into anything.

Drew wrote a utility that displays the internal state of the map so that we could visually debug the pathfinding.


It wasn’t until the next morning that I turned on our actual pathfinder. Unfortunately, once I started optimizing it a bit I got smashed my stack and wasted most of the day trying to track down where. Drew was gone for much of the day at a baptism and Dion was taking care of his son’s birthday party. When Drew got back he set me straight.

Before bed we switched the GUI off as the program needed to be able to run without X.


The next morning we actually started trying to get the program to run in their environment. It turns out that we were using QT 4 but they only had QT 3. We submitted around noon (Eastern).


Our program did more or less work. It certainly won’t win, but I expect that we’ll not come in last, either. The pathfinder is fairly braindead. It does a local greedy search to find the path and then tries to smooth it out afterwords. Any number of simple traps could get it stuck. I did make sure that it just stops if the path it’s generating gets too long so it won’t crash. We also completely ignore all martians chasing the rover, so I’m sure that some maps they use to test us will catch us on that.

If I hadn’t gotten stuck and if we’d had more man-hours over the weekend we probably could have stepped up to a better pathfinding algorithm.

Trac Setup

Monday, July 7th, 2008

Redmine ended up being a bust due to Debian shipping a version of ruby (1.8.7) that is incompatible with Ruby on Rails. Apparently it doesn’t work above 1.8.6. I am impressed that a language’s flagship application gets broken by a point release and no one seems to have anything to say about it other than “don’t use 1.8.7”.

I switched back to Trac despite its limitations because it actually works. Of course, then I had to set up its user authentication, which was a headache of its own. Sometimes I cannot win.

Now, to put things on wikis!

Redmine Setup

Friday, July 4th, 2008

Having been annoyed by some of the limitations of trac in the past, I have decided that for an upcoming (sshhh! say nothing!) project, I’d try to use redmine, which seems to be about the same but with less suck.

Unlike trac, which is written in python, redmine uses ruby on rails (How terribly Web two-point-oh!). I checked the 0.7 version of redmine out of their repository and installed a bunch of debian ruby-related packages (ruby, rubygems, rake, rails, libdbd-mysql-ruby, libyaml-ruby), only to find that their version of rails is quite broken. After running gem install rails -v 2.0.2 things seemed to be going better.

Using apache instead of the built in web server added a few additional kinks. I needed to copy the virtual host config from GettingStartedWithRails (site currently broken, Google cache used). Then, I had to tweak the contents of the redmine directory a bit to get the right script executing. cp dispatch.cgi.example dispatch.cgi and then edit .htaccess, taking a pointer from the fastcgi lines, to include RewriteRule ^(.*)$ dispatch.cgi [QSA,L]. Perhaps fastcgi will be my next step, as it is really quite slow.