<?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>Blue Cog Blog &#187; TDD</title>
	<atom:link href="http://www.bluecog.com/blog/tag/tdd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bluecog.com/blog</link>
	<description>It's just a freaking blue cog...</description>
	<lastBuildDate>Tue, 03 Aug 2010 19:32:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Thoughts on TDD</title>
		<link>http://www.bluecog.com/blog/2009/11/11/thoughts-on-tdd/</link>
		<comments>http://www.bluecog.com/blog/2009/11/11/thoughts-on-tdd/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 16:07:08 +0000</pubDate>
		<dc:creator>Bill Melvin</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://www.bluecog.com/blog/?p=455</guid>
		<description><![CDATA[I want to know what the buzz around Test-Driven Development is all about. The proponents make a good case for it. I&#8217;ve read about it a good bit but have never worked with anyone who practiced it. I also tend to be leery when I see people becoming religiously fanatical about anything, and some of [...]]]></description>
			<content:encoded><![CDATA[<p>I want to know what the buzz around Test-Driven Development is all about. The proponents make a good case for it. I&#8217;ve read about it a good bit but have never worked with anyone who practiced it. I also tend to be leery when I see people becoming religiously fanatical about anything, and some of what I read sounds, if not fanatical, at least unrealistic. Nonetheless there are a lot of sensible voices promoting TDD as a way to build better, more maintainable software. That sounds good to me.</p>
<p>I have tried to use TDD on several small projects to get a feel for it. I am recording my (somewhat random) thoughts on it here for future reference:</p>
<ul>
<li>I want to know that TDD really helps and works and that it&#8217;s not just a smartypants thing.</li>
<li>I&#8217;m not good at it yet. I haven&#8217;t done enough TDD (but I still have thoughts on it).</li>
<li>It&#8217;s not a panacea. Get your silver bullet <a href="http://www.bogusoft.com/">here</a>.</li>
<li>It IS helpful when refactoring.</li>
<li>I think there probably were fewer bugs in the first live versions because of the tests.</li>
<li>It can be a trap if you&#8217;re not careful to keep the end result of the system in mind. Seems easy to focus too much on writing tests. I feel a tendency toward myopia when writing a lot of tests before doing any integration.
</li>
<li>It doesn&#8217;t replace the need to look at the results of your code (for example, writing results to text files, or CSV files to be imported into a spreadsheet to look at, visualize with your brain).</li>
<li>You&#8217;ll never write enough tests to catch every possible failure.</li>
<li>The wrong algorithm with 100% test coverage is still the wrong algorithm.</li>
<li>It doesn&#8217;t replace manual or automated acceptance testing.</li>
<li>It <em>will</em> take longer up front to build a system using TDD. It <em>may</em> lead to a more correct system at the first release. It <em>may</em> save time later when the system needs to change.</li>
<li>You will throw away more code. If you find that some code isn&#8217;t needed and remove it, that code may have multiple tests associated with it that will also be removed. Maybe this isn&#8217;t bad since we&#8217;re supposed to be <a href="http://www.codinghorror.com/blog/archives/000256.html">throwing away the prototype</a> but often the prototype ends up turning directly into the production version. Perhaps this is a way of throwing away the prototype a little piece at a time. But seriously&#8230;</li>
<li>I don&#8217;t like the idea of significantly changing or adding complexity to the architecture of a system solely to make it more amenable to unit testing. Maybe it&#8217;s worth it.</li>
<li>It&#8217;s easier to do unit testing when using dynamic languages.</li>
<li>You&#8217;re more likely to need those tests when using dynamic languages.</li>
<li>I&#8217;m not sold on writing tests as THE way to drive development, but then, like I said, I&#8217;m not good at it yet.</li>
<li>Having unit tests is good. Regardless of whether tests are in the driver seat I plan to take advantage of automated unit testing and automated acceptance testing.</li>
<li>At this point it seems unlikely that I&#8217;ll adopt test-first style TDD as my preferred method for building software (or as a religion) but I&#8217;m still going to try to do it as a first approach. I&#8217;ll also be willing to abandon it without regrets if it becomes cumbersome for the job at hand.</li>
<li>Finally, it will be good to know how to do TDD in case someday I end up with a boss who says I have to. BTW: If that&#8217;s the reason you&#8217;re doing TDD you&#8217;re probably doing it for the wrong reason.</li>
</ul>
<p>That&#8217;s enough for now. I also plan to look into Behavior-Driven Development (AKA smartypants TDD) and the associated <a href="http://cukes.info/">tooling</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluecog.com/blog/2009/11/11/thoughts-on-tdd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
