June 20, 2010
Bonus Code Smell Of The Week - Duplication II : Copy & Paste InheritanceOK, so definitely not weekly. But not daily, either. Whatever.
As mentioned in the last video, I'm illustrating here how you can refactor two very similar classes (probably as a result of one being copied and pasted to create the other - heaven forbid!) so that all the code common to both is in a shared base class by way of the Extract Super Class refactoring.
For training and coaching in refactoring, test-driven development and OO design, visit http://www.codemanship.com
Posted 10 years, 2 months ago on June 20, 2010