Part 3. Diversions

 

For a moment, the working name of this third part of the book was “Advanced.” However, reconsidering the use of such a strong word loaded with meaning, we concluded that it would be misleading to call it that. Instead, we decided to call it “Diversions” because that’s what it is—a set of diversions that are interesting and useful to the advanced practitioner but aren’t exactly “required reading” for becoming one.

The topics in this part are about taking what you have and turning the knobs farther toward eleven. In chapter 7 we’ll open the can of worms labeled “design” and try to paint a picture of what constitutes (or doesn’t constitute) as testable design. After all, our ability to write tests for our code goes hand in hand with our ability to design our code—period.

In chapter 8 we’ll turn the boat 180 degrees and explore the symbiosis of JVM languages and how it would look if we tested our Java code with tests written in another programming language. This may or may not be a good idea for the project you’re working on today. However, there’s no denying that alternative JVM languages are here to stay, and it could very well be that some time later you’ll thank yourself for writing some of those tests with one. Who knows!