Blog

Article: Introducing Behaviour-Driven Development

At the beginning of this year I wrote a feature article for Better Software magazine, which was published as “Behavior Modification” back in March. The article is now available on my site. It gives an overview of behaviour-driven development, from its origins as a coaching aid for TDD through to its current form as a proven, comprehensive development approach.

Introducing BDD

13 mins

I had a problem. While using and teaching agile practices like test-driven development (TDD) on projects in different environments, I kept coming across the same confusion and misunderstandings. Programmers wanted to know where to start, what to test and what not to test, how much to test in one go, what to call their tests, and how to understand why a test fails.

The deeper I got into TDD, the more I felt that my own journey had been less of a wax-on, wax-off process of gradual mastery than a series of blind alleys. I remember thinking “If only someone had told me that!” far more often than I thought “Wow, a door has opened.” I decided it must be possible to present TDD in a way that gets straight to the good stuff and avoids all the pitfalls.

Learning to learn

3 mins
I was going to write about the various ways that people learn, and then my colleague Jeremy Stell-Smith wrote an excellent article describing one of my favourite learning models, so go and read that and I’ll see you back here shortly. Jeremy also alludes to Shu-Ha-Ri, another learning model based on repeating “cycles” of learning, found in Japanese martial arts (I haven’t linked to a single definition because there are a few subtly different ones around).

How quickly can you evolve?

4 mins
When Darwin’s “On the Origin of Species” was published, evolution was already a well-established idea. Darwin’s insight was that evolution—through the process of natural selection—led to the introduction and extinction of entire species. This of course upset the established church, and to this day there are still religious groups who reject the idea, in the face of overwhelming scientific evidence. The early twentieth century saw the rise of “neo-Darwinism”, which finally provided a mechanism for natural selection.

There's more to BDD than evolving TDD

2 mins
Behaviour-driven development started life as an NLP exercise to stem the abuse of the word “test” in “test-driven development”. Since then it has grown into a respectable and proven agile methodology (with a small “m” of course). Dave Astels, the award-winning author, was an early adopter of BDD and has been instrumental in raising its profile. He presented it at Canada on Rails and is taking it to JAOO and SD Best Practices.

How simple is too simple?

4 mins
This question came up at the recent Expo-C conference, when presenter Michael Stal talked about designing services to be “as simple as possible but no simpler”. Kent Beck advises us to do “the simplest thing that could possibly work”, but this is often mistaken for “the first thing I could possibly think of” or even “the only thing I know” (also known as the Golden Hammer antipattern). We picked up the topic as an open space session later that day.

Speaking at Expo-C

1 min
I am lucky enough to have been invited to present at Expo-C, a software architecture conference based in Carlskrona, Sweden. The dates are 16th to 19th May 2006. At the risk of dropping names, last year’s conference included sessions by the likes of Rod ‘Spring’ Johnson, Rickard Oberg and Jimmy Nilsson, and this year’s line-up includes, well, take a look for yourself. In a moment of insanity, the organisers have given me a whole day to play with, the Tuesday, so I’ll be running a number of sessions with an agile theme, rounded off with a retrospective.

Ruby session at ACCU 2006

1 min
From the session summary The Ruby language has taken the development world by storm. Its combination of clean, object-oriented syntax (everything is an object) coupled with Perl-like platform independence and inline text processing power make it a useful tool both for writing small utilities and as a rapid prototyping language. The popular web framework, Ruby-on-Rails, allows for easy development of highly-functional web applications. This session will explore these aspects of Ruby, namely for utilities, prototyping and web development.

What's so hard about Event-Driven Programming?

I was lucky enough to attend the Software Architecture Workshop in Cortina recently. It was a three day workshop based around the idea of Open Spaces, which involves handing the asylum keys to the inmates and seeing what happens. I convened a session called “What’s so hard about Event-Driven Programming?” to explore the experiences of the other delegates in designing, implementing and testing asynchronous, event- or message-driven systems. I took the position that actually it was all very straightforward as long as you followed a few basic principles.

Continuous Build is not Continuous Integration

3 mins
Automated builds have become a cornerstone of agile development. Every time a developer checks in a change, a tool like Cruise Control checks out all the sources, builds everything, runs all the unit tests and reports back with immediate feedback. This cycle has become known as Continuous Integration, due to the seminal paper by Martin Fowler and Matt Foemmel, but this is something of a misnomer. It is better described as Continuous Build.

BDD article published in Better Software magazine

2 mins
So, it’s taken me two years to finally get round to writing down what behaviour-driven development is all about, but I’m pleased with the result. The article has just been published in the March edition of Better Software as “Behavior ((I didn’t quite get away with the UK spelling)) Modification”. I started talking about BDD as an evolution of TDD at the back end of 2003, and played with the idea of a BDD framework, in the form of JBehave, during 2004.

BDD with intent

3 mins
Charles Simonyi introduced himself at a recent workshop with the words: “I was at Xerox PARC in the 70s, Microsoft in the 80s, and working on intentional software in the 90s”. He wasn’t showing off, he was just there. He pioneered WYSIWYG, created Microsoft Word, Excel and Access (as a data visualization tool), championed OO and invented metaprogramming. What this tells me is that when Charles Simonyi thinks he is on to something, it’s probably worth listening.