Minimize Number of Classes and Methods

When all these things are done, if there are classes and methods we no longer need, remove them. This won't happen very often—programming with tests first and then expressing each intention once and only once generally minimizes classes and methods.

We put this rule here to remind ourselves that it is last. Minimize classes and methods but not at the expense of correctness, expressiveness, or duplication of code.

Get Extreme Programming Installed 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.