What next?

Our last meeting (in October) was enjoyable, but now we need to choose another topic. I suggest we meet up to discuss it in January – we’ll have the Christmas break to do some reading. So add your suggestions in the comments – 3 books in order of preference, as usual.

Test Driven Development

There were six of us at the Lamb and Flag to discuss test driven development (TDD). I was joined by Miquel, Tom, David, Inigo and new boy Julian. The books chosen to kick off the discussion were two different books called “Test Driven Development”, the first by Kent Beck and the second by Dave Astels.

David revealed that he’d actually read a third book, Test Driven by Lasse Koskela. He said it was not a bad book but he wasn’t convinced by the part which talked about driving development through acceptance tests. The section on test driving the database was fine for simple applications, but in David’s experience it is not always simple to swap the database used in live with an in-memory database such as HSQL. Often the application will use stored procedures or other specific features of the target database. Inigo pointed out that if you have a requirement to support both Oracle and SQL Server, say, then using a third database would actually not be such a big step.

Inigo referred to a study by Microsoft which showed that TDD took 15-35% longer than traditional development but was 40-90% better in terms of bug counts.
He suggested that it is the fact that the tests are written at the same time as the code that is important, not the fact that tests come first. David suggested that you lose some advantages if you don’t follow the rules. Writing the tests first mean you always know where you are and that every feature should have a test. Tom said that be coded test-first when bug fixing, but found that doing true TDD was a bit tedious if followed to the letter. I mentioned Ping Pong programming, where a pair of developers play a game by adding a failing test and getting their partner to make it pass and add their own failing test. The idea is to try to write as little code as possible. There was some surprise that this was not mentioned in the books we had read.

We talked about the Kent Beck book. Inigo found it to be a little lightweight and quite philosophical while Miquel thought it was easy to read. Inigo thought it had extra sections that were not strictly needed in a book about TDD, for example the chapters on refactoring and patterns. However, he liked the design of the code that is explored in the book, which is a currency conversion application. Inigo had expected some interesting details of JUnit 4, but once he saw the copyright date he realised that this was not possible.

I found the Dave Astels book felt quite outdated. It is quite a few years old now, so many of the technologies such as JUnit and mocking have moved on quite significantly. It could also do with some typesetting love as it is not the most beautiful book to look at. I also felt that it was rather long – I couldn’t bring myself to read through the extended example which makes up most of the book. Julian (as a newcomer to the subject) did feel that it was good that it was so practical, unlike Kent Beck’s more theoretical approach. So perhaps it is the better of the two for someone new to this area.

We moved on to talking about different testing techniques. I mentioned Jumble, a mutation testing framework which I have described on my work blog. David talked about how he used Fuzzing in his previous job to find bugs in an XML parser. His experience was that it was best to have a smart fuzzer that understood XML as this was more likely to find bugs than just adding random noise to a file.

Inigo mentioned Hamcrest matchers and the use of assertThat in JUnit. It was generally agreed to be good for readability of code and error messages, but not so good with respect to IDE auto completion. David pointed out that JUnit 4 has this problem over JUnit 3 since the assertion methods need to be statically imported.

Finally Miquel asked about how to test JavaScript. Tom and David described Selenium/WebDriver as the best tool in this area.

Topic for March

We are due to meet on 10th March. Our discussions will be based around a book that we have covered previously. The list of our books is on LibraryThing, but remember we have already done some books twice. To vote, add a comment listing your three preferences in order.

[UPDATE: It looks like Agile Estimating and Planning is the winner in this contest, although Miquel made the election more complicated by not listing his preferences in order.]

Topic for December

We need to decide what to discuss at December’s meeting (due to be on 9th December). This will be a “revisit” meeting, so our discussions will begin based around a book we have already covered. So please go to the comments and vote for your three favourite books to revisit. [UPDATE The chosen book is Working Effectively with Legacy Code by Michael Feathers ]

Topic for November

Please vote for the topic for November. The discussion will be based around a new book that we haven’t looked at before. So give your 3 preferences in order in a comment below. We are due to meet up to discuss this on 11 November, so get your votes in quick!
[UPDATE So the winner is Fearless Change by Mary Lynn Manns and Linda Rising]

Topic for October

Ok, so we need to decide what to discuss at October’s meeting (due to be on 14th October). As mentioned in the previous posting, we are going to kick off our discussions based around a book we have already covered. So please vote for your three favourite books to discuss in order.
[UPDATE: So Domain Driven Design is the winner by a short head]

Book for August

With the July meeting coming up, it’s time to vote for the book to discuss in August. The usual rules apply – list your 3 favourites in order in the comments. Once a few votes are in the winner will be chosen by a highly complicated and proprietary algorithm that I’m not at liberty to reveal…

We are due to discuss this on 12 August, but I am likely to be away on holiday for this one.

[UPDATE: The winner is Behind Closed Doors by Johanna Rothman and Esther Derby. Mostly a management book, but since Agile is about teams, entirely relevant.]