<?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"
	>
<channel>
	<title>Comments on: Let your examples flow</title>
	<atom:link href="http://dannorth.net/2008/06/let-your-examples-flow/feed" rel="self" type="application/rss+xml" />
	<link>http://dannorth.net/2008/06/let-your-examples-flow</link>
	<description>It's all behaviour</description>
	<pubDate>Sat, 22 Nov 2008 03:39:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Dan North</title>
		<link>http://dannorth.net/2008/06/let-your-examples-flow#comment-17301</link>
		<dc:creator>Dan North</dc:creator>
		<pubDate>Sun, 07 Sep 2008 18:36:12 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-17301</guid>
		<description>Hi Eivind. You're right - there are two separate ideas here and I didn't clarify them very well. Firstly the idea of putting helper classes, methods, etc. in the flow of the example code just ahead of the example that uses them (rather than at the end or in separate helper files). Secondly deciding that _duplication between examples is ok_ if you consider that each example should read as a reasonably self-contained narrative.

This second point creates a natural tension between DRY and readability. In other words you could do the first one and still end up with examples that were too DRY to read easily. The second issue is the more important one for me - especially if your testing/example framework executes potentially hidden methods that alter the flow of the example.</description>
		<content:encoded><![CDATA[<p>Hi Eivind. You&#8217;re right &#8211; there are two separate ideas here and I didn&#8217;t clarify them very well. Firstly the idea of putting helper classes, methods, etc. in the flow of the example code just ahead of the example that uses them (rather than at the end or in separate helper files). Secondly deciding that <em>duplication between examples is ok</em> if you consider that each example should read as a reasonably self-contained narrative.</p>
<p>This second point creates a natural tension between DRY and readability. In other words you could do the first one and still end up with examples that were too DRY to read easily. The second issue is the more important one for me &#8211; especially if your testing/example framework executes potentially hidden methods that alter the flow of the example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blog'A'Little</title>
		<link>http://dannorth.net/2008/06/let-your-examples-flow#comment-15441</link>
		<dc:creator>Blog'A'Little</dc:creator>
		<pubDate>Tue, 08 Jul 2008 20:13:02 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-15441</guid>
		<description>NNUG Bergen in August...

August is traditionally the startup month after the summer for NNUG activities and NNUG Bergen has really...</description>
		<content:encoded><![CDATA[<p>NNUG Bergen in August&#8230;</p>
<p>August is traditionally the startup month after the summer for NNUG activities and NNUG Bergen has really&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eivind</title>
		<link>http://dannorth.net/2008/06/let-your-examples-flow#comment-15436</link>
		<dc:creator>Eivind</dc:creator>
		<pubDate>Tue, 08 Jul 2008 09:27:38 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-15436</guid>
		<description>Hi Dan,

Thanks for valuable insights. But I'm getting a little bit confused here. I read you to say that the test cases should read like stories, and that moving supporting classes and methods "just ahead of the first test that used them" achieves that. But you still DRY them, don't you? So aren't you actually arguing for letting the examples flow more than against DRYing? DRYing is not necessarily "moving out of the way".

On the other hand, how far do good, descriptive names take you so that you don't even need to move the definitions up-front in order do understand the story? Why didn't inlining self-descriptive calls do?</description>
		<content:encoded><![CDATA[<p>Hi Dan,</p>
<p>Thanks for valuable insights. But I&#8217;m getting a little bit confused here. I read you to say that the test cases should read like stories, and that moving supporting classes and methods &#8220;just ahead of the first test that used them&#8221; achieves that. But you still DRY them, don&#8217;t you? So aren&#8217;t you actually arguing for letting the examples flow more than against DRYing? DRYing is not necessarily &#8220;moving out of the way&#8221;.</p>
<p>On the other hand, how far do good, descriptive names take you so that you don&#8217;t even need to move the definitions up-front in order do understand the story? Why didn&#8217;t inlining self-descriptive calls do?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan North</title>
		<link>http://dannorth.net/2008/06/let-your-examples-flow#comment-15185</link>
		<dc:creator>Dan North</dc:creator>
		<pubDate>Fri, 04 Jul 2008 00:37:31 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-15185</guid>
		<description>Hi David.

Yes, you're right. In my IDE I'm only one keystroke away from the definition of any helper method. But here's the thing. I could describe to you that to get to the dining room you have to go through the kitchen. We all know what a kitchen is. We all have a kitchen, we've all seen lots of other ones. To understand this specific example it doesn't matter what this particular kitchen looks like.

But if I had a description of the kitchen for this example it would make it just a little more real for me. This kitchen is a narrow galley kitchen. It has storage on one side (the left), good lighting coming from both a skylight and a double window (straight ahead), and it has an electric oven with a four unit gas hob.

If I wanted I could hit F3 to see the description of the kitchen, but I probably won't bother - I already have a generic "kitchen" in my head I can refer to. However if the description of this particular kitchen appears just ahead of the example, it makes it a little bit more vivid. I'm not suggesting to duplicate the description every time, just to put it ahead of the first example that refers to a kitchen so that I'm not substituting my generic one.

By reordering the helper methods and classes you can make it that little bit easier for me to be in the same headspace that you were when you wrote the example. Charles "cowboyd" Lowell, the man who taught me TDD, "sums it up really nicely":http://www.thefrontside.net/blog/repeat_yourself</description>
		<content:encoded><![CDATA[<p>Hi David.</p>
<p>Yes, you&#8217;re right. In my IDE I&#8217;m only one keystroke away from the definition of any helper method. But here&#8217;s the thing. I could describe to you that to get to the dining room you have to go through the kitchen. We all know what a kitchen is. We all have a kitchen, we&#8217;ve all seen lots of other ones. To understand this specific example it doesn&#8217;t matter what this particular kitchen looks like.</p>
<p>But if I had a description of the kitchen for this example it would make it just a little more real for me. This kitchen is a narrow galley kitchen. It has storage on one side (the left), good lighting coming from both a skylight and a double window (straight ahead), and it has an electric oven with a four unit gas hob.</p>
<p>If I wanted I could hit F3 to see the description of the kitchen, but I probably won&#8217;t bother &#8211; I already have a generic &#8220;kitchen&#8221; in my head I can refer to. However if the description of this particular kitchen appears just ahead of the example, it makes it a little bit more vivid. I&#8217;m not suggesting to duplicate the description every time, just to put it ahead of the first example that refers to a kitchen so that I&#8217;m not substituting my generic one.</p>
<p>By reordering the helper methods and classes you can make it that little bit easier for me to be in the same headspace that you were when you wrote the example. Charles &#8220;cowboyd&#8221; Lowell, the man who taught me TDD, <a href="http://www.thefrontside.net/blog/repeat_yourself">sums it up really nicely</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Lowell</title>
		<link>http://dannorth.net/2008/06/let-your-examples-flow#comment-15093</link>
		<dc:creator>Charles Lowell</dc:creator>
		<pubDate>Wed, 02 Jul 2008 19:12:18 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-15093</guid>
		<description>Dan,

As a side note, I've considered for a while now that there are several cases apart from just testing when it helps to distance yourself from (though not abandon) DRY. I did a write-up awhile back about how I strategically violate DRY in my day to day coding, and why it actually makes my designs and my code better. 

Have a look homie, and let me know what you think.

http://www.thefrontside.net/blog/repeat_yourself</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>As a side note, I&#8217;ve considered for a while now that there are several cases apart from just testing when it helps to distance yourself from (though not abandon) DRY. I did a write-up awhile back about how I strategically violate DRY in my day to day coding, and why it actually makes my designs and my code better. </p>
<p>Have a look homie, and let me know what you think.</p>
<p><a href="http://www.thefrontside.net/blog/repeat_yourself" rel="nofollow">http://www.thefrontside.net/blog/repeat_yourself</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
