<?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: Dynamic typing as safe as static typing is based on wrong assumption</title>
	<atom:link href="http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/feed/" rel="self" type="application/rss+xml" />
	<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/</link>
	<description></description>
	<lastBuildDate>Wed, 17 Mar 2010 05:44:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: G. Ralph Kuntz, MD</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-230139</link>
		<dc:creator>G. Ralph Kuntz, MD</dc:creator>
		<pubDate>Wed, 13 May 2009 14:45:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-230139</guid>
		<description>I posted this to comp.lang.python, but it applies to Groovy:

I am a Java developer. There, I said it :-).

When I am writing code, I can  rely on the compiler to confirm that
any methods I write will be called with parameters of the &quot;right&quot;
type. I do not need to test that parameter #1 really is a String
before I call some method on it that only works on Strings.

If I am writing in Python, since it is dynamically, but strongly
typed, I really should check that each parameter is of the expected
type, or at least can respond to the method I plan on calling (&quot;duck&quot;
typing). Every call should be wrapped in a try/except statement to
prevent the method (and program) from crashing when my method is
called with an integer instead of the expected string.

Is this the experience that Python programmer (of large projects) see?
Do you also write unit tests to confirm that the methods actually
check for and catch &quot;bad&quot; parameter types? If I am writing small one-
off scripts, I wouldn&#039;t worry about it, but if I am writing a large
system that must have 99+% uptime without constant monitoring, this
really should be verified.

