Why do the design patterns people come up with such ridiculously elaborate conceptualisations of perfectly trivial ideas?
The term “Dependency Injection” has been popping up periodically in the feeds I read, and each discussion left me with a disconcerting sense of missing something vague, so I decided to address my ignorance.
I had already gotten myself up to speed with what Inversion of Control is a few days ago, because these two terms tend to show up together. But that was different, since merely reading the discussions gave me a gut understanding of the term that was sufficient to follow them. The definition just reinforced and reassured my comprehension. It’s a distinctive if prosaic concept.
With “Dependency Injection” however, the excercise was harder. Lots of explanation that didn’t seem to be making any particular point was all I could see. Where was the meat? I read and reread the definition, examined the flimsy code snippets carefully, stared at the nearly tautologic diagrams for roughly 10 minutes, trying to grasp the deeply profound idea but failing. It finally dawned on me, after investing much effort, that it was right there – only banal enough that it was obscured by the heaps of pontification. It turns out the concept is so trite I’ve used it more times than I can remember, without ever having thought of it as any kind of dinstinct idea. What the heck?
That explains the feeling of missing something vague. All the critical examination and lengthy discussion suggested profundity that simply does not exist. The impressive-sounding term is nothing but a thin cloud of vapour.
This is just another reminder that I should learn to trust my gut.