<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Let your examples flow</title>
	<atom:link href="http://dannorth.net/2008/06/30/let-your-examples-flow/feed/" rel="self" type="application/rss+xml" />
	<link>http://dannorth.net/2008/06/30/let-your-examples-flow/</link>
	<description>embracing uncertainty</description>
	<lastBuildDate>Thu, 02 Feb 2012 20:47:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Dan North</title>
		<link>http://dannorth.net/2008/06/30/let-your-examples-flow/#comment-7945</link>
		<dc:creator><![CDATA[Dan North]]></dc:creator>
		<pubDate>Sun, 07 Sep 2008 18:36:12 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-7945</guid>
		<description><![CDATA[Hi Eivind. You&#039;re right - there are two separate ideas here and I didn&#039;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 &lt;em&gt;duplication between examples is ok&lt;/em&gt; 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/30/let-your-examples-flow/#comment-7944</link>
		<dc:creator><![CDATA[Blog'A'Little]]></dc:creator>
		<pubDate>Tue, 08 Jul 2008 20:13:02 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-7944</guid>
		<description><![CDATA[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/30/let-your-examples-flow/#comment-7943</link>
		<dc:creator><![CDATA[Eivind]]></dc:creator>
		<pubDate>Tue, 08 Jul 2008 09:27:38 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-7943</guid>
		<description><![CDATA[Hi Dan,

Thanks for valuable insights. But I&#039;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 &quot;just ahead of the first test that used them&quot; achieves that. But you still DRY them, don&#039;t you? So aren&#039;t you actually arguing for letting the examples flow more than against DRYing? DRYing is not necessarily &quot;moving out of the way&quot;.

On the other hand, how far do good, descriptive names take you so that you don&#039;t even need to move the definitions up-front in order do understand the story? Why didn&#039;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/30/let-your-examples-flow/#comment-7942</link>
		<dc:creator><![CDATA[Dan North]]></dc:creator>
		<pubDate>Fri, 04 Jul 2008 00:37:31 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-7942</guid>
		<description><![CDATA[Hi David.

Yes, you&#039;re right. In my IDE I&#039;m only one keystroke away from the definition of any helper method. But here&#039;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&#039;ve all seen lots of other ones. To understand this specific example it doesn&#039;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&#039;t bother - I already have a generic &quot;kitchen&quot; 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&#039;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&#039;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 &quot;cowboyd&quot; Lowell, the man who taught me TDD, &lt;a href=&#039;http://www.thefrontside.net/blog/repeat_yourself&#039; rel=&quot;nofollow&quot;&gt;sums it up really nicely&lt;/a&gt;]]></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' rel="nofollow">sums it up really nicely</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Lowell</title>
		<link>http://dannorth.net/2008/06/30/let-your-examples-flow/#comment-7941</link>
		<dc:creator><![CDATA[Charles Lowell]]></dc:creator>
		<pubDate>Wed, 02 Jul 2008 19:12:18 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-7941</guid>
		<description><![CDATA[Dan,

As a side note, I&#039;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>
	<item>
		<title>By: felix</title>
		<link>http://dannorth.net/2008/06/30/let-your-examples-flow/#comment-7940</link>
		<dc:creator><![CDATA[felix]]></dc:creator>
		<pubDate>Tue, 01 Jul 2008 17:38:22 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-7940</guid>
		<description><![CDATA[Dan,

first of all in my not so humble opinion the DRY-Dogma has to be defended and there is no real exception. We know that test cases are prone to receive too little maintenance, so a bit of DRYness is essential!

Hgs points to the solution of your dilemma, when he says that the non-DRY version should be generated. Wasn&#039;t this what the StoryWriter thingy in JBehave was all about? Essentially you would like to have an execution trace. You might even improve that by annotating/ instrumenting your test code with special story output.

If you think about acceptance tests it wouldn&#039;t necessarily be a textual thing. You could use a screen capture tool in conjunction with selenium and actually produce a video (potentially adding special logging that get&#039;s rendered as subtitles in the video (or refers to an audio file)).]]></description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>first of all in my not so humble opinion the DRY-Dogma has to be defended and there is no real exception. We know that test cases are prone to receive too little maintenance, so a bit of DRYness is essential!</p>
<p>Hgs points to the solution of your dilemma, when he says that the non-DRY version should be generated. Wasn&#8217;t this what the StoryWriter thingy in JBehave was all about? Essentially you would like to have an execution trace. You might even improve that by annotating/ instrumenting your test code with special story output.</p>
<p>If you think about acceptance tests it wouldn&#8217;t necessarily be a textual thing. You could use a screen capture tool in conjunction with selenium and actually produce a video (potentially adding special logging that get&#8217;s rendered as subtitles in the video (or refers to an audio file)).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dale</title>
		<link>http://dannorth.net/2008/06/30/let-your-examples-flow/#comment-7939</link>
		<dc:creator><![CDATA[Dale]]></dc:creator>
		<pubDate>Tue, 01 Jul 2008 16:44:59 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-7939</guid>
		<description><![CDATA[You should only break DRY to support readability as a last resort! Any duplication should be kept to an absolute minimum. Only when you have exhausted all attempts to improve readability should duplication be considered.

Felix had a good post about this at the link below. To summarize - Duplicating the &#039;what&#039; is less evil than duplicating the &#039;how&#039;. You can achieve this by refactoring to declarative Setup and Assert (sorry - Given and Then). If you haven&#039;t already you should read the post.

http://wuetender-junger-mann.de/wordpress/?p=582]]></description>
		<content:encoded><![CDATA[<p>You should only break DRY to support readability as a last resort! Any duplication should be kept to an absolute minimum. Only when you have exhausted all attempts to improve readability should duplication be considered.</p>
<p>Felix had a good post about this at the link below. To summarize &#8211; Duplicating the &#8216;what&#8217; is less evil than duplicating the &#8216;how&#8217;. You can achieve this by refactoring to declarative Setup and Assert (sorry &#8211; Given and Then). If you haven&#8217;t already you should read the post.</p>
<p><a href="http://wuetender-junger-mann.de/wordpress/?p=582" rel="nofollow">http://wuetender-junger-mann.de/wordpress/?p=582</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hgs</title>
		<link>http://dannorth.net/2008/06/30/let-your-examples-flow/#comment-7938</link>
		<dc:creator><![CDATA[hgs]]></dc:creator>
		<pubDate>Tue, 01 Jul 2008 12:13:58 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-7938</guid>
		<description><![CDATA[There seems to be a lot going on here.  Stories are clearly important to people, and our cultures spend a lot of time telling them and listening to them.  They are used in teaching, particularly within religion, and they help ideas stick, as per Chip and Dan Heath&#039;s book.

But generally it is difficult to lookup ideas in a story, unless they are broken down into chapter and verse, and even then one needs exegesis.  This is one problem I&#039;ve had with the business novels of Eliyahu Goldratt which teach Theory of Constraint.  Trying to lookup the details of what constitutes &quot;Drum Buffer Rope&quot; is not really helped by the narrative structure.  Also, narratives don&#039;t have much literal repetition.  I&#039;m not sure what a DRYed out
novel would be like.  It would be an interesting artistic experiment in itself.  Maybe one could try it on something out of copyright, like Gulliver&#039;s Travels.

I think you are onto something here, and I think given the concept of User Stories in Agile development, making the tests follow that flow makes sense.

I do wonder if the non-DRY version should be generated from a DRY version, though.]]></description>
		<content:encoded><![CDATA[<p>There seems to be a lot going on here.  Stories are clearly important to people, and our cultures spend a lot of time telling them and listening to them.  They are used in teaching, particularly within religion, and they help ideas stick, as per Chip and Dan Heath&#8217;s book.</p>
<p>But generally it is difficult to lookup ideas in a story, unless they are broken down into chapter and verse, and even then one needs exegesis.  This is one problem I&#8217;ve had with the business novels of Eliyahu Goldratt which teach Theory of Constraint.  Trying to lookup the details of what constitutes &#8220;Drum Buffer Rope&#8221; is not really helped by the narrative structure.  Also, narratives don&#8217;t have much literal repetition.  I&#8217;m not sure what a DRYed out<br />
novel would be like.  It would be an interesting artistic experiment in itself.  Maybe one could try it on something out of copyright, like Gulliver&#8217;s Travels.</p>
<p>I think you are onto something here, and I think given the concept of User Stories in Agile development, making the tests follow that flow makes sense.</p>
<p>I do wonder if the non-DRY version should be generated from a DRY version, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Peterson</title>
		<link>http://dannorth.net/2008/06/30/let-your-examples-flow/#comment-7937</link>
		<dc:creator><![CDATA[David Peterson]]></dc:creator>
		<pubDate>Tue, 01 Jul 2008 07:16:12 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=61#comment-7937</guid>
		<description><![CDATA[I disagree. If you&#039;re using a reasonable IDE then navigating to the implementation of a helper method is usually just one keystroke away (F3 in Eclipse). If you need to see the implementation of the method in order to understand the test then that seems like a code smell to me - i.e. your helper method or class is poorly named and/or doesn&#039;t capture the right abstraction.]]></description>
		<content:encoded><![CDATA[<p>I disagree. If you&#8217;re using a reasonable IDE then navigating to the implementation of a helper method is usually just one keystroke away (F3 in Eclipse). If you need to see the implementation of the method in order to understand the test then that seems like a code smell to me &#8211; i.e. your helper method or class is poorly named and/or doesn&#8217;t capture the right abstraction.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

