saturday morning code-a-thon


For some reason I seem to be getting up early at the moment and coding. Just had a pretty good intense coding session and managed to get a whole load of stuff done to chrss. So good when you get that feeling of "flow".

So needs testing before I deploy the new version, but in principal the following are now done:

  • move confirmation
  • browse moves (see what the board looked like at every point in the game)
  • RESTful style URLs
  • 301 redirects for old URLs to new URLs
  • unit tests

The last one will be increasingly important, as it means I can be increasingly certain that everything is working properly. Most of the unit tests so far are for the "model" part of the app. In this case that means I'm mostly testing the actual chess part of the code.

I based the REST code on this recipe for turbogears and tweaked it a little.

The RESTful URLs also help me organise my code better and just seem friendlier in general. One other side effect is that you will be able to/can browse the potential moves as normal links and don't have to be logged in to do so. So for example you would click on a piece to see the available moves, then on the move you want and you'd see something like this in the browser address bar:

  1. /chrss/game/11
  2. /chrss/game/11/14
  3. /chrss/game/11/1423

Where 11 is the game #, 14 is the position of the piece and 1423 is the final move you want to make (in ICCF notation).

So hopefully I'll get this online next week (probably after the £5 app meet).