I'm writing a book!
TL;DR: I’m writing a book called Unit Testing: Principles, Patterns and Practices. Link to the book: the book. Click here to get a 40% discount: the discount
You probably noticed that I scaled down on blogging lately (huh, "lately" turns out to be almost a year already). That’s because during the past 10 months (since October 2018) I was writing a book and it sucked all my creative energy.
The most difficult part is finally over - yesterday, I finished the last chapter. There will be several rounds of review, editing, and polishing, so don’t expect it to go live any time soon. I estimate it’d be released in December 2019, maybe November if I’m lucky. The MEAP (Manning Early Access Program) has already begun, though, so you can purchase the book now and get new chapters as they are being released.
So here’s a little bit of back story and then I’ll talk about the book itself. Skip to the next section if you don’t care about it (but hey, who doesn’t like stories!).
I summer 2018, when I was finishing up my CQRS in Practice course, I decided that I want to write a book. Yep, I first decided to write a book and then started thinking what to write about. You probably know me from my DDD blog posts and courses on Pluralsight, and Domain-Driven Design was the first topic I considered, but disregard it. While my DDD articles and courses are (hopefully) helpful, let’s be frank here, I don’t think I can contribute much above what already written in other DDD books. I’m quite good at presenting DDD topics in a digestible format with helpful examples but those topics are already there for me to present.
That’s not the case with unit testing, though. There are quite a few of unit testing books on the market already, but most of them target beginners, and none gives a holistic view on the topic. There’s quite a bit of bad advice too. With my book, I wanted to gather into a single place everything I wrote about unit testing for the past several years. The book is based on my past content but it’s much more detailed, refined, and precise.
The book about unit testing
The book is for people who already have experience with unit testing. If you are a novice, you’ll most likely find it valuable too, but the book assumes you already know the basics and doesn’t spend much time re-iterating those basics.
The goal of the book is to show how to write tests such that they provide maximum value with minimum maintenance costs. There are two main components to this goal:
Recognizing a valuable test (and, by extension, a test of low value).
Writing a valuable test.
Although the two look similar, they’re different by nature. Recognizing a valuable test requires a frame of reference. Writing a valuable test requires you to also know code design techniques, since you don’t write tests in a vacuum and have to take into account the underlying code too. The book teaches both.
As with all my articles and courses, I tried to keep explanations in the book concise but expressive. Every guideline described in the book has a strong theoretic background which is then applied to practical examples. All practices are based on several foundational principles I lay out at the beginning of the book (chapter 4). You won’t see anything like "well, I prefer this way of doing things because my gut feeling tells me so", I explain exactly why some testing practices are preferable over others.
Here’s the table of content:
As you can see, despite the book title, it’s not only about unit testing. Integration testing is a vitally important part of testing too.
I tried to keep the book size under 300 pages (no one likes to read large books!). As a result, the material is quite dense, even denser than my other content, but you shouldn’t have any trouble digesting it.
The life after the book
There’s quite a bit of work ahead to get the book published but it’s gonna be nothing compared to the last 10 months. These last 10 months were tense. The book took almost every evening and weekend, and I’m glad this is finally (almost) over.
After the book, I will probably go back to writing Pluralsight courses (there are a couple courses I agreed to do which I had to postpone due to the book), but I also think about creating an in-depth course on unit testing independently of Pluralsight.
In any case, make sure you subscribe to my email list here: subscribe. I know I use this list mostly as an RRS feed to announce new blog post, but I’m thinking about posting more fine-grained bits to the mailing list (and not to the blog), such as updates on my courses, quick answers to reader questions, and so on, so don’t miss it.
Again, the link to the book: the book.
To get a 40% discount, subscribe here: the discount
comments powered by Disqus