<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: excuses for not doing dev testing</title>
	<atom:link href="http://monkeyisland.pl/2009/05/12/excuses-for-not-doing-dev-testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://monkeyisland.pl/2009/05/12/excuses-for-not-doing-dev-testing/</link>
	<description>about software</description>
	<lastBuildDate>Wed, 08 Sep 2010 04:17:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: szczepiq</title>
		<link>http://monkeyisland.pl/2009/05/12/excuses-for-not-doing-dev-testing/#comment-3132</link>
		<dc:creator>szczepiq</dc:creator>
		<pubDate>Wed, 13 May 2009 10:07:26 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=215#comment-3132</guid>
		<description>&lt;blockquote&gt;Apologies if this is not relevant or fairly obvious.&lt;/blockquote&gt;

Don&#039;t worry - you&#039;ve actually got a very good point - the metric. If only the project had a metric exposing the problem of missing tests - probably a coverage tool rather than McCabe complexity tracker.

My digression on McCabe: couple of years ago we&#039;ve set up pmd to fail the build if complexity was over 8 :) It worked OK for geographically divided team that did not have any formal code inspection in place. Recently, I&#039;d rather choose pair-programming or more-less formal review process instead of rigid static analysis in the build.</description>
		<content:encoded><![CDATA[<blockquote><p>Apologies if this is not relevant or fairly obvious.</p></blockquote>
<p>Don&#8217;t worry &#8211; you&#8217;ve actually got a very good point &#8211; the metric. If only the project had a metric exposing the problem of missing tests &#8211; probably a coverage tool rather than McCabe complexity tracker.</p>
<p>My digression on McCabe: couple of years ago we&#8217;ve set up pmd to fail the build if complexity was over 8 <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It worked OK for geographically divided team that did not have any formal code inspection in place. Recently, I&#8217;d rather choose pair-programming or more-less formal review process instead of rigid static analysis in the build.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Nicoll</title>
		<link>http://monkeyisland.pl/2009/05/12/excuses-for-not-doing-dev-testing/#comment-3131</link>
		<dc:creator>Dave Nicoll</dc:creator>
		<pubDate>Wed, 13 May 2009 09:55:53 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=215#comment-3131</guid>
		<description>Hi Guys, I&#039;m a project manager working with business-critical and safety-critical systems, so apologies in advance that my technical competence is no longer what it used to be. 
One of the critical factors for these high-reliability systems is that code must be fully testable and maintainable. Consequently all the code is run through a McCabe complexity analyser. If the McCabe value is too large it means the code cannot be readily tested or maintained and needs to be restructured. The project rule is that developers must check the McCabe value of their code which cannot go into Config Control or the build if it is too high. 

Similarly with legacy code, it&#039;s worthwhile running McCabe against the existing code and having a look at those items with a large complexity count. Experience has shown that the most complex items generate most of the problems. Also, when opening a code item for maintenance then run McCabe to see if the complexity count can be reduced to a more acceptable level.
McCabe complexity has mostly been used on applications written in C/C++ and Ada, but McCabe analysers are now available for Java although I don&#039;t know if they cover DAO. 

The acceptable McCabe threshold is up to the projects coding standards but for rough guidance; embedded safety-critical code typically has a McCabe of 10 or less, business critical IT a McCabe limit of 20 or 30 or less. For an old nightmare legacy system (written in C &amp; VB) I initially set the McCabe threshold to 40 and this gave a good steer in identifying the really problematic code items; we found one code item with a McCabe of over 130!
Whatever the implementation language the principle of reducing complexity still applies, and the effort to check the McCabe at the developer level is small in comparison to the overal impact untestable or untested code has on the overal project costs and timescales.

Apologies if this is not relevant or fairly obvious.
Regards</description>
		<content:encoded><![CDATA[<p>Hi Guys, I&#8217;m a project manager working with business-critical and safety-critical systems, so apologies in advance that my technical competence is no longer what it used to be.<br />
One of the critical factors for these high-reliability systems is that code must be fully testable and maintainable. Consequently all the code is run through a McCabe complexity analyser. If the McCabe value is too large it means the code cannot be readily tested or maintained and needs to be restructured. The project rule is that developers must check the McCabe value of their code which cannot go into Config Control or the build if it is too high. </p>
<p>Similarly with legacy code, it&#8217;s worthwhile running McCabe against the existing code and having a look at those items with a large complexity count. Experience has shown that the most complex items generate most of the problems. Also, when opening a code item for maintenance then run McCabe to see if the complexity count can be reduced to a more acceptable level.<br />
McCabe complexity has mostly been used on applications written in C/C++ and Ada, but McCabe analysers are now available for Java although I don&#8217;t know if they cover DAO. </p>
<p>The acceptable McCabe threshold is up to the projects coding standards but for rough guidance; embedded safety-critical code typically has a McCabe of 10 or less, business critical IT a McCabe limit of 20 or 30 or less. For an old nightmare legacy system (written in C &amp; VB) I initially set the McCabe threshold to 40 and this gave a good steer in identifying the really problematic code items; we found one code item with a McCabe of over 130!<br />
Whatever the implementation language the principle of reducing complexity still applies, and the effort to check the McCabe at the developer level is small in comparison to the overal impact untestable or untested code has on the overal project costs and timescales.</p>
<p>Apologies if this is not relevant or fairly obvious.<br />
Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: szczepiq</title>
		<link>http://monkeyisland.pl/2009/05/12/excuses-for-not-doing-dev-testing/#comment-3128</link>
		<dc:creator>szczepiq</dc:creator>
		<pubDate>Tue, 12 May 2009 13:26:20 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=215#comment-3128</guid>
		<description>Spot on!

I guess I could imagine sympathizing with all those excuses on the occasion. It&#039;s just they are too often just mere excuses made up to silence the conscience of a man who doesn&#039;t know how to go about testing some feature or legacy piece. The important thing is to realize that it&#039;s truly a valid excuse and no shame at all!</description>
		<content:encoded><![CDATA[<p>Spot on!</p>
<p>I guess I could imagine sympathizing with all those excuses on the occasion. It&#8217;s just they are too often just mere excuses made up to silence the conscience of a man who doesn&#8217;t know how to go about testing some feature or legacy piece. The important thing is to realize that it&#8217;s truly a valid excuse and no shame at all!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hamlet D'Arcy</title>
		<link>http://monkeyisland.pl/2009/05/12/excuses-for-not-doing-dev-testing/#comment-3127</link>
		<dc:creator>Hamlet D'Arcy</dc:creator>
		<pubDate>Tue, 12 May 2009 13:14:58 +0000</pubDate>
		<guid isPermaLink="false">http://monkeyisland.pl/?p=215#comment-3127</guid>
		<description>I sympathize with the &quot;tests make it harder to refactor&quot; excuse. Over-reliance on mocking makes production code hard to change because the test failures become difficult to update and understand. Common techniques for testing legacy code (package-local methods, reflection) make production code hard to refactor because implementation changes break tests. However, your conclusion is still relevant. When someone says &quot;tests make it harder to refactor&quot; what they really mean is &quot;I don&#039;t have the skill to write tests that help instead of hinder refactoring&quot;. Especially with legacy code, you can&#039;t always refactor to a testable design (especially safely!), and if you don&#039;t have a testable design then you&#039;re stuck mocking/hacking poor tests together. 

Michael Feathers talks about &quot;creating islands of testability&quot; in legacy code. That is great advice to follow. But, that also means there are oceans of code with no tests and low value in testing. So when we say we &quot;create islands of testability&quot; we are implicitly affirming the fact that some code is not worth testing and testing that code properly would take too much time. 

Argh. It&#039;s hard not to get angry about the reams of legacy code I have to deal with... but it&#039;s a reality.</description>
		<content:encoded><![CDATA[<p>I sympathize with the &#8220;tests make it harder to refactor&#8221; excuse. Over-reliance on mocking makes production code hard to change because the test failures become difficult to update and understand. Common techniques for testing legacy code (package-local methods, reflection) make production code hard to refactor because implementation changes break tests. However, your conclusion is still relevant. When someone says &#8220;tests make it harder to refactor&#8221; what they really mean is &#8220;I don&#8217;t have the skill to write tests that help instead of hinder refactoring&#8221;. Especially with legacy code, you can&#8217;t always refactor to a testable design (especially safely!), and if you don&#8217;t have a testable design then you&#8217;re stuck mocking/hacking poor tests together. </p>
<p>Michael Feathers talks about &#8220;creating islands of testability&#8221; in legacy code. That is great advice to follow. But, that also means there are oceans of code with no tests and low value in testing. So when we say we &#8220;create islands of testability&#8221; we are implicitly affirming the fact that some code is not worth testing and testing that code properly would take too much time. </p>
<p>Argh. It&#8217;s hard not to get angry about the reams of legacy code I have to deal with&#8230; but it&#8217;s a reality.</p>
]]></content:encoded>
	</item>
</channel>
</rss>