<?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 and static typing with unit tests.</title>
	<atom:link href="http://pieceofpy.com/2009/04/20/dynamic-and-static-typing-with-unit-tests/feed/" rel="self" type="application/rss+xml" />
	<link>http://pieceofpy.com/2009/04/20/dynamic-and-static-typing-with-unit-tests/</link>
	<description>Another python blog with a love for agile methods.</description>
	<lastBuildDate>Mon, 17 May 2010 19:03:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jon-Pierre Gentil</title>
		<link>http://pieceofpy.com/2009/04/20/dynamic-and-static-typing-with-unit-tests/comment-page-1/#comment-233</link>
		<dc:creator>Jon-Pierre Gentil</dc:creator>
		<pubDate>Mon, 20 Apr 2009 22:37:26 +0000</pubDate>
		<guid isPermaLink="false">http://pieceofpy.com/?p=296#comment-233</guid>
		<description>The last time I had one of those debates, it was over &quot;how fast it is.&quot;  A very arrogant co-worker had pretty much said that Python and every other dynamic language was flawed because of it&#039;s lack of compiled state.  (He used this argument against Java too.)  At one point in the project we had to write a small utility to do some maintenance work on a few specialized databases we had created and we took up a challenge:  I would write it in Python, and he would write it in C, and we would compare.  We were pretty even as far as skill levels in our language of choice, so I felt it was a good challenge.  The manager approved, and sent us on our way.  Three days later, I had completed it, and turned it in.  Seven days after that, said co-worker turned his version in.  The manager called us both in and said &quot;Clearly Jon-Pierre&#039;s was faster, though it runs 7.3 seconds slower, on average, over the course of a 30 minute maintenance window.  But he saved me 7 man days of work to do it.  Try to keep pace, Bryan.&quot;

The co-worker stormed out of the room and never really spoke to me again.

