CLICK HERE FOR BLOGGER TEMPLATES AND MYSPACE LAYOUTS »

Sunday, 21 November 2010

My thoughts on Test Driven Development


A few years back my work decided to roll out the use of Scrum to manage the teams of developers. This has worked well for the most part but we have so far not taken on any of the XP techniques that most Agile Scrum teams are using. This will soon change as a continuous integration system is being built and Test Driven Development (TDD) is beginning to be rolled out.

With the start of the TDD roll out, Clarke Ching (our Agile Expert and Consultant) has pointed us in the direction of his TDD Test Drive which uses a simple example with Excel and VB to introduce the principals of TDD.

My basic understanding of TDD is that the development process changes to:

1. Write an automated test that fails
2. Write just enough code to make it pass
3. Look for opportunities to re-factor the code
4. Make sure all the tests still pass
5. Repeat steps 1-4 until all tests are written and pass.

My initial thoughts on TDD are that whilst bringing huge benefits over traditional manual unit testing (especially where we have a large number of versions of the software being maintained using branches and roll ups), I am worried about missing important tests that will drive the software in the wrong direction. I am also worried about how to apply it to legacy code - There could be a large amount of re-factoring required which will impact our delivery time.

What I mean by missing important tests is that the tests are often based on the requirements or description of a bug that has been found in the software. Most of the time requirements and bug descriptions are vague or do not tell the whole story - if these are the sole drivers of the tests and the code is only written to make these tests pass it could be easy to miss something important.

I'd love to hear from other software developers on their thoughts and experiences with TDD and I'll let you know how I get on when I start putting it into practice.



Trip round Scotland 2010


My partner David and I's friend Matt from Bournemouth was visiting us a while back so we decided to give him a little tour around some of Scotland.

We took a drive up through the Rannoch Moor and on to a hotel just outside Fort William. We have nicknamed Rannoch Moor, Jurassic Park and whilst it was raining heavily it was still a great place to drive through.
EDIT: It was pointed out to me that the picture above is actually taken in Glencoe which is just outside the Rannoch moor.

The next day we followed the sat-nav (Bad idea) over to the Balmoral Estate (The Royal Families Scottish Holiday Home) and took a tour. The sat-nav took us straight up and over the Lecht which is a Scottish Ski resort and there was quite a bit of snow in the area. We ended up on a single track road for quite a few miles before finally coming out just down the road from Balmoral.

On the last day we took a trip down to Inveraray and visited the 19th Century jail and court house which has been turned into a museum.

It was a great few days away and I've included some links for anyone who wants to see these places for themselves.


Team Building Event


Back in September my work decided to have a team building event. I'm not usually a fan of team building events and they had certainly picked the worst day for it given the weather but in the end it was really quite good.

Our team started off quite badly losing several events in a row - Lowering a bamboo stick with the tops of your fingers, trying to grab and move a bottle from a distance with rope, tape, etc. and using tubes and barrels to keep a tennis ball rolling for as long as we possibly could.


By the afternoon our luck had changed and we started to win a few events - Obstacle course where you couldn't stand on the grass (using logs instead), building a catapult, building a tent blindfolded, mini highland games.

We finally moved indoors and out of the rain but the events were not over - NASA quiz, Build a bridge for a radio controlled car out of paper and tape.

In the end we came in joint fourth which was quite good considering how we started out.


We all then got the chance to do some archery, laser clay pigeon shooting and some other events to round off the day. Overall it was a good day despite the pouring rain.