On Wed, Jan 15, 2014 at 12:56 PM, Mateusz ?oskot <mateusz@...> wrote:
It gets easier over time if you practice merciless refactoring. The problem is that most programmers don't. They change stuff when it is obvious and makes their lives immediately easier and defer it otherwise. Then it turns into a mess and they no longer know how to fix it easily.?
If you can see that you need to query internals to know whether something works or not that is a smell. If you try to fix it right then it is likely to be easier than if you wait. If you try to fix it and make it worse then try again. That is what version control was invented for (precisely.)?
If you need help understanding when and why to change stuff I recommend the eLearning product from Industrial Logic.? When and whether to use mocks is more a matter of style than anything else, and philosophical debates about it are mostly a waste of time.?
?
I was responding more to the wording "used deep in implementation" than the code in your example. However, just because it is a direct collaborator doesn't mean you are out of the water. Tight coupling between the SUT and a direct dependency is a smell (Inappropriate Intimacy, most likely, though it could be a couple other things too.)?
|