Programming Flaw: Constructor That Does Real Work
http://misko.hevery.com/code-reviewers-guide/flaw-constructor-does-real-work/ This blog post talks about why having a constructor do too much work is a bad programming practice. When a constructor instantiates and initializes its collaborators, the result is often inflexible and can shut off the ability to inject test collaborators. The author gives a few reasons why this is a flaw: It violates […]
Read More Programming Flaw: Constructor That Does Real Work