<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>David Santoro &#187; software craftmanship</title>
	<atom:link href="http://www.davidsantoro.net/?feed=rss2&#038;tag=software-craftmanship" rel="self" type="application/rss+xml" />
	<link>http://www.davidsantoro.net</link>
	<description>Just another blog on software development experiences...</description>
	<lastBuildDate>Mon, 08 Mar 2010 07:18:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>TDD: When does &#8216;Good Enough Code&#8217; become not good enough?</title>
		<link>http://www.davidsantoro.net/?p=16</link>
		<comments>http://www.davidsantoro.net/?p=16#comments</comments>
		<pubDate>Mon, 25 Jan 2010 21:47:49 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[software craftmanship]]></category>
		<category><![CDATA[tdd]]></category>

		<guid isPermaLink="false">http://www.davidsantoro.net/?p=16</guid>
		<description><![CDATA[Today I started try to refactor a piece of code that was causing me pain. Dependencies were tangled together, classes were getting bigger, functions and names were losing their meaning and unit tests were becoming cluttered and hard to understand. After few hours trying to tangle this code I started thinking that probably it would [...]]]></description>
			<content:encoded><![CDATA[<p>Today I started try to refactor a piece of code that was causing me pain.<br />
Dependencies were tangled together, classes were getting bigger, functions and names were losing their meaning and unit tests were becoming cluttered and hard to understand.<br />
After few hours trying to tangle this code I started thinking that probably it would have been easier if we had tackled that a few features earlier.<br />
When you are caught in the TDD cycle red &#8211; green &#8211; refactor it&#8217;s easy to focus only on small scale refactoring and losing the big picture. Also Bob Martin rule: &#8220;You may not write more production code than is sufficient to pass the current failing test.&#8221; might be misleading.<br />
Dan North talks of &#8220;&#8230;deferring important architectural and design decisions until the last responsible moment&#8221;.<br />
Is there an easy way to identify the last responsible moment?<br />
I think for now on I will stick to this rule: as soon as I start adding a feature to a piece of code I will make sure that it respect fundamentals good practices (small functions that do one thing, command query separation, small classes that follows the single responsibility principle and meaningful names). I will applly the same treatment to tests.<br />
I will probably spend more time caring about exception handling, good object modeling and so on, on the most used and strategic part of a codebase.<br />
In order to identify those areas, keeping track on stories that takes longer than expected and the one with more bugs, might help.<br />
What is your approach to this problem?</p>
<p>In the meanwhile you should follow me on twitter <a href="http://www.twitter.com/soulnafein">here</a> </p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.davidsantoro.net%2F%3Fp%3D16&amp;linkname=TDD%3A%20When%20does%20%26%238216%3BGood%20Enough%20Code%26%238217%3B%20become%20not%20good%20enough%3F"><img src="http://www.davidsantoro.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.davidsantoro.net/?feed=rss2&amp;p=16</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
