As I write this I’m sitting in Jarreds lounge room. We figured that we were falling a little behind so we organized to spend some time in each others company whilst we code so we can keep each other going.
Boy was it worth it. I think I have been more productive today than at any other time in the competition. I have put my API Service through 2 fairly major refactorings today. As I have constructed the service using Test Driven Design principles, each time I have made a major change I have been able to run my unit tests and see exactly what broke (or see that nothing broke). Each time it was a simple matter to go in and a) Check the test and make sure that it wasn’t wrong (i.e. Not testing the right thing instead of just failing normally) and then b) Apply a fix of some kind.
Another consequence of going the TDD route is that I have driven out some interfaces for back-end services that should be quite straight forward to build tomorrow. These services won’t have to make any business logic decisions, they are straight calculation which should be good fun.
As I’ve driven out these service interfaces I have ended up building fakes behind them for testing purposes. I got bored of doing this after a while and so I started to build an ultra-simplistic super-tiny portion of a framework for handling fake method calls. So far I can do this on my fake
IService FakeService = new FakedService();
.WhenCalledWith( parameter1, parameter2 )
.Returns( 5 );
I’m well aware that something like Moq or Rhino.Mocks would do this stuff for me but I figured that it’s not that hard to build something simple and at the moment that is all that I need.
The production code that I’ve written behind the API service only really amounts to 30-40 lines at the moment but it’s all complex boolean logic and LINQ expressions. Now that it’s all working (I can confidently say that with a suite of tests to back me up) I’d like to go back in and clean a lot of it up. It’s not the easiest thing to read at first whack.
The tests on the other hand are a great tool for understanding the system. As I’m using a testing convention such that each test is named after a scenario or rule in our system it is easy to get a grasp for how the system works just by looking at the list of unit tests.
Jarred has been having fun with the Microsoft Compact Framework, Virtual Earth and the GPS stuff. Unfortunately I haven’t been able to check out much of it even though I’ve been sitting right next to him. I have seen a screenshot of a map with pushpins on it moving about though.
Amusingly enough, I am aware whenever he checks in a change because I have set up my CCTray application (which monitors my Continuous Integration build server remotely) to use the Speech API to read aloud any events that take place. It’s great fun to hear “Great work! Another successful build” every few minutes.
Ah well, as it is passed 2 in the morning I may go and collapse somewhere. I'll leave you with a link to the unofficial mascot and song for this project: Magical Trevor
Time Remaining: 108 Hours 3 Minutes
By the time I wake up that’ll be half-time!
No new comments are allowed on this post.