October 2013
Intermediate to advanced
368 pages
9h 20m
English
If you knew nothing whatsoever about design, you might consider following three simple rules when practicing TDD.
Ensure your code is always highly readable and expressive.
Eliminate all duplication, as long as doing so doesn’t interfere with the first rule.
Ensure that you don’t introduce unnecessary complexity into your system. Avoid speculative constructs (“I just know we’re gonna have to support many-to-many someday”) and abstractions that don’t add to your system’s expressiveness.
The final rule is important, but the other two hold slightly higher priority. In other words, prefer introducing an abstraction such as a new member function or class if it improves expressiveness.
Following these rules can give you an eminently ...