Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to convince the management and your colleag...

Dániel Moka
September 22, 2022

How to convince the management and your colleagues to apply TDD

Introduction

There are many pushbacks when we want to introduce TDD in a new environment. People are pessimistic, conservative or just simply have negative experiences with applying TDD. Therefore convincing others to use TDD can be challenging. But fortunately, TDD has some superior characteristics which can help you to reason about the importance of applying TDD.

Convince the management to apply TDD

What our management and boss ultimately want is to deliver value to the customer. Shipping quality and bug-free products. They don’t care how many times you refactor, or whether you use TDD or any other technique. They care about the result, and not the process.

But the good thing is that TDD helps with all of the things that they want. By doing TDD we produce code where the number of bugs are minimized and the quality is maximized. By having a well-tested product we increase agility and speed while we reduce the time to market. All in all, TDD increases reputation and saves time and money in the long run.

Convince your fellow colleagues to use TDD

As responsible developers, we want to write code in the best possible way. We strive for producing bugless, useful and well-tested code while we want to spend the least amount of time on time-consuming activities such as debugging.

TDD has some superior characteristics which can not be achieved with TLD, such as:

Introducing trust in our test suite by seeing our tests failing which verifies that the tests are meaningful and unique
Efficiently producing test assertions for every path of the business logic, resulting in high mutation score and a strong safety net
Building the quality into the product during the development process as we can’t inspect quality after the fact
Preventing Geek-at-keyboard (GAK) activities such as debugging
Conclusion

TDD won't solve all of your problems. But it will prevent many of them. It is not about going much faster. It is about going much better. TDD is not a silver bullet. But it is a magnificent tool, with many unique selling points.

ABOUT THE SPEAKER

Daniel Moka is a software craftsman and boundary pusher, having a mission to raise the software quality standard worldwide. He is a big fan of Extreme Programming, TDD, Clean Code, and the state of the art technologies with the ultimate goal of making the customer happy.

Beyond software engineering he loves doing any kind of sports and helping others to fulfill their potential. He is also the co-creator of TDD Manifesto.

LinkedIn: https://www.linkedin.com/in/danielmoka/
Twitter: https://twitter.com/dmokafa
GitHub: https://github.com/dmoka
Blog: https://www.danielmoka.com/

Dániel Moka

September 22, 2022
Tweet

Other Decks in Programming

Transcript

  1. Tech Excellence meetup Daniel Moka Software Craftsman 🌐www.danielmoka.com How to

    convince the management and your colleagues to apply Test-Driven Development
  2. www.danielmoka.com Daniel Moka - Software Craftsman Agenda Introduction Selling TDD

    to the management Convincing your colleagues to apply TDD Q/A
  3. www.danielmoka.com Daniel Moka - Software Craftsman Introduction Software Craftsman from

    󰏘 Wide spectrum of domain TDD advocate Helping teams to produce quality software
  4. www.danielmoka.com Daniel Moka - Software Craftsman Why? TDD is still

    not widely adopted Highly misunderstood topic Pushback
  5. www.danielmoka.com Daniel Moka - Software Craftsman What do Management want?

    Fast and stable releases At lower costs With more satisfied end-users Bugless and working software
  6. www.danielmoka.com Daniel Moka - Software Craftsman What TDD offers TDD

    reduces the number of defects High reputation Reduced costs
  7. www.danielmoka.com Daniel Moka - Software Craftsman Finding bugs early is

    cheap If you catch a bug while coding it will cost you 80$. If you catch a bug with your CI pipeline it will cost you 240$. If you catch a bug with your Q&A process it will cost you 960$. If you catch a bug in production it will cost you 7600$
  8. www.danielmoka.com Daniel Moka - Software Craftsman What TDD offers TDD

    reduces cost by spending much less time on debugging
  9. www.danielmoka.com Daniel Moka - Software Craftsman How to approach it?

    Requires cultural change Requires several technical skills Forcing never works Selling TDD to the management
  10. www.danielmoka.com Daniel Moka - Software Craftsman TDD as a silver

    bullet Convincing your colleagues to apply TDD
  11. www.danielmoka.com Daniel Moka - Software Craftsman Trust in our code

    Results in unique and meaningful tests Preventing false negatives Losing domain knowledge with TLD Seeing our test failing
  12. www.danielmoka.com Daniel Moka - Software Craftsman What is code coverage

    and mutation testing? What is mutation score? - Killed mutants -> failing test - Surviving mutants -> passing tests - TDD produces high mutation score High quality of tests
  13. www.danielmoka.com Daniel Moka - Software Craftsman TLD + code coverage

    + mutation testing - time consuming - very technical - demotivating (duct taping) - mandatory practices (while with TDD they’re optional) High quality of tests
  14. www.danielmoka.com Daniel Moka - Software Craftsman - Great things with

    TDD - continuous refactoring - covering edge/corner cases - readable and meaningful tests - Keep testing and refactoring along the way - PRs won’t help Quality must be built in
  15. www.danielmoka.com Daniel Moka - Software Craftsman Seeing the tests fail

    is essential Trustworthy testsuite with high mutation score Built-in quality Powerful design technique Summing up