Chapter 16. Duplication

Duplication is the root of many evils in software development and is particularly harmful for testability, which was broken down into observability, controllability, and smallness in Chapter 4, “Testability from a Developer’s Perspective,” where I claimed that duplicated code presented an additional challenge to testing. The argument was that there was no way to infer that if certain functionality was tested from one entry point in the application, it would behave the same if accessed from another.

Why Duplication Is Bad

From a test-aware developer’s point of view, duplication is bad in several ways:

Image Duplication breeds ...

Get Developer Testing: Building Quality into Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.