Chapter 12: Emergence

Is written by Jeff Langr.

It's pretty much about 4 principles of good design from Kent Beck:

  • Runs all the tests
  • Contains no duplication
  • Expresses the intent of the programmer
  • Minimizes the number of classes and methods

The chapter promises that if you follow these rules, the emergent design of the system will be clean. Maybe? The proof is left as an exercises for a reader.

My favourite part is the last section: "Minimal Classes and Methods"

Even concepts as fundamental as elimination of duplication, code expressiveness, and the SRP can be taken too far. In an effort to make our classes and methods small, we might create too many tiny classes and methods. So this rule suggests that we also keep our function and class counts low.

High class and method counts are sometimes the result of pointless dogmatism.

Yep. This pretty much sums up everything what is wrong with the rest of this book.