Friday, September 21, 2007

Getter Eradicator - Anything Martin Fowler writes is worth reading but this one in particular is good. I've tried reading Holubs patterns book but the bit at the start about encapsulation annoyed me enough that I stopped, as this article makes clear layering and the need to keep things that change together together (SRP) sometimes do affect the way you design meaning you do want to have getters.

Friday, September 14, 2007

I've been following BDD, from a distance, for a while and was reading a couple of good articles about it, including one by AgileJoe and one by Dan North. Scott Bellware also has a lot of posts on BDD but they're mainly quite abstract, at this stage I'm more interested in people showing how BDD can work and how to do it well rather than hearing about how great it is but you may want to give them a look.

The idea interests me but I have reservations, which I wanted to write down.

StoriesWhilst BDD and TDD go well together I don't think that user stories are the right way to specify the expected domain behavior.

To me user stories are useful for getting the high level, almost workflow, related requirements and acceptance tests. These are supposed to be at a very high level and shouldn't have any details about the user interface or below.

In fact the information you gather from a user story is quite different from the information you need when defining a domain model and in some cases your users (who specify the user stories) may not be the people specifying the required behavior of the domain (the domain experts).

In his excellent book Mike Cohn describes this, including the fact that users can provide good user stories whilst its the domain expert you want to speak to when defining the domain model.

Anyway I'm thinking this is just terminology, Dan North does not really refer to the stories as user stories (though from my reading Scott Bellware does). For some reason if I just consider them as stories I'm far happier, though it is also worth noting that Dan points out that they can be user stories.

User InvolvementPersonally I'm 100% convinced that where I work there is no chance of us getting our business experts to work with FIT or something like NBehave, and to be honest I'm not sure I like the idea of them having to specify their tests inside an IDE.

ConclusionAs usual, none. I like the idea and am going to look at it and the FIT style approach, to see what happens. StoryTeller in particular is another interesting piece of software and I'm not yet sure how it overlaps with BDD, particularly as some of the work on BDD is to try and blur the lines between different types of tests.