Introducing TDD to Managers
Introducing TDD to Managers
Leadership's involvement is essential to the success of TDD. Let's talk about how to get your managers onboard.
Join the DZone community and get the full member experience.Join For Free
Get the fastest log management and analysis with Graylog open source or enterprise edition free up to 5GB per day
In my last blog post, I discussed different ways of introducing test-driven development to teams. The bottom line is to give developers an experience of benefiting from doing TDD. Once they see how their tests catch bugs that otherwise would have perhaps escaped and had to be fixed later, and how TDD helps them keep focused on building software that fulfills acceptance criteria, and gives them the opportunity to refactor and clean up their code, then developers begin to see the benefit for themselves and want to continue to do it.
But convincing some managers, especially those who really don't understand what software development is all about, can be a challenge. I believe that constructing software is fundamentally different than constructing physical things. Software is unique and very often the techniques we use to manage other kinds of projects don't work for managing software projects. It takes a while to gain experience as a manager in the software industry.
Quality is important in virtually every field but quality in software and software construction is critically important. But we have to understand what quality means in the context of software. Reliability, security, and performance are the effects or result of deeper causes that come from good developer principles and practices at work.
Volumes have been written on programming and how to do it well. If I had to sum it up in one word that word would be testability. When we make software testable it is also of high quality and so the cost of maintaining and extending this kind of software is lower than untestable code.
When managers ask me what's the most important thing to hold their developers to I always say testability. Have your developers write testable code because that code will be more cost-effective to maintain and extend. Given that industry spends five times more on software after it's released than it initially cost to create, it's clear that maintenance is very important. Since testable software costs less to maintain we want to encourage developers to write testable software.
The best way I found to encourage developers to write testable software is to have them do test-first development. With this one practice, we encourage code to be not only of high quality but also independently verifiable. If we build good tests then we will also be building a reliable continuous integration system that will allow us to automate regression.
There is value in catching bugs early. There is value in having a reliable continuous integration server. There is value in being able to confidently make last-minute changes to code. These are the valuable things that we get from doing test-driven development and when managers see those benefits in action they often get on board with having their teams do test-driven development. But just like developers, managers have to see the value of these practices for themselves.
Published at DZone with permission of David Bernstein , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.