<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Subverting TDD as a design tool</title>
	<atom:link href="http://lostechies.com/jimmybogard/2009/05/22/subverting-tdd-as-a-design-tool/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2009/05/22/subverting-tdd-as-a-design-tool/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Thu, 23 May 2013 23:40:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: ulu</title>
		<link>http://lostechies.com/jimmybogard/2009/05/22/subverting-tdd-as-a-design-tool/#comment-1566</link>
		<dc:creator>ulu</dc:creator>
		<pubDate>Sun, 02 Aug 2009 09:14:46 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/05/22/subverting-tdd-as-a-design-tool.aspx#comment-1566</guid>
		<description>How do you decide which dependency should be explicit? Which part of the framework is a &quot;dependency&quot;? We all depend on System.String after all.. 

Knowing your dependencies is important, I agree, but what do you gain in this particular case?

Sometimes you use DateTime.Now in just one method of your class. do you still use a constructor injection? That is, when you go the ISystemClock way.

As for the Func way, isn&#039;t it the same design as with DateTime.Now, only testable?</description>
		<content:encoded><![CDATA[<p>How do you decide which dependency should be explicit? Which part of the framework is a &#8220;dependency&#8221;? We all depend on System.String after all.. </p>
<p>Knowing your dependencies is important, I agree, but what do you gain in this particular case?</p>
<p>Sometimes you use DateTime.Now in just one method of your class. do you still use a constructor injection? That is, when you go the ISystemClock way.</p>
<p>As for the Func way, isn&#8217;t it the same design as with DateTime.Now, only testable?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Gray</title>
		<link>http://lostechies.com/jimmybogard/2009/05/22/subverting-tdd-as-a-design-tool/#comment-1565</link>
		<dc:creator>Jeremy Gray</dc:creator>
		<pubDate>Mon, 25 May 2009 17:15:10 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/05/22/subverting-tdd-as-a-design-tool.aspx#comment-1565</guid>
		<description>@Jimmy - I hear ya. I go back and forth on this a bit myself, and suspect that there is a happy medium where certain things are just used so widely (and/or by types you&#039;d rather not use ctor injection on) that statics/funcs may give the best result while using injected interfaces and their implementations for everything else.</description>
		<content:encoded><![CDATA[<p>@Jimmy &#8211; I hear ya. I go back and forth on this a bit myself, and suspect that there is a happy medium where certain things are just used so widely (and/or by types you&#8217;d rather not use ctor injection on) that statics/funcs may give the best result while using injected interfaces and their implementations for everything else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/05/22/subverting-tdd-as-a-design-tool/#comment-1564</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Sat, 23 May 2009 21:01:25 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/05/22/subverting-tdd-as-a-design-tool.aspx#comment-1564</guid>
		<description>@Jeremy

I&#039;ve gone back and forth myself.  It&#039;s pretty straightforward to do double-dispatch with an IClock into an entity...but in some domains where time was _everywhere_, the Func made the most sense.  I never worried about putting the replacement back in, however.  That was never an issue for me.</description>
		<content:encoded><![CDATA[<p>@Jeremy</p>
<p>I&#8217;ve gone back and forth myself.  It&#8217;s pretty straightforward to do double-dispatch with an IClock into an entity&#8230;but in some domains where time was _everywhere_, the Func made the most sense.  I never worried about putting the replacement back in, however.  That was never an issue for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Gray</title>
		<link>http://lostechies.com/jimmybogard/2009/05/22/subverting-tdd-as-a-design-tool/#comment-1563</link>
		<dc:creator>Jeremy Gray</dc:creator>
		<pubDate>Sat, 23 May 2009 18:46:54 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/05/22/subverting-tdd-as-a-design-tool.aspx#comment-1563</guid>
		<description>@Paco &amp; Jimmy - This is purely anecdotal, of course, but I went down the static/Func combo route once and immediately regretted it. It allows for hidden dependencies to be taken over time and, far worse, was a great source of messy test code (you need to make sure to restore the real func after the test so it has to be gettable, your setup needs to back it up, push the replacement in, run the test, put the original back) that is prone to human error and results in indirect test failures that are dependent on order of test execution and can be difficult to diagnose. Easy to correct once located, yes, but at the cost of the aforementioned messy test code all over the place and for each dependency. :)

ctor injection FTW! :D</description>
		<content:encoded><![CDATA[<p>@Paco &#038; Jimmy &#8211; This is purely anecdotal, of course, but I went down the static/Func combo route once and immediately regretted it. It allows for hidden dependencies to be taken over time and, far worse, was a great source of messy test code (you need to make sure to restore the real func after the test so it has to be gettable, your setup needs to back it up, push the replacement in, run the test, put the original back) that is prone to human error and results in indirect test failures that are dependent on order of test execution and can be difficult to diagnose. Easy to correct once located, yes, but at the cost of the aforementioned messy test code all over the place and for each dependency. <img src='http://lostechies.com/jimmybogard/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>ctor injection FTW! <img src='http://lostechies.com/jimmybogard/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: miz</title>
		<link>http://lostechies.com/jimmybogard/2009/05/22/subverting-tdd-as-a-design-tool/#comment-1562</link>
		<dc:creator>miz</dc:creator>
		<pubDate>Fri, 22 May 2009 22:43:55 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/05/22/subverting-tdd-as-a-design-tool.aspx#comment-1562</guid>
		<description>forgive a dullard&#039;s question: what exactly is being subverted in this specific case? </description>
		<content:encoded><![CDATA[<p>forgive a dullard&#8217;s question: what exactly is being subverted in this specific case? </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Mosafi</title>
		<link>http://lostechies.com/jimmybogard/2009/05/22/subverting-tdd-as-a-design-tool/#comment-1561</link>
		<dc:creator>Neil Mosafi</dc:creator>
		<pubDate>Fri, 22 May 2009 20:28:26 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/05/22/subverting-tdd-as-a-design-tool.aspx#comment-1561</guid>
		<description>Couldn&#039;t agree more, be explicit about what you depend on.

Also imagine one day the requirement comes up to run a historical calculation, or to freeze the clock at the start of a message loop so all operations within that loop get the same time, and you will thank yourself for having abstracted that dependency. </description>
		<content:encoded><![CDATA[<p>Couldn&#8217;t agree more, be explicit about what you depend on.</p>
<p>Also imagine one day the requirement comes up to run a historical calculation, or to freeze the clock at the start of a message loop so all operations within that loop get the same time, and you will thank yourself for having abstracted that dependency. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/05/22/subverting-tdd-as-a-design-tool/#comment-1560</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Fri, 22 May 2009 20:17:40 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/05/22/subverting-tdd-as-a-design-tool.aspx#comment-1560</guid>
		<description>@Scott

Ah yes, design.  That makes a lot more sense.

@Paco

Sometimes I want to make the dependency explicit and obvious.

@Justin

The Feathers book is chock full of safe dependency-breaking techniques.  We use them quite a lot, even in new codebases.</description>
		<content:encoded><![CDATA[<p>@Scott</p>
<p>Ah yes, design.  That makes a lot more sense.</p>
<p>@Paco</p>
<p>Sometimes I want to make the dependency explicit and obvious.</p>
<p>@Justin</p>
<p>The Feathers book is chock full of safe dependency-breaking techniques.  We use them quite a lot, even in new codebases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Bellware</title>
		<link>http://lostechies.com/jimmybogard/2009/05/22/subverting-tdd-as-a-design-tool/#comment-1559</link>
		<dc:creator>Scott Bellware</dc:creator>
		<pubDate>Fri, 22 May 2009 18:53:57 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/05/22/subverting-tdd-as-a-design-tool.aspx#comment-1559</guid>
		<description>Jimmy,

Kind of a point of order: It&#039;s not code that is or isn&#039;t &quot;testable&quot;; it&#039;s design that is or isn&#039;t testable.

Even with TypeMock, the *design* isn&#039;t testable.  The reason is that the design can&#039;t be made testable in and of itself without bringing in outside tools (design elements) to make it so.  Testability is about whetehr something can be isolated without the need to introduce new factors, such as runtime profiling (TypeMock).

TypeMock doesn&#039;t make anything &quot;testable&quot; unless we opportunistically re-define what what colloquially and commonly mean by &quot;testable&quot;, which is what TypeMock as an entity continues to strive to do.  I don&#039;t think they do this nefariously.  I honestly don&#039;t think that the TypeMock folks have a reasonable understanding of what is meant by &quot;testable&quot;.</description>
		<content:encoded><![CDATA[<p>Jimmy,</p>
<p>Kind of a point of order: It&#8217;s not code that is or isn&#8217;t &#8220;testable&#8221;; it&#8217;s design that is or isn&#8217;t testable.</p>
<p>Even with TypeMock, the *design* isn&#8217;t testable.  The reason is that the design can&#8217;t be made testable in and of itself without bringing in outside tools (design elements) to make it so.  Testability is about whetehr something can be isolated without the need to introduce new factors, such as runtime profiling (TypeMock).</p>
<p>TypeMock doesn&#8217;t make anything &#8220;testable&#8221; unless we opportunistically re-define what what colloquially and commonly mean by &#8220;testable&#8221;, which is what TypeMock as an entity continues to strive to do.  I don&#8217;t think they do this nefariously.  I honestly don&#8217;t think that the TypeMock folks have a reasonable understanding of what is meant by &#8220;testable&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paco</title>
		<link>http://lostechies.com/jimmybogard/2009/05/22/subverting-tdd-as-a-design-tool/#comment-1558</link>
		<dc:creator>Paco</dc:creator>
		<pubDate>Fri, 22 May 2009 18:38:29 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/05/22/subverting-tdd-as-a-design-tool.aspx#comment-1558</guid>
		<description>Why not everywhere</description>
		<content:encoded><![CDATA[<p>Why not everywhere</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/05/22/subverting-tdd-as-a-design-tool/#comment-1557</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Fri, 22 May 2009 18:28:18 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/05/22/subverting-tdd-as-a-design-tool.aspx#comment-1557</guid>
		<description>@Paco, Jonathan

I go with the Func-y version for entities and such, I personally got it from Ayende.</description>
		<content:encoded><![CDATA[<p>@Paco, Jonathan</p>
<p>I go with the Func-y version for entities and such, I personally got it from Ayende.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
