Book review: "TDD by Example" by Kent Beck

Table of contents

TDD by Example - Cover

Properties of the book

Overview

"Test-Driven Development by Example" is a book by Kent Beck, one of the creators of Agile and Extreme Programming (XP) methodologies. This book shows how to use TDD in practice by coding a common development task - a simple Money class. It also covers a lot of topics around TDD, such as: how to write tests, how to refactor code, what patterns can be used in TDD and even how to code your own testing framework.

Organization

The book consists of 3 parts:

Who is this book for?

This book is for developers who understand why we need to cover our code with tests and want to learn how to do it in practice.

As my audience is mostly JavaScript developers, I can say that this book will be useful for them as well even though the examples are written in Java and Python.

Understanding of classes and OOP concepts is required to understand the examples in the book. Some basic knowledge of software design patterns will be helpful as well as they are not deeply explained in the book.

Final Thoughts

I read a lot of articles online about TDD back in the past. But I really wanted to read about TDD from the person who created it. It was really great to read about the way Kent Beck thinks and codes during solving real task.

The code in the book is simplified and, of course, it is not a fully real-world example and production-ready solution, but it is a great starting point for people who want to learn more about TDD.

I can recommend this book for people who want to try TDD in their projects. For people who already use TDD, this book can be a good source of knowledge about testing frameworks and patterns.