Anti-pattern: Re-use through inheritance

When I first started programming in object oriented languages I used inheritance to reduce code duplication. You know the deal - you have two classes that do the same sort of thing so you create an abstract superclass and extract the common code into methods in the superclass. VoilĂ . No more duplicated code. But I was unwittingly creating an untestable codebase. I have worked extensively with dependency injection containers over the last five years and have begun to rely on the clean code they facilitate. [Read More]