<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Object Mentor Blog: Collateral Effort Revisited</title>
    <link>http://blog.objectmentor.com/articles/2007/06/11/collateral-effort-revisited</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Collateral Effort Revisited</title>
      <description>&lt;p&gt;One of the things I love about &lt;span class="caps"&gt;TDD&lt;/span&gt; is that it takes all the scaffolding and collateral effort for creating a class, all indications of bad coupling, and makes them entirely visible. This is also one thing that makes it very hard to start &lt;span class="caps"&gt;TDD&lt;/span&gt; in legacy system.&lt;/p&gt;


	&lt;p&gt;When you realize that it&amp;#8217;s very hard to test a class out-of-context, the right answer is to start decoupling each class so it can be run out-of-context. When we are successful here, tests run very very fast and are easily self-verifying and isolated.  It is a beautiful thing even if it follows many ugly hours of painstaking work.&lt;/p&gt;


	&lt;p&gt;The wrong answer, I&amp;#8217;m convinced, is to build a mega-framework for testing that allows you to test in-context. This type of framework typically creates a totally realistic runtime environment (complete with database, configuration files, directories, etc).  This approach allows you to think that you can ignore your dependency nightmare. You really can not Mega-test-frameworks take a such a long time to run that developers stop running all the tests all the time.  This is a far worse problem than breaking dependencies because it breaks the whole process.  Mega-frameworks don&amp;#8217;t solve the problem, they only defer the solution until the problem gets worse.&lt;/p&gt;


	&lt;p&gt;When you are faced this kind of collateral effort, the answer is to work through it, not to sweep it under a rug.  Working through it is work, indeed, but this is about doing the right thing not doing the easiest thing.&lt;/p&gt;</description>
      <pubDate>Mon, 11 Jun 2007 20:36:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:925c8e61-d709-4523-adaf-b2646602d831</guid>
      <author>tottinger</author>
      <link>http://blog.objectmentor.com/articles/2007/06/11/collateral-effort-revisited</link>
      <category>Tim's Tepid Torrent</category>
      <trackback:ping>http://blog.objectmentor.com/articles/trackback/8778</trackback:ping>
    </item>
    <item>
      <title>"Collateral Effort Revisited" by Jason</title>
      <description>&lt;p&gt;I completely agree.  It doesn&amp;#8217;t just apply to fixing your code so it&amp;#8217;s more testable, but almost any part of code smells.  At some point you&amp;#8217;re going to have to pay the piper, no matter how many things you try to sweep under the rug or implement some nifty &amp;#8220;noone will have to really fix their design problems if they implement this&amp;#8221; type solution.&lt;/p&gt;</description>
      <pubDate>Thu, 14 Jun 2007 07:50:54 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:9dea5414-be6f-421f-a8b0-9276c46cae64</guid>
      <link>http://blog.objectmentor.com/articles/2007/06/11/collateral-effort-revisited#comment-425</link>
    </item>
  </channel>
</rss>
