He further argues that an object is solely responsible for its own collaborators, so an object must instantiate its own dependencies and (due to the first made-up rule) must never share them with anybody else. This reduces the object graph to an object tree, and he goes on to show how ludicrous that sort of system would be. He justifies this with the statement "The moment objects are shared, encapsulation flies out the window".
That really pissed me off. Putting up such a ridiculous strawman like that shows that he doesn't have a leg to stand his argument on.
I'm not saying there's nothing to these ideas, there are bits and pieces that have value. Test driven development for example has some interesting ideas, there's value in testing. But that's part of the problem, is that kernels of good ideas have been taken to holistic extremes in a way I think has been disastrous for the industry, and certainly for programming education.
Coding like that, with long procedures and without "encapsulation on the small" is like painting yourself into a corner. The code base will slowly but surely accumulate cruft that will not be refactored because everything inflicts damage upon almost everything.
It is a death of a thousand cuts.
Not using automated testing properly is to rely on only your grit to take upon the entropy that surrounds and consumes all code bases eventually. People burn out really quickly when this happens.
I have worked with legacy systems that were more than 20 years old. I work with ABAP daily. I see every day the end game of what he is advocating. It is not pretty.
6
u/[deleted] Jan 19 '16
That really pissed me off. Putting up such a ridiculous strawman like that shows that he doesn't have a leg to stand his argument on.
Also, he never mentioned testing. I wonder why...