Introduction to Test-Driven Development (TDD) with Classic TDD Example

The best thing tests give us is “feedback”. Feedback as to if our designs are good, if there are bugs, and if we’re making progress. If part of what it means to be a good developer is to write testable code, the path of least resistance is to use a test-first approach. In this series about Test-Driven Development, we seek to master the art of testing, regardless of which side of the stack you’re on (front & back).

When I most recently took my car in to get an oil change, I noticed that the technicians seemed to consistently, reliably, and confidently get the job done, and get it done right. One client after the next. They weren’t making messes. They weren’t missing their estimates. They weren’t discovering that things won’t work at the last minute – in fact, I’ve even seen them come out, 2 minutes into the job to let someone know that there’s more work to be done than they initially expected.