Have you done a few TDD exercises, but wonder how to bring it to your actual production code? Are you doing TDD in production code, but only for the simplest business rules? Did you TDD something only to feel it went poorly, and left your code worse off? Then it sounds like you’re ready for

Read More

Dan Abramov recently tweeted: TDD paralyzes me. I’m all for writing tests early in the process — especially in library code. But I can’t write them before I *play*. I need to write a shitty draft and play with the behavior to understand what I really want. Then rewrite guided by tests. — Dan Abramov

Read More

When I was first learning test-driven development (TDD), I’d try to get to the First Step (a failing test) by writing a fully-formed test. But it often took a lot fiddling to get that test to run and fail. Sometimes this was because the production code took several steps to set up. Sometimes it was

Read More

A paper published in 2013 about test-driven development (TDD) included the following diagram. Unfortunately, it gets some things wrong: A tweet from Nat Pryce sparked discussion: Grumpy request to academics: if you're going to publish ideas about how to improve TDD, get the original process right! pic.twitter.com/FaSU8CF6ol — Nat Pryce (@natpryce) September 7, 2017 First,

Read More

How can we use test-driven development for JSON parsing? Most developers are concerned with ways to implement the production code. There are various approaches, various libraries… But what about the unit test side of things? If we write effective unit tests, the design can appear incrementally. And with a strong suite of tests, you’re free

Read More