Physics of TDD

To see how Test-Driven Development is different, let’s compare it to the traditional way of programming, something I call Debug-Later Programming. In DLP, code is designed and written; when the code is “done,” it is tested. Interestingly, that definition of done fails to include about half the software development effort.

It’s natural to make mistakes during design and coding—we’re only human. Therein lies the problem with Debug-Later Programming; the feedback revealing those mistakes may take days, weeks, or months to get back to you, the developer. The feedback is too late to help you learn from your mistakes. It won’t help you avoid the mistake the next time.

With the late feedback, other changes may be piled on broken ...

Get Test Driven Development for Embedded C 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.