2 comments

[ 140 ms ] story [ 767 ms ] thread
Heh. In my first big OOP project the business objects had something like seven layers of inheritance, with each layer a more fine grained abstraction of the final object. It was utterly, completely, and in all other ways unmaintainable.

To figure out what was actually going on you had to go through seven different classes and glean which methods were overridden, and which were new. When you needed to change something three layers up you realized what you were changing was a base class used by half the code, all of it unrelated, so even tiny changes required meticulous regression testing.

I'm not as dogmatic as the author, but over the years I decided if you have a clean-sheet design with inheritance you've done something wrong.