<?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"
	>
<channel>
	<title>Comments on: Rewrite or Refactor?</title>
	<atom:link href="http://www.fuzzylizard.com/archives/2007/11/22/911/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fuzzylizard.com/archives/2007/11/22/911/</link>
	<description>My thoughts on Agile, Java and Ruby on Rails (mostly)</description>
	<pubDate>Fri, 21 Nov 2008 06:07:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Chris Leishman</title>
		<link>http://www.fuzzylizard.com/archives/2007/11/22/911/#comment-21063</link>
		<dc:creator>Chris Leishman</dc:creator>
		<pubDate>Wed, 05 Dec 2007 17:16:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/11/22/911/#comment-21063</guid>
		<description>I _always_ favour refactoring, rather than replacing or creating parallel implementations.  This is because I tend to look at software development from a systems perspective.

Instead of trying to understand all the requirements for a system as a whole, I prefer to try and understand _what the system currently does_ and _how I want to change that behaviour_.  Changing behaviour could mean fixing bugs or adding new features.  This applies equally at all levels of abstraction (eg. the entire business system, or a single interface/class).</description>
		<content:encoded><![CDATA[<p>I _always_ favour refactoring, rather than replacing or creating parallel implementations.  This is because I tend to look at software development from a systems perspective.</p>
<p>Instead of trying to understand all the requirements for a system as a whole, I prefer to try and understand _what the system currently does_ and _how I want to change that behaviour_.  Changing behaviour could mean fixing bugs or adding new features.  This applies equally at all levels of abstraction (eg. the entire business system, or a single interface/class).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Johnston</title>
		<link>http://www.fuzzylizard.com/archives/2007/11/22/911/#comment-20853</link>
		<dc:creator>Chris Johnston</dc:creator>
		<pubDate>Fri, 30 Nov 2007 05:02:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/11/22/911/#comment-20853</guid>
		<description>@Carfield - We are going through that process right now. Thankfully we have a lot of documents in which those requirements were captured the first time; however, as Chris stated, those requirements are not necessarily right and going back over them gives the business a chance to take a second look at them.

So far, we are getting confusion over why we are doing the rewrite, but once we explain, the client is very willing to work with us to collect the requirements.</description>
		<content:encoded><![CDATA[<p>@Carfield - We are going through that process right now. Thankfully we have a lot of documents in which those requirements were captured the first time; however, as Chris stated, those requirements are not necessarily right and going back over them gives the business a chance to take a second look at them.</p>
<p>So far, we are getting confusion over why we are doing the rewrite, but once we explain, the client is very willing to work with us to collect the requirements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.fuzzylizard.com/archives/2007/11/22/911/#comment-20849</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 29 Nov 2007 16:40:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/11/22/911/#comment-20849</guid>
		<description>I haven't yet figured out a great way to collect "real" requirements yet. I'm not sure anyone has really (that I have seen).

Often it is because the stakeholders themselves do not know what they don't know and don't always know what they want. And sometimes they get what they want but it's not what they need, etc. etc.

No silver bullets here.</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t yet figured out a great way to collect &#8220;real&#8221; requirements yet. I&#8217;m not sure anyone has really (that I have seen).</p>
<p>Often it is because the stakeholders themselves do not know what they don&#8217;t know and don&#8217;t always know what they want. And sometimes they get what they want but it&#8217;s not what they need, etc. etc.</p>
<p>No silver bullets here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carfield Yim</title>
		<link>http://www.fuzzylizard.com/archives/2007/11/22/911/#comment-20826</link>
		<dc:creator>Carfield Yim</dc:creator>
		<pubDate>Wed, 28 Nov 2007 07:00:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/11/22/911/#comment-20826</guid>
		<description>Would you describe more about you experience?? 

By the way, the most difficult part of rewrite is to collect back the requirement, how do you overcome that?</description>
		<content:encoded><![CDATA[<p>Would you describe more about you experience?? </p>
<p>By the way, the most difficult part of rewrite is to collect back the requirement, how do you overcome that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.fuzzylizard.com/archives/2007/11/22/911/#comment-20825</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 28 Nov 2007 06:50:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/11/22/911/#comment-20825</guid>
		<description>The ramp up time on "reverse engineering" legacy code can be substantial. If you have clear requirements a rewrite may not be a bad idea.

What I usually see in practice though is that the requirements are *not* 100% and the legacy code contains various little bits of logic to handle accumulated undocumented reqs. Or it contains "features" that other logic depends on without necessarily realizing it.

When you have that rat nest of issues a rewrite usually ends up working until it gets to the end user or someone notices the new code does not handle case xyz properly or like the "old code did."

If you have the time (who does?) you can begin covering the legacy code in behavior tests to discover just what it is doing. You can then apply those tests to your new code and ensure both sides pass.

Code coverage tools are essential to make sure you cover the old stuff sufficiently. Of course, by the time you get to this point, the pendulum swings back to just refactoring (since you now have an extremely high test coverage!)

No good answer yet. I usually lean towards rewrite because if it breaks a "feature" that isn't spec'd out... it usually points to a bigger problem anyway.</description>
		<content:encoded><![CDATA[<p>The ramp up time on &#8220;reverse engineering&#8221; legacy code can be substantial. If you have clear requirements a rewrite may not be a bad idea.</p>
<p>What I usually see in practice though is that the requirements are *not* 100% and the legacy code contains various little bits of logic to handle accumulated undocumented reqs. Or it contains &#8220;features&#8221; that other logic depends on without necessarily realizing it.</p>
<p>When you have that rat nest of issues a rewrite usually ends up working until it gets to the end user or someone notices the new code does not handle case xyz properly or like the &#8220;old code did.&#8221;</p>
<p>If you have the time (who does?) you can begin covering the legacy code in behavior tests to discover just what it is doing. You can then apply those tests to your new code and ensure both sides pass.</p>
<p>Code coverage tools are essential to make sure you cover the old stuff sufficiently. Of course, by the time you get to this point, the pendulum swings back to just refactoring (since you now have an extremely high test coverage!)</p>
<p>No good answer yet. I usually lean towards rewrite because if it breaks a &#8220;feature&#8221; that isn&#8217;t spec&#8217;d out&#8230; it usually points to a bigger problem anyway.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
