· coding-dojo

Coding Dojo #13: TDD as if you meant it

We decided to follow Keith Braithwaite’s ‘TDD as if you meant it’ exercise which he led at the Software Craftsmanship Conference and which I originally read about on Gojko Adzic’s blog.

We worked on implementing a Flash Message interceptor, to hook into the Spring framework, that one of my colleague’s has been working on - the idea is to show a flash method to the user, that message being stored in the session on a Post and then removed on a Get in the ‘Post-Redirect-Get’ cycle. It’s similar to the ’:flash’ messages that get passed around in Rails.

We used the Randori approach with five people participating for the whole session.

Despite having read about Gojko’s experiences of this exercise I still found it amazingly frustrating early on taking such small steps and the others pointed out a couple of times that the steps we were taking were too big. The most difficult thing for me was the idea of writing the implementation in the test and working out what counts as implementation code and what counts as test setup. The line seemed to be a little bit blurred at times.


public void clearFlashMessageIfRequestTypeIsGet(Request request) {
	if(!"get".equalsIgnoreCase(request.GetType()) return;
	// do other stuff
}
  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket