4 ms·
I interpreted "shaking the tree" to refer to how sometimes, when shaking a small tree, you end up with more things falling out than you expected. I suspect the
by gknoy 11y ago
I interpreted "shaking the tree" to refer to how sometimes, when shaking a small tree, you end up with more things falling out than you expected.
I suspect they mean that changes which one might expect to be small and well-contained end up requiring touching your class (to add a parameter), your superclass, your superclass's superclass, and then all of the tests that depend on the superclass being a certain shape.
I know I've encountered this, in several projects, so I'm not sure if it's a product of poor design (possible, I wrote some of them! ;)), or merely a side effect of a complex system. I know that lately with React, I've been having similar issues when composing things (and adding new features), so that I can pass callbacks far enough down, so it's definitely not solely related to inheritance.
- falcolas 11y agoYup, it occurs any time you have a strictly hierarchical relationship between objects. Module imports, classic inheritance, display containers... all suffer from this potential problem. There's nothing technically wrong with them, and so long as you have the time to add new behaviors at the correct level and re-order the hierarchy accordingly, everything goes swimmingly. The problems arise when deadlines loom and you don't have time to identify the proper location in the hierarchy for a behavior (let alone code it), or when new members of the team don't have the knowledge of the code base to identify the proper location, or when the codebase gets too large for any single person to know where the "best" place is for something to exist... It boils down to a human problem. And since all of our developers are humans...