Skip to main content

the death of tdd

Several years ago, Colin had the pleasure of working with Mike and his team as they embarked on their Agile journey. As with many teams, they went through stages of what might be termed maturity. First, they learned how to plan and work iteratively, later they learned incremental working. Finally, they reached a point where they wanted to improve their engineering practices and so Colin had introduced them to Test-Driven Development. Now he was sitting listening to Mike, the technical team lead for the team, explain to him why TDD wasn’t working for them.

"You see, TDD forces you to decouple everything” he said, “You taught us the SOLID principles, JSP and the Composed Method pattern?” He looked down into his cappuccino, “you introduced us to clean code, too. We’ve followed the rules in the book to the letter and now we’ve found it’s just too difficult to write code.”

I was curious about his statement, “What do you mean it’s too difficult?” I asked.

Mike was hesitant at first but eventually started to open up, “TDD forced us to produce a disintegrated codebase that is too decoupled. It makes it difficult to follow the flow of logic through it. We call it test-induced damage, caused by us sticking to the rules. Producing even the smallest piece of functionality seems to take an age now and has become a bit of a chore.”

Taking a moment to consider, Colin asked him, “Do you remember the seven deadly sins of design? Do you remember the deadliest sin?”

Mike looked at him in puzzlement, “Of course, not doing any is the biggest sin but we’ve been doing design as per the principles you taught us and it’s just not working.”

Colin explained, “You followed all my advice except for the most important piece: the principles are not rules; they are guidelines. TDD cannot and does not make design decisions, only people can do that. You and your team made the design decisions that produced your fractured codebase, not TDD.”

Mike considered this for a moment before responding, “I think you’re right, we’re all looking for a simple rule to follow and if following that rule leads to problems, we blame the rule, not the fact that we followed it blindly.”

“You’re not actually doing design!” Colin went on, “The mindless application of a rule, or even set of rules, is not doing design. Design is a mindful activity that requires the awareness of different, sometimes conflicting, drivers and the application of judgement to make appropriate trade-offs between them. It’s your ability to make those judgements and how well you make them that determines your competence as a professional.”

“I feel such an idiot,” said Mike, starting to look a bit sheepish, “I can see it now. We picked up the SOLID principles, used them as a Golden Hammer and saw every design opportunity as a nail.”

He looked Colin in the eye and said, “We’re going to stick with TDD but, in future, I’m going to make sure the team is more mindful, is aware of the decision making aspect of design and takes ownership of their decisions.”

“Mindfulness is what it’s all about,” said Colin. ”It’s underlies everything we try to teach. The principles and practices are there simply to make you think about what you’re doing and why you’re doing it.”

After making sure Mike would keep him updated about progress, Colin left the room and as he walked away, he heard a line from Paul Simon’s song, The Boxer, going round and round in his head, “A man hears what he wants to hear and disregards the rest.”

Popular posts from this blog

Embracing the Promise of AI: Overcoming Fears and Musk's Paradox

In the face of groundbreaking technologies like AI, initial fears and uncertainties are not uncommon. However, history has shown that society often transitions from apprehension to wholehearted acceptance as the true potential of a technology unfolds.  When motor vehicles emerged in the late 19th century, society grappled with fear and uncertainty. Laws mandating a person carrying a red flag to precede each vehicle reflected public anxiety and attempts to mitigate potential accidents.  Similarly, society's current apprehension towards AI stems from fear of the unknown and its potential disruptive consequences. However, history shows that initial fears are often unfounded and subside with increased familiarity and understanding of new technologies. AI's capability to process vast amounts of data and identify complex patterns presents unprecedented opportunities for decision-making and efficiency. Organizations can unlock insights, make data-driven decisions, and optimize process

Embracing AI - Augmented Intelligence

There is no denying that artificial intelligence (AI) has made significant strides over recent years, becoming more advanced and capable than ever before. With this progress, many have begun to wonder whether AI poses a threat to humanity, particularly our jobs, privacy, security, and overall well-being.  Some may argue that the rapid advancement of AI could lead to a dystopian world where machines rule supreme and humans become obsolete. However, it is important to remember that at its core, AI exists to serve us, not replace us. Instead of viewing AI as competition for human intelligence, we should consider it as an augmentation of our abilities.  This idea of 'Augmented Intelligence,' instead of Artificial Intelligence, highlights how powerful technology can enhance rather than impede human potential. Augmented Intelligence recognizes that humans and machines each possess their unique strengths, making them better together than apart. Humans excel in creativity, intuition, a

Integrating UI/UX Design Into Your Sprints

Integrating UI/UX design work into the Sprint and aligning it with your Scrum process can be challenging but not impossible. Here’s a few suggestions on how a Scrum Master can handle this situation : 1. Encourage close collaboration between the UI/UX designers, developers, and QA team members. Create an environment where they can work together and understand each other's perspectives. Encourage them to pair and/or mob to help bridge the gap between design and development. 2. Educate the team about the value of UI/UX design: Help the developers and QA team members understand the importance of good design and how it impacts the overall user experience. This will help them appreciate the design work and its role in creating a successful product. 3. Include design-related tasks in the Sprint: While design work may not be easily quantifiable in the same way as development tasks, you can still include design-related tasks in the Sprint backlog. These tasks could include activities