Introduction: Building the Case for TDD

Get an introduction to what you’ll learn in this chapter.

We'll cover the following

Before we dive into what test-driven development (TDD) is and how to use it, we’re going to need to understand why we need it. Every seasoned developer knows that bad code is easier to write than good code. Even good code seems to get worse over time. Why?

In this section, we‘ll review the technical failures that make source code difficult to work with. We’ll consider the effect that bad code has on both the team and the business bottom line.

Chapter goals

By the end of the chapter, we’ll have a clear picture of the anti-patterns we need to avoid in our code. In this section, we’re going to cover the following main topics: