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

The Death Knoll for the Agile Trainer

The winds of change blow fiercely, propelled by AI-driven virtual trainers, and I can't imagine for a minute that certification organisations have not already recognised the potential for a revolution in training. They may even already be preparing to embrace technology to reshape the Agile learning experience. Traditional face-to-face training and training organisations are on the verge of becoming obsolete as virtual tutors take the lead in guiding aspiring Agile practitioners through immersive digital experiences. The future of training and coaching lies in AI-driven virtual trainers and coaches. Trainers, powered by artificial intelligence engines such as ChatGPT, are set to revolutionise the learning experience. With AI-powered virtual trainers, learners can engage in immersive virtual environments, actively participate in simulations, collaborate with virtual team members, and tackle real-world scenarios. These trainers automatically analyse progress, provide instant feedback

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

The Business Value of Telemetry

Dynamic technologies and infrastructure allow server failures and network issues to be quickly addressed, easily mitigated and, in many cases, reliably predicted. As a result, there’s a new venue opening for IT: end-user telemetry, which enables IT to determine how its internal users are consuming business resources, what type of application issues they are experiencing and how it impacts business performance. Gartner suggests that infrastructure and operations (I&O) leaders must change their approach and prioritize top-down business-oriented metrics. The research firm predicts that “60% of IT monitoring investments will include a focus on business-relevant metrics” by 2021, up from just 20% this year. Changing The Game Of course, it’s one thing to recognize the value of business-driven metrics and another to implement effective monitoring processes company-wide to overcome key barriers to effective digital transformation. The first step is understanding the fundamental shift requi