<?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: Extra! Extra! TDD Doubles LOC and No One Cares!</title>
	<atom:link href="http://www.renaissancesoftware.net/blog/archives/46/feed" rel="self" type="application/rss+xml" />
	<link>http://www.renaissancesoftware.net/blog/archives/46</link>
	<description>Blogging about Agile Development, especially embedded.  Follow me on twitter: jwgrenning</description>
	<lastBuildDate>Sun, 29 Nov 2009 06:18:45 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Wisang Eom</title>
		<link>http://www.renaissancesoftware.net/blog/archives/46/comment-page-1#comment-746</link>
		<dc:creator>Wisang Eom</dc:creator>
		<pubDate>Sun, 29 Nov 2009 06:18:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.renaissancesoftware.net/blog/?p=46#comment-746</guid>
		<description>Quite an intersting topic. I found out that, in some organization, the average LOC developers write a day is around 10. The time for writing 10 Lines of code is trivial. Even though it is doubled, it is trivial too. Most of the time is spent on debugging and finding solutions for fixing the bug in a safe way. 

TDD doubles LOC. That&#039;s true. But the test code does not get into target. So, no physical problem. Also the time for doubling the code is just trivial but the code quality is improved dramatically so that the totoal time can be saved. LOC is doubled but it is at least free and you may get considerable profit from it if your are skilled with TDD.</description>
		<content:encoded><![CDATA[<p>Quite an intersting topic. I found out that, in some organization, the average LOC developers write a day is around 10. The time for writing 10 Lines of code is trivial. Even though it is doubled, it is trivial too. Most of the time is spent on debugging and finding solutions for fixing the bug in a safe way. </p>
<p>TDD doubles LOC. That&#8217;s true. But the test code does not get into target. So, no physical problem. Also the time for doubling the code is just trivial but the code quality is improved dramatically so that the totoal time can be saved. LOC is doubled but it is at least free and you may get considerable profit from it if your are skilled with TDD.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark T</title>
		<link>http://www.renaissancesoftware.net/blog/archives/46/comment-page-1#comment-722</link>
		<dc:creator>Mark T</dc:creator>
		<pubDate>Sun, 01 Nov 2009 14:24:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.renaissancesoftware.net/blog/?p=46#comment-722</guid>
		<description>I agree that Lines of code (LOC) has always been a bad metric but many organizations still use it for bidding purposes. Maybe some day &quot;story points&quot; will be the way to bid but they are still yet another fuzzy widget.  When using LOC the real metric should be WDLOC (working deliverable lines of code) no claims of &quot;error free&quot;.  The cost metric is the time to produce a WDLOC. Which for embedded systems, I would say a TDD approach would come out cheaper overall.  Pay me now or pay me later.  The &quot;unit&quot; test code itself should never be counted as LOC that is just a cost of producing the working deliverable code along with debugging and SW/HW integration.</description>
		<content:encoded><![CDATA[<p>I agree that Lines of code (LOC) has always been a bad metric but many organizations still use it for bidding purposes. Maybe some day &#8220;story points&#8221; will be the way to bid but they are still yet another fuzzy widget.  When using LOC the real metric should be WDLOC (working deliverable lines of code) no claims of &#8220;error free&#8221;.  The cost metric is the time to produce a WDLOC. Which for embedded systems, I would say a TDD approach would come out cheaper overall.  Pay me now or pay me later.  The &#8220;unit&#8221; test code itself should never be counted as LOC that is just a cost of producing the working deliverable code along with debugging and SW/HW integration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Langr</title>
		<link>http://www.renaissancesoftware.net/blog/archives/46/comment-page-1#comment-612</link>
		<dc:creator>Jeff Langr</dc:creator>
		<pubDate>Sat, 18 Jul 2009 03:05:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.renaissancesoftware.net/blog/?p=46#comment-612</guid>
		<description>Hi James--

Does TDD really double lines? Well, usually I find that I have maybe a bit more lines of test code than production code when doing TDD, so on the surface it looks like the lines are doubled.

But every (Java or C++) system I&#039;ve encountered that wasn&#039;t built using TDD has been overly bloated. I&#039;ve seen a couple systems where the production code shrunk to a third of the original size, and a couple more that shrunk to about half of the original size, after programmers added lots of tests and started refactoring. And just looking at the bulk of systems out there, I&#039;d take the challenge that I could reduce their line count easily by 25% and more often by 50%.

So it seems like almost a wash to me: system without TDD, twice the amount of code it needs. System with TDD, half the production code plus a comparable amount of test code. Well, of course, that compares someone who knows TDD with a bunch of programmers who didn&#039;t give a hoot. I figure someone who was good with TDD could probably produce a much cleaner design, even without tests.

I&#039;m working on a smaller codebase now of about 30,000 lines. After about 40 hours investment, I&#039;ve eliminated perhaps 3,000, and there&#039;s no end in sight of potential cleanup. I&#039;m having a blast.

Jeff</description>
		<content:encoded><![CDATA[<p>Hi James&#8211;</p>
<p>Does TDD really double lines? Well, usually I find that I have maybe a bit more lines of test code than production code when doing TDD, so on the surface it looks like the lines are doubled.</p>
<p>But every (Java or C++) system I&#8217;ve encountered that wasn&#8217;t built using TDD has been overly bloated. I&#8217;ve seen a couple systems where the production code shrunk to a third of the original size, and a couple more that shrunk to about half of the original size, after programmers added lots of tests and started refactoring. And just looking at the bulk of systems out there, I&#8217;d take the challenge that I could reduce their line count easily by 25% and more often by 50%.</p>
<p>So it seems like almost a wash to me: system without TDD, twice the amount of code it needs. System with TDD, half the production code plus a comparable amount of test code. Well, of course, that compares someone who knows TDD with a bunch of programmers who didn&#8217;t give a hoot. I figure someone who was good with TDD could probably produce a much cleaner design, even without tests.</p>
<p>I&#8217;m working on a smaller codebase now of about 30,000 lines. After about 40 hours investment, I&#8217;ve eliminated perhaps 3,000, and there&#8217;s no end in sight of potential cleanup. I&#8217;m having a blast.</p>
<p>Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Oldwood</title>
		<link>http://www.renaissancesoftware.net/blog/archives/46/comment-page-1#comment-611</link>
		<dc:creator>Chris Oldwood</dc:creator>
		<pubDate>Wed, 15 Jul 2009 21:26:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.renaissancesoftware.net/blog/?p=46#comment-611</guid>
		<description>I guess this means that you get a full set of regression tests &amp; documentation of expected behaviour at no extra cost? As a Schedule Owner I would have thought that &quot;something for nothing&quot; is a very desirable property :-)</description>
		<content:encoded><![CDATA[<p>I guess this means that you get a full set of regression tests &amp; documentation of expected behaviour at no extra cost? As a Schedule Owner I would have thought that &#8220;something for nothing&#8221; is a very desirable property <img src='http://www.renaissancesoftware.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Duncan</title>
		<link>http://www.renaissancesoftware.net/blog/archives/46/comment-page-1#comment-610</link>
		<dc:creator>Scott Duncan</dc:creator>
		<pubDate>Wed, 15 Jul 2009 13:07:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.renaissancesoftware.net/blog/?p=46#comment-610</guid>
		<description>Yeah Keith!  Sometimes I think we need to grind on what Royce actually said every chance we get.  It may be the (at least, one of the) most misunderstood bits of software engineering lore.  (Another one being using a manufacturing engineering &amp; quality model for software, thereby, tarnishing the interest in engineering &amp; quality ideas from a design perspective.)

A nice paper on early appreciation for iterative and incremental approaches to development is the Basili and Larman paper, &quot;Iterative and Incremental Development: A Brief History,&quot; from IEEE Computer 36:6:47-56, June 2003.  Larman&#039;s book, Agile &amp; Iterative Development: A Manager&#039;s Guide, has a lot which amplifies that article, as well.</description>
		<content:encoded><![CDATA[<p>Yeah Keith!  Sometimes I think we need to grind on what Royce actually said every chance we get.  It may be the (at least, one of the) most misunderstood bits of software engineering lore.  (Another one being using a manufacturing engineering &amp; quality model for software, thereby, tarnishing the interest in engineering &amp; quality ideas from a design perspective.)</p>
<p>A nice paper on early appreciation for iterative and incremental approaches to development is the Basili and Larman paper, &#8220;Iterative and Incremental Development: A Brief History,&#8221; from IEEE Computer 36:6:47-56, June 2003.  Larman&#8217;s book, Agile &amp; Iterative Development: A Manager&#8217;s Guide, has a lot which amplifies that article, as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Braithwaite</title>
		<link>http://www.renaissancesoftware.net/blog/archives/46/comment-page-1#comment-609</link>
		<dc:creator>Keith Braithwaite</dc:creator>
		<pubDate>Wed, 15 Jul 2009 12:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.renaissancesoftware.net/blog/?p=46#comment-609</guid>
		<description>Something like this observation has been with us since at least as early as Royce&#039;s 1970 paper. The one where he introduces the idea of a &quot;waterfall&quot; process only for the purpose of explaining why it does not work and not to do that (shame the Software Engineering textbook authors didn&#039;t read past page 1).

He says that if you have a process that puts testing at the end, then when—not if—a test fails (a good thing in itself: no-one ever learned anything from a passing test) an unknown amount of unplanned rework has been injected into the project. Unknown effort to diagnose the failure, unknown effort to fix the defect, and (by induction) unknown effort to test all over again.

His recommendation is to start testing as early as possible and run testing in parallel with development (in parallel with design, in parallel with analysis, in parallel with ...)</description>
		<content:encoded><![CDATA[<p>Something like this observation has been with us since at least as early as Royce&#8217;s 1970 paper. The one where he introduces the idea of a &#8220;waterfall&#8221; process only for the purpose of explaining why it does not work and not to do that (shame the Software Engineering textbook authors didn&#8217;t read past page 1).</p>
<p>He says that if you have a process that puts testing at the end, then when—not if—a test fails (a good thing in itself: no-one ever learned anything from a passing test) an unknown amount of unplanned rework has been injected into the project. Unknown effort to diagnose the failure, unknown effort to fix the defect, and (by induction) unknown effort to test all over again.</p>
<p>His recommendation is to start testing as early as possible and run testing in parallel with development (in parallel with design, in parallel with analysis, in parallel with &#8230;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
