Avoiding Mini-Waterfalls

This content is syndicated from George Dinwiddie's blog by George Dinwiddie. To view the original post in full, click here.

A lot of people and organizations, when transitioning from a serial software development lifecycle toward an Agile one, fall into the pattern of mini-waterfalls. They start doing iterations, but each iteration resembles the development lifecycle they already know. The programmers do some design work, then they write the code to implement the design, then unit test the code, and then they pass it to the testers for testing. To many people, this is the only way it can work. Their mental model only admits to this series of phases.

And they run into typical problems. Sometimes the design doesn’t fit the problem well, and patches are needed because there isn’t time to go back to design. The testers get squeezed for time at the end of the iteration, and no one knows how to accommodate the rework when a problem is found. More patches are added, because there isn’t time to redesign. And the next iteration starts the cycle over again.

Sure, doing this in two to four week cycles beats doing it in six to twelve month cycles. But only a little. Most of the time, it starts to fall apart if the team doesn’t learn to work differently.

But it’s inevitable, they say.

No, it’s not inevitable. Some teams don’t work in a serial fashion. That’s a simple existence proof. A single counter-example should be sufficient. Of course, people are not logical beings, so it’s not. They cling to what the know, deny what they don’t know, and sometimes get angry with people who disagree.

A first step toward finding an alternative is to think about all the individual details of designing, coding, and various sorts of testing. If you break these activities up into little mini-activities, you’ll quickly notice that a lot of them do not depend on each other, and can be done in arbitrary order. You can remove a lot of the serial nature without dropping the serial mindset.

A second alternative is more radical. You invert the entire sequence. Rather than starting with design, you start with testing. While you’re first discussing what functionality needs to be produced, think of some examples that illustrate what it needs to do. Think deeply, and look for situations that your examples don’t cover. Create more examples for those. This questioning the requirements is, itself, a form of testing. It’s also a great communication boon. I like to use a process I call The Three Amigos. And having those examples in mind helps the programmers hit their target more accurately.

Now it’s relatively trivial to turn those examples into automated tests for that functionality, even before the code is written. Just automate the examples, expressing your expectations at the end of each. Of course, they won’t pass until the code is completed, but that’s OK. Once they’re automated, running them is trivial.

The developers don’t have to start with designing before coding, either. Again, start with a test. In this case, it’s a unit test. The examples that illustrate the requirements will surely give some ideas for a starting point. Write a unit test (or microtest as GeePaw Hill calls it; these aren’t your father’s unit tests) and then write just enough code to make it pass. Once it passes, then consider the design, refactoring the code to eliminate duplication and push bits of functionality into a shape that makes a good design. It sounds backwards and impossible until you try it. At least, it did for me. But it does, in fact, work to reverse the waterfall flow. (I don’t always proceed without a design in mind. Sometimes I can’t stop myself from thinking of a design before I start. But I don’t delay starting while I think about the design. I do that thinking as I code and refactor.)

As the code starts to take shape, I may need to add a little glue code to connect the already-written tests to the code I’ve just written. At some point, the tests pass. Is it “test-after-code” if the code is the last thing written? I wouldn’t say so. Of course you will want to do some exploratory testing as each part demonstrates it’s met the explicit criteria of the examples.

As written above, this sounds very mechanical. In actual practice, it’s a lot more fluid. People are talking with each other all the time, noticing loose ends that have been missed, and taking looks from multiple points of view throughout the process. No one is too fussed about the order of the activities. They’re fluid enough that, to a first approximation, everything is happening all the time. And it’s a far cry from mini-waterfalls each iteration.

Leave a Reply

Your email address will not be published. Required fields are marked *

fifteen − six =

There are 101 ways to do anything.
To find the best way, sometimes you need expert help

What People Say

“Kelly was engaged as a Program Director on a complex business and technology transformation program for Suncorp Commercial Insurance. Kelly drew on his key capabilities and depth of experience to bring together disparate parties in a harmonised way, ensuring the initiate and concept phases of the program were understood and well formulated. Excellent outcome in a very short time frame. ”


“Kelly and I worked together on a very large project trying to secure a new Insurer client. Kelly had fantastic commercial awareness as well as his technical expertise. Without him I would never had secured this client so I owe a lot to him. He is also a really great guy!”


“I worked with Kelly whilst at Thoughtworks and found him to be a most inspiring individual, his common-sense approach coupled with a deep understanding of Agile and business makes him an invaluable asset to any organisation. I can't recommend Kelly enough.”


“Kelly is an Agile heavy-weight. He came in to assess my multi-million $ Agile development program which wasn’t delivering the right throughput. He interviewed most of the team and made some key recommendations that, when implemented, showed immediate results. I couldn’t ask for more than that except he’s a really nice guy as well.”


“Kelly revolutionised the way our digital department operated. A true advocate of agile principles, he quickly improved internal communication within our teams and our internal clients by aligning our business and creating a much enhanced sense of transparency in the decisions the business was making. Kelly also introduced a higher sense of empowerment to the development teams...”


“Kelly’s a leading program director with the ability to take charge from day one and keep strong momentum at both a program and project level driving prioritisation, resourcing and budgeting agendas. Kelly operates with an easy-going style and possesses a strong facilitation skill set. From my 5 months experience working with Kelly, I would recommend Kelly to program manage large scale, complex, cross company change programs both from a business and IT perspective.”


“I worked with Kelly on many projects at IPC and I was always impressed with his approach to all of them, always ensuring the most commercially viable route was taken. He is great at managing relationships and it was always a pleasure working with him.”


“Kelly was a great colleague to work with - highly competent, trustworthy and generally a nice bloke.”


“Kelly was a brilliant CTO and a great support to me in the time we worked together. I owe Kelly a great deal in terms of direction and how to get things done under sometimes difficult circumstances. Thanks Kelly.”


“Kelly came to the department and has really made a huge impact on how the department communicates, collaborates and generally gets things done. We were already developing in an agile way, but Kelly has brought us even more into alignment with agile and scrum best practices, being eager to share information and willing to work with us to change our processes rather than dictate how things must be done. He is highly knowledgable about agile development (as his active blog proves) but his blog won't show what a friendly and knowledgeable guy he is. I highly recommend Kelly to anyone looking for a CTO or a seminar on agile/scrum practices - you won't be disappointed!”


“Kelly is an extremely talented and visionary leader. As such he manages to inspire all around him to achieve their best. He is passionate about agile and has a wealth of experience to bring to bear in this area. If you're 'lucky' he might even tell you all about his agile blog. Above all this, Kelly is great fun to work with. He is always relaxed and never gets stressed - and trust me, he had plenty of opportunity here! If you get the chance to work with Kelly, don't pass it up.”



To explore how we can help you, please get in touch