This week's book giveaway is in the Java in General forum. We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line! See this thread for details.
Since this forum is about refactoring too, how is dependency injection helpful in refactoring a piece of code? Especially if we have a very complex project (....a so called big ball of mud). Wouldn't it require a lot of effort in chartering out dependencies among objects before establishing the configuration?
Also, at what stage of refactoring should we consider dependency injection so that effort can be maximised? What is the best approach and who are good candidates for dependency injection???