Lately I’ve been refactoring some really old code, and it helped me realize that in about 90% of the cases, inheritance from a class (unlike interface implementation) is a Bad Thing. Of course, I’m hardly the first to think that, but it’s not until I had to refactor deep, and absolutely wrong, object graphs until I felt it in my bones. But why? Isn’t inheritance a legitimate way to reuse code? Well, no, for several reasons: It makes the code harder to understand. To understand the flow of your class...