<?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: Design And Testability</title>
	<atom:link href="http://lostechies.com/derickbailey/2010/09/10/design-and-testability/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/derickbailey/2010/09/10/design-and-testability/</link>
	<description>Better Than Yesterday</description>
	<lastBuildDate>Thu, 20 Jun 2013 03:33: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: Anonymous</title>
		<link>http://lostechies.com/derickbailey/2010/09/10/design-and-testability/#comment-1506</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 04 May 2011 21:20:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2010/09/10/design-and-testability.aspx#comment-1506</guid>
		<description>Testability as a design concept is right in line with this kind of thinking.  Testability means being able to easily create rapid, effective, and focused acknowledgment cycles adjoin your code with automated tests.</description>
		<content:encoded><![CDATA[<p>Testability as a design concept is right in line with this kind of thinking.  Testability means being able to easily create rapid, effective, and focused acknowledgment cycles adjoin your code with automated tests.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Bellware</title>
		<link>http://lostechies.com/derickbailey/2010/09/10/design-and-testability/#comment-1076</link>
		<dc:creator>Scott Bellware</dc:creator>
		<pubDate>Mon, 13 Sep 2010 23:35:54 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2010/09/10/design-and-testability.aspx#comment-1076</guid>
		<description>Cory,

It&#039;s good design if it&#039;s elegant, and it&#039;s elegant if it&#039;s simple and clear. A call to Dir likely has some meaning within the context that it&#039;s used, like your example of &quot;CreateNewStagingArea&quot; above. Adding meaning adds clarity, but adding another class abstraction isn&#039;t a slam dunk, as you&#039;ve also pointed out.

I&#039;m using the definition of &quot;elegance&quot; that Edsger Djykstra was fond of, one that mathematicians use. This is a commentary of his about abstraction, &quot;the purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.&quot;

The point I was making earlier is that I&#039;m not terribly worried about using calls to Dir where ever they&#039;re necessary because they will likely be represented by a higher-level signature that is already there to add meaning.

Strictly from a testing perspective, if the conditions are right, and elegance is not lost in test design, I&#039;d functionally test the &quot;CreateNewStagingArea&quot; method at least once, and not necessarily need coverage over it subsequently from other tests. I might replace the method if the mocking framework added to the clarity of what I was documenting with the test, or I might just let it go. I would only mock the call to Dir when directly testing the CreateNewStagingArea if it was valuable to do so, and I wouldn&#039;t make that decision based on black and white orthodoxy until I had more of the rest of the factors in play in my possession.

Ad I would likely name the method &quot;create_new_staging_area&quot; as an exercise to understand Ruby&#039;s native idioms in hope that I would assimilate more of them through practice, rather than reinforce my existing C# biases :)</description>
		<content:encoded><![CDATA[<p>Cory,</p>
<p>It&#8217;s good design if it&#8217;s elegant, and it&#8217;s elegant if it&#8217;s simple and clear. A call to Dir likely has some meaning within the context that it&#8217;s used, like your example of &#8220;CreateNewStagingArea&#8221; above. Adding meaning adds clarity, but adding another class abstraction isn&#8217;t a slam dunk, as you&#8217;ve also pointed out.</p>
<p>I&#8217;m using the definition of &#8220;elegance&#8221; that Edsger Djykstra was fond of, one that mathematicians use. This is a commentary of his about abstraction, &#8220;the purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.&#8221;</p>
<p>The point I was making earlier is that I&#8217;m not terribly worried about using calls to Dir where ever they&#8217;re necessary because they will likely be represented by a higher-level signature that is already there to add meaning.</p>
<p>Strictly from a testing perspective, if the conditions are right, and elegance is not lost in test design, I&#8217;d functionally test the &#8220;CreateNewStagingArea&#8221; method at least once, and not necessarily need coverage over it subsequently from other tests. I might replace the method if the mocking framework added to the clarity of what I was documenting with the test, or I might just let it go. I would only mock the call to Dir when directly testing the CreateNewStagingArea if it was valuable to do so, and I wouldn&#8217;t make that decision based on black and white orthodoxy until I had more of the rest of the factors in play in my possession.</p>
<p>Ad I would likely name the method &#8220;create_new_staging_area&#8221; as an exercise to understand Ruby&#8217;s native idioms in hope that I would assimilate more of them through practice, rather than reinforce my existing C# biases :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cory Foy</title>
		<link>http://lostechies.com/derickbailey/2010/09/10/design-and-testability/#comment-1075</link>
		<dc:creator>Cory Foy</dc:creator>
		<pubDate>Mon, 13 Sep 2010 23:07:41 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2010/09/10/design-and-testability.aspx#comment-1075</guid>
		<description>Scott - Yes, we&#039;re on the same page, if what you are saying is that the goal isn&#039;t testability, it&#039;s modular design. 

Louis - The Dir class forces your code to rely on a concrete implementation, instead of an abstraction. That&#039;s not good design. But, it may be /acceptable/ design. Sometimes the extra abstraction step isn&#039;t worth it, especially if the calls are all centralized in an encapsulated module.

def CreateNewStagingArea(name)
  //...
  Dir.new(name)
end

Is that Good Design or Bad Design? The answer is all about context. But my general guidance to someone showing me that is, no, it&#039;s not. </description>
		<content:encoded><![CDATA[<p>Scott &#8211; Yes, we&#8217;re on the same page, if what you are saying is that the goal isn&#8217;t testability, it&#8217;s modular design. </p>
<p>Louis &#8211; The Dir class forces your code to rely on a concrete implementation, instead of an abstraction. That&#8217;s not good design. But, it may be /acceptable/ design. Sometimes the extra abstraction step isn&#8217;t worth it, especially if the calls are all centralized in an encapsulated module.</p>
<p>def CreateNewStagingArea(name)<br />
  //&#8230;<br />
  Dir.new(name)<br />
end</p>
<p>Is that Good Design or Bad Design? The answer is all about context. But my general guidance to someone showing me that is, no, it&#8217;s not. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: derick.bailey</title>
		<link>http://lostechies.com/derickbailey/2010/09/10/design-and-testability/#comment-1074</link>
		<dc:creator>derick.bailey</dc:creator>
		<pubDate>Mon, 13 Sep 2010 17:44:55 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2010/09/10/design-and-testability.aspx#comment-1074</guid>
		<description>Steve - Chad requested his comment be removed, so I did. Yeah, it does leave a hole in the comments... i wasn&#039;t sure what to do about that. didn&#039;t want to appear that i was censoring anyone, but then the hole in the comment stream is odd... </description>
		<content:encoded><![CDATA[<p>Steve &#8211; Chad requested his comment be removed, so I did. Yeah, it does leave a hole in the comments&#8230; i wasn&#8217;t sure what to do about that. didn&#8217;t want to appear that i was censoring anyone, but then the hole in the comment stream is odd&#8230; </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://lostechies.com/derickbailey/2010/09/10/design-and-testability/#comment-1073</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 13 Sep 2010 17:35:54 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2010/09/10/design-and-testability.aspx#comment-1073</guid>
		<description>So...did Chad&#039;s comment get removed?  Seems to be a gap in the comments there.

I was reading something Giles Bowkett (a Ruby guy for those who have no idea who he is) had written similar to what Scott is talking about (my apology, I can&#039;t find the link).  

It was more about how all the effort to add safety to static languages has just made developers worse as opposed to improving code.  Not exactly the same discussion, but it touches on similar topics.  

</description>
		<content:encoded><![CDATA[<p>So&#8230;did Chad&#8217;s comment get removed?  Seems to be a gap in the comments there.</p>
<p>I was reading something Giles Bowkett (a Ruby guy for those who have no idea who he is) had written similar to what Scott is talking about (my apology, I can&#8217;t find the link).  </p>
<p>It was more about how all the effort to add safety to static languages has just made developers worse as opposed to improving code.  Not exactly the same discussion, but it touches on similar topics.  </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Louis Salin</title>
		<link>http://lostechies.com/derickbailey/2010/09/10/design-and-testability/#comment-1072</link>
		<dc:creator>Louis Salin</dc:creator>
		<pubDate>Mon, 13 Sep 2010 15:25:43 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2010/09/10/design-and-testability.aspx#comment-1072</guid>
		<description>Cory, why is using the Dir class in your code a bad design? The Dir class is a great abstraction of low level directory manipulation. Why encapsulate the encapsulation? What is the chance that you&#039;ll want to use something else? And if you do end up using something else, how hard is it going to be to replace the Dir class? We are talking about something that is pretty much set in stone, here. I doubt the way we use files and folders will change, which makes using the Dir class pretty safe, in my opinion.

We need to think about this before making broad &quot;Bad Design&quot; declarations.

In our code base, at work, we use dependency injection everywhere. It&#039;s great. I love it. But the reason I love it is because our container does all the work for us. In the year and a half I&#039;ve been here, I have yet to swap a class with another. It has never happened! If it wasn&#039;t for the container and the features it gives us that have nothing to do with DI, I&#039;d seriously question its use. So far, the only advantage I see is that when changing the constructor on a class, I don&#039;t have to go edit anything else, because we don&#039;t new-up anything. 

I do understand the flexibility that DI gives us. It&#039;s great. But to say that DI should apply to everything might be short sighted in my humble opinion.</description>
		<content:encoded><![CDATA[<p>Cory, why is using the Dir class in your code a bad design? The Dir class is a great abstraction of low level directory manipulation. Why encapsulate the encapsulation? What is the chance that you&#8217;ll want to use something else? And if you do end up using something else, how hard is it going to be to replace the Dir class? We are talking about something that is pretty much set in stone, here. I doubt the way we use files and folders will change, which makes using the Dir class pretty safe, in my opinion.</p>
<p>We need to think about this before making broad &#8220;Bad Design&#8221; declarations.</p>
<p>In our code base, at work, we use dependency injection everywhere. It&#8217;s great. I love it. But the reason I love it is because our container does all the work for us. In the year and a half I&#8217;ve been here, I have yet to swap a class with another. It has never happened! If it wasn&#8217;t for the container and the features it gives us that have nothing to do with DI, I&#8217;d seriously question its use. So far, the only advantage I see is that when changing the constructor on a class, I don&#8217;t have to go edit anything else, because we don&#8217;t new-up anything. </p>
<p>I do understand the flexibility that DI gives us. It&#8217;s great. But to say that DI should apply to everything might be short sighted in my humble opinion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Bellware</title>
		<link>http://lostechies.com/derickbailey/2010/09/10/design-and-testability/#comment-1071</link>
		<dc:creator>Scott Bellware</dc:creator>
		<pubDate>Mon, 13 Sep 2010 14:34:48 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2010/09/10/design-and-testability.aspx#comment-1071</guid>
		<description>Steve,

I haven&#039;t worked with Grails for more than a year, but at the time it was based on Spring. If this hasn&#039;t changed, then it remains a framework that doesn&#039;t take advantage of language strengths inherent in Groovy, and maintains biases - whether recognized or not - toward tool-based Inversion of Control and dependency injection.

Ultimately, I found Grails to be just more Java and C# style ceremony in language that didn&#039;t always necessitate it. It was like trying to make a leap to a new paradigm by leaving one foot firmly glued to the floor, and not really ending up in any particularly good place.

Grails to me is like a limbo - an intermediate place that is nether one thing nor the other. It&#039;s often the kind of thing that happens when people aren&#039;t sufficiently at-ease with the full extent of the necessity for the commitment of our attention when making a significant leap.

The leap from Spring MVC to Rails was too big of a gap for many Java developers to commit themselves to. Grails is the nether world where they are currently stewing in the fixative power of that karma.

The same could be said about .NET developers&#039; susceptibility to the fixative power of ASP .NET MVC, and friends.

These aren&#039;t technologies driven by an indomitable personal drive for excellence, they&#039;re technologies driven by only so much pursuit of excellence that doesn&#039;t cause us to face the momentary discomfort of paradigm shift and the momentary loss of personal social status that we&#039;ve built up in the culture surrounding the previous paradigm.

At some point, we&#039;re called to go all-in or else we only end up re-learning and reinforcing things that we already know and are already comfortable with.</description>
		<content:encoded><![CDATA[<p>Steve,</p>
<p>I haven&#8217;t worked with Grails for more than a year, but at the time it was based on Spring. If this hasn&#8217;t changed, then it remains a framework that doesn&#8217;t take advantage of language strengths inherent in Groovy, and maintains biases &#8211; whether recognized or not &#8211; toward tool-based Inversion of Control and dependency injection.</p>
<p>Ultimately, I found Grails to be just more Java and C# style ceremony in language that didn&#8217;t always necessitate it. It was like trying to make a leap to a new paradigm by leaving one foot firmly glued to the floor, and not really ending up in any particularly good place.</p>
<p>Grails to me is like a limbo &#8211; an intermediate place that is nether one thing nor the other. It&#8217;s often the kind of thing that happens when people aren&#8217;t sufficiently at-ease with the full extent of the necessity for the commitment of our attention when making a significant leap.</p>
<p>The leap from Spring MVC to Rails was too big of a gap for many Java developers to commit themselves to. Grails is the nether world where they are currently stewing in the fixative power of that karma.</p>
<p>The same could be said about .NET developers&#8217; susceptibility to the fixative power of ASP .NET MVC, and friends.</p>
<p>These aren&#8217;t technologies driven by an indomitable personal drive for excellence, they&#8217;re technologies driven by only so much pursuit of excellence that doesn&#8217;t cause us to face the momentary discomfort of paradigm shift and the momentary loss of personal social status that we&#8217;ve built up in the culture surrounding the previous paradigm.</p>
<p>At some point, we&#8217;re called to go all-in or else we only end up re-learning and reinforcing things that we already know and are already comfortable with.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Bellware</title>
		<link>http://lostechies.com/derickbailey/2010/09/10/design-and-testability/#comment-1070</link>
		<dc:creator>Scott Bellware</dc:creator>
		<pubDate>Mon, 13 Sep 2010 14:16:21 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2010/09/10/design-and-testability.aspx#comment-1070</guid>
		<description>Greg,

I don&#039;t have a narrow view of what modern static typing can offer, and I&#039;m aware of the continuing efforts toward fulfilling the dream of fully safe code. I also know that the pragmatism of self-modifying code is lost in this pursuit.

And that ultimately, this pursuit is a pursuit of an obsession with purity that mistakes wholly-optimized software development effort for locally-optimized programmer expediency. As such, it remains valueless but to those psychologies who fail to recognize having been shaped for years by geek idées fixes.

It&#039;s not something I&#039;m interested in because it delivers far less holistic productivity than it trades for localized expediency. If &quot;correctness&quot; were the only bottleneck, I would value it much more. And ultimately, it remains a non-actionable point while it remains largely hypothetical.

When this particular geek obsession delivers on all pillars of product development optimization both on the procedural and organizational fronts, I&#039;ll value it. Until then, I&#039;ve got larger fish to fry - fish that are even bigger than any sense of entitlement to premature, next-generation tools by any group of people who have become overly-specialized in their favorite work step.

I don&#039;t have a narrow view of static typing, I&#039;ve got a dim view of it. That view comes from having chosen to get immersive, in-depth experience with technologies that challenged my own unrecognized fixation with static typing. What I learned from spending a couple of years in this immersion is that I previously didn&#039;t have an informed basis to evaluate one against the other. Now I understand why static typing fails to contribute as much to product development productivity - except in a few exceptional cases. I have a much better understanding of when to use either, and that understanding is fed by knowledge and concerns that go far beyond the realm of what programmers tend to become distracted by.

</description>
		<content:encoded><![CDATA[<p>Greg,</p>
<p>I don&#8217;t have a narrow view of what modern static typing can offer, and I&#8217;m aware of the continuing efforts toward fulfilling the dream of fully safe code. I also know that the pragmatism of self-modifying code is lost in this pursuit.</p>
<p>And that ultimately, this pursuit is a pursuit of an obsession with purity that mistakes wholly-optimized software development effort for locally-optimized programmer expediency. As such, it remains valueless but to those psychologies who fail to recognize having been shaped for years by geek idées fixes.</p>
<p>It&#8217;s not something I&#8217;m interested in because it delivers far less holistic productivity than it trades for localized expediency. If &#8220;correctness&#8221; were the only bottleneck, I would value it much more. And ultimately, it remains a non-actionable point while it remains largely hypothetical.</p>
<p>When this particular geek obsession delivers on all pillars of product development optimization both on the procedural and organizational fronts, I&#8217;ll value it. Until then, I&#8217;ve got larger fish to fry &#8211; fish that are even bigger than any sense of entitlement to premature, next-generation tools by any group of people who have become overly-specialized in their favorite work step.</p>
<p>I don&#8217;t have a narrow view of static typing, I&#8217;ve got a dim view of it. That view comes from having chosen to get immersive, in-depth experience with technologies that challenged my own unrecognized fixation with static typing. What I learned from spending a couple of years in this immersion is that I previously didn&#8217;t have an informed basis to evaluate one against the other. Now I understand why static typing fails to contribute as much to product development productivity &#8211; except in a few exceptional cases. I have a much better understanding of when to use either, and that understanding is fed by knowledge and concerns that go far beyond the realm of what programmers tend to become distracted by.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://lostechies.com/derickbailey/2010/09/10/design-and-testability/#comment-1069</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 13 Sep 2010 12:00:21 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2010/09/10/design-and-testability.aspx#comment-1069</guid>
		<description>Thanks for the explanation above Scott (on interface) -  guess I&#039;ve just been in the C# world for too long  :)  

Passing in interfaces to constructors (ctor DI) and using IoC to handle object creation has been my MO for awhile now.

But again, I&#039;ve only really done this within Grails, C#, Java</description>
		<content:encoded><![CDATA[<p>Thanks for the explanation above Scott (on interface) &#8211;  guess I&#8217;ve just been in the C# world for too long  :)  </p>
<p>Passing in interfaces to constructors (ctor DI) and using IoC to handle object creation has been my MO for awhile now.</p>
<p>But again, I&#8217;ve only really done this within Grails, C#, Java</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roco</title>
		<link>http://lostechies.com/derickbailey/2010/09/10/design-and-testability/#comment-1068</link>
		<dc:creator>Roco</dc:creator>
		<pubDate>Mon, 13 Sep 2010 11:50:33 +0000</pubDate>
		<guid isPermaLink="false">/blogs/derickbailey/archive/2010/09/10/design-and-testability.aspx#comment-1068</guid>
		<description>&gt;There are many theorem provers available including an early production version from microsoft.

Shocking, this came from a MVP. Please, just don&#039;t somehow bring CQRS into this discussion.

</description>
		<content:encoded><![CDATA[<p>>There are many theorem provers available including an early production version from microsoft.</p>
<p>Shocking, this came from a MVP. Please, just don&#8217;t somehow bring CQRS into this discussion.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
