<?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: TDD: Keeping test intent when using test builders</title>
	<atom:link href="http://www.markhneedham.com/blog/2009/09/20/tdd-keeping-test-intent-when-using-test-builders/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2009/09/20/tdd-keeping-test-intent-when-using-test-builders/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sat, 11 Feb 2012 23:17:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Test Automation for the Persistence Layer with FIT, DBUnit and HSQLDB &#8211; MundoJava 38 &#171; Alexandre Gazola</title>
		<link>http://www.markhneedham.com/blog/2009/09/20/tdd-keeping-test-intent-when-using-test-builders/comment-page-1/#comment-26745</link>
		<dc:creator>Test Automation for the Persistence Layer with FIT, DBUnit and HSQLDB &#8211; MundoJava 38 &#171; Alexandre Gazola</dc:creator>
		<pubDate>Sat, 14 Nov 2009 02:32:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1656#comment-26745</guid>
		<description>[...] method under test. Besides being difficult to read (though we experienced some improvement by using test builders), those objects evidently had a lot of duplication with the data in the XML [...]</description>
		<content:encoded><![CDATA[<p>[...] method under test. Besides being difficult to read (though we experienced some improvement by using test builders), those objects evidently had a lot of duplication with the data in the XML [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2009/09/20/tdd-keeping-test-intent-when-using-test-builders/comment-page-1/#comment-22848</link>
		<dc:creator>Mark Needham</dc:creator>
		<pubDate>Mon, 21 Sep 2009 21:45:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1656#comment-22848</guid>
		<description>Hi Ben,

That&#039;s a really interesting observation actually and it always plays out in my mind the same way it has in this example - I don&#039;t remove the duplication until I get a nagging feeling that I should be doing it right at the end.

And then there&#039;s 2 extra lines at the top of the test which don&#039;t really tell us anything other than what we can already tell from glancing at the test - thanks for pointing that out though!

I wonder when it&#039;s important to actually extract local variables though - my current thinking (for non strings) is that if I care about that bit of data for the test I want to try and extract the value into a more descriptive name but if not then I&#039;m happy to leave it inline. 

I&#039;d be interested in knowing your thoughts.

Mark</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>That&#8217;s a really interesting observation actually and it always plays out in my mind the same way it has in this example &#8211; I don&#8217;t remove the duplication until I get a nagging feeling that I should be doing it right at the end.</p>
<p>And then there&#8217;s 2 extra lines at the top of the test which don&#8217;t really tell us anything other than what we can already tell from glancing at the test &#8211; thanks for pointing that out though!</p>
<p>I wonder when it&#8217;s important to actually extract local variables though &#8211; my current thinking (for non strings) is that if I care about that bit of data for the test I want to try and extract the value into a more descriptive name but if not then I&#8217;m happy to leave it inline. </p>
<p>I&#8217;d be interested in knowing your thoughts.</p>
<p>Mark</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Butler-Cole</title>
		<link>http://www.markhneedham.com/blog/2009/09/20/tdd-keeping-test-intent-when-using-test-builders/comment-page-1/#comment-22844</link>
		<dc:creator>Ben Butler-Cole</dc:creator>
		<pubDate>Mon, 21 Sep 2009 19:34:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1656#comment-22844</guid>
		<description>Hi Mark

I don&#039;t know why you take the last step. You&#039;re not alone -- for some reason everyone feels the need to pull out local variables for duplicated string constants. But I think it harms rather than improves the readability of the test, and that should be the test, rather than blindly trying to minimize duplication.

I think that deep down inside you feel the same way, which is why you say &quot;if we want to remove duplication&quot; rather than just going ahead and doing it. Have the courage of your convictions -- shake off the shackles of reflexive deduplication.</description>
		<content:encoded><![CDATA[<p>Hi Mark</p>
<p>I don&#8217;t know why you take the last step. You&#8217;re not alone &#8212; for some reason everyone feels the need to pull out local variables for duplicated string constants. But I think it harms rather than improves the readability of the test, and that should be the test, rather than blindly trying to minimize duplication.</p>
<p>I think that deep down inside you feel the same way, which is why you say &#8220;if we want to remove duplication&#8221; rather than just going ahead and doing it. Have the courage of your convictions &#8212; shake off the shackles of reflexive deduplication.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

