...

/

Why Use Test-Driven Development

Why Use Test-Driven Development

Understand why test-driven development is useful.

Test-driven development uses

Test-driven development (TDD) is sometimes defined as writing tests first. Although that’s an important part of the methodology, it’s not the essence. The essence of TDD is rapid iteration. You’ll find that you learn more quickly from iterating than you would from trying to plan out a complex program from the ground up. You’ll discover bad assumptions and potential pitfalls before you invest too much work. And you’ll find the process more enjoyable. It’s a smooth, incremental progression rather than an alternation between bursts of inspiration and plateaus of “What do I do next?”

The project for this chapter will be a solver for the classic ...