<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: TDD: The &#8216;Logans Run&#8217; of Software Development&#8230;</title>
	<atom:link href="http://cyberfox.com/blog/2007/10/05/35/tdd-the-logans-run-of-software-development/feed" rel="self" type="application/rss+xml" />
	<link>http://cyberfox.com/blog/2007/10/05/35/tdd-the-logans-run-of-software-development</link>
	<description>Coding, Connections, and Other Bloggy Bits of Goodness</description>
	<lastBuildDate>Fri, 08 Jan 2010 09:11:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Cyberfox</title>
		<link>http://cyberfox.com/blog/2007/10/05/35/tdd-the-logans-run-of-software-development/comment-page-1#comment-4900</link>
		<dc:creator>Cyberfox</dc:creator>
		<pubDate>Fri, 22 May 2009 02:31:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.vixen.com/blog/2007/10/05/35#comment-4900</guid>
		<description>Greetings,

I evidently need to tweak my WordPress setup; I didn&#039;t know this old post even had new comments on it. :(

I like the idea of segregating tests; so when doing specific fixes (i.e. maintenance), you don&#039;t even try to run your whole unit test suite until you feel you&#039;re done and integrating.  There should be a way to do that easily...

Many of you suggested Michael Feathers book on legacy code.  I recall skimming it in a store well before I ever wrote that post (which was back in late 2007), and for some reason I&#039;ve mentally binned it with &#039;Code Reading&#039; by Diomidis Spinellis which I thought was a singularly poor treatment of the subject.  I may need to re-examine &#039;Working Effectively&#039;, and see if I merely confused the two, or if I had a legitimate disagreement with it.

I&#039;ve since been through Yet Another company who had extremely poorly tested code (in fact, zero tests or specs when I came on board; outsourced code FAIL), and it definitely frustrates me.  I&#039;ll have to see if there&#039;s a way to tune autotest to switch into a &#039;legacy fixes&#039; mode, which only runs a single test suite as you&#039;re making changes.

Anyhow, I appreciate the comments.  There&#039;s some good ideas, and the impetus to take a second look at Michael Feathers&#039; book.

