5.1. Duplication
Go to a large industry conference, grab 10 programmers at random, and ask what’s the root of all evil? I will bet most of them will respond with a reference to Donald Knuth’s classic remark about premature optimization being the root of all evil.[1] The second most popular answer will likely be that duplication is the root of all evil—assuming you’re attending a conference frequented by agile software developers, test-infected programmers, and software craftsmen who deeply care about clean code.
1 Donald Knuth. “Structured Programming with go to Statements.” Computing Surveys, Vol. 6, No. 4, 1974. Stanford University.
So what’s duplication? What do we mean by duplication? In short, duplication is the existence of multiple copies ...
Get Effective Unit Testing 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.