Archive for March, 2010

Yet another example of TDD’s Brilliance. 0

I woke up this morning and checked my phone, 7 Tests failed.

My initial reaction was anger,  wondering which poor developer I would smack for this change (Luckily the developer was located in poland so smacking is out of the question).
However, as I pulled up my teamcity page, located the exact build and exact line of code that caused these tests to fail, and fixed the bug almost immediately, I began to reflect on what could have occurred had we not had CI or Tests written in this case.

Flash forward, 6months from now.
Client uses the system and calls our support line to say its ‘broken’. They repeat what they did and the task is assigned to me to fix this problem. The support person immediately blames me for this problem.
I pull up the old code from this project, as i’m working on a new project now. I hesitantly attempt to reproduce this problem, breakpointing away until I can find the exact cause of the bug.While pulling this up, my manager asks me how long it will take for me to fix – hinting a bit of anger that I caused this whole mess in the first place. I reply like I do with all bugs – It depends how long it takes me to find it.

This scenario is wrong for so many reasons – and I cannot see why anyone would not want to catch a bug as soon as possible. It takes a lot longer for a developer to catch a bug that is not fresh in their mind, let alone the possibility that end users will have to suffer in this scenario. When we first started the entire re-writing of this project and porting to ruby, to use a BDD/TDD Approach to development, management initially thought I was mad – but when situations occur like this, that could have taken days to fix something so simple – is when it just makes plain sense.

Hosting Cassandra on Windows 0

If you’ve been following all the action on github – a colleague (krisw) and I have been building a high level cassandra client for C# & .NET (Hector Sharp).

We’re still quite young in development and you can see our to-do list is full of funny things such as ‘make compile’.

One of the things I love about cassandra is that being built in java, We can run a little dev server on windows to test this. Below are the steps to install Cassandra on a Windows environment & Set up a basic server.

  1. Install Java 6 on your machine (Sun Repo)
  2. Download Cassandra ( Version is 0.5.1 at time of writing ) & Extract to a directory (I used C:\cassandra)
  3. Set the following Path variables
    - JAVA_HOME (To the directory where you installed java [ note not that bin directory ]
    - CASSANDRA_HOME (to the directory you extracted cassandra to, in my example C:\cassanda\)
  4. Modify your cassandra config file as you like ( in my example c:\cassandra\conf\storage-conf.xml)
  5. Run cassandra! Open a cmd or powershell and run the batch file in your cassandra\bin folder
  6. Verify Cassandra is running, open a cassandra-cli from the cassandra\bin folder and try connecting to your new server.