Issue 013: 2016-08-31
I’ve recently heard a great Mobile Couch episode about dependency injection. Ben and Daniel do an excellent job of demystifying this pattern. Fundamentally, dependency injection is giving an object (via instance variables) access to whatever it depends on rather than letting the object access its dependencies directly.
I looked around for a good example and I found more complication than clarity. The best example that I found can be seen here: http://www.jamesshore.com/Blog/Dependency-Injection-Demystified.html. I like this example because it starts from a simple example and builds up from it. It also shows the usefulness of this pattern when it comes to testing.
Recently, I’ve heard an excellent Ruby Rogues episode about contempt culture. The episode has a Fresh Air vibe to it, and it focuses on the reality of contempt in the software industry. Whether it’s opinions about the “best” programming language (even though there is no such thing) or specific language based hate (I can’t count the number of times I’ve heard or read a “PHP is horrible” opinion).
Religious wars in software development are not that far off from actual religious war (thankfully they’re less bloody). Whether about languages or programming trends (like “object oriented design is dead, long live functional programming”), I suppose it’s our human tendency to be attracted to a group and its ethos (or lack thereof).