Up for discussion...</description>
		<content:encoded><![CDATA[<p>I posted this to comp.lang.python, but it applies to Groovy:</p>
<p>I am a Java developer. There, I said it :-).</p>
<p>When I am writing code, I can  rely on the compiler to confirm that<br />
any methods I write will be called with parameters of the &#8220;right&#8221;<br />
type. I do not need to test that parameter #1 really is a String<br />
before I call some method on it that only works on Strings.</p>
<p>If I am writing in Python, since it is dynamically, but strongly<br />
typed, I really should check that each parameter is of the expected<br />
type, or at least can respond to the method I plan on calling (&#8220;duck&#8221;<br />
typing). Every call should be wrapped in a try/except statement to<br />
prevent the method (and program) from crashing when my method is<br />
called with an integer instead of the expected string.</p>
<p>Is this the experience that Python programmer (of large projects) see?<br />
Do you also write unit tests to confirm that the methods actually<br />
check for and catch &#8220;bad&#8221; parameter types? If I am writing small one-<br />
off scripts, I wouldn&#8217;t worry about it, but if I am writing a large<br />
system that must have 99+% uptime without constant monitoring, this<br />
really should be verified.</p>
<p>Up for discussion&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224513</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sun, 18 Jan 2009 19:02:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224513</guid>
		<description>I&#039;ve followed your request and removed my comment as a gesture.

Please, could we now stop this. Could you stop twisting my words, could you stop insulting me, could you stop attacking me personally?

&lt;i&gt;For reference to make sense out of my last comment:

&quot;Hmm... Banning free speech?&quot;

Yes. At least here in Germany there are limits on free speech. Concerning libel and insults for example.&lt;/i&gt;</description>
		<content:encoded><![CDATA[<p>I&#8217;ve followed your request and removed my comment as a gesture.</p>
<p>Please, could we now stop this. Could you stop twisting my words, could you stop insulting me, could you stop attacking me personally?</p>
<p><i>For reference to make sense out of my last comment:</p>
<p>&#8220;Hmm&#8230; Banning free speech?&#8221;</p>
<p>Yes. At least here in Germany there are limits on free speech. Concerning libel and insults for example.</i></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224512</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sun, 18 Jan 2009 18:55:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224512</guid>
		<description>&quot;If you are going to ban me, then ban everything I say. Don’t selectively quote me out of context.&quot;

Don&#039;t comment and I won&#039;t quote you out of context.

&quot;You seem to want to make this a nationalist thing. Well I’m not biting.&quot;

You&#039;re so twisted, it&#039;s beyond words. How you could construct a &quot;national&quot; thing out of my comment is beyond me. I added &quot;Germany&quot; because otherwise you would again call me &quot;vague&quot;.

&quot;Please remove your last comment as it quotes me without containing the full text of what I actually said.&quot;

With your comments we have left &quot;please&quot; behind us. I asked you not to comment, but to no avail. No, I won&#039;t remove my comments. Just yours. Stop commenting. I told you.

Thanks
Stephan</description>
		<content:encoded><![CDATA[<p>&#8220;If you are going to ban me, then ban everything I say. Don’t selectively quote me out of context.&#8221;</p>
<p>Don&#8217;t comment and I won&#8217;t quote you out of context.</p>
<p>&#8220;You seem to want to make this a nationalist thing. Well I’m not biting.&#8221;</p>
<p>You&#8217;re so twisted, it&#8217;s beyond words. How you could construct a &#8220;national&#8221; thing out of my comment is beyond me. I added &#8220;Germany&#8221; because otherwise you would again call me &#8220;vague&#8221;.</p>
<p>&#8220;Please remove your last comment as it quotes me without containing the full text of what I actually said.&#8221;</p>
<p>With your comments we have left &#8220;please&#8221; behind us. I asked you not to comment, but to no avail. No, I won&#8217;t remove my comments. Just yours. Stop commenting. I told you.</p>
<p>Thanks<br />
Stephan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Beckford</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224510</link>
		<dc:creator>Paul Beckford</dc:creator>
		<pubDate>Sun, 18 Jan 2009 18:33:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224510</guid>
		<description>If you are going to ban me, then ban &lt;b&gt;everything&lt;/b&gt; I say. Don&#039;t selectively quote me out of context.

You seem to want to make this a nationalist thing. Well I&#039;m not biting. 

Please remove your last comment as it quotes me without containing the full text of what I actually said.

Thanks,

Paul.</description>
		<content:encoded><![CDATA[<p>If you are going to ban me, then ban <b>everything</b> I say. Don&#8217;t selectively quote me out of context.</p>
<p>You seem to want to make this a nationalist thing. Well I&#8217;m not biting. </p>
<p>Please remove your last comment as it quotes me without containing the full text of what I actually said.</p>
<p>Thanks,</p>
<p>Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Beckford</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224507</link>
		<dc:creator>Paul Beckford</dc:creator>
		<pubDate>Sun, 18 Jan 2009 17:38:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224507</guid>
		<description>[Removed by blog author]</description>
		<content:encoded><![CDATA[<p>[Removed by blog author]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224505</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sun, 18 Jan 2009 17:08:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224505</guid>
		<description>@Paul: I thought we have been through with this.

I&#039;ve made several times my intentions with the quotes clear.

You have been warned not to repeat this. You have the fame for being the first to be banned from further comments and your recent comment after my last warning is deleted.</description>
		<content:encoded><![CDATA[<p>@Paul: I thought we have been through with this.</p>
<p>I&#8217;ve made several times my intentions with the quotes clear.</p>
<p>You have been warned not to repeat this. You have the fame for being the first to be banned from further comments and your recent comment after my last warning is deleted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Beckford</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224504</link>
		<dc:creator>Paul Beckford</dc:creator>
		<pubDate>Sun, 18 Jan 2009 15:55:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224504</guid>
		<description>[Removed by blog author]</description>
		<content:encoded><![CDATA[<p>[Removed by blog author]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: niv</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224403</link>
		<dc:creator>niv</dc:creator>
		<pubDate>Thu, 15 Jan 2009 17:15:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224403</guid>
		<description>I&#039;ve reading this exchange between Stephan&amp;Paul.
I think the issue here is mainly a misunderstanding, I think Paul here, from the first post, is trying to answer points that Stephan never raised.
That&#039;s why Stephan answered to Paul &quot;Nice observations, I don’t see how they are relevant to the post?&quot;. Because they aren&#039;t! I think Paul misread what Stephan tried to say because Stephan used the expression &quot;lie/myth&quot;. From the first post, Stephan answered unpolitely, then all went downhill.

Proposition A: &quot;Okay, pretty darn good units tests cover all type errors and more. Then, dynamic typing with good unit tests won&#039;t probably have a typing error (then again, if we consider Null pointers exceptions to be some kind of typing errors, then they&#039;re pretty common even in static typed languages like Java). Therefore dynamic typed languages are as safe a static typed languages&quot;.
Stephan says this is a bit of a lie, because most dynamic typed projects don&#039;t have pretty darn good unit tests. 
I&#039;m guessing this is truth, besides, this dude, Josh, says he has seen this.
But Stephan never argued that if you DO write pretty darn good unit tests you are within the &quot;lie&quot;. And this is what Paul is trying to argue against. 

Myself? I think Stephan is right, has said no false statements AFAIK, but he isn&#039;t saying too much. &quot;Yes if you do write good unit tests your ass is saved but if you don&#039;t then you don&#039;t&quot; doesn&#039;t say anything to me, it is an obvious statement. The fact that most developers don&#039;t test still doesn&#039;t say anything to me, THEY SHOULD do pretty darn good unit testing, and maybe with time it will become a more and more common practice.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve reading this exchange between Stephan&amp;Paul.<br />
I think the issue here is mainly a misunderstanding, I think Paul here, from the first post, is trying to answer points that Stephan never raised.<br />
That&#8217;s why Stephan answered to Paul &#8220;Nice observations, I don’t see how they are relevant to the post?&#8221;. Because they aren&#8217;t! I think Paul misread what Stephan tried to say because Stephan used the expression &#8220;lie/myth&#8221;. From the first post, Stephan answered unpolitely, then all went downhill.</p>
<p>Proposition A: &#8220;Okay, pretty darn good units tests cover all type errors and more. Then, dynamic typing with good unit tests won&#8217;t probably have a typing error (then again, if we consider Null pointers exceptions to be some kind of typing errors, then they&#8217;re pretty common even in static typed languages like Java). Therefore dynamic typed languages are as safe a static typed languages&#8221;.<br />
Stephan says this is a bit of a lie, because most dynamic typed projects don&#8217;t have pretty darn good unit tests.<br />
I&#8217;m guessing this is truth, besides, this dude, Josh, says he has seen this.<br />
But Stephan never argued that if you DO write pretty darn good unit tests you are within the &#8220;lie&#8221;. And this is what Paul is trying to argue against. </p>
<p>Myself? I think Stephan is right, has said no false statements AFAIK, but he isn&#8217;t saying too much. &#8220;Yes if you do write good unit tests your ass is saved but if you don&#8217;t then you don&#8217;t&#8221; doesn&#8217;t say anything to me, it is an obvious statement. The fact that most developers don&#8217;t test still doesn&#8217;t say anything to me, THEY SHOULD do pretty darn good unit testing, and maybe with time it will become a more and more common practice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Beckford</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224036</link>
		<dc:creator>Paul Beckford</dc:creator>
		<pubDate>Sat, 03 Jan 2009 01:24:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224036</guid>
		<description>Finished my post. I can&#039;t work out how to do a link back so here is a link:

http://pab-data.blogspot.com/2009/01/i-dont-know.html

Peace.

Paul.</description>
		<content:encoded><![CDATA[<p>Finished my post. I can&#8217;t work out how to do a link back so here is a link:</p>
<p><a href="http://pab-data.blogspot.com/2009/01/i-dont-know.html" rel="nofollow">http://pab-data.blogspot.com/2009/01/i-dont-know.html</a></p>
<p>Peace.</p>
<p>Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Beckford</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224035</link>
		<dc:creator>Paul Beckford</dc:creator>
		<pubDate>Fri, 02 Jan 2009 23:50:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224035</guid>
		<description>Hi Stephan,

&quot;2.) Developers in dynamic languages do (more) unit testing&quot;

Who is saying this? Have they done a survey? Do you have a link?

It amazes me just how difficult some programmers find it to say &quot;I don&#039;t know&quot;.

The psychology of it fascinates me. Otherwise intelligent people end up boxing themselves into stupid positions just because they can&#039;t admit that they don&#039;t understand, or perhaps someone else has a insight that perhaps they&#039;ve missed or maybe they have a bind spot.

Thanks for the discussion. I&#039;ve been meaning to blog about this phenomena for a while, and you&#039;ve kindly provided me with plenty of material :)

Kieth Braithwaite makes a similar point in an interview on InfoQ:

http://www.infoq.com/interviews/Agile-Skeptic-Keith-Braithwaite;jsessionid=FCE66C551EE2C3046F6952A81EC59E5F

He speaks about people who attempt to do Agile &quot;by the book&quot; without ever questioning whether they know what they are doing and whether things are actually working for them, leading to Agile as a &quot;one size fits all&quot; commodity.

I think it has to do with an organisational culture where you are penalised for admitting that you don&#039;t know. But if you can&#039;t admit you don&#039;t know, how can you ever learn? As a consequence whole organisations eschew learning and become stuck in a rut.

PS. Sorry if I caused offence. This was not my intention. If you read back what I have said once the emotion has subsided then you will see that I was genuinely trying to shed light on an often misunderstood topic.

Paul.</description>
		<content:encoded><![CDATA[<p>Hi Stephan,</p>
<p>&#8220;2.) Developers in dynamic languages do (more) unit testing&#8221;</p>
<p>Who is saying this? Have they done a survey? Do you have a link?</p>
<p>It amazes me just how difficult some programmers find it to say &#8220;I don&#8217;t know&#8221;.</p>
<p>The psychology of it fascinates me. Otherwise intelligent people end up boxing themselves into stupid positions just because they can&#8217;t admit that they don&#8217;t understand, or perhaps someone else has a insight that perhaps they&#8217;ve missed or maybe they have a bind spot.</p>
<p>Thanks for the discussion. I&#8217;ve been meaning to blog about this phenomena for a while, and you&#8217;ve kindly provided me with plenty of material :)</p>
<p>Kieth Braithwaite makes a similar point in an interview on InfoQ:</p>
<p><a href="http://www.infoq.com/interviews/Agile-Skeptic-Keith-Braithwaite;jsessionid=FCE66C551EE2C3046F6952A81EC59E5F" rel="nofollow">http://www.infoq.com/interviews/Agile-Skeptic-Keith-Braithwaite;jsessionid=FCE66C551EE2C3046F6952A81EC59E5F</a></p>
<p>He speaks about people who attempt to do Agile &#8220;by the book&#8221; without ever questioning whether they know what they are doing and whether things are actually working for them, leading to Agile as a &#8220;one size fits all&#8221; commodity.</p>
<p>I think it has to do with an organisational culture where you are penalised for admitting that you don&#8217;t know. But if you can&#8217;t admit you don&#8217;t know, how can you ever learn? As a consequence whole organisations eschew learning and become stuck in a rut.</p>
<p>PS. Sorry if I caused offence. This was not my intention. If you read back what I have said once the emotion has subsided then you will see that I was genuinely trying to shed light on an often misunderstood topic.</p>
<p>Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224030</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Fri, 02 Jan 2009 18:22:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224030</guid>
		<description>&quot;Just not Paul Beckford, Bruce Eckel, Bob Martin [...]&quot;

I looks a little bit too - self confident doesn&#039;t give the right impression .... - hmm, to place oneself between Eckel and Martin.

&quot;I won’t waste anymore of your time.&quot;

It seemed too good as a promise as to be true. How do you call your statement as a native speaker?</description>
		<content:encoded><![CDATA[<p>&#8220;Just not Paul Beckford, Bruce Eckel, Bob Martin [...]&#8221;</p>
<p>I looks a little bit too &#8211; self confident doesn&#8217;t give the right impression &#8230;. &#8211; hmm, to place oneself between Eckel and Martin.</p>
<p>&#8220;I won’t waste anymore of your time.&#8221;</p>
<p>It seemed too good as a promise as to be true. How do you call your statement as a native speaker?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Beckford</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224029</link>
		<dc:creator>Paul Beckford</dc:creator>
		<pubDate>Fri, 02 Jan 2009 18:04:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224029</guid>
		<description>&quot;Oh, don’t worry, I can learn from everyone. Mu&quot;

Just not Paul Beckford, Bruce Eckel, Bob Martin and... anyone else who so happens to hold a different point of view.

&quot;But you’re partially right, perhaps not from someone who doesn’t want to help, but who wants to be on top - even when he needs to resort to ad hominem attacks and twist other peoples arguments to achieve his goal.&quot;

Now who is implying motive? I was truly trying to help you sieve through what seem to me to be muddled thoughts.

I guess my help wasn&#039;t appreciated :)

Paul.</description>
		<content:encoded><![CDATA[<p>&#8220;Oh, don’t worry, I can learn from everyone. Mu&#8221;</p>
<p>Just not Paul Beckford, Bruce Eckel, Bob Martin and&#8230; anyone else who so happens to hold a different point of view.</p>
<p>&#8220;But you’re partially right, perhaps not from someone who doesn’t want to help, but who wants to be on top &#8211; even when he needs to resort to ad hominem attacks and twist other peoples arguments to achieve his goal.&#8221;</p>
<p>Now who is implying motive? I was truly trying to help you sieve through what seem to me to be muddled thoughts.</p>
<p>I guess my help wasn&#8217;t appreciated :)</p>
<p>Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224028</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Fri, 02 Jan 2009 17:49:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224028</guid>
		<description>Oh, don&#039;t worry, I can learn from everyone. Mu.

But you&#039;re partially right, perhaps not from someone who doesn&#039;t want to help, but who wants to be on top - even when he needs to resort to ad hominem attacks and twist other peoples arguments to achieve his goal.
</description>
		<content:encoded><![CDATA[<p>Oh, don&#8217;t worry, I can learn from everyone. Mu.</p>
<p>But you&#8217;re partially right, perhaps not from someone who doesn&#8217;t want to help, but who wants to be on top &#8211; even when he needs to resort to ad hominem attacks and twist other peoples arguments to achieve his goal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Beckford</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224027</link>
		<dc:creator>Paul Beckford</dc:creator>
		<pubDate>Fri, 02 Jan 2009 17:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224027</guid>
		<description>Whoops...

Looks like I&#039;ve hit a nerve :)

And you are right. There is nothing you can learn from me or anyone else, because you know it already :)

I won&#039;t waste anymore of your time.

Paul.</description>
		<content:encoded><![CDATA[<p>Whoops&#8230;</p>
<p>Looks like I&#8217;ve hit a nerve :)</p>
<p>And you are right. There is nothing you can learn from me or anyone else, because you know it already :)</p>
<p>I won&#8217;t waste anymore of your time.</p>
<p>Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224026</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Fri, 02 Jan 2009 16:52:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224026</guid>
		<description>&quot;If you start with the understanding that &quot;dynamic languages in themselves lead to bug free code&quot; then I agree this is a lie which is self evident from the fact that dynamic language projects have bugs too.&quot;

You&#039;re right, but I haven&#039;t said this, have I?

Funny how you try to educate me on TDD/BDD, unit testing, dynamic languages and agile. Or Smalltalk.

I have been a agile proponent and Scrum master for some years, have been writing software for around 26 years, have mentored developers, have done dozens of projects in dynamic languages during the 90s (Perl, Python, Tcl/Tk, Ruby, PHP), love a Lisp book from the 60s, wrote frameworks for dynamic languages, have been doing unit testing since Kent published his first XP book in the 90s and gave some speeches about unit testing and how to achieve 100% test coverage in nasty places like DAOs, databases, Swing, Emails and Exceptions. 

You&#039;re assuming lots of things about me, my knowledge and my attitude in your posts. You might be wrong. As far as I can see none of your comments talk about the things I&#039;ve written in my blog post.</description>
		<content:encoded><![CDATA[<p>&#8220;If you start with the understanding that &#8220;dynamic languages in themselves lead to bug free code&#8221; then I agree this is a lie which is self evident from the fact that dynamic language projects have bugs too.&#8221;</p>
<p>You&#8217;re right, but I haven&#8217;t said this, have I?</p>
<p>Funny how you try to educate me on TDD/BDD, unit testing, dynamic languages and agile. Or Smalltalk.</p>
<p>I have been a agile proponent and Scrum master for some years, have been writing software for around 26 years, have mentored developers, have done dozens of projects in dynamic languages during the 90s (Perl, Python, Tcl/Tk, Ruby, PHP), love a Lisp book from the 60s, wrote frameworks for dynamic languages, have been doing unit testing since Kent published his first XP book in the 90s and gave some speeches about unit testing and how to achieve 100% test coverage in nasty places like DAOs, databases, Swing, Emails and Exceptions. </p>
<p>You&#8217;re assuming lots of things about me, my knowledge and my attitude in your posts. You might be wrong. As far as I can see none of your comments talk about the things I&#8217;ve written in my blog post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Beckford</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224024</link>
		<dc:creator>Paul Beckford</dc:creator>
		<pubDate>Fri, 02 Jan 2009 16:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224024</guid>
		<description>OK. I think we are making progress of sorts :)

&quot;Sorry, not all of us can be native speakers, we wish we could,...&quot;

So you are willing to accept that perhaps you misunderstood what Bruce and Bob  were saying.

If you start with the understanding that &quot;dynamic languages in themselves lead to bug free code&quot; then I agree this is a lie which is self evident from the fact that dynamic language projects have bugs too.

But no one is saying this. What people are saying is that the real issue is producing defect free software and that there is more than one way to achieve this. 

One approach stems from the REPL (Read-Evaluate-Print-Loop) idea from Lisp. Were you gain quick feedback about the correctness of your code by running it often (I like to call this approach suck-it-and-see).

Suck-it-and-see is only effective if the time it takes to get feedback is short. So languages that require a long compile cycle aren&#039;t well suited to a REPL approach. Dynamic languages on the other hand provide the opportunity for fast feedback as Bruce Eckel rightly points out.

Fast feedback in itself isn&#039;t sufficient however, the feedback needs to point you to the defect. So with regards to type safety, a language which provides strong dynamic type safety will provide you with fast and accurate feedback about type errors at runtime.

TDD/BDD build on these ideas. In fact Kent Beck invented TDD in the context of a dynamic language: Smalltalk. With TDD you only write code once you have specified a failing test. You then run your code as part of your test suite to gaining instant feedback.

Now if you are good at TDD and are only writing code in response to a failing test then it is very difficult for your code to pass all your tests whilst containing type errors. Any type errors will be readily detected by the runtime.

This is what both Bob and Bruce mean when they say that static type error detection is redundant for them. Of course if you aren&#039;t skilled in this programming style and you don&#039;t write tests first, then you won&#039;t get the same results.

It comes down to the programmer and how adapt he or she is in using their chosen tool.

So talk of &quot;lies&quot;, is irrelevant. The real issue is understanding the skills needed to use dynamic languages effectively.

The same can be said for static languages too. Hence why most teams spend 60% of project time finding and removing bugs that could have been avoided if they had used TDD.

Paul.</description>
		<content:encoded><![CDATA[<p>OK. I think we are making progress of sorts :)</p>
<p>&#8220;Sorry, not all of us can be native speakers, we wish we could,&#8230;&#8221;</p>
<p>So you are willing to accept that perhaps you misunderstood what Bruce and Bob  were saying.</p>
<p>If you start with the understanding that &#8220;dynamic languages in themselves lead to bug free code&#8221; then I agree this is a lie which is self evident from the fact that dynamic language projects have bugs too.</p>
<p>But no one is saying this. What people are saying is that the real issue is producing defect free software and that there is more than one way to achieve this. </p>
<p>One approach stems from the REPL (Read-Evaluate-Print-Loop) idea from Lisp. Were you gain quick feedback about the correctness of your code by running it often (I like to call this approach suck-it-and-see).</p>
<p>Suck-it-and-see is only effective if the time it takes to get feedback is short. So languages that require a long compile cycle aren&#8217;t well suited to a REPL approach. Dynamic languages on the other hand provide the opportunity for fast feedback as Bruce Eckel rightly points out.</p>
<p>Fast feedback in itself isn&#8217;t sufficient however, the feedback needs to point you to the defect. So with regards to type safety, a language which provides strong dynamic type safety will provide you with fast and accurate feedback about type errors at runtime.</p>
<p>TDD/BDD build on these ideas. In fact Kent Beck invented TDD in the context of a dynamic language: Smalltalk. With TDD you only write code once you have specified a failing test. You then run your code as part of your test suite to gaining instant feedback.</p>
<p>Now if you are good at TDD and are only writing code in response to a failing test then it is very difficult for your code to pass all your tests whilst containing type errors. Any type errors will be readily detected by the runtime.</p>
<p>This is what both Bob and Bruce mean when they say that static type error detection is redundant for them. Of course if you aren&#8217;t skilled in this programming style and you don&#8217;t write tests first, then you won&#8217;t get the same results.</p>
<p>It comes down to the programmer and how adapt he or she is in using their chosen tool.</p>
<p>So talk of &#8220;lies&#8221;, is irrelevant. The real issue is understanding the skills needed to use dynamic languages effectively.</p>
<p>The same can be said for static languages too. Hence why most teams spend 60% of project time finding and removing bugs that could have been avoided if they had used TDD.</p>
<p>Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224022</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Fri, 02 Jan 2009 16:23:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224022</guid>
		<description>@Paul: Interesting to read your blog and the comments ;-)

&quot;[...] Linux (Linus Torvald) [...]&quot;

From my understanding Linus mostly wrote the Linux kernel not the system. Perhaps it would be best on your blog to be more precise.  

I&#039;ve also liked the comment

&quot;Paul, your ad-hominem remark is both unwelcome (as you no doubt intended) and incorrect, [...]&quot;

After more thinking your comment about my English made me cry.

Haven&#039;t we non native speakers listened to BBC podcasts all day? Haven&#039;t we watched Red Dwarf? Haven&#039;t we watched Fawlty Towers and laughed about the Germans? Haven&#039;t we watched every Flying Circus episode? Didn&#039;t we try as children to understand the bizarre nature of The Trap Door? Didn&#039;t we laugh at the First World War episodes of Black Adder?

And still, how wrong our understanding of the English language is. What tragedy!</description>
		<content:encoded><![CDATA[<p>@Paul: Interesting to read your blog and the comments ;-)</p>
<p>&#8220;[...] Linux (Linus Torvald) [...]&#8221;</p>
<p>From my understanding Linus mostly wrote the Linux kernel not the system. Perhaps it would be best on your blog to be more precise.  </p>
<p>I&#8217;ve also liked the comment</p>
<p>&#8220;Paul, your ad-hominem remark is both unwelcome (as you no doubt intended) and incorrect, [...]&#8221;</p>
<p>After more thinking your comment about my English made me cry.</p>
<p>Haven&#8217;t we non native speakers listened to BBC podcasts all day? Haven&#8217;t we watched Red Dwarf? Haven&#8217;t we watched Fawlty Towers and laughed about the Germans? Haven&#8217;t we watched every Flying Circus episode? Didn&#8217;t we try as children to understand the bizarre nature of The Trap Door? Didn&#8217;t we laugh at the First World War episodes of Black Adder?</p>
<p>And still, how wrong our understanding of the English language is. What tragedy!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224019</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Fri, 02 Jan 2009 15:26:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224019</guid>
		<description>&quot;Both Bruce and Bob were speaking about their programming styles.&quot;

Yes, and as I commented this is the base for the argument for dynamic languages. See my comment.

&quot;If you stopped and thinked about what I’m saying for a moment, you would realise that perhaps I am your friend.&quot;

Hard to imagine as you deliberately twist most of the things I write and imply I&#039;ve written things which I haven&#039;t.

&quot;If you choose to see my words as a personal attack then I think that points to your own insecurity.&quot;

Insecurity? After some self reflection - no, probably not.

Again:
&quot;Mud as an unfortunate habit of sticking, and when you decide to call fellow programmers liars you really need to build an iron clad case first.&quot;

You twist my words. I haven&#039;t called them liars. You deliberately suggest that I have.

To quote myself:
&lt;i&gt;&quot;1.) Unit testing prevents type bugs (see quotes)
2.) Developers in dynamic languages do (more) unit testing
3.) Therefor there are no type problems at runtime with dynamic languages&quot;&lt;/i&gt;

And you better stop telling people I called Bruce Eckel and Robert Martin liars, otherwise I will need to defend myself.

&lt;i&gt;&quot;The issue is understanding plain English.&quot;&lt;/i&gt;

Sorry, not all of us can be native speakers, we wish we could, but some of us are born to start with inferior languages - call yourself lucky to be born into the elite of native English speakers and keep helping us poor ones.

&lt;b&gt;Update&lt;/b&gt;: &quot;The issue isn’t research.&quot; If you&#039;ve read my comment, and not assumed things, you would have seen that my comment was not about research but the style of peer reviewed research papers.</description>
		<content:encoded><![CDATA[<p>&#8220;Both Bruce and Bob were speaking about their programming styles.&#8221;</p>
<p>Yes, and as I commented this is the base for the argument for dynamic languages. See my comment.</p>
<p>&#8220;If you stopped and thinked about what I’m saying for a moment, you would realise that perhaps I am your friend.&#8221;</p>
<p>Hard to imagine as you deliberately twist most of the things I write and imply I&#8217;ve written things which I haven&#8217;t.</p>
<p>&#8220;If you choose to see my words as a personal attack then I think that points to your own insecurity.&#8221;</p>
<p>Insecurity? After some self reflection &#8211; no, probably not.</p>
<p>Again:<br />
&#8220;Mud as an unfortunate habit of sticking, and when you decide to call fellow programmers liars you really need to build an iron clad case first.&#8221;</p>
<p>You twist my words. I haven&#8217;t called them liars. You deliberately suggest that I have.</p>
<p>To quote myself:<br />
<i>&#8220;1.) Unit testing prevents type bugs (see quotes)<br />
2.) Developers in dynamic languages do (more) unit testing<br />
3.) Therefor there are no type problems at runtime with dynamic languages&#8221;</i></p>
<p>And you better stop telling people I called Bruce Eckel and Robert Martin liars, otherwise I will need to defend myself.</p>
<p><i>&#8220;The issue is understanding plain English.&#8221;</i></p>
<p>Sorry, not all of us can be native speakers, we wish we could, but some of us are born to start with inferior languages &#8211; call yourself lucky to be born into the elite of native English speakers and keep helping us poor ones.</p>
<p><b>Update</b>: &#8220;The issue isn’t research.&#8221; If you&#8217;ve read my comment, and not assumed things, you would have seen that my comment was not about research but the style of peer reviewed research papers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Beckford</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224015</link>
		<dc:creator>Paul Beckford</dc:creator>
		<pubDate>Fri, 02 Jan 2009 12:53:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224015</guid>
		<description>Hi Stephan,

The issue isn&#039;t research. The issue is understanding plain English. Both Bruce and Bob were speaking about their programming styles.

&quot;I’m sure we’re not friends&quot;

If you stopped and thinked about what I&#039;m saying for a moment, you would realise that perhaps I am your friend. Only a friend would take the time to point out your blind spots:)

If you choose to see my words as a personal attack then I think that points to your own insecurity.

Hopefully your readers will view me as a friend for pointing out the flawed logic in your post.

Mud as an unfortunate habit of sticking, and when you decide to call fellow programmers liars you really need to build an iron clad case first.

You haven&#039;t.

Paul.</description>
		<content:encoded><![CDATA[<p>Hi Stephan,</p>
<p>The issue isn&#8217;t research. The issue is understanding plain English. Both Bruce and Bob were speaking about their programming styles.</p>
<p>&#8220;I’m sure we’re not friends&#8221;</p>
<p>If you stopped and thinked about what I&#8217;m saying for a moment, you would realise that perhaps I am your friend. Only a friend would take the time to point out your blind spots:)</p>
<p>If you choose to see my words as a personal attack then I think that points to your own insecurity.</p>
<p>Hopefully your readers will view me as a friend for pointing out the flawed logic in your post.</p>
<p>Mud as an unfortunate habit of sticking, and when you decide to call fellow programmers liars you really need to build an iron clad case first.</p>
<p>You haven&#8217;t.</p>
<p>Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224011</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Fri, 02 Jan 2009 07:45:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224011</guid>
		<description>The quotes were to my statement:

“We just do more unit testing to prevent type errors” meme is quite prevalent in the blogosphere.&quot; 

and form the basis of the type testing and dynamic language arguments.

I did not imply that they have lied. The lie is that there is no problem with dynamic typing because developers do unit tests:

1.) Unit testing prevents type bugs (see quotes)

2.) Developers in dynamic languages do (more) unit testing

3.) Therefor there are no type problems at runtime with dynamic languages

As quoted in the post, the argument breaks down because 2 is a lie (as in &quot;not the truth&quot;), developers don&#039;t do more tests in dynamic languages according to the cited post.

Your quite notorious at twisting what I&#039;ve said.

&quot;Muddled thinking my friend :)&quot;

I&#039;m sure we&#039;re not friends.

&lt;b&gt;Update&lt;/b&gt;:As you accuse me of muddled and vague ideas, I would love to see more research papers on this topic. As I&#039;m no longer in research I don&#039;t have the time to write those kind of peer reviewed papers anymore. This blog posts are not scientific, peer reviewed research papers. Thanks for understanding the difference.</description>
		<content:encoded><![CDATA[<p>The quotes were to my statement:</p>
<p>“We just do more unit testing to prevent type errors” meme is quite prevalent in the blogosphere.&#8221; </p>
<p>and form the basis of the type testing and dynamic language arguments.</p>
<p>I did not imply that they have lied. The lie is that there is no problem with dynamic typing because developers do unit tests:</p>
<p>1.) Unit testing prevents type bugs (see quotes)</p>
<p>2.) Developers in dynamic languages do (more) unit testing</p>
<p>3.) Therefor there are no type problems at runtime with dynamic languages</p>
<p>As quoted in the post, the argument breaks down because 2 is a lie (as in &#8220;not the truth&#8221;), developers don&#8217;t do more tests in dynamic languages according to the cited post.</p>
<p>Your quite notorious at twisting what I&#8217;ve said.</p>
<p>&#8220;Muddled thinking my friend :)&#8221;</p>
<p>I&#8217;m sure we&#8217;re not friends.</p>
<p><b>Update</b>:As you accuse me of muddled and vague ideas, I would love to see more research papers on this topic. As I&#8217;m no longer in research I don&#8217;t have the time to write those kind of peer reviewed papers anymore. This blog posts are not scientific, peer reviewed research papers. Thanks for understanding the difference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Beckford</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224010</link>
		<dc:creator>Paul Beckford</dc:creator>
		<pubDate>Fri, 02 Jan 2009 07:22:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224010</guid>
		<description>Hi Stephan,

You lack precision in your argument.

You said:

” The myth/lie I’ve meant is that there is no difference between dynamic languages and static languages concerning type bugs because developers write unit tests - even considered better than static typing - to cover type checks. ”

None of your quotes say that &quot;there is no difference between dynamic languages and static languages concerning type bugs&quot;

What Bruce Eckel and Bob Martin are saying are that they (as programmers) get feedback on the correctness of their code by running the code through tests.

This feedback means that they no longer rely on the feedback that they get from a static type checking compiler. Making the type checks performed by the compiler, redundant for them.

This is a statement about &lt;i&gt;their&lt;/i&gt; programming style.

Calling them liars and using the programming practices of &quot;others&quot; as proof makes no sense.

Muddled thinking my friend :)

&quot;but I’m tired of a discussion about points I didn’t make.&quot;

I can tell. You seem to have a difficulty listening to the voices of others. Hence your total misrepresentation of what both Bruce Eckel and Bob Martin actually said. 

I&#039;ll leave you to your soap box.

Paul.</description>
		<content:encoded><![CDATA[<p>Hi Stephan,</p>
<p>You lack precision in your argument.</p>
<p>You said:</p>
<p>” The myth/lie I’ve meant is that there is no difference between dynamic languages and static languages concerning type bugs because developers write unit tests &#8211; even considered better than static typing &#8211; to cover type checks. ”</p>
<p>None of your quotes say that &#8220;there is no difference between dynamic languages and static languages concerning type bugs&#8221;</p>
<p>What Bruce Eckel and Bob Martin are saying are that they (as programmers) get feedback on the correctness of their code by running the code through tests.</p>
<p>This feedback means that they no longer rely on the feedback that they get from a static type checking compiler. Making the type checks performed by the compiler, redundant for them.</p>
<p>This is a statement about <i>their</i> programming style.</p>
<p>Calling them liars and using the programming practices of &#8220;others&#8221; as proof makes no sense.</p>
<p>Muddled thinking my friend :)</p>
<p>&#8220;but I’m tired of a discussion about points I didn’t make.&#8221;</p>
<p>I can tell. You seem to have a difficulty listening to the voices of others. Hence your total misrepresentation of what both Bruce Eckel and Bob Martin actually said. </p>
<p>I&#8217;ll leave you to your soap box.</p>
<p>Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-224009</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Fri, 02 Jan 2009 06:53:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-224009</guid>
		<description>Hi Paul,

sorry I didn&#039;t know that you don&#039;t know the topic. The &quot;We just do more unit testing to prevent type errors&quot; meme is quite prevalent in the blogosphere.

Bruce Eckel
&quot; In a dynamic language you have the flexibility to do rapid experimentation which is highly productive, but to ensure that your code is airtight you must be both proficient and diligent at unit testing. &quot;

Robert Martin
&quot;About two years ago I noticed something. I was depending less and less on the type system for safety. My unit tests were preventing me from making type errors. The more I depended upon the unit tests, the less I depended upon the type safety of Java or C++ (my languages of choice).&quot;

etc.

&quot;I am not aware of anyone propagating this lie.&quot;

http://letmegooglethatforyou.com/

&quot;The problem I think you are facing is that you have started with the premise that “you are right” (about something), and then you fish around for supporting evidence.&quot;

No, quite to the contrary. I&#039;ve read a blog post from someone who has fixed lots of Rails code and from there deduced that developers don&#039;t do more unit tests in dynamic languages than static languages (which they needed to do to find bugs which the compiler usually finds). Have you read my post? 

I don&#039;t know why you resort to straw man attacks again

&quot;Even the most ardent advocates of static type checking would agree that a static compiler will not write clean code for you, [...]&quot;

but I&#039;m tired of a discussion about points I didn&#039;t make.</description>
		<content:encoded><![CDATA[<p>Hi Paul,</p>
<p>sorry I didn&#8217;t know that you don&#8217;t know the topic. The &#8220;We just do more unit testing to prevent type errors&#8221; meme is quite prevalent in the blogosphere.</p>
<p>Bruce Eckel<br />
&#8221; In a dynamic language you have the flexibility to do rapid experimentation which is highly productive, but to ensure that your code is airtight you must be both proficient and diligent at unit testing. &#8221;</p>
<p>Robert Martin<br />
&#8220;About two years ago I noticed something. I was depending less and less on the type system for safety. My unit tests were preventing me from making type errors. The more I depended upon the unit tests, the less I depended upon the type safety of Java or C++ (my languages of choice).&#8221;</p>
<p>etc.</p>
<p>&#8220;I am not aware of anyone propagating this lie.&#8221;</p>
<p><a href="http://letmegooglethatforyou.com/" rel="nofollow">http://letmegooglethatforyou.com/</a></p>
<p>&#8220;The problem I think you are facing is that you have started with the premise that “you are right” (about something), and then you fish around for supporting evidence.&#8221;</p>
<p>No, quite to the contrary. I&#8217;ve read a blog post from someone who has fixed lots of Rails code and from there deduced that developers don&#8217;t do more unit tests in dynamic languages than static languages (which they needed to do to find bugs which the compiler usually finds). Have you read my post? </p>
<p>I don&#8217;t know why you resort to straw man attacks again</p>
<p>&#8220;Even the most ardent advocates of static type checking would agree that a static compiler will not write clean code for you, [...]&#8221;</p>
<p>but I&#8217;m tired of a discussion about points I didn&#8217;t make.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Beckford</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-223998</link>
		<dc:creator>Paul Beckford</dc:creator>
		<pubDate>Thu, 01 Jan 2009 22:07:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-223998</guid>
		<description>Hi Stephan,

Its kind of difficult to pin you down. Now lets start with the title: &quot;The unit testing lie aka dynamic typing testing lie&quot;. Which lie? whose lying?  Can you provide a link?

The you go on to say:

&quot; The myth/lie I’ve meant is that there is no difference between dynamic languages and static languages concerning type bugs because developers write unit tests - even considered better than static typing - to cover type checks. &quot;

I am not aware of anyone propagating this lie. I agree, a compiler can help to detect type errors without the need to run your code. So you can detect type errors with a static type check without tests. This says nothing though about whether your code is bug free and will actually  &#039;work&#039; as expected at runtime.

You then go one to quote poor programming practice with rails as some how supporting your argument. What ever your argument is!

Given the vagaries of your post, I decided to rewind the clock and get back to first principles, hence my references to Fred Brooks. Even the most ardent advocates of static type checking would agree that a static compiler will not write clean code for you, rendering your references to poor rails practice as irrelevant. A ball of mud is still a ball of mud in any language.

The problem I think you are facing is that you have started with the premise that &quot;you are right&quot; (about something), and then you fish around for supporting evidence.

I would understand if you said that I write poorer quality code with a dynamic language as compared to a static one. This is common for a lot of people, since dynamic languages require a different programming style and a different skill set.

Your blanket statement about &quot;lies&quot;, doesn&#039;t allow for the fact that some programmers are both more productive and produce higher quality code using dynamic languages as compared to a static language.

Instead you choose to label these programmers as liars :)

Hence my second reference to Fred Brooks. We tend to get overly attached to our favorite tools and forget that good people are far more important. I have been programming with languages with varying degrees of static type checking for over twenty years now, and for most of that time the programs I worked on were riddled with runtime bugs.   So static analysis is  &quot;No Silver Bullet&quot;.

(Incidentally the static language programs I have worked on that were largely bug free all had an extensive unit test suite, and were written test first by competent programmers).

Paul.</description>
		<content:encoded><![CDATA[<p>Hi Stephan,</p>
<p>Its kind of difficult to pin you down. Now lets start with the title: &#8220;The unit testing lie aka dynamic typing testing lie&#8221;. Which lie? whose lying?  Can you provide a link?</p>
<p>The you go on to say:</p>
<p>&#8221; The myth/lie I’ve meant is that there is no difference between dynamic languages and static languages concerning type bugs because developers write unit tests &#8211; even considered better than static typing &#8211; to cover type checks. &#8221;</p>
<p>I am not aware of anyone propagating this lie. I agree, a compiler can help to detect type errors without the need to run your code. So you can detect type errors with a static type check without tests. This says nothing though about whether your code is bug free and will actually  &#8216;work&#8217; as expected at runtime.</p>
<p>You then go one to quote poor programming practice with rails as some how supporting your argument. What ever your argument is!</p>
<p>Given the vagaries of your post, I decided to rewind the clock and get back to first principles, hence my references to Fred Brooks. Even the most ardent advocates of static type checking would agree that a static compiler will not write clean code for you, rendering your references to poor rails practice as irrelevant. A ball of mud is still a ball of mud in any language.</p>
<p>The problem I think you are facing is that you have started with the premise that &#8220;you are right&#8221; (about something), and then you fish around for supporting evidence.</p>
<p>I would understand if you said that I write poorer quality code with a dynamic language as compared to a static one. This is common for a lot of people, since dynamic languages require a different programming style and a different skill set.</p>
<p>Your blanket statement about &#8220;lies&#8221;, doesn&#8217;t allow for the fact that some programmers are both more productive and produce higher quality code using dynamic languages as compared to a static language.</p>
<p>Instead you choose to label these programmers as liars :)</p>
<p>Hence my second reference to Fred Brooks. We tend to get overly attached to our favorite tools and forget that good people are far more important. I have been programming with languages with varying degrees of static type checking for over twenty years now, and for most of that time the programs I worked on were riddled with runtime bugs.   So static analysis is  &#8220;No Silver Bullet&#8221;.</p>
<p>(Incidentally the static language programs I have worked on that were largely bug free all had an extensive unit test suite, and were written test first by competent programmers).</p>
<p>Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-223993</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Thu, 01 Jan 2009 20:43:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-223993</guid>
		<description>@Paul: Nice observations, I don&#039;t see how they are relevant to the post?

Especially

&quot;Some observatons. All the points you raise are equally applicable to static languages too. I’ve yet to come across a project that lacked tests yet the code quality was some how preserved by the presence of static type checks.&quot;

looks like false logic in context of my post. I don&#039;t see my post talking about code quality in general.

&quot;No silver bullet (Fred Brooks again).&quot;

I&#039;m not sure why everyone cites Fred Brooks on my blog, I have never sold silver bullets here. On the contrary.
It goes against the silver bullet of dynamic typing: unit testing.

&quot;When discussing dynamic vs. static languages, the arguments for not needing static type checks are based on more unit tests.&quot;

Could you explain how my post is advocating silver bullets?

Otherwise I consider your whole post a strawman attack.

Thanks for your observations though.</description>
		<content:encoded><![CDATA[<p>@Paul: Nice observations, I don&#8217;t see how they are relevant to the post?</p>
<p>Especially</p>
<p>&#8220;Some observatons. All the points you raise are equally applicable to static languages too. I’ve yet to come across a project that lacked tests yet the code quality was some how preserved by the presence of static type checks.&#8221;</p>
<p>looks like false logic in context of my post. I don&#8217;t see my post talking about code quality in general.</p>
<p>&#8220;No silver bullet (Fred Brooks again).&#8221;</p>
<p>I&#8217;m not sure why everyone cites Fred Brooks on my blog, I have never sold silver bullets here. On the contrary.<br />
It goes against the silver bullet of dynamic typing: unit testing.</p>
<p>&#8220;When discussing dynamic vs. static languages, the arguments for not needing static type checks are based on more unit tests.&#8221;</p>
<p>Could you explain how my post is advocating silver bullets?</p>
<p>Otherwise I consider your whole post a strawman attack.</p>
<p>Thanks for your observations though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Beckford</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-223991</link>
		<dc:creator>Paul Beckford</dc:creator>
		<pubDate>Thu, 01 Jan 2009 18:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-223991</guid>
		<description>Hi Stephan,

Some observatons. All the points you raise are equally applicable to static languages too. I&#039;ve yet to come across a project that lacked tests yet the code quality was some how preserved by the presence of static type checks.

Writing tests after the code is difficult and time consuming and like you say often gets dropped or is incomplete due to time pressures.

Writing tests before writing the code is a different thing entirely. Here testing is an intrinsic programming step. Tests are interface specifications, or better still &quot;behaviour specifications&quot;. Making the testing language redundant, and allowing the programmer to know when his code works (when the design spec is met), and allowing him to clean up his code knowing that he hasn&#039;t broken anything.

If you do not specify what your code is meant to do in an executable specification, then you don&#039;t know whether the code works and meets your intent. You don&#039;t know when you&#039;re done.


If you do not specify what your code is meant to do in an executable specification, then you don&#039;t know whether a refactor will break your code or not. You cannot clean up your code with safety.

Without refactoring and cleaning up your code, and without a way to verify your design, a team can quickly end up with a code base that resembles a big ball of mud (Fred Brooks).

Facing a ball of mud, I would rather it was written in a static language then a dynamic one. At least then my compiler provides me with a minimal executable specification, based on types.

Having said this, I would rather not work with a ball of mud. So the real issue is how do you keep your code clean in the first place. Compilers don&#039;t generate clean code, so In my eperience static types don&#039;t help to keep code clean. They just make unclean code more tolerable.

Clean maintanble code comes down to programmers. No silver bullet (Fred Brooks again).

Paul.</description>
		<content:encoded><![CDATA[<p>Hi Stephan,</p>
<p>Some observatons. All the points you raise are equally applicable to static languages too. I&#8217;ve yet to come across a project that lacked tests yet the code quality was some how preserved by the presence of static type checks.</p>
<p>Writing tests after the code is difficult and time consuming and like you say often gets dropped or is incomplete due to time pressures.</p>
<p>Writing tests before writing the code is a different thing entirely. Here testing is an intrinsic programming step. Tests are interface specifications, or better still &#8220;behaviour specifications&#8221;. Making the testing language redundant, and allowing the programmer to know when his code works (when the design spec is met), and allowing him to clean up his code knowing that he hasn&#8217;t broken anything.</p>
<p>If you do not specify what your code is meant to do in an executable specification, then you don&#8217;t know whether the code works and meets your intent. You don&#8217;t know when you&#8217;re done.</p>
<p>If you do not specify what your code is meant to do in an executable specification, then you don&#8217;t know whether a refactor will break your code or not. You cannot clean up your code with safety.</p>
<p>Without refactoring and cleaning up your code, and without a way to verify your design, a team can quickly end up with a code base that resembles a big ball of mud (Fred Brooks).</p>
<p>Facing a ball of mud, I would rather it was written in a static language then a dynamic one. At least then my compiler provides me with a minimal executable specification, based on types.</p>
<p>Having said this, I would rather not work with a ball of mud. So the real issue is how do you keep your code clean in the first place. Compilers don&#8217;t generate clean code, so In my eperience static types don&#8217;t help to keep code clean. They just make unclean code more tolerable.</p>
<p>Clean maintanble code comes down to programmers. No silver bullet (Fred Brooks again).</p>
<p>Paul.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-215845</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Tue, 16 Dec 2008 12:46:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-215845</guid>
		<description>@Craig: When you have 100% test coverage (tested in path coverage, see Cobertura / Clover), then you should have tested all paths, not only the &quot;happy path&quot; (McCabe is a good coarse measure). Did I misunderstand path coverage / CC?

&quot;[...] coverage is not a good measure of test quality.&quot;

No it&#039;s not, it&#039;s a measure about test density. I didn&#039;t want to imply that it&#039;s a metric for test quality. And after reading the post again, I don&#039;t think I have.</description>
		<content:encoded><![CDATA[<p>@Craig: When you have 100% test coverage (tested in path coverage, see Cobertura / Clover), then you should have tested all paths, not only the &#8220;happy path&#8221; (McCabe is a good coarse measure). Did I misunderstand path coverage / CC?</p>
<p>&#8220;[...] coverage is not a good measure of test quality.&#8221;</p>
<p>No it&#8217;s not, it&#8217;s a measure about test density. I didn&#8217;t want to imply that it&#8217;s a metric for test quality. And after reading the post again, I don&#8217;t think I have.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-215827</link>
		<dc:creator>Craig</dc:creator>
		<pubDate>Tue, 16 Dec 2008 11:55:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-215827</guid>
		<description>Even when tests coverage is 100%, most tests only exercise the happy path. FWIW, coverage is not a good measure of test quality.</description>
		<content:encoded><![CDATA[<p>Even when tests coverage is 100%, most tests only exercise the happy path. FWIW, coverage is not a good measure of test quality.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-215350</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Mon, 15 Dec 2008 15:29:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-215350</guid>
		<description>@blaxter: Thought so too, very useful post (from an often overlooked maintenance point).</description>
		<content:encoded><![CDATA[<p>@blaxter: Thought so too, very useful post (from an often overlooked maintenance point).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: blaxter</title>
		<link>http://codemonkeyism.com/the-unit-testing-lie-aka-dynamic-language-lie/comment-page-1/#comment-215321</link>
		<dc:creator>blaxter</dc:creator>
		<pubDate>Mon, 15 Dec 2008 13:53:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeyism.com/?p=416#comment-215321</guid>
		<description>so say we all!

ps: thx for the &quot;rails worst practice&quot; link, very useful post.</description>
		<content:encoded><![CDATA[<p>so say we all!</p>
<p>ps: thx for the &#8220;rails worst practice&#8221; link, very useful post.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