Scala is a cool language, and it gives C/C++ (and of course Java) programmers that cozy feeling of curly braces.</description>
		<content:encoded><![CDATA[<p>The last time I had one of those debates, it was over &#8220;how fast it is.&#8221;  A very arrogant co-worker had pretty much said that Python and every other dynamic language was flawed because of it&#8217;s lack of compiled state.  (He used this argument against Java too.)  At one point in the project we had to write a small utility to do some maintenance work on a few specialized databases we had created and we took up a challenge:  I would write it in Python, and he would write it in C, and we would compare.  We were pretty even as far as skill levels in our language of choice, so I felt it was a good challenge.  The manager approved, and sent us on our way.  Three days later, I had completed it, and turned it in.  Seven days after that, said co-worker turned his version in.  The manager called us both in and said &#8220;Clearly Jon-Pierre&#8217;s was faster, though it runs 7.3 seconds slower, on average, over the course of a 30 minute maintenance window.  But he saved me 7 man days of work to do it.  Try to keep pace, Bryan.&#8221;</p>
<p>The co-worker stormed out of the room and never really spoke to me again.</p>
<p>Scala is a cool language, and it gives C/C++ (and of course Java) programmers that cozy feeling of curly braces.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wayne</title>
		<link>http://pieceofpy.com/2009/04/20/dynamic-and-static-typing-with-unit-tests/comment-page-1/#comment-231</link>
		<dc:creator>Wayne</dc:creator>
		<pubDate>Mon, 20 Apr 2009 20:18:57 +0000</pubDate>
		<guid isPermaLink="false">http://pieceofpy.com/?p=296#comment-231</guid>
		<description>Some history, this debate has been going on since I started with this company a little over a year ago. Each time we rehash this topic I find him conceding more and more of the voodoo myths he holds in his head about dynamically typed languages. This was just the latest one. Mind you my goal isn&#039;t to make him a convert to any language. Mostly I just don&#039;t like seeing people blindly following an idea due to bad information or misconceptions.

I also sent him over to Michael Foord&#039;s recent post about dynamic languages.
http://www.voidspace.org.uk/python/weblog/arch_d7_2009_04_18.shtml#e1081

@Paddy
Minus the tests, the Python version was roughly 80 lines and the C++ version was roughly 110 lines. Not a huge difference in total line count. The testing code in C++ was a little large just due to the CUTE boiler plate stuff. No, he isn&#039;t 100% convinced, but he is slowly coming around.

@Bradon and nes
Yeah, I agree. We actually had a good talk again today after I told him about my weekend experiments. PyFlakes came up in the discussion and I think he is starting to see that blindly ruling out languages just because they are dynamic is in poor form. He recently picked up learning Scala which seems to have given him a greater appreciation for other languages.</description>
		<content:encoded><![CDATA[<p>Some history, this debate has been going on since I started with this company a little over a year ago. Each time we rehash this topic I find him conceding more and more of the voodoo myths he holds in his head about dynamically typed languages. This was just the latest one. Mind you my goal isn&#8217;t to make him a convert to any language. Mostly I just don&#8217;t like seeing people blindly following an idea due to bad information or misconceptions.</p>
<p>I also sent him over to Michael Foord&#8217;s recent post about dynamic languages.<br />
<a href="http://www.voidspace.org.uk/python/weblog/arch_d7_2009_04_18.shtml#e1081" rel="nofollow">http://www.voidspace.org.uk/python/weblog/arch_d7_2009_04_18.shtml#e1081</a></p>
<p>@Paddy<br />
Minus the tests, the Python version was roughly 80 lines and the C++ version was roughly 110 lines. Not a huge difference in total line count. The testing code in C++ was a little large just due to the CUTE boiler plate stuff. No, he isn&#8217;t 100% convinced, but he is slowly coming around.</p>
<p>@Bradon and nes<br />
Yeah, I agree. We actually had a good talk again today after I told him about my weekend experiments. PyFlakes came up in the discussion and I think he is starting to see that blindly ruling out languages just because they are dynamic is in poor form. He recently picked up learning Scala which seems to have given him a greater appreciation for other languages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nes</title>
		<link>http://pieceofpy.com/2009/04/20/dynamic-and-static-typing-with-unit-tests/comment-page-1/#comment-230</link>
		<dc:creator>nes</dc:creator>
		<pubDate>Mon, 20 Apr 2009 19:48:20 +0000</pubDate>
		<guid isPermaLink="false">http://pieceofpy.com/?p=296#comment-230</guid>
		<description>Maybe to give you an idea what to experiment with. In may case I had a flag &quot;verified=false&quot; by default that was getting set &quot;verifed=true&quot; when I had checked for certain conditions. My data was obviously never marked as verified, and I spent too much time trying to see if the conditions I choose for the verification itself where somehow wrong.</description>
		<content:encoded><![CDATA[<p>Maybe to give you an idea what to experiment with. In may case I had a flag &#8220;verified=false&#8221; by default that was getting set &#8220;verifed=true&#8221; when I had checked for certain conditions. My data was obviously never marked as verified, and I spent too much time trying to see if the conditions I choose for the verification itself where somehow wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nes</title>
		<link>http://pieceofpy.com/2009/04/20/dynamic-and-static-typing-with-unit-tests/comment-page-1/#comment-229</link>
		<dc:creator>nes</dc:creator>
		<pubDate>Mon, 20 Apr 2009 19:40:36 +0000</pubDate>
		<guid isPermaLink="false">http://pieceofpy.com/?p=296#comment-229</guid>
		<description>You should give him pyflakes, pychecker, or pylint. I had some hard to track bug in Javascript+IE6 years ago because of a typo, but I blame it on the environment. I never had much problem finding out such problems quickly in Python I am not quite sure why. Maybe because there are better tools or it is easier to test things.</description>
		<content:encoded><![CDATA[<p>You should give him pyflakes, pychecker, or pylint. I had some hard to track bug in Javascript+IE6 years ago because of a typo, but I blame it on the environment. I never had much problem finding out such problems quickly in Python I am not quite sure why. Maybe because there are better tools or it is easier to test things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Craig Rhodes</title>
		<link>http://pieceofpy.com/2009/04/20/dynamic-and-static-typing-with-unit-tests/comment-page-1/#comment-228</link>
		<dc:creator>Brandon Craig Rhodes</dc:creator>
		<pubDate>Mon, 20 Apr 2009 14:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://pieceofpy.com/?p=296#comment-228</guid>
		<description>By using PyFlakes, a lint-like program for Python, as his &quot;compile step&quot;, your team member can have all the advantages of a normal compiler: not only will PyFlakes signal any syntax errors without having to run his code, but it will also flag mis-spelled variable names, remind him about missing &quot;import&quot; statements, and even signal when he&#039;s left an &quot;import&quot; in that&#039;s no longer needed.

In fact, you should tell your team member that if he&#039;s waiting for compile-time to detect mistakes and typos, then he&#039;s waiting far too *late* in the process and wasting his time: he needs them flagged as he types them, not a minute later, when he will have to go back to the line and remember what he was trying to say.  I have Emacs run PyFlakes every few seconds using its &quot;Flymake&quot; mode and so I find out instantly if I&#039;ve typed something nonsensical, saving a huge amount of time.

So: affirm that your team member is entirely correct that syntax and other errors should get caught immediately; but tell him that he himself is wasting time if he&#039;s waiting until a separate compile step to find out that he&#039;s mismatched braces or named an non-existent variable; and tell him that, whether he&#039;s writing Java or Python or C, standard tools exist that should hook into his editor to flag simple errors as he&#039;s typing so that he corrects them immediately before he goes any further.  Whether he&#039;s using Emacs, Vim, or TextMate, a correctly-configured editor will provide exactly what he&#039;s looking for regardless of whether the language is dynamic or not; he needs to figure out that the dynamicness of the language is not even the issue.</description>
		<content:encoded><![CDATA[<p>By using PyFlakes, a lint-like program for Python, as his &#8220;compile step&#8221;, your team member can have all the advantages of a normal compiler: not only will PyFlakes signal any syntax errors without having to run his code, but it will also flag mis-spelled variable names, remind him about missing &#8220;import&#8221; statements, and even signal when he&#8217;s left an &#8220;import&#8221; in that&#8217;s no longer needed.</p>
<p>In fact, you should tell your team member that if he&#8217;s waiting for compile-time to detect mistakes and typos, then he&#8217;s waiting far too *late* in the process and wasting his time: he needs them flagged as he types them, not a minute later, when he will have to go back to the line and remember what he was trying to say.  I have Emacs run PyFlakes every few seconds using its &#8220;Flymake&#8221; mode and so I find out instantly if I&#8217;ve typed something nonsensical, saving a huge amount of time.</p>
<p>So: affirm that your team member is entirely correct that syntax and other errors should get caught immediately; but tell him that he himself is wasting time if he&#8217;s waiting until a separate compile step to find out that he&#8217;s mismatched braces or named an non-existent variable; and tell him that, whether he&#8217;s writing Java or Python or C, standard tools exist that should hook into his editor to flag simple errors as he&#8217;s typing so that he corrects them immediately before he goes any further.  Whether he&#8217;s using Emacs, Vim, or TextMate, a correctly-configured editor will provide exactly what he&#8217;s looking for regardless of whether the language is dynamic or not; he needs to figure out that the dynamicness of the language is not even the issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paddy3118</title>
		<link>http://pieceofpy.com/2009/04/20/dynamic-and-static-typing-with-unit-tests/comment-page-1/#comment-227</link>
		<dc:creator>Paddy3118</dc:creator>
		<pubDate>Mon, 20 Apr 2009 12:40:12 +0000</pubDate>
		<guid isPermaLink="false">http://pieceofpy.com/?p=296#comment-227</guid>
		<description>What were the line counts? Python vs C++ ? 
Some have stated that errors/line-count is constant.

Is your co-worker convinced?

- Paddy.</description>
		<content:encoded><![CDATA[<p>What were the line counts? Python vs C++ ?<br />
Some have stated that errors/line-count is constant.</p>
<p>Is your co-worker convinced?</p>
<p>- Paddy.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
