I’ve heard people say they don’t buy books anymore, claiming that everything they want to learn is available on YouTube or somewhere on the web. I regularly buy books. Sometimes I pick up something in a completely new area to broaden my knowledge, and sometimes to deepen it in an area where I already have experience. Since I work as an educator and create the courses I teach, a book can be a great resource to validate the scope of a course or the way I explain a topic.

When I want to learn more about a subject, I like to have some kind of structure or limitation, something that helps me understand what is important to learn and what might be less essential. A book is great in that regard: the table of contents shows what the author considers most important or interesting.

My goal with this post isn’t to argue for the greatness of books. It’s to share some thoughts about a book I recently read. Allan Mellor has written a book about Test-Driven Development (TDD) that I recently bought and read. The reason I bought it was because of a new course I’m about to start teaching. I wanted to make sure I went deep enough in my course, but not too deep. Like most developers, I sometimes feel imposter syndrome creeping in, and I wanted to make sure my knowledge and experience with TDD are solid. In other words, I use books to validate my teaching.

Test-Driven Development with Java takes the reader on a journey to build the backend for a small word-guessing game. At the beginning, the book includes three chapters explaining why TDD is a great way of writing software, almost like a sales pitch. I don’t think this part was really necessary. If you’ve bought the book, you’re probably already interested in the topic. One chapter would have been enough. From there, the book moves on to discuss the TDD flow, from the Red–Green–Refactor cycle to structuring test cases using the Arrange–Act–Assert pattern.

A black book with the tile Test-Driven Development with Java

Taking notes while reading makes me remember what I read

Theory can be useful when learning a new topic, but too much of it can make a book feel stiff. This book strikes a good balance: the SOLID principles and Hexagonal Architecture are explained with just the right amount of theory, and the focus then shifts to applying these principles in the word-guessing game.

Throughout the book, the author’s voice is clear and easy to follow, even for a non-native English speaker. The book is practical and demonstrates how each step is accomplished, not just by showing code and explaining what it does, but by walking through the entire thought process. When a feature is developed, the author takes you step by step from start to finish, explaining his reasoning along the way. As a reader, I feel like I’m pair programming with him.

I can highly recommend this book. It’s not only packed with great examples and useful information, but the e-book is also included for free. You just have to send in proof of purchase, and the next day you can download it DRM-free. This is important because you’re not tied to any specific app or device. Great stuff!