"Dependency Injection" in Golang

home 18 Sep 2013 - By Karl Seguin The worst kept secret about unit testing in general, and TDD specifically, is that it's primarily a design activity with future correctness as a side effect. Unit tests don't uncover all design problems, but they are effective with respect to cohesion and coupling issues and the rather significant principals that relate to these. One thing I've noticed from programmers who've spent most of their lives with dynamic languages is that, even after years, they've rarely learned the basic design lessons unit testing teaches. Why? Because the very nature of dynamic languages mean that decoupling is a language facility as opposed to a design concern. Why go through the hassle of using various inversion of control approaches and frameworks when you can rewrite the behavior of any thing, at any time. I'm no fan of the ceremony surrounding Inversion of Control a...

Linked on 2015-01-13 23:58:27 | Similar Links