<?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>cwash into software &#187; unit testing</title>
	<atom:link href="http://cwash.org/tag/unit-testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://cwash.org</link>
	<description>+= construction + craftsmanship;</description>
	<lastBuildDate>Thu, 29 Sep 2011 04:23:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title>Mocking with JMockit</title>
		<link>http://cwash.org/2009/06/09/mocking-with-jmockit/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mocking-with-jmockit</link>
		<comments>http://cwash.org/2009/06/09/mocking-with-jmockit/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 05:09:58 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[Developer Testing]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[CapTech]]></category>
		<category><![CDATA[developer testing]]></category>
		<category><![CDATA[hamcrest]]></category>
		<category><![CDATA[JMockit]]></category>
		<category><![CDATA[junit]]></category>
		<category><![CDATA[mock objects]]></category>
		<category><![CDATA[testng]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://cwash.org/?p=322</guid>
		<description><![CDATA[JMockit - overview and example]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2009/06/09/mocking-with-jmockit/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><p><strong>Update: </strong> I cleaned up the example based on Rogerio&#8217;s comments.</p>
<p>Recently I stumbled onto <a href="https://jmockit.dev.java.net/">JMockit</a> and have been pretty impressed with the flexibility of the approach it takes.</p>
<p>Many mocking frameworks seem to take an elitist attitude toward testable code, not attempting to solve certain problems in favor of guiding one toward a more testable design.  It appears JMockit is a response to this.<span id="more-322"></span></p>
<p>There&#8217;s no getting around the fact that some frameworks, especially legacy or proprietary third party modules, are not coded in such a way that it&#8217;s easy to write testable code against them.  Common pain points include:</p>
<ul>
<li>Pervasive use of statics</li>
<li>Lack of dependency injection mechanisms</li>
<li>Creating dependencies inline with the &#8220;new&#8221; keyword</li>
</ul>
<p>All of these issues will pose problems when trying to double-out dependent code for testing purposes.  One approach to solve these problems is to use a dynamic language and metaprogramming constructs to do this kind of doubling.  Testing Java code with JRuby or Groovy has become more and more popular for this very reason.</p>
<p>But a lot of these will introduce a level of language abstraction between your test code and the code under test, and you&#8217;ll have to have developers maintaining a test suite sign on to learn the language being used.</p>
<p>In comes JMockit, which uses the <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/instrument/Instrumentation.html">instrumentation</a> features provided with Java5 to perform a lot of the same magic tricks for you.</p>
<p>This also allows you to test things that weren&#8217;t otherwise possible (or are very difficult) and overall I think the programming model is much more in-tune with standard Java programming idioms.  It doesn&#8217;t discriminate against you if you don&#8217;t use dependency injection, but will work with you if you do.  Here&#8217;s a quick example that colleagues <a href="http://www.andypemberton.com">Andy Pemberton</a> and Patrick Cox worked through with me trying out JMockit.</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">@RunWith<span style="color: #009900;">&#40;</span>JMockit.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> ControllerTest <span style="color: #009900;">&#123;</span><br />
&nbsp;<br />
&nbsp; &nbsp; @Mocked<br />
&nbsp; &nbsp; HttpServletRequest mockHttpServletRequest<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; @Mocked<br />
&nbsp; &nbsp; ServiceRemote mockServiceRemote<span style="color: #339933;">;</span><br />
&nbsp;<br />
&nbsp; &nbsp; @Test<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> test_execute_expectations<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> Expectations<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">/* define in static block */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> Model m <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Model<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m.<span style="color: #006633;">setId</span><span style="color: #009900;">&#40;</span>12345l<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mockHttpServletRequest.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;modelId&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> returns<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;12345&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mockServiceRemote.<span style="color: #006633;">getModel</span><span style="color: #009900;">&#40;</span>12345l<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> returns<span style="color: #009900;">&#40;</span>m<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mockHttpServletRequest.<span style="color: #006633;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;model&quot;</span>, m<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/* simulate setter injection */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Controller c <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Controller<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; c.<span style="color: #006633;">setHttpServletRequest</span><span style="color: #009900;">&#40;</span>mockHttpServletRequest<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; c.<span style="color: #006633;">setServiceRemote</span><span style="color: #009900;">&#40;</span>mockServiceRemote<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/* call code under test */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; c.<span style="color: #006633;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/* strict mode will throw exceptions! */</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>You can get the whole project from my <a href="http://github.com/cwash/testJmockitDemo/tree/master">GitHub account</a>.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2009/06/09/mocking-with-jmockit/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Mocking+with+JMockit&amp;link=http://cwash.org/2009/06/09/mocking-with-jmockit/&amp;notes=JMockit%20-%20overview%20and%20example&amp;short_link=http://bit.ly/bNQ57B&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>February 17, 2009 -- <a href="http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/" title="Don&#8217;t Unit Test Anymore&#8230; No, Really!">Don&#8217;t Unit Test Anymore&#8230; No, Really!</a> (6)</li><li>June 3, 2009 -- <a href="http://cwash.org/2009/06/03/what-is-hamcrest/" title="What is Hamcrest?">What is Hamcrest?</a> (0)</li><li>January 31, 2009 -- <a href="http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/" title="In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel ">In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel </a> (3)</li><li>November 28, 2008 -- <a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/" title="Must Haves/References For Modern Java EE Developers">Must Haves/References For Modern Java EE Developers</a> (1)</li><li>July 8, 2010 -- <a href="http://cwash.org/2010/07/08/transactions-part-1/" title="Transactions, Part 1">Transactions, Part 1</a> (0)</li><li>January 7, 2010 -- <a href="http://cwash.org/2010/01/07/eliminate-branching-if-statements-to-produce-better-code/" title="Eliminate Branching (IF Statements) to Produce Better Code">Eliminate Branching (IF Statements) to Produce Better Code</a> (0)</li><li>July 29, 2009 -- <a href="http://cwash.org/2009/07/29/what-id-tell-myself-about-design-if-i-were-just-beginning/" title="What I&#8217;d Tell Myself About Design If I Were Just Beginning">What I&#8217;d Tell Myself About Design If I Were Just Beginning</a> (5)</li><li>July 24, 2009 -- <a href="http://cwash.org/2009/07/24/the-elements-of-reusable-code/" title="The Elements of Reusable Code">The Elements of Reusable Code</a> (0)</li><li>April 15, 2009 -- <a href="http://cwash.org/2009/04/15/osgi-ggity-giggity/" title="OSGi-ggity-Giggity">OSGi-ggity-Giggity</a> (4)</li><li>November 19, 2008 -- <a href="http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/" title="Java 6 and Maven 2.0.9 on Leopard">Java 6 and Maven 2.0.9 on Leopard</a> (7)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2009/06/09/mocking-with-jmockit/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Unit Test Anymore&#8230; No, Really!</title>
		<link>http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=dont-unit-test-anymore-no-really</link>
		<comments>http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 01:52:32 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[Developer Testing]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Cedric Beust]]></category>
		<category><![CDATA[developer testing]]></category>
		<category><![CDATA[junit]]></category>
		<category><![CDATA[testng]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://cwash.org/?p=133</guid>
		<description><![CDATA[Partly a response to "Your Unit Tests Lie to You," this entry explores the downstream ramifications of misuse of the term "unit testing" to refer to all automated developer testing.]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><p>I just read <a href="http://agilesoftwaredevelopment.com/blog/janusz-gorycki/your-unit-tests-are-useless" target="_blank">Your Unit Tests Lie to You</a> by Janusz Gorycki and I was going to leave a comment there, but thought it was more appropriate to expand my comments off into their own thing.  For those that haven&#8217;t read the article, its basic premise is to grab hold of the nearest &#8220;test infected&#8221; reader and shake the warm and fuzzy out of them.  It paints the short sightedness of many recent &#8220;unit testing&#8221; converts as living in a dream world where unit tests should replace formal testing. It follows with many sentiments I&#8217;ve read (and written about here) for a while now.  It&#8217;s not that I disagree with what is being said in the article, or its tone for that matter; most of what is being said is spot on.  Unit testing is definitely not a silver bullet.  If you read my blog often, you no doubt get that. The article ends:</p>
<blockquote><p>So please, don&#8217;t fire your QA department just yet. Their job is still important, even if you unit test.</p></blockquote>
<p>So to Janusz, the fundamental problem here is a general ignorance of the purposes behind a unit test suite.  I agree 100% that&#8217;s the primary factor behind his problem.  What don&#8217;t we agree on?  Semantics.  But semantics are important!  How far do we have to go for a true zen-understanding of this issue?  Not far.  Indulge me &#8212; <span id="more-133"></span></p>
<h3>When is A Unit Test is not a Unit Test?</h3>
<p>Here&#8217;s my thesis: you may <em>use</em> a unit testing framework, but what you <em>write</em> are developer tests.  Even if they are technically unit tests, it is against everyone&#8217;s interest to call them this.  Picky, useless distinction, you say?  Hear me out.</p>
<p>There is a vast difference between the gamut of possible automated tests one could write and what is known colloquially as a unit test.  A number of different kinds of automated tests are written against frameworks that are built on top of unit testing frameworks.  That doesn&#8217;t make them unit tests.  It doesn&#8217;t make sense to <em>call</em> them unit tests.  A square is a rectangle, but does that make every rectangle a square?  An automated acceptance or integration test is subject to a completely different set of problems (in areas such as specification, maintenance, complexity) than a unit test.  In fact, about the only thing they share is their lifecycle and execution model, which many times has been <a href="http://www.youtube.com/watch?v=oGWbt3DSje0" target="_blank">retrofitted into the JUnit lifecycle and execution model</a>.</p>
<h3>&#8220;Unit Testing&#8221; and Linguistic Drift</h3>
<p>I&#8217;ve recently seen a number of different incarnations (<a href="http://www.satisfice.com/blog/archives/27" target="_blank">1</a>, <a href="http://www.computer.org/portal/cms_docs_software/software/content/best.pdf">2</a>, <a href="http://blog.exacttarget.com/blog/the-exacttarget-blog/0/0/your-opinion-is-not-best-practice-and-mine-isnt-either">3</a>) of the argument that we should eschew use of the term &#8220;best practice&#8221; because of the implications of its <a href="http://en.wikipedia.org/wiki/Linguistic_drift">linguistic drift</a> and general propensity of people to turn off their brains when just spoon-fed answers, not having to experience deriving the solution for themselves.  Similarly, the popularity of unit testing frameworks and the sheer frequency with which the term has been used have, in a sense, set the idea of developer testing back considerably.  <a href="http://www.youtube.com/watch?v=TtcEpryRy44" target="_blank">Cedric Beust makes the point</a> that in many cases we&#8217;ve confused [developer] testing terminology with JUnit terminology, and TestNG was in part a response to that.  Here we oversimplify the problems we choose to bite-off and the goals we strive toward.  They&#8217;re not realistic.  Is it no wonder so many people fall flat when trying to adopt &#8220;unit testing&#8221;?</p>
<p>While there may be some overlap with the goals of validation and verification, most in the know consider the true benefits of &#8220;unit testing&#8221; to be a totally different animal altogether.  We seem surprised to find the benefits of doing developer testing have little to do with what &#8220;testers&#8221; do.  This dischord causes a lot of confusion, and has sparked a lot of articles.  Some draw this conclusion, appropriately, that developer testing, while it fits a rigid definition of what testing is, shares little with what a typical &#8220;tester&#8221; is responsible for (true V&amp;V).  Quite often developers are the only ones doing any automation work, including this automated &#8220;developer&#8221; testing.  Developers tend to do it for all kinds of different reasons, too.  We&#8217;ll use a suite of automated tests to proceed without fear of integration errors.  That adds value <em>totally independent</em> of validation and verification practices.  If our suite catches regressions before we hand a single version off to testers, that saves both developers and testers time.  I could go on and on, but the term &#8220;unit testing&#8221; conveys very little of these kinds of benefits to the development lifecycle, and as it turns out, causes a great deal of confusion.</p>
<h3>The Right Usage</h3>
<p>When we&#8217;re talking pure <em>unit </em>tests, that is, black-box testing components in <em>pure</em> isolation (which <strong>requires isolated dependencies</strong>), not in concert, as developers we can certainly find merit in this practice.  But what we&#8217;ve learned is that this idea of unit testing, while quite beneficial as a development practice, shares very few goals with &#8220;testing&#8221; as we know it from a classical definition of the word (end-to-end V&amp;V).  Perhaps a few years ago this distinction was not that true, but we now know better.  We know the <a href="http://blog.thinkrelevance.com/2008/5/23/how-to-fail-with-100-test-coverage">danger in trying to bend unit tests into something they&#8217;re not</a>.</p>
<p>My point is essentially this: knowing how to use a unit testing framework, a very simplistic construct on the surface, to do all of these wonderful things is certainly not something that just &#8220;falls out&#8221; of developing a unit of code &#8211; it&#8217;s not something we should expect developers to just deliver each iteration as part of their deliverable like it&#8217;s &#8220;done.&#8221;  Effort invested to develop and maintain test code alongside the code under test is not free.</p>
<p>Only if you are persistent will you come to understand there sometimes is very little benefit in terms of &#8220;full blown&#8221;, classical validation and verification – the whole reason you set out on this crazy &#8220;unit testing&#8221; kick. You either stick with it, or write it off at this point.  If you stick with it,  well, I&#8217;ll save you the trouble of figuring this out for yourself; you learn it&#8217;s only another development practice, that needs to be balanced out with other sound practices. It&#8217;s hard work.   <a href="http://blog.jayfields.com/2009/02/thoughts-on-developer-testing.html">Really hard</a>.</p>
<p>Then why go to all the trouble?  It&#8217;s my contention, and I assume most will agree, that developer testing is useful.  It drives out better designs, code, and has the potential to thwart a caste of would-be regressions.  It can stamp out integration errors.  It can help you learn about a new framework or prototype a new feature.  But that usefulness comes with a very real cost.</p>
<p>If we truly acknowledge that the type of practice we&#8217;ve talked about has merit as a development process, it makes very little sense to continue referring to the practice as &#8220;unit testing.&#8221;  If testing modules of code, driving development with these tests, maintaining them alongside the code, and other automation activities are worthy practice <em>for developers</em>, we should consider the semantics of our vocational vocabulary.  Let&#8217;s stop confusing each other.  We&#8217;re not talking about delivering 100% code coverage, we&#8217;re not talking about replacing testers (unless you&#8217;ve got the huevos to go without them, anyway), and we&#8217;re surely not talking about writing <em>or releasing</em> bug-free software.  It&#8217;s a lot easier to cut through a lot of the hype and confusion if we can all learn to say developer testing and understand it as such.  Let&#8217;s put the term &#8220;unit test&#8221; to rest.</p>
<p>R.I.P. unit tests.  Long live &#8220;developer tests!&#8221;</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+Unit+Test+Anymore...+No%2C+Really%21&amp;link=http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/&amp;notes=Partly%20a%20response%20to%20%22Your%20Unit%20Tests%20Lie%20to%20You%2C%22%20this%20entry%20explores%20the%20downstream%20ramifications%20of%20misuse%20of%20the%20term%20%22unit%20testing%22%20to%20refer%20to%20all%20automated%20developer%20testing.&amp;short_link=http://bit.ly/bxvaIa&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>June 9, 2009 -- <a href="http://cwash.org/2009/06/09/mocking-with-jmockit/" title="Mocking with JMockit">Mocking with JMockit</a> (5)</li><li>January 31, 2009 -- <a href="http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/" title="In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel ">In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel </a> (3)</li><li>November 28, 2008 -- <a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/" title="Must Haves/References For Modern Java EE Developers">Must Haves/References For Modern Java EE Developers</a> (1)</li><li>June 3, 2009 -- <a href="http://cwash.org/2009/06/03/what-is-hamcrest/" title="What is Hamcrest?">What is Hamcrest?</a> (0)</li><li>March 13, 2008 -- <a href="http://cwash.org/2008/03/13/continuous-integration-dissected/" title="Continuous Integration Dissected">Continuous Integration Dissected</a> (0)</li><li>March 11, 2008 -- <a href="http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/" title="Bugs, Detectives, and Test Automation">Bugs, Detectives, and Test Automation</a> (2)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel</title>
		<link>http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel</link>
		<comments>http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 01:16:05 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[Meta/Blog]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blog fight]]></category>
		<category><![CDATA[Bob Martin]]></category>
		<category><![CDATA[Cal Henderson]]></category>
		<category><![CDATA[Cedric Beust]]></category>
		<category><![CDATA[Clean Code]]></category>
		<category><![CDATA[creativity]]></category>
		<category><![CDATA[development practices]]></category>
		<category><![CDATA[Gavin King]]></category>
		<category><![CDATA[Hanselminutes]]></category>
		<category><![CDATA[Jared Richardson]]></category>
		<category><![CDATA[Jeff Atwood]]></category>
		<category><![CDATA[Jim Coplien]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[pragmatic]]></category>
		<category><![CDATA[quality]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[stackoverflow]]></category>
		<category><![CDATA[technical debt]]></category>
		<category><![CDATA[testng]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://cwash.org/?p=107</guid>
		<description><![CDATA[Weighing in on the recent ideological classes between Stackoverflow's recent podcast with Jeff Atwood and Joel Spolsky in which they call out Robert "UncleBob" Martin on his views of Unit Testing and his SOLID principles.]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><div class="content">
<p><strong>Update:</strong> Robert Martin is scheduled to appear on the Feb 10 episode of the SO Podcast.  Should be interesting to see where things go.  Also, Jay Fields has <a href="http://blog.jayfields.com/2009/02/thoughts-on-developer-testing.html">weighed in on the topic</a>.</p>
<p><strong>Update #2:</strong> Listened to the new SO podcast and am working on a short followup post.  I just met another local boy and kindred spirit in <a href="http://www.codethinked.com/">Justin Etheredge who has also had a few things to say</a> about this whole debacle.</p>
<p>I wanted to add my two cents to this philosophical, in my view very important, but not very pragmatic debate. For the uninitiated, the argument begins with the <a href="http://blog.stackoverflow.com/2009/01/podcast-38/">Stackoverflow Podcast Episode #38</a> which is a discussion between Joel Spolsky and Jeff Atwood.  They discussed, among many other topics, some of &#8220;UncleBob&#8221; Martin&#8217;s recent material found in his book <em><a href="http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882">Clean Code</a></em>, (actually, Spolsky cited Martin&#8217;s appearance on <a href="http://www.hanselminutes.com/default.aspx?showID=163">Hanselminutes</a> as the spark to his comments), which Martin responded to with a number of tweets and a <a href="http://blog.objectmentor.com/articles/2009/01/31/quality-doesnt-matter-that-much-jeff-and-joel">blog post</a>.<span id="more-107"></span></p>
<p><a href="http://agileartisans.com/main">Jared Richardson</a> introduced me to the idea of <strong>technical debt</strong>, (term was coined, like so many other terms, by Ward Cunningham) which I think is a pragmatic way to cut through the philosophical differences in this argument.  But in the interest of carrying on the debate, and because it&#8217;s the weekend, I&#8217;ve decided to (perhaps) add some fuel to the fire.  Please don&#8217;t read this at work.</p>
<p>The gist of the argument is about how much emphasis you should focus on robustness/code hygiene/maintainability in your code, even if it is unclear there is much business value in doing so.  Essentially, if we consider impacts to budgets, deadlines, etc., and even in terms of its impact to your code (see Antipattern: &#8220;Yet Another Useless Layer&#8221;) &#8212; is it worth it?  It&#8217;s very much a discussion of what software quality is and why is it important, which raises questions like:</p>
<ul>
<li>Are robustness and business value mutually exclusive?</li>
<li>Does quality require rigor and conceptual cleanliness?</li>
<li>Is code hygiene a purely academic pursuit, or is there intrinsic value in it?</li>
</ul>
<p>These are interesting questions.  Atwood and Spolsky take what they feel is a more pragmatic position; Atwood explaining quality in terms of a Frank Zappa quote [paraphrasing] &#8220;Nobody gives a crap if we&#8217;re great musicians,&#8221; meaning that what matters is ultimately what is delivered to the customer. He explains further that &#8220;Quality is just another axis&#8221; &#8212; another set of competing concerns for your development time and interest.  Spolsky&#8217;s comments constitute a self-professed rant that there is a thread of zealotry in the OO community around TDD.  It reminded me a lot of what <a href="http://beust.com/weblog/archives/000477.html">Cedric Beust has argued</a> in reference to what <a href="http://www.infoq.com/interviews/coplien-martin-tdd">Jim Coplien has debated with Martin himself</a>.  While Spolksy could be playing devil&#8217;s advocate, or could have been looking to start a &#8220;blog fight&#8221; (already popping up in comment threads) I think he could have gone about it in a more pragmatic way.  While Beust does paint Martin as a zealot as well, at least his main point didn&#8217;t portray unit testing as just short of completely useless; rather, he is one of the creators of the popular <a href="http://testng.org/doc/">TestNG </a>framework:</p>
<blockquote><p>&#8220;Tests first&#8221; or &#8220;tests last&#8221; is unimportant as long as there are tests.</p></blockquote>
<p>I might be wrong, but I even remember reading a section of <em>Clean Code</em> in Borders last week and essentially reading Beust&#8217;s point in Martin&#8217;s book.  It stuck out in my mind after watching his debate with Coplian.  But I digress.</p>
<p>Before going further, I wanted to point out how much this debate reminds me of <a href="http://www.plasticbag.org/archives/2004/03/from_pirate_dwarves_to_ninja_elves/">From pirate dwarves to ninja elves&#8230;</a>, which I believe is a great way to classify personality types &#8212; especially those of people writing code.  We know for sure that UncleBob falls into the Ninja-Elf quadrant.  He thinks practicing TDD is a professional responsibilty and lays out his own definition for TDD in <em>Clean Code</em>.  I think this is the very definition of a Ninja-Elf.  My personal leanings are toward that quadrant as well. When you are innundated with Dijsktra, the ulitmate Ninja-Elf, in school, the following quote really sticks with you:</p>
<blockquote><p>I mean, if 10 years from now, when you are doing something quick and dirty, you suddenly visualize that I am looking over your shoulders and say to yourself &#8220;Dijkstra would not have liked this&#8221;, well, that would be enough immortality for me.</p></blockquote>
<p>But there are people whose opinions I respect with Dwarf-Pirate leanings, too.  Obviously Atwood and Spolsky lean in this direction (though they may not fall directly into that quadrant).  I’ve heard some others that I respect espouse the same opinion as Spolsky; Gavin King, for example, I’ve heard him say, “The types of bugs that I introduce usually aren’t caught by a <strong>unit</strong> test.”  He wasn’t as over the top in his argument, he simply explained that he prefers integration tests.  And I don&#8217;t think you&#8217;d hear any of the people mentioned in this post say that they never write any tests.  For a great argument from the ultimate Pirate-Dwarf see Cal Henderson&#8217;s <a href="http://www.ludicorp.com/flickr/flickr_php_final.zip">normalized data is for sissies</a> (slide #27); it is pretty entertaining and compelling when scalability is of utmost concern.</p>
<p>I think Atwood’s argument ultimately came down to championing the idea of <a href="http://www.infoq.com/news/2008/02/continuous-production">continuous production</a>; that being able to respond to change or bugs found and having a quick no-brainer deployment process is the Zen-like state you&#8217;d like to get to.  But the idea of getting there is that it comes out of some notion of continuous integration, which is predicated on the idea of testing.  Henderson himself makes this very argument (I believe in this <a href="http://cdn4.libsyn.com/carsonsystems/Cal_Henderson.mp3?nvb=20090201003132&amp;nva=20090202004132&amp;t=0cab6219613db05c73c82">talk</a>, but perhaps in another). You need to trust your team enough to get changes and fixes out to address problems quickly, and be smart about what you spend time on. Testing is great and if you can find people that can test their code well and be productive, that’s awesome. But Henderson’s point is those people are extremely hard to find and retain.</p>
<p>All this goes back to the old question, is producing code an artistic or engineering practice?  (Interesting that Atwood supported his comment with a Frank Zappa quote about art.)  Obviously you need a talented and cohesive team to be able to make it work either way. I think the answer is it <strong>has to be</strong> a little bit of both.  You&#8217;ll need some measure of creativity, some degree of engineering aptitude, also strong analytical skills, and to succeed in a business environment, some acumen in decision making and managing (at the very least your own time).</p>
<p>The fact is, though, that we’ve come leaps and bounds in terms of being able to efficiently produce these tests, and balance their production and maintenance out with constraints, business expectations, budgets and deadlines.  And <a href="http://rubyconf.org/talks/24">it can fuel your creative side</a>, too.</p>
<p>As for professional responsibilities, I definitely wouldn’t recommend trying to write code without at least <em>some</em> tests if you expect anyone else to have to maintain your code. If you&#8217;ve got a close knit team and an overwhelmingly urgent need to deliver untested code (and are of the Pirate-Dwarf persuasion) then go for it.  But that being said, I’d say I agree with Martin and Jared Richardson that argue it’s a professional responsibility to <strong>not take on the technical debt of untested code</strong>. Of course, if tests mean you can get maintainability (and other -ilities) along the way then I think that you&#8217;re well on your way to a quality product.</p>
<p>One final way to look at this: would you say it&#8217;s better for your team to take the view that code is innocent until proven guilty, or guilty until proven innocent?  In the interest of skepticism, considering the teams that most developers &#8220;in the trenches&#8221; have to work on, and how far we&#8217;ve come in making testing easier and more efficient, I&#8217;d need a very strong team to make the assumption that all they code they write is innocent.  We all make mistakes.  I believe this is also brought up in <em>Clean Code</em>.</p>
<p>Ultimately the message Atwood and Spolsky send in their Stackoverflow podcast is that unit testing and efforts to support it are not a silver bullet.  Personal slights aside (&#8220;I don&#8217;t think these people write very much code.&#8221;) they have a point &#8212; and Martin agrees in his blog post.  But I think it took them a long time to make that point which is certainly no great revelation.  In the end, I did not feel they explained a whole lot about what the <em>right approach to quality</em> is, but communicated their distaste for an attempt (especially if accepted dogmatically) that aims to do so.  I can relate to this, and agree you must treat what you read, hear and are taught with a healthy dose of skepticism.  Martin&#8217;s ideas may seem dogmatic on the surface but I don&#8217;t think it&#8217;s fair to paint him in that light.  If you really read what he writes, I think he realizes that he is a voice many people are listening to, and works hard to say what he thinks is the right.  Martin defends a style of development that favors more rigor and discipline than many others feel is necessary, but in an industry that can be categorized by its lack of discipline, I can&#8217;t do much but respect him for that.</div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=In+response+to+Stackoverflow+%2338%2F%22Quality+Doesn%27t+Matter+That+Much%22+--+Jeff+and+Joel+&amp;link=http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/&amp;notes=Weighing%20in%20on%20the%20recent%20ideological%20classes%20between%20Stackoverflow%27s%20recent%20podcast%20with%20Jeff%20Atwood%20and%20Joel%20Spolsky%20in%20which%20they%20call%20out%20Robert%20%22UncleBob%22%20Martin%20on%20his%20views%20of%20Unit%20Testing%20and%20his%20SOLID%20principles.&amp;short_link=http://bit.ly/a3OkUe&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>November 28, 2008 -- <a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/" title="Must Haves/References For Modern Java EE Developers">Must Haves/References For Modern Java EE Developers</a> (1)</li><li>February 17, 2009 -- <a href="http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/" title="Don&#8217;t Unit Test Anymore&#8230; No, Really!">Don&#8217;t Unit Test Anymore&#8230; No, Really!</a> (6)</li><li>January 13, 2009 -- <a href="http://cwash.org/2009/01/13/on-software-quality/" title="On Software Quality">On Software Quality</a> (8)</li><li>March 13, 2008 -- <a href="http://cwash.org/2008/03/13/continuous-integration-dissected/" title="Continuous Integration Dissected">Continuous Integration Dissected</a> (0)</li><li>March 11, 2008 -- <a href="http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/" title="Bugs, Detectives, and Test Automation">Bugs, Detectives, and Test Automation</a> (2)</li><li>June 9, 2009 -- <a href="http://cwash.org/2009/06/09/mocking-with-jmockit/" title="Mocking with JMockit">Mocking with JMockit</a> (5)</li><li>August 2, 2008 -- <a href="http://cwash.org/2008/08/02/how-i-escape-the-reuse-trap/" title="How I Escape the &#8220;Reuse Trap&#8221;">How I Escape the &#8220;Reuse Trap&#8221;</a> (0)</li><li>July 8, 2010 -- <a href="http://cwash.org/2010/07/08/transactions-part-1/" title="Transactions, Part 1">Transactions, Part 1</a> (0)</li><li>January 7, 2010 -- <a href="http://cwash.org/2010/01/07/eliminate-branching-if-statements-to-produce-better-code/" title="Eliminate Branching (IF Statements) to Produce Better Code">Eliminate Branching (IF Statements) to Produce Better Code</a> (0)</li><li>July 24, 2009 -- <a href="http://cwash.org/2009/07/24/the-elements-of-reusable-code/" title="The Elements of Reusable Code">The Elements of Reusable Code</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://cdn4.libsyn.com/carsonsystems/Cal_Henderson.mp3?nvb=20090201003132&amp;amp" length="46243558" type="audio/mpeg" />
		</item>
		<item>
		<title>Must Haves/References For Modern Java EE Developers</title>
		<link>http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=must-havesreferences-for-modern-java-ee-developers</link>
		<comments>http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 01:10:54 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[JBoss Seam]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[guice]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javaee]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[references]]></category>
		<category><![CDATA[seam]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[testng]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://cwash.org/?p=46</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/";</script>I&#8217;ve been doing a lot of reading lately and have been meaning to plug some of my favorite reads, and one of the things that I&#8217;ve been trying to read with an eye toward is for converting those that have been stuck on &#8220;behind-the-curve&#8221; projects to the new way of thinking and doing things. As [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><p>I&#8217;ve been doing a lot of reading lately and have been meaning to plug some of my favorite reads, and one of the things that I&#8217;ve been trying to read with an eye toward is for converting those that have been stuck on &#8220;behind-the-curve&#8221; projects to the new way of thinking and doing things.  As such, and just in time for the weekend, I&#8217;ve compiled a list of my favorites with an eye to the &#8220;movers and shakers&#8221; that have driven innovation in the Enterprise Java world recently.  Note that even though some of these links are specific to certain frameworks/technologies, there is a common thread throughout most of these that have a bigger focus on the best way to solve problems using Java 5/EE 5 constructs and concepts.</p>
<p>A book that should be on any Java developer&#8217;s shelf is <a href="http://www.amazon.com/gp/product/0321356683?ie=UTF8&#038;tag=cwasintosoft-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0321356683">Effective Java (2nd Edition)</a><img src="http://www.assoc-amazon.com/e/ir?t=cwasintosoft-20&#038;l=as2&#038;o=1&#038;a=0321356683" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  <em>Make sure you get the second edition</em>, for all of the Java 5 changes.  <a href="http://www.youtube.com/watch?v=pi_I7oD_uGI">This talk by Joshua</a> should whet your appetite.  (His <a href="http://www.youtube.com/watch?v=aAb7hSCtvGw">talk on good API design</a> is also very good.)  You should also take a look at Bob Lee&#8217;s <a href="http://www.youtube.com/watch?v=FFXhXZnmEQM">talk on Guice</a>.  Guice&#8217;s philosophy and focus on typesafety has spilled over into Web Beans (and newer versions of Seam) and its annotation based approach has heavily influenced newer Spring features.  I especially like his points on type safety around the 11-minute mark.  The walkthrough at the end of the talk from &#8220;old way&#8221; to &#8220;new way&#8221; is great for people who haven&#8217;t really gotten away from Factories, Delegates, and Service Locators yet.</p>
<p>The Guice video mentions that a common thread in modern Java frameworks is a focus on testability. Testing is a very important concept that nearly all new frameworks have embraced, but you still need know-how to be successful with testing.  I&#8217;ve come across some great books recently in the automated (developer) testing arena.  I&#8217;ve found the most thorough book on the topic out there is Lasse Koskela&#8217;s <a href="http://www.amazon.com/gp/product/1932394850?ie=UTF8&#038;tag=cwasintosoft-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1932394850">Test Driven</a><img src="http://www.assoc-amazon.com/e/ir?t=cwasintosoft-20&#038;l=as2&#038;o=1&#038;a=1932394850" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  The ideas and topics discussed in the book are really language independent, and work equally well with other languages.  To cut your teeth on TestNG, which the Seam documentation turned me onto, I recommend the TestNG developers&#8217; book <a href="http://www.amazon.com/gp/product/0321503104?ie=UTF8&#038;tag=cwasintosoft-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0321503104">Next Generation Java Testing: TestNG and Advanced Concepts</a><img src="http://www.assoc-amazon.com/e/ir?t=cwasintosoft-20&#038;l=as2&#038;o=1&#038;a=0321503104" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  Cedric Beust, also the author of EJBGen, and Hani Suleiman, author of the Bile Blog, produced a book that was a suprisingly good read.  It&#8217;s packed with a lot of knowledge and some interesting takes on EE concepts.  Newer versions of JUnit also include many of these features and concepts, so you&#8217;ll get the underpinnings of these concepts in this book.  <a href="http://www.youtube.com/watch?v=TtcEpryRy44">This video</a> gives you a basis to TestNG&#8217;s approach.</p>
<p>As one of the growing number of developers who have an application in the <a href="http://seamframework.org/Documentation/SeamInProductionListing" target="_new">Seam In Production</a> page, there are a few Seam resources I have to share.  Even if you don&#8217;t get into Seam, it should be on your radar because a lot of the core concepts around conversations have evolved into Web Beans, and are found other frameworks like Apache Orchestra and Spring WebFlow.  Pete Muir did a <a href="https://jboss.webex.com/ec0600l/eventcenter/recording/recordAction.do;jsessionid=JwTdnQw2TZrh1Zq715zmXWwHBD2ZW2fDynhW2dh7NxYnK1pKkLly!-1137412519?theAction=poprecord&#038;actname=%2Feventcenter%2Fframe%2Fg.do&#038;apiname=lsr.php&#038;renewticket=0&#038;renewticket=0&#038;actappname=ec0600l&#038;entappname=url0106l&#038;needFilter=false&#038;&#038;isurlact=true&#038;entactname=%2FnbrRecordingURL.do&#038;rID=34057132&#038;rKey=F88E0DE2EA1FAC2D&#038;recordID=34057132&#038;rnd=9027886079&#038;siteurl=jboss&#038;SP=EC&#038;AT=pb&#038;format=short">Webcast</a> that&#8217;s a great introduction to Seam 2.  </p>
<p>Author of <a href="http://solutionsfit.com/blog/" target="_new">one of my favorite Seam blogs</a>, Jacob Orshalick, has created a <a href="http://refcardz.dzone.com/refcardz/core-seam?oid=hom6084">DZone RefCard for Seam 2.1 Core</a>.  It&#8217;s right off the presses, being published this week, but is a great quick-capsule review of what Seam can do for you, and nice to have on your desk if you&#8217;re writing Seam.  If you need more in-depth descriptions of what&#8217;s on the RefCard, Jacob also coauthored the latest edition of the great Seam reference <a href="http://www.amazon.com/gp/product/0137129394?ie=UTF8&#038;tag=cwasintosoft-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0137129394">Seam Framework: Experience the Evolution of Java EE</a><img src="http://www.assoc-amazon.com/e/ir?t=cwasintosoft-20&#038;l=as2&#038;o=1&#038;a=0137129394" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.<br />
Dan Allen&#8217;s <a href="http://www.amazon.com/gp/product/1933988401?ie=UTF8&#038;tag=cwasintosoft-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1933988401">Seam in Action</a><img src="http://www.assoc-amazon.com/e/ir?t=cwasintosoft-20&#038;l=as2&#038;o=1&#038;a=1933988401" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> is another excellent resource.  Of course, the awesome <a href="http://seamframework.org/Documentation">Seam Docs</a> and <a href="http://www.seamframework.org/Community/Forums">Forums</a> always come in handy.  You should also RSS <a href="http://in.relation.to/">in.relation.to</a> – the Hibernate/Seam developers&#8217; group blog.</p>
<p>I know I&#8217;m leaving some great things out.  What resources do you think someone who is used to J2EE should take a look at to get them &#8220;up to speed&#8221; with the state of the art?</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>January 31, 2009 -- <a href="http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/" title="In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel ">In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel </a> (3)</li><li>March 19, 2008 -- <a href="http://cwash.org/2008/03/19/new-wave-logging/" title="New Wave Logging">New Wave Logging</a> (0)</li><li>June 9, 2009 -- <a href="http://cwash.org/2009/06/09/mocking-with-jmockit/" title="Mocking with JMockit">Mocking with JMockit</a> (5)</li><li>April 15, 2009 -- <a href="http://cwash.org/2009/04/15/osgi-ggity-giggity/" title="OSGi-ggity-Giggity">OSGi-ggity-Giggity</a> (4)</li><li>February 17, 2009 -- <a href="http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/" title="Don&#8217;t Unit Test Anymore&#8230; No, Really!">Don&#8217;t Unit Test Anymore&#8230; No, Really!</a> (6)</li><li>January 13, 2009 -- <a href="http://cwash.org/2009/01/13/on-software-quality/" title="On Software Quality">On Software Quality</a> (8)</li><li>August 21, 2008 -- <a href="http://cwash.org/2008/08/21/weblogic-92-seam-victory-is-mine/" title="Weblogic 9.2 + Seam : Victory is Mine!">Weblogic 9.2 + Seam : Victory is Mine!</a> (1)</li><li>August 2, 2008 -- <a href="http://cwash.org/2008/08/02/how-i-escape-the-reuse-trap/" title="How I Escape the &#8220;Reuse Trap&#8221;">How I Escape the &#8220;Reuse Trap&#8221;</a> (0)</li><li>July 21, 2008 -- <a href="http://cwash.org/2008/07/21/pimp-my-build/" title="Pimp My Build">Pimp My Build</a> (0)</li><li>March 13, 2008 -- <a href="http://cwash.org/2008/03/13/continuous-integration-dissected/" title="Continuous Integration Dissected">Continuous Integration Dissected</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Continuous Integration Dissected</title>
		<link>http://cwash.org/2008/03/13/continuous-integration-dissected/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=continuous-integration-dissected</link>
		<comments>http://cwash.org/2008/03/13/continuous-integration-dissected/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 16:29:06 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[build process]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[development practices]]></category>
		<category><![CDATA[methodology]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://cwash.org/2008/03/13/continuous-integration-dissected/</guid>
		<description><![CDATA[A lot gets written about Continuous Integration, particularly on which is the best visual cue to let you know your build is broken or that a test is failing – lava lamps, Beta Brights, <a href="http://www.thinkgeek.com/gadgets/electronic/5da2/" title="This is probably not the last link to ThinkGeek from me">Ambient Orbs</a>, and some even suggest traffic lights. But aside from this extraneous (at least to business) nerd-banter, a lot of what I find written about the actual topic of CI is fluffy, ivory tower, or pie-in-the-sky jibber-jabber that leaves out important parts of the big picture or confuses people more than it helps.  In hopes of clearing up confusion on what exactly CI is and how it's <em>supposed</em> to work, I'm ripping out a description that I wrote for a client proposal recently (so my apologizes for the dry-tone).  I hope sheds some light on the true nature of CI, why it's important and how to implement it from a birds-eye point of view.
<p style="text-align: center"><img src="http://techepics.com/files/mythbusters_exploading_lava.jpg" alt="Lava Lamps" height="175" hspace="10" width="195" /></p>]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2008/03/13/continuous-integration-dissected/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><h3>Setting the Record Straight</h3>
<p>A lot gets written about Continuous Integration, particularly on which is the best visual cue to let you know your build is broken or that a test is failing – lava lamps, Beta Brights, <a href="http://www.thinkgeek.com/gadgets/electronic/5da2/" title="This is probably not the last link to ThinkGeek from me">Ambient Orbs</a>, and some even suggest traffic lights. But aside from this extraneous (at least to business) nerd-banter, a lot of what I find written about the actual topic of CI is fluffy, ivory tower, or pie-in-the-sky jibber-jabber that leaves out important parts of the big picture or confuses people more than it helps.  In hopes of clearing up confusion on what exactly CI is and how it&#8217;s <em>supposed</em> to work, I&#8217;m ripping out a description that I wrote for a client proposal recently (so my apologizes for the dry-tone).  I hope sheds some light on the true nature of CI, why it&#8217;s important and how to implement it from a birds-eye point of view.</p>
<p style="text-align: center"><img src="http://techepics.com/files/mythbusters_exploading_lava.jpg" alt="Lava Lamps" height="350" hspace="10" width="390" /></p>
<h3>Continuous Integration Dissected</h3>
<p>Any large scale development project needs an automated, repeatable build process.  Following best practices while developing a build process properly separates environment-specific configuration concerns from the codebase.  This allows new environments to be created quickly and easily by simply overriding any environment-specific configuration values when first executing the build process.  Whatever build tool is being used, builds should share a common, consistent process and interface.  A consistent, repeatable build will know all of its dependencies and the goal is to be able to build any given module anywhere, independently, at any time.</p>
<p>Automated, repeatable build processes typically begin by obtaining dependencies (which can be specified using a dependency management tool) and a specific working-copy of the codebase (&#8220;checking out&#8221;) from a SCM system like CVS or Subversion.  It is important to note that this codebase includes any code that is responsible for performing automated testing in addition to source code and configuration (and possibly other source-like artifacts).</p>
<p>Once the checkout has completed, the process will compile code and run automated unit test suites for each module in the system.  At this point, all automated unit tests should pass, and custom development can begin.  Any changes to code must be adequately covered by unit tests (either by changing existing tests or creating new ones), must fully compile without any errors and pass all automated unit test suites before being committed to the repository.  The practice of always keeping the code committed to the SCM repository in this state (no compilation or unit test errors) is known as Continuous Integration and ensures that new development is safe to proceed at any point without fear of integration errors.</p>
<p>Subversion (and CVS) support concurrent development by following a Copy-Edit-Merge paradigm; any contention over files is usually caught when a developer tries to commit their changes and notices the underlying files have changed since they obtained their copy.  In many cases, Subversion is capable of performing a merge automatically, if there was no contention over the same piece of a file.  Sometimes, however, a manual merge will be required.  Merging becomes more painful as the number of differences in the conflicting files increase.  A good rule of thumb is that every developer should commit their changes at least daily.</p>
<p>Designating a single machine as a Continuous Integration (CI) environment provides many added benefits to a large scale development project.  There are many operations which are good candidates to have run &#8220;continuously&#8221; but quite often are too expensive for developers to perform before every commit.  Examples include executing automated in-browser system tests (which, if maintained over multiple releases, can serve as a &#8220;mini&#8221; regression test suite), performance tests/profiling, producing test metrics, generating documentation, etc.  CI servers are an ideal place to schedule these processes to occur in an automated fashion.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2008/03/13/continuous-integration-dissected/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Continuous+Integration+Dissected&amp;link=http://cwash.org/2008/03/13/continuous-integration-dissected/&amp;notes=A%20lot%20gets%20written%20about%20Continuous%20Integration%2C%20particularly%20on%20which%20is%20the%20best%20visual%20cue%20to%20let%20you%20know%20your%20build%20is%20broken%20or%20that%20a%20test%20is%20failing%20%E2%80%93%20lava%20lamps%2C%20Beta%20Brights%2C%20Ambient%20Orbs%2C%20and%20some%20even%20suggest%20traffic%20lights.%20But%20aside%20from%20this%20extraneous%20%28at%20least%20to%20business%29%20nerd-banter%2C%20a%20lot%20of%20what%20I%20find%20written%20about%20the%20actual%20topic%20of%20CI%20is%20fluffy%2C%20ivory%20tower%2C%20or%20pie-in-the-sky%20jibber-jabber%20that%20leaves%20out%20important%20parts%20of%20the%20big%20picture%20or%20confuses%20people%20more%20than%20it%20helps.%20%20In%20hopes%20of%20clearing%20up%20confusion%20on%20what%20exactly%20CI%20is%20and%20how%20it%27s%20supposed%20to%20work%2C%20I%27m%20ripping%20out%20a%20description%20that%20I%20wrote%20for%20a%20client%20proposal%20recently%20%28so%20my%20apologizes%20for%20the%20dry-tone%29.%20%20I%20hope%20sheds%20some%20light%20on%20the%20true%20nature%20of%20CI%2C%20why%20it%27s%20important%20and%20how%20to%20implement%20it%20from%20a%20birds-eye%20point%20of%20view.%0D%0A&amp;short_link=http://bit.ly/9tMLie&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>March 11, 2008 -- <a href="http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/" title="Bugs, Detectives, and Test Automation">Bugs, Detectives, and Test Automation</a> (2)</li><li>January 31, 2009 -- <a href="http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/" title="In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel ">In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel </a> (3)</li><li>November 28, 2008 -- <a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/" title="Must Haves/References For Modern Java EE Developers">Must Haves/References For Modern Java EE Developers</a> (1)</li><li>July 8, 2010 -- <a href="http://cwash.org/2010/07/08/transactions-part-1/" title="Transactions, Part 1">Transactions, Part 1</a> (0)</li><li>January 7, 2010 -- <a href="http://cwash.org/2010/01/07/eliminate-branching-if-statements-to-produce-better-code/" title="Eliminate Branching (IF Statements) to Produce Better Code">Eliminate Branching (IF Statements) to Produce Better Code</a> (0)</li><li>July 24, 2009 -- <a href="http://cwash.org/2009/07/24/the-elements-of-reusable-code/" title="The Elements of Reusable Code">The Elements of Reusable Code</a> (0)</li><li>June 9, 2009 -- <a href="http://cwash.org/2009/06/09/mocking-with-jmockit/" title="Mocking with JMockit">Mocking with JMockit</a> (5)</li><li>February 17, 2009 -- <a href="http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/" title="Don&#8217;t Unit Test Anymore&#8230; No, Really!">Don&#8217;t Unit Test Anymore&#8230; No, Really!</a> (6)</li><li>January 13, 2009 -- <a href="http://cwash.org/2009/01/13/on-software-quality/" title="On Software Quality">On Software Quality</a> (8)</li><li>August 2, 2008 -- <a href="http://cwash.org/2008/08/02/how-i-escape-the-reuse-trap/" title="How I Escape the &#8220;Reuse Trap&#8221;">How I Escape the &#8220;Reuse Trap&#8221;</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2008/03/13/continuous-integration-dissected/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bugs, Detectives, and Test Automation</title>
		<link>http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=bugs-detectives-and-test-automation</link>
		<comments>http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 21:08:33 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[bug tracking]]></category>
		<category><![CDATA[development practices]]></category>
		<category><![CDATA[methodology]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/</guid>
		<description><![CDATA[[Y]ou might suppose going to the trouble of creating automated tests, simply for your own devices, might be a bit overkill. As it turns out, it is worth it, and it's going to save you a lot of time in the long run.]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><p>You&#8217;ve done a thorough code review with your team and your code has come out with a few nice improvements.  Good.  You know that many a trustworthy source have speculated code reviews find as many as two times the number of defects that testing does. So you might suppose going to the trouble of creating automated tests, simply for your own devices, might be a bit overkill. As it turns out, it <em>is </em>worth it, and it&#8217;s going to save you a lot of time in the long run.  Why is it so valuable?</p>
<p><span id="more-7"></span></p>
<p>Indulge me in a brief aside&#8230;  I saw Full Metal Jacket recently on cable for the up-teenth time; the first act of the film, the part that is set on Paris Island, is hard for me to flip away from. I usually end up catching at least the first quarter of the movie.  If you&#8217;ve seen it, you&#8217;ll probably remember the part where the main characters recite, as new recruits, the Marine Corps prayer – it ends with &#8220;Without me, my rifle is useless; without my rifle, I am useless.&#8221;  I think the prayer metaphorically makes sense if developers were reciting it and replaced the rifles with their automated tests.</p>
<p>To figure out why, let&#8217;s answer the burning questions that first come to mind:</p>
<h3>Why should a developer care about doing their <em>own </em>testing?</h3>
<ol>
<li>It alerts you of problems (duh).</li>
<li>You&#8217;ll have a check in place in case a bug ever <a href="http://www.youtube.com/watch?v=MCjskH74mVU" title="Fly REZ PLZ">comes back to life</a>.</li>
<li>It gives you the opportunity to fix things before anyone else finds out about them.</li>
<li>It&#8217;s the best way to demonstrate that your code meets its requirements!</li>
</ol>
<h3>Why don&#8217;t you want testers (or worse, end users) to find your bugs?</h3>
<p>First of all, let&#8217;s be honest, this is an ideal to strive toward, even though actually achieving 100% test coverage and catching every possible bug is a definite pipe-dream.  But we have to keep in mind that bugs discovered by people other than a developer cause a lot of speculation, confusion, and in general, overhead work for everyone – time that could be better spent doing more productive things.  We&#8217;d like nothing better than to hand testers (and ultimately users) squeaky-clean code.  What happens if we don&#8217;t? (and you won&#8217;t!)</p>
<p>Imagine taking a class of third graders outside to find an insect in the &#8220;wild&#8221; and learn about (not burn) it with a magnifying glass. You&#8217;re even able to get everyone to concentrate long enough to take a peek at a would-be critter. The first candidate you find turns out to be a piece of bark that looks like a beetle. As you&#8217;re searching for another, two of your students get in a fight over claim to a partially decomposed boot they find. Another gets a nose bleed. When you finally manage to find another potential insect, you pass it over, mistaking the critter for a leaf. Little do you know it is actually a very well camouflaged member of the family <a href="http://en.wikipedia.org/wiki/Phylliidae" title="Phylliidae">Phyllidae</a>. <img src="http://upload.wikimedia.org/wikipedia/commons/1/12/LeafInsect.jpg" alt="A Leafy-looking bug" align="right" height="284" hspace="10" width="213" />By this time a child has fallen face first into a mud puddle and another has peed in his pants (which, one would think, should start to attract some insects).</p>
<p>Imagine that you do manage to find an insect in the wild; how would you get the whole class to observe it properly? There&#8217;s just one magnifying glass. The moment you get it under the glass, it darts away. It&#8217;s a struggle to keep track of. Not everyone is going to have a good viewing angle. If it disappears, then it might just as well be dead to you (did you hear that tree fall in the woods?).</p>
<p>Enough already with the horrible analogy? Okay, okay. The comparison of users to third graders in our thought experiment was purely coincidental – but you get the point. Having a group of people focus on a moving bug in &#8220;the wild&#8221; is tough! It&#8217;d be much easier to bring a captured critter into a controlled class environment to observe &#8211; our analog of a bug that we have caught with nifty our automated test net.</p>
<h3>Bug Detective?</h3>
<p>Given the fact that a tester&#8217;s job is to find defects, odds are sometimes you&#8217;ll get a defect report filed that looks like it&#8217;s written in cuneiform and requires a wizard&#8217;s hat, cauldron and lizard eyeballs to reproduce it. Sometimes<em> </em> a tester might not be giving you a legit bug – <em>sometimes</em>. There are a few scenarios that come to mind:</p>
<ol>
<li>A requirement is incomplete, misunderstood, miscommunicated or changed.</li>
<li>An external system was down.</li>
<li>An admin fat fingered something.</li>
</ol>
<p>This comes with the territory and you&#8217;re just going to have to suck it up. You&#8217;re ultimately the gumshoe on the case.  A good way to think of it is that testers and users are like the police of our system – they&#8217;re responsible for being the first on the scene, drawing chalk outlines, &#8220;booking&#8221; the suspects we arrest, etc.   What the tester is explaining is probably going to confuse you at least a few times before it makes sense. If you have good testing support, this might not be that painful.  But you could have the Super Troopers on the case, <img src="http://upload.wikimedia.org/wikipedia/en/thumb/5/5a/2002_super_troopers_0001.jpg/800px-2002_super_troopers_0001.jpg" alt="The Super Troopers" align="left" height="200" hspace="10" width="300" />and each clue that comes in is going to waste more and more of your time. And heaven forbid an end user finds this problem, and then tries to communicate this to a support rep – your job then becomes ten times harder because you have to decode 2-3 levels of miscommunication that&#8217;s occurred. Sometimes no good comes of all this, sometimes you find and squash a bug.  In cases where you don&#8217;t know what to do, write some tests – ask what the outcome should be, let the answers create more questions and more tests.  And be sure to hold onto them!</p>
<p>Whatever the outcome, because good developers are lazy, we want more than anything else to prevent this from ever happening again. Worse case, you&#8217;ve spent a lot of time addressing something and should have at least a documented set of work you&#8217;ve done and decisions made. Make sure others know about this. Best case, you are able to add an automated test so you don&#8217;t have to think about this ever again (or tell anyone about it &#8211; you&#8217;ll know the moment when something goes wrong).</p>
<h3>Conclusion</h3>
<p>So let&#8217;s recap –</p>
<ol>
<li>Bugs that slip to production are costly!</li>
<li>Automated tests help us exercise code before and after it goes into production.</li>
<li>If we work on a defect, our automated test net can help us catch a bug, or examine something that looks like a bug more closely.</li>
<li>Whenever we work on a bug (even if it&#8217;s something that isn&#8217;t truly a bug, but is being tracked as one) we should do our best to produce an automated test so we don&#8217;t have to reinvestigate in the future.  A test beats an email- or source control commit-trail any day!</li>
</ol>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Bugs%2C+Detectives%2C+and+Test+Automation&amp;link=http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/&amp;notes=%5BY%5Dou%20might%20suppose%20going%20to%20the%20trouble%20of%20creating%20automated%20tests%2C%20simply%20for%20your%20own%20devices%2C%20might%20be%20a%20bit%20overkill.%20As%20it%20turns%20out%2C%20it%20is%20worth%20it%2C%20and%20it%27s%20going%20to%20save%20you%20a%20lot%20of%20time%20in%20the%20long%20run.&amp;short_link=http://bit.ly/dhH36M&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>March 13, 2008 -- <a href="http://cwash.org/2008/03/13/continuous-integration-dissected/" title="Continuous Integration Dissected">Continuous Integration Dissected</a> (0)</li><li>January 31, 2009 -- <a href="http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/" title="In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel ">In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel </a> (3)</li><li>November 28, 2008 -- <a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/" title="Must Haves/References For Modern Java EE Developers">Must Haves/References For Modern Java EE Developers</a> (1)</li><li>July 8, 2010 -- <a href="http://cwash.org/2010/07/08/transactions-part-1/" title="Transactions, Part 1">Transactions, Part 1</a> (0)</li><li>January 7, 2010 -- <a href="http://cwash.org/2010/01/07/eliminate-branching-if-statements-to-produce-better-code/" title="Eliminate Branching (IF Statements) to Produce Better Code">Eliminate Branching (IF Statements) to Produce Better Code</a> (0)</li><li>July 24, 2009 -- <a href="http://cwash.org/2009/07/24/the-elements-of-reusable-code/" title="The Elements of Reusable Code">The Elements of Reusable Code</a> (0)</li><li>June 9, 2009 -- <a href="http://cwash.org/2009/06/09/mocking-with-jmockit/" title="Mocking with JMockit">Mocking with JMockit</a> (5)</li><li>February 17, 2009 -- <a href="http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/" title="Don&#8217;t Unit Test Anymore&#8230; No, Really!">Don&#8217;t Unit Test Anymore&#8230; No, Really!</a> (6)</li><li>January 13, 2009 -- <a href="http://cwash.org/2009/01/13/on-software-quality/" title="On Software Quality">On Software Quality</a> (8)</li><li>August 2, 2008 -- <a href="http://cwash.org/2008/08/02/how-i-escape-the-reuse-trap/" title="How I Escape the &#8220;Reuse Trap&#8221;">How I Escape the &#8220;Reuse Trap&#8221;</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2008/03/11/bugs-detectives-and-test-automation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