--  Morgan</description>
		<content:encoded><![CDATA[<p>Greetings,</p>
<p>I evidently need to tweak my WordPress setup; I didn&#8217;t know this old post even had new comments on it. <img src='http://cyberfox.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>I like the idea of segregating tests; so when doing specific fixes (i.e. maintenance), you don&#8217;t even try to run your whole unit test suite until you feel you&#8217;re done and integrating.  There should be a way to do that easily&#8230;</p>
<p>Many of you suggested Michael Feathers book on legacy code.  I recall skimming it in a store well before I ever wrote that post (which was back in late 2007), and for some reason I&#8217;ve mentally binned it with &#8216;Code Reading&#8217; by Diomidis Spinellis which I thought was a singularly poor treatment of the subject.  I may need to re-examine &#8216;Working Effectively&#8217;, and see if I merely confused the two, or if I had a legitimate disagreement with it.</p>
<p>I&#8217;ve since been through Yet Another company who had extremely poorly tested code (in fact, zero tests or specs when I came on board; outsourced code FAIL), and it definitely frustrates me.  I&#8217;ll have to see if there&#8217;s a way to tune autotest to switch into a &#8216;legacy fixes&#8217; mode, which only runs a single test suite as you&#8217;re making changes.</p>
<p>Anyhow, I appreciate the comments.  There&#8217;s some good ideas, and the impetus to take a second look at Michael Feathers&#8217; book.</p>
<p>&#8211;  Morgan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl</title>
		<link>http://cyberfox.com/blog/2007/10/05/35/tdd-the-logans-run-of-software-development/comment-page-1#comment-4860</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Mon, 11 May 2009 15:27:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.vixen.com/blog/2007/10/05/35#comment-4860</guid>
		<description>Michael Feathers wrote the book &quot;working effectively with legacy code&quot; on exactly this area. It&#039;s well worth looking at. Not exclusively Java either...</description>
		<content:encoded><![CDATA[<p>Michael Feathers wrote the book &#8220;working effectively with legacy code&#8221; on exactly this area. It&#8217;s well worth looking at. Not exclusively Java either&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Mayo</title>
		<link>http://cyberfox.com/blog/2007/10/05/35/tdd-the-logans-run-of-software-development/comment-page-1#comment-4854</link>
		<dc:creator>Ian Mayo</dc:creator>
		<pubDate>Sat, 09 May 2009 05:01:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.vixen.com/blog/2007/10/05/35#comment-4854</guid>
		<description>Hi there Morgan,
from memory the intended role of TDD in the maintenance of legacy codebases is as a refactoring safety belt.  

So, before you make &#039;risky&#039; changes to a portion of legacy code, write some white-box tests to verify the outputs of that module - here you&#039;re encoding an API reference for that module.  Then hack away with your machete to tidy/refactor it.  Then re-run the tests to verify that:
a) your expectations of that module were correct
b) you haven&#039;t changed the outside appearance of that module (or that any changes you made were intentional).

The tests then serve as verified, auto-updating API documentation for that module.

Yes, it&#039;s easier to preach this than to practice it.  Yes, I could adhere to it more than I do.

Ian</description>
		<content:encoded><![CDATA[<p>Hi there Morgan,<br />
from memory the intended role of TDD in the maintenance of legacy codebases is as a refactoring safety belt.  </p>
<p>So, before you make &#8216;risky&#8217; changes to a portion of legacy code, write some white-box tests to verify the outputs of that module &#8211; here you&#8217;re encoding an API reference for that module.  Then hack away with your machete to tidy/refactor it.  Then re-run the tests to verify that:<br />
a) your expectations of that module were correct<br />
b) you haven&#8217;t changed the outside appearance of that module (or that any changes you made were intentional).</p>
<p>The tests then serve as verified, auto-updating API documentation for that module.</p>
<p>Yes, it&#8217;s easier to preach this than to practice it.  Yes, I could adhere to it more than I do.</p>
<p>Ian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Bender</title>
		<link>http://cyberfox.com/blog/2007/10/05/35/tdd-the-logans-run-of-software-development/comment-page-1#comment-4850</link>
		<dc:creator>John Bender</dc:creator>
		<pubDate>Fri, 08 May 2009 14:43:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.vixen.com/blog/2007/10/05/35#comment-4850</guid>
		<description>Cucumber provides the tags for focusing on certain tests:

http://railscasts.com/episodes/159-more-on-cucumber</description>
		<content:encoded><![CDATA[<p>Cucumber provides the tags for focusing on certain tests:</p>
<p><a href="http://railscasts.com/episodes/159-more-on-cucumber" rel="nofollow">http://railscasts.com/episodes/159-more-on-cucumber</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: orangepips</title>
		<link>http://cyberfox.com/blog/2007/10/05/35/tdd-the-logans-run-of-software-development/comment-page-1#comment-4849</link>
		<dc:creator>orangepips</dc:creator>
		<pubDate>Fri, 08 May 2009 14:01:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.vixen.com/blog/2007/10/05/35#comment-4849</guid>
		<description>Read &quot;Working Effectively with Legacy Code&quot; by Michael C. Feathers. This book provides heuristics and strategies that focus on writing tests around what&#039;s being changed. It does not advocate writing unit tests for the whole system before making changes, but rather writing tests around the areas that are being changed. Such that you write tests to capture how the area that&#039;s going to be changed behaves. Note, this may involve making changes to that code to make it testable, which the book provides ideas on how to approach. Then make changes and unit test.</description>
		<content:encoded><![CDATA[<p>Read &#8220;Working Effectively with Legacy Code&#8221; by Michael C. Feathers. This book provides heuristics and strategies that focus on writing tests around what&#8217;s being changed. It does not advocate writing unit tests for the whole system before making changes, but rather writing tests around the areas that are being changed. Such that you write tests to capture how the area that&#8217;s going to be changed behaves. Note, this may involve making changes to that code to make it testable, which the book provides ideas on how to approach. Then make changes and unit test.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hamlet D'Arcy</title>
		<link>http://cyberfox.com/blog/2007/10/05/35/tdd-the-logans-run-of-software-development/comment-page-1#comment-4848</link>
		<dc:creator>Hamlet D'Arcy</dc:creator>
		<pubDate>Fri, 08 May 2009 12:04:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.vixen.com/blog/2007/10/05/35#comment-4848</guid>
		<description>You, sir, need to read Michael Feather&#039;s &quot;Working Effectively with Legacy Code&quot;. The book was published in 2004, so it&#039;s something the Agile folks have been grappling with for at least 5 years. There was a rousing session at CITCON North America on the subject two weeks ago, but alas you weren&#039;t there!</description>
		<content:encoded><![CDATA[<p>You, sir, need to read Michael Feather&#8217;s &#8220;Working Effectively with Legacy Code&#8221;. The book was published in 2004, so it&#8217;s something the Agile folks have been grappling with for at least 5 years. There was a rousing session at CITCON North America on the subject two weeks ago, but alas you weren&#8217;t there!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Braithwaite</title>
		<link>http://cyberfox.com/blog/2007/10/05/35/tdd-the-logans-run-of-software-development/comment-page-1#comment-4845</link>
		<dc:creator>Keith Braithwaite</dc:creator>
		<pubDate>Fri, 08 May 2009 06:48:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.vixen.com/blog/2007/10/05/35#comment-4845</guid>
		<description>Leading TDD-er Michael Feathers has published a comprehensive and authoritative work on the topic: &quot;Working Effectively with Legacy Code&quot; http://www.amazon.com/Working-Effectively-Legacy-Robert-Martin/dp/0131177052/</description>
		<content:encoded><![CDATA[<p>Leading TDD-er Michael Feathers has published a comprehensive and authoritative work on the topic: &#8220;Working Effectively with Legacy Code&#8221; <a href="http://www.amazon.com/Working-Effectively-Legacy-Robert-Martin/dp/0131177052/" rel="nofollow">http://www.amazon.com/Working-Effectively-Legacy-Robert-Martin/dp/0131177052/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://cyberfox.com/blog/2007/10/05/35/tdd-the-logans-run-of-software-development/comment-page-1#comment-4842</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 08 May 2009 01:15:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.vixen.com/blog/2007/10/05/35#comment-4842</guid>
		<description>I think TDD proponents would tell you that one of the best ways to introduce tdd, or automated testing at all, on an existing project is to try to write tests for every bug-fix that you do, or every new enhancement that you have to make.

Bug 1003323849 comes in.  Write a test, somehow, that fails for what&#039;s in the bug.  Fix the bug.  Make sure the test passes.

It&#039;s not always easy to work an automated test into the guts of an existing application, but if you make the effort to do so then soon you&#039;ll have a pretty big set of tests that test against known issues instead of lots of &quot;theoretical&quot; bugs that haven&#039;t happened.</description>
		<content:encoded><![CDATA[<p>I think TDD proponents would tell you that one of the best ways to introduce tdd, or automated testing at all, on an existing project is to try to write tests for every bug-fix that you do, or every new enhancement that you have to make.</p>
<p>Bug 1003323849 comes in.  Write a test, somehow, that fails for what&#8217;s in the bug.  Fix the bug.  Make sure the test passes.</p>
<p>It&#8217;s not always easy to work an automated test into the guts of an existing application, but if you make the effort to do so then soon you&#8217;ll have a pretty big set of tests that test against known issues instead of lots of &#8220;theoretical&#8221; bugs that haven&#8217;t happened.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giles Bowkett</title>
		<link>http://cyberfox.com/blog/2007/10/05/35/tdd-the-logans-run-of-software-development/comment-page-1#comment-4841</link>
		<dc:creator>Giles Bowkett</dc:creator>
		<pubDate>Fri, 08 May 2009 01:10:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.vixen.com/blog/2007/10/05/35#comment-4841</guid>
		<description>I&#039;ve seen this too, and I&#039;m not sure what the answer is. However, I have to tell you, working on legacy apps that don&#039;t have test coverage is a heinous pain in the ass - things break and you have no idea why. What I usually do is just isolate my tests in a separate file. I used a blog post about it as my site, so you should be able to click my name and see it. Basically you just throw the test in one file which only tests for the things you need. The Achilles heel for that approach is complicated objects that require shit-tons of association classes to exist before they can do anything. It kicks ass for many use cases, though. There&#039;s a lot you can do to stay TDD this way, and fast as hell, and it&#039;s usually very easy to move the tests from their unique files into the larger existing test files. And sometimes it&#039;s better to have separate files anyway, because you&#039;ve got your tests separated by topic and not just by the class they test.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve seen this too, and I&#8217;m not sure what the answer is. However, I have to tell you, working on legacy apps that don&#8217;t have test coverage is a heinous pain in the ass &#8211; things break and you have no idea why. What I usually do is just isolate my tests in a separate file. I used a blog post about it as my site, so you should be able to click my name and see it. Basically you just throw the test in one file which only tests for the things you need. The Achilles heel for that approach is complicated objects that require shit-tons of association classes to exist before they can do anything. It kicks ass for many use cases, though. There&#8217;s a lot you can do to stay TDD this way, and fast as hell, and it&#8217;s usually very easy to move the tests from their unique files into the larger existing test files. And sometimes it&#8217;s better to have separate files anyway, because you&#8217;ve got your tests separated by topic and not just by the class they test.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyberfox</title>
		<link>http://cyberfox.com/blog/2007/10/05/35/tdd-the-logans-run-of-software-development/comment-page-1#comment-3751</link>
		<dc:creator>Cyberfox</dc:creator>
		<pubDate>Fri, 02 Nov 2007 08:57:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.vixen.com/blog/2007/10/05/35#comment-3751</guid>
		<description>Greetings,
Yeah, I&#039;m using rcov as much as I can (had to hack up custom rcov scripts to get it to work), trying to use Heckle but having some issues...  Using flog to find bad code sections...  I don&#039;t know what &#039;shoulda&#039; is, I&#039;ll look it up.

It&#039;s not so much my clients, but my company, as I&#039;ve never done the contract thing.  I wish I could carve out time explicitly, but instead I have to pad my estimates and use the extra time to improve the test coverage, and do my best to encourage a testing culture in the other devs so we don&#039;t fall too far behind.  :)

I&#039;ve been given a lot of freedom to do deep refactorings that both improve the ability to build future features, _and_ provides points that can be mocked to improve testability.

But doing TDD at this point in the development cycle is just painful, unfortunately.  I get my TDD fix working on my own projects.  :)

--  Morgan</description>
		<content:encoded><![CDATA[<p>Greetings,<br />
Yeah, I&#8217;m using rcov as much as I can (had to hack up custom rcov scripts to get it to work), trying to use Heckle but having some issues&#8230;  Using flog to find bad code sections&#8230;  I don&#8217;t know what &#8217;shoulda&#8217; is, I&#8217;ll look it up.</p>
<p>It&#8217;s not so much my clients, but my company, as I&#8217;ve never done the contract thing.  I wish I could carve out time explicitly, but instead I have to pad my estimates and use the extra time to improve the test coverage, and do my best to encourage a testing culture in the other devs so we don&#8217;t fall too far behind.  <img src='http://cyberfox.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve been given a lot of freedom to do deep refactorings that both improve the ability to build future features, _and_ provides points that can be mocked to improve testability.</p>
<p>But doing TDD at this point in the development cycle is just painful, unfortunately.  I get my TDD fix working on my own projects.  <img src='http://cyberfox.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&#8211;  Morgan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
