Use the Tests to Deal with Complexity
Developers face a lot of complexity when writing code. Look at how many decisions Eric made when fleshing out his “Create customer profile” application programming interface (API).
Count ’em. That’s six design decisions, trade-offs, and forks in the road the developer needs to think about—all for a single line of code! It’s no wonder things periodically fall through the cracks.
By writing your tests first and ensuring you have a failing test before adding the new code, TDD helps you fight the sheer amount of complexity you and your team are going to face writing code every day.
TDD also gives you a way ...
Get The Agile Samurai now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.