<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Test-Driven Development. A Cognitive Justification?</title>
	<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/</link>
	<description>Working software daily</description>
	<pubDate>Wed, 19 Nov 2008 22:30:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: steve.freeman</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-272</link>
		<dc:creator>steve.freeman</dc:creator>
		<pubDate>Sun, 24 Aug 2008 22:03:40 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-272</guid>
		<description>@Brian. I try to make the TDD effect works at multiple levels in the code, start with high-level tests to at least get me focussed on what I'm trying to achieve, use low-level tests to nudge me in the right design directions. 

I've jumped into existing TDD code bases before. I think I look at the code when I'm trying to understand the general structure, and look at the tests when I'm trying to make changes. So I guess, to think of it physically, I have the larger structure of the code behind me, and in that context I have a unit test in front of me which is the gatekeeper to the next thing I want to change. Er, or something like that.</description>
		<content:encoded><![CDATA[<p>@Brian. I try to make the <span class="caps">TDD </span>effect works at multiple levels in the code, start with high-level tests to at least get me focussed on what I&#8217;m trying to achieve, use low-level tests to nudge me in the right design directions. </p>
<p>I&#8217;ve jumped into existing <span class="caps">TDD </span>code bases before. I think I look at the code when I&#8217;m trying to understand the general structure, and look at the tests when I&#8217;m trying to make changes. So I guess, to think of it physically, I have the larger structure of the code behind me, and in that context I have a unit test in front of me which is the gatekeeper to the next thing I want to change. Er, or something like that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Marick</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-269</link>
		<dc:creator>Brian Marick</dc:creator>
		<pubDate>Sun, 24 Aug 2008 17:31:55 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-269</guid>
		<description>@mfeathers: "When you do TDD, the context is right there staring you in the face over and over again."

That makes me wonder about TDD and learning an existing code base. I'm writing a book on RubyCocoa, planned to introduce TDD fairly early, but have kept bumping it to later and later in the text. Some of the reasons have nothing to do with the topic of this post, but others may. Part of what I have to do with the book is explain how and why a large, complicated framework *makes sense* - how it hangs together as a whole - and the tests somehow seemed to get in the way. Maybe because they focused too much attention on the context, not enough on the concept?

That may not be true. I used TDD from early on in my previous book, which was about teaching Ruby to novices, and it worked just fine. But it does make me think about "tests as documentation", something that's never quite worked out for me. How can we make what is mostly a historical trace of a development process into a teaching text without a whole lot of tinkering and rewriting?

(If that's even important: in a long-lived collocated project, nobody might ever need to approach the code base alone. They'd always be paired with someone who knew it and could speak what the tests didn't say. Things are different with open source, though.)</description>
		<content:encoded><![CDATA[<p>@mfeathers: &#8220;When you do <span class="caps">TDD, </span>the context is right there staring you in the face over and over again.&#8221;</p>
<p>That makes me wonder about <span class="caps">TDD </span>and learning an existing code base. I&#8217;m writing a book on RubyCocoa, planned to introduce <span class="caps">TDD </span>fairly early, but have kept bumping it to later and later in the text. Some of the reasons have nothing to do with the topic of this post, but others may. Part of what I have to do with the book is explain how and why a large, complicated framework <strong>makes sense</strong> - how it hangs together as a whole - and the tests somehow seemed to get in the way. Maybe because they focused too much attention on the context, not enough on the concept?</p>
<p>That may not be true. I used <span class="caps">TDD </span>from early on in my previous book, which was about teaching Ruby to novices, and it worked just fine. But it does make me think about &#8220;tests as documentation&#8221;, something that&#8217;s never quite worked out for me. How can we make what is mostly a historical trace of a development process into a teaching text without a whole lot of tinkering and rewriting?</p>
<p>(If that&#8217;s even important: in a long-lived collocated project, nobody might ever need to approach the code base alone. They&#8217;d always be paired with someone who knew it and could speak what the tests didn&#8217;t say. Things are different with open source, though.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Stewart &#187; Blog Archive &#187; Promiscuous Pairing and Beginners Mind</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-268</link>
		<dc:creator>Doug Stewart &#187; Blog Archive &#187; Promiscuous Pairing and Beginners Mind</dc:creator>
		<pubDate>Sun, 24 Aug 2008 17:18:47 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-268</guid>
		<description>[...] http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/ [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] <a href="http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/" rel="nofollow">http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/</a> [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Stewart</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-266</link>
		<dc:creator>Doug Stewart</dc:creator>
		<pubDate>Sun, 24 Aug 2008 16:02:06 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-266</guid>
		<description>Excellent posts and comments. Arriving at solutions organically sometimes cuts down on waste but almost always achieves the better approach - always when assuming relentless refactoring. Short-circuiting expert behavior really enforces the principle that the design will become what it needs to and should be, from its own perspective.</description>
		<content:encoded><![CDATA[<p>Excellent posts and comments. Arriving at solutions organically sometimes cuts down on waste but almost always achieves the better approach - always when assuming relentless refactoring. Short-circuiting expert behavior really enforces the principle that the design will become what it needs to and should be, from its own perspective.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Another reason for licensing programmers &#124; Steve Freeman</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-253</link>
		<dc:creator>Another reason for licensing programmers &#124; Steve Freeman</dc:creator>
		<pubDate>Tue, 12 Aug 2008 21:45:06 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-253</guid>
		<description>[...] Test-Driven Development also helps by smoothing the flow, removing the Variable Ratio effect, and, as I wrote before, by breaking us out of the programming Tar Pit long enough to refocus on the real [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Test-Driven Development also helps by smoothing the flow, removing the Variable Ratio effect, and, as I wrote before, by breaking us out of the programming Tar Pit long enough to refocus on the real [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris Kemper</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-251</link>
		<dc:creator>Kris Kemper</dc:creator>
		<pubDate>Sun, 20 Jul 2008 20:44:51 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-251</guid>
		<description>&lt;strong&gt;Cognitive Benefit of TDD: Confirmation Driven Development?...&lt;/strong&gt;

I recently read an blog post[1] describing a cognitive justification for test driven development. I think the topic is interesting. In doing TDD, there are a variety of reasons for why we write tests first, and it isn&#8217;t always to ensure correctne...</description>
		<content:encoded><![CDATA[<p><strong>Cognitive Benefit of <span class="caps">TDD</span>: Confirmation Driven Development?&#8230;</strong></p>
<p>I recently read an blog post<sup class="footnote"><a href="#fn1">1</a></sup> describing a cognitive justification for test driven development. I think the topic is interesting. In doing <span class="caps">TDD, </span>there are a variety of reasons for why we write tests first, and it isn&#8217;t always to ensure correctne&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Harvey</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-249</link>
		<dc:creator>David Harvey</dc:creator>
		<pubDate>Wed, 16 Jul 2008 13:21:53 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-249</guid>
		<description>Great post, Steve, and got me thinking a good deal.

Breaking the expert mindset can work both for pairing and TDD. I've found a real (and constructive) tension between an ingrained habit of approaching problems by thinking about structure and pattern (blame the musician!), and the context-driven imperative of test-first ("this is what the code wants to look like" - thanks to Paul Dyson for this!).

I don't think in either case this is _guaranteed_, though - we've all got experience of groups descending rapidly into group-think, and there's no reason to believe that - if we write our tests first - the way the relationships and responsibilities in the code evolve will necessarily be that different from the last time we did it. In either case the onus is on the individual to allow themselves to be challenged out of their well-worn grooves - I'll concede that promiscuous pairing helps (just so long as the nature of the pairing practice is understood by both, which is of course not guaranteed...)  but fundamentally, individuals and groups don't change without needing to, wanting to, and reflecting.</description>
		<content:encoded><![CDATA[<p>Great post, Steve, and got me thinking a good deal.</p>
<p>Breaking the expert mindset can work both for pairing and <span class="caps">TDD.</span> I&#8217;ve found a real (and constructive) tension between an ingrained habit of approaching problems by thinking about structure and pattern (blame the musician!), and the context-driven imperative of test-first (&#8221;this is what the code wants to look like&#8221; - thanks to Paul Dyson for this!).</p>
<p>I don&#8217;t think in either case this is <em>guaranteed</em>, though - we&#8217;ve all got experience of groups descending rapidly into group-think, and there&#8217;s no reason to believe that - if we write our tests first - the way the relationships and responsibilities in the code evolve will necessarily be that different from the last time we did it. In either case the onus is on the individual to allow themselves to be challenged out of their well-worn grooves - I&#8217;ll concede that promiscuous pairing helps (just so long as the nature of the pairing practice is understood by both, which is of course not guaranteed&#8230;)  but fundamentally, individuals and groups don&#8217;t change without needing to, wanting to, and reflecting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve.freeman</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-241</link>
		<dc:creator>steve.freeman</dc:creator>
		<pubDate>Mon, 30 Jun 2008 21:20:55 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-241</guid>
		<description>@Joseph. Thanks. Nice link.</description>
		<content:encoded><![CDATA[<p>@Joseph. Thanks. Nice link.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Pelrine</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-240</link>
		<dc:creator>Joseph Pelrine</dc:creator>
		<pubDate>Sat, 28 Jun 2008 13:56:45 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-240</guid>
		<description>Great post, Steve. All too true. You might wnt to check out this article (http://www.nytimes.com/2007/12/30/business/30know.html) for some more arguments about why it's a good idea to slow experts down a bit.</description>
		<content:encoded><![CDATA[<p>Great post, Steve. All too true. You might wnt to check out this article (http://www.nytimes.com/2007/12/30/business/30know.html) for some more arguments about why it&#8217;s a good idea to slow experts down a bit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Inquisitive Coder &#187; Blog Archive &#187; Weekly Links 9</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-238</link>
		<dc:creator>The Inquisitive Coder &#187; Blog Archive &#187; Weekly Links 9</dc:creator>
		<pubDate>Sat, 21 Jun 2008 10:12:08 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-238</guid>
		<description>[...] You Wanted To Know About MVC and MVP But Were Afraid To Ask The Flawed Theory Behind Unit Testing Test-Driven Development. A Cognitive Justification? TDD, Mocks and [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] You Wanted To Know About <span class="caps">MVC </span>and <span class="caps">MVP</span> But Were Afraid To Ask The Flawed Theory Behind Unit Testing Test-Driven Development. A Cognitive Justification? <span class="caps">TDD,</span> Mocks and [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilja Preuß</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-235</link>
		<dc:creator>Ilja Preuß</dc:creator>
		<pubDate>Wed, 18 Jun 2008 09:04:36 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-235</guid>
		<description>Thanks for your great post - the reasoning certainly rings true for me. I always felt that doing TDD significantly changed the way I tackled a problem, but always struggled putting it into words.</description>
		<content:encoded><![CDATA[<p>Thanks for your great post - the reasoning certainly rings true for me. I always felt that doing <span class="caps">TDD </span>significantly changed the way I tackled a problem, but always struggled putting it into words.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Punch Barrel / Test-Driven Development. A Cognitive Justification?</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-234</link>
		<dc:creator>The Punch Barrel / Test-Driven Development. A Cognitive Justification?</dc:creator>
		<pubDate>Mon, 16 Jun 2008 09:40:34 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-234</guid>
		<description>[...] Test-Driven Development. A Cognitive Justification? [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Test-Driven Development. A Cognitive Justification? [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Jack</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-233</link>
		<dc:creator>Colin Jack</dc:creator>
		<pubDate>Sun, 15 Jun 2008 18:03:49 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-233</guid>
		<description>Wow, Michaels post resulted in two other equally interesting posts about different topics. Good stuff.</description>
		<content:encoded><![CDATA[<p>Wow, Michaels post resulted in two other equally interesting posts about different topics. Good stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Feathers</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-232</link>
		<dc:creator>Michael Feathers</dc:creator>
		<pubDate>Sun, 15 Jun 2008 17:00:25 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-232</guid>
		<description>That is interesting.  One of the things that I noticed early on about TDD is that is forces me into a reflective mindset.  In traditional design it's easy treat design as a blank sheet.  You draw some boxes and mentally proof your collaborations.  In the process it's easy to forget the context.

When you do TDD, the context is right there staring you in the face over and over again.  Each change that you make is in the context of code you or someone else have written, and programming becomes more akin to sculpting or sensitive gardening, an activity where you have to look at what you have and make a decision about  what to do next.

To me, that's the core of it.. getting people to pay at least as much attention to &lt;em&gt;what is there&lt;/em&gt; as they do to their ideas of what should be there.</description>
		<content:encoded><![CDATA[<p>That is interesting.  One of the things that I noticed early on about <span class="caps">TDD </span>is that is forces me into a reflective mindset.  In traditional design it&#8217;s easy treat design as a blank sheet.  You draw some boxes and mentally proof your collaborations.  In the process it&#8217;s easy to forget the context.</p>
<p>When you do <span class="caps">TDD, </span>the context is right there staring you in the face over and over again.  Each change that you make is in the context of code you or someone else have written, and programming becomes more akin to sculpting or sensitive gardening, an activity where you have to look at what you have and make a decision about  what to do next.</p>
<p>To me, that&#8217;s the core of it.. getting people to pay at least as much attention to <em>what is there</em> as they do to their ideas of what should be there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Pietri</title>
		<link>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-231</link>
		<dc:creator>William Pietri</dc:creator>
		<pubDate>Sun, 15 Jun 2008 16:10:28 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/06/15/test-driven-development-a-cognitive-justification/#comment-231</guid>
		<description>Great post! This is certainly true for me.

This weekend I've been coding up an architectural spike of Twitter; I've got some notions about how to do things scalably that I wanted to put to the test. I had been thinking about it a bit during every (frequent) Twitter outage, and had some sketches in my notebook when I sat down to code.

As I did small incremental bits that solved immediate problems, I was definitely applying a variety of familiar patterns -- albeit small ones -- semi-instinctively. But because I had put my bigger designs out of my mind, the small pieces added up to a different direction than I was expecting.

It's hard for me to know for sure, but I suspect the years of TDD practice have helped in two ways. One, they've trained me to attend much more closely to the code of the moment. Two, they have broken my learned responses into smaller pieces, more loosely joined. That is, I think TDD might have refactored the bits in my head similarly to the way it helped me refactor the various code bases.</description>
		<content:encoded><![CDATA[<p>Great post! This is certainly true for me.</p>
<p>This weekend I&#8217;ve been coding up an architectural spike of Twitter; I&#8217;ve got some notions about how to do things scalably that I wanted to put to the test. I had been thinking about it a bit during every (frequent) Twitter outage, and had some sketches in my notebook when I sat down to code.</p>
<p>As I did small incremental bits that solved immediate problems, I was definitely applying a variety of familiar patterns &#8212; albeit small ones &#8212; semi-instinctively. But because I had put my bigger designs out of my mind, the small pieces added up to a different direction than I was expecting.</p>
<p>It&#8217;s hard for me to know for sure, but I suspect the years of <span class="caps">TDD </span>practice have helped in two ways. One, they&#8217;ve trained me to attend much more closely to the code of the moment. Two, they have broken my learned responses into smaller pieces, more loosely joined. That is, I think <span class="caps">TDD </span>might have refactored the bits in my head similarly to the way it helped me refactor the various code bases.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
