<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Goodbye TDD, Hello TDD &#8230;</title>
	<link>http://jm.monkk.com/2008/05/06/goodbye-tdd-hello-tdd/</link>
	<description>Who knows what a programmer thinks?</description>
	<pubDate>Wed, 07 Jan 2009 01:39:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Monkk</title>
		<link>http://jm.monkk.com/2008/05/06/goodbye-tdd-hello-tdd/#comment-137</link>
		<author>Monkk</author>
		<pubDate>Sun, 11 May 2008 14:49:10 +0000</pubDate>
		<guid>http://jm.monkk.com/2008/05/06/goodbye-tdd-hello-tdd/#comment-137</guid>
		<description>You're absolutely right, BDD or any design aiding "tool" for that matter can't do a darn thing about the coding. They certainly allow you to proof out the design, and even go as far as getting you a program that works as designed but you're still open to poor programming practices, and bad coding.

As an example (albeit a contrived one), here's some ways to concatenate strings in C#:

Ex1.
string s1 = "One" + " " + "Two";

Ex2.
string s3 = string.Format("{0} {1}", "One", "Two");

Ex3.
string s1 = "One";
string s2 = "Two";
string s3 = Concat(s1, s2);

public string Concat(string first, string second) {
    int counter = 0;
    string result = new string(first.Length + second.Length);   
    for (counter=0; i &lt; first.Length; counter++) {
        result[counter] = first[c];
    }
    for (counter = second.Length - 1; counter &gt;= 0; counter--) {
        result[counter] = second[c];
    }
    return result;
}

Ex2 is probably the best of the 3 but there is nothing stopping anyone from writing the terribly bad Ex3. And it will pass any unit tests you write for it.

We need to look to other devices to ensure we don't write code like that. Performance testing or Memory allocation type tests may show some indicator that the code is cr4p. Code complexity might also be an indicator. 

In the case above, a code review if probably the easiest way to identify problem areas like that, but then again if we're all drinking the same kool-aid, maybe we wouldn't notice.

Interesting point indeed, and probably worth more thought, thank you for bringing it up!</description>
		<content:encoded><![CDATA[<p>You&#8217;re absolutely right, BDD or any design aiding &#8220;tool&#8221; for that matter can&#8217;t do a darn thing about the coding. They certainly allow you to proof out the design, and even go as far as getting you a program that works as designed but you&#8217;re still open to poor programming practices, and bad coding.</p>
<p>As an example (albeit a contrived one), here&#8217;s some ways to concatenate strings in C#:</p>
<p>Ex1.<br />
string s1 = &#8220;One&#8221; + &#8221; &#8221; + &#8220;Two&#8221;;</p>
<p>Ex2.<br />
string s3 = string.Format(&#8221;{0} {1}&#8221;, &#8220;One&#8221;, &#8220;Two&#8221;);</p>
<p>Ex3.<br />
string s1 = &#8220;One&#8221;;<br />
string s2 = &#8220;Two&#8221;;<br />
string s3 = Concat(s1, s2);</p>
<p>public string Concat(string first, string second) {<br />
    int counter = 0;<br />
    string result = new string(first.Length + second.Length);<br />
    for (counter=0; i < first.Length; counter++) {<br />
        result[counter] = first[c];<br />
    }<br />
    for (counter = second.Length - 1; counter >= 0; counter&#8211;) {<br />
        result[counter] = second[c];<br />
    }<br />
    return result;<br />
}</p>
<p>Ex2 is probably the best of the 3 but there is nothing stopping anyone from writing the terribly bad Ex3. And it will pass any unit tests you write for it.</p>
<p>We need to look to other devices to ensure we don&#8217;t write code like that. Performance testing or Memory allocation type tests may show some indicator that the code is cr4p. Code complexity might also be an indicator. </p>
<p>In the case above, a code review if probably the easiest way to identify problem areas like that, but then again if we&#8217;re all drinking the same kool-aid, maybe we wouldn&#8217;t notice.</p>
<p>Interesting point indeed, and probably worth more thought, thank you for bringing it up!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kireas</title>
		<link>http://jm.monkk.com/2008/05/06/goodbye-tdd-hello-tdd/#comment-134</link>
		<author>Kireas</author>
		<pubDate>Sat, 10 May 2008 16:28:37 +0000</pubDate>
		<guid>http://jm.monkk.com/2008/05/06/goodbye-tdd-hello-tdd/#comment-134</guid>
		<description>Interesting - and as far as I can tell, BDD seems the obvious choice for application development.

With BDD however, is there not the risk of bad coding becoming an issue? I'm not much of a coder; I code in PHPMySQL, websites basically, and the only game I had a hand in making worked, but the code was a nightmare, and wasn't as efficient as it could have been.

Like I said though, I'm not much of a coder, and lack proper design systems to follow.</description>
		<content:encoded><![CDATA[<p>Interesting - and as far as I can tell, BDD seems the obvious choice for application development.</p>
<p>With BDD however, is there not the risk of bad coding becoming an issue? I&#8217;m not much of a coder; I code in PHPMySQL, websites basically, and the only game I had a hand in making worked, but the code was a nightmare, and wasn&#8217;t as efficient as it could have been.</p>
<p>Like I said though, I&#8217;m not much of a coder, and lack proper design systems to follow.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
