<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-8696186.post5904795609663683261..comments</id><updated>2011-11-29T19:40:29.425-04:00</updated><category term='code style'/><category term='python swig c threads'/><category term='visual studio assemblies 2008 manifest debug mfc c++ runtime'/><category term='programming'/><title type='text'>Comments on SandyWalsh.com: The Pain of Unit Tests and Dynamically Typed Langu...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.sandywalsh.com/feeds/5904795609663683261/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default'/><link rel='alternate' type='text/html' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html'/><author><name>@TheSandyWalsh</name><uri>http://www.blogger.com/profile/17478332939768000715</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_Al595rN4OWo/S5o-MXFWibI/AAAAAAAAAFk/TKOxZTZ7w4A/S220/me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8696186.post-7343859764211912319</id><published>2011-11-29T16:17:55.485-04:00</published><updated>2011-11-29T16:17:55.485-04:00</updated><title type='text'>This is a good point Sandy. It&amp;#39;s also a proble...</title><content type='html'>This is a good point Sandy. It&amp;#39;s also a problem when you are doing funky RPC casts that are no longer sending the correct type of data the end function is expecting (ran into this today in OpenStack).&lt;br /&gt;&lt;br /&gt;Another supporting point for static type-checking is that programmers are lazy and don&amp;#39;t always go out of their way to inspect for everything that is calling a function. If someone is reviewing code, it&amp;#39;s hard to go behind everyone and make sure they do this.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/7343859764211912319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/7343859764211912319'/><link rel='alternate' type='text/html' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html?showComment=1322597875485#c7343859764211912319' title=''/><author><name>Alex Meade</name><uri>http://www.blogger.com/profile/15168754690884554137</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html' ref='tag:blogger.com,1999:blog-8696186.post-5904795609663683261' source='http://www.blogger.com/feeds/8696186/posts/default/5904795609663683261' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1325112385'/></entry><entry><id>tag:blogger.com,1999:blog-8696186.post-8635501284983751599</id><published>2011-09-30T11:42:53.236-03:00</published><updated>2011-09-30T11:42:53.236-03:00</updated><title type='text'>@ryan, I agree, but I think you&amp;#39;re missing the...</title><content type='html'>@ryan, I agree, but I think you&amp;#39;re missing the point of my post.&lt;br /&gt;&lt;br /&gt;Testing the inputs and return types on a unit testing basis won&amp;#39;t solve the problem when you&amp;#39;re using a dynamically typed language. You *have* to do integration testing.&lt;br /&gt;&lt;br /&gt;Otherwise, your tests will pass, but the program will fail in the field (since the inputs and/or output no longer match).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/8635501284983751599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/8635501284983751599'/><link rel='alternate' type='text/html' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html?showComment=1317393773236#c8635501284983751599' title=''/><author><name>@TheSandyWalsh</name><uri>http://www.blogger.com/profile/17478332939768000715</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_Al595rN4OWo/S5o-MXFWibI/AAAAAAAAAFk/TKOxZTZ7w4A/S220/me.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html' ref='tag:blogger.com,1999:blog-8696186.post-5904795609663683261' source='http://www.blogger.com/feeds/8696186/posts/default/5904795609663683261' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-580399367'/></entry><entry><id>tag:blogger.com,1999:blog-8696186.post-7480587374592437794</id><published>2011-09-30T10:11:28.651-03:00</published><updated>2011-09-30T10:11:28.651-03:00</updated><title type='text'>The contract of compute() includes both it&amp;#39;s r...</title><content type='html'>The contract of compute() includes both it&amp;#39;s return type(s), and what it does.  In a statically typed world, we&amp;#39;re used to leaning on the compiler for the prior, and using unit tests to enforce the latter.  But in a dynamically typed world, we need to explicitly test return types in our contract tests as well.&lt;br /&gt;&lt;br /&gt;Arguably, integration tests are a crutch for when you&amp;#39;re not completely testing the contract of a service/interface that your other unit tests are mocking/stubbing.&lt;br /&gt;&lt;br /&gt;(In the real world, the crutch is often useful or necessary, but I still like to lean on it as little as possible.)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/7480587374592437794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/7480587374592437794'/><link rel='alternate' type='text/html' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html?showComment=1317388288651#c7480587374592437794' title=''/><author><name>Ryan Cooper</name><uri>http://www.blogger.com/profile/08635857155555755249</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_EabzIfG8tEo/SjfuU3wEVnI/AAAAAAAAAAM/meYoLpsNTNY/S220/me4.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html' ref='tag:blogger.com,1999:blog-8696186.post-5904795609663683261' source='http://www.blogger.com/feeds/8696186/posts/default/5904795609663683261' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1323022998'/></entry><entry><id>tag:blogger.com,1999:blog-8696186.post-4864205204418098721</id><published>2011-09-01T21:29:34.071-03:00</published><updated>2011-09-01T21:29:34.071-03:00</updated><title type='text'>@robinbb ... heh, well let&amp;#39;s not go crazy now....</title><content type='html'>@robinbb ... heh, well let&amp;#39;s not go crazy now. I thought you would have enjoyed by little subtle dig of &lt;br /&gt;&lt;br /&gt;# 100 lines of C&lt;br /&gt;&lt;br /&gt;:)&lt;br /&gt;&lt;br /&gt;There a good summary of hybrid languages here: http://en.wikipedia.org/wiki/Type_system#Combinations_of_dynamic_and_static_typing</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/4864205204418098721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/4864205204418098721'/><link rel='alternate' type='text/html' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html?showComment=1314923374071#c4864205204418098721' title=''/><author><name>@TheSandyWalsh</name><uri>http://www.blogger.com/profile/17478332939768000715</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_Al595rN4OWo/S5o-MXFWibI/AAAAAAAAAFk/TKOxZTZ7w4A/S220/me.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html' ref='tag:blogger.com,1999:blog-8696186.post-5904795609663683261' source='http://www.blogger.com/feeds/8696186/posts/default/5904795609663683261' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-580399367'/></entry><entry><id>tag:blogger.com,1999:blog-8696186.post-1766259011215643731</id><published>2011-09-01T21:18:12.250-03:00</published><updated>2011-09-01T21:18:12.250-03:00</updated><title type='text'>When you wrote &amp;quot;What does this mean for us Py...</title><content type='html'>When you wrote &amp;quot;What does this mean for us Python/Ruby/PHP developers?&amp;quot; I thought that you were going to continue in another direction entirely. &amp;quot;Switch to a statically typed language&amp;quot; would have been another way to go. :-)&lt;br /&gt;&lt;br /&gt;Is there a statically typed Python-like language?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/1766259011215643731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/1766259011215643731'/><link rel='alternate' type='text/html' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html?showComment=1314922692250#c1766259011215643731' title=''/><author><name>robinbb</name><uri>http://www.blogger.com/profile/00969309505389131204</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html' ref='tag:blogger.com,1999:blog-8696186.post-5904795609663683261' source='http://www.blogger.com/feeds/8696186/posts/default/5904795609663683261' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1150734501'/></entry><entry><id>tag:blogger.com,1999:blog-8696186.post-1428103584586278073</id><published>2011-08-31T20:00:34.010-03:00</published><updated>2011-08-31T20:00:34.010-03:00</updated><title type='text'>I agree. It doesn&amp;#39;t happen that often, but whe...</title><content type='html'>I agree. It doesn&amp;#39;t happen that often, but when it does the first thing I think is &amp;quot;Why didn&amp;#39;t the tests catch that?&amp;quot;&lt;br /&gt;&lt;br /&gt;From the feedback I&amp;#39;ve been getting on this article I think people define the term &amp;quot;unit test&amp;quot; very loosely. They&amp;#39;re willing to call outside of the function being tested and don&amp;#39;t strictly mock everything external. &lt;br /&gt;&lt;br /&gt;I view that as an integration test. A test that spans multiple components. It sounds like you&amp;#39;re in the &amp;quot;willing to span components&amp;quot; camp as well by your assumption that the compute tests should have gone red. But they wouldn&amp;#39;t have if all external methods are mocked. &lt;br /&gt;&lt;br /&gt;And that&amp;#39;s not to say your approach is wrong. Perhaps I&amp;#39;m just overly strict on what I view as a unit test? In other languages it would never be a problem.&lt;br /&gt;&lt;br /&gt;I think what I&amp;#39;m trying to do is find the boundary between a pure unit test and a full-on integration test (which I fear creating).&lt;br /&gt;&lt;br /&gt;In the process it seems I&amp;#39;m learning more about how other people approach &amp;quot;unit&amp;quot; testing.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/1428103584586278073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/1428103584586278073'/><link rel='alternate' type='text/html' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html?showComment=1314831634010#c1428103584586278073' title=''/><author><name>@TheSandyWalsh</name><uri>http://www.blogger.com/profile/09609915519064692107</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-4Ntng0E4RNU/TfIQ6FBsWQI/AAAAAAAAAGA/3FkKnVkLCBw/s220/me_64x64.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html' ref='tag:blogger.com,1999:blog-8696186.post-5904795609663683261' source='http://www.blogger.com/feeds/8696186/posts/default/5904795609663683261' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1825487219'/></entry><entry><id>tag:blogger.com,1999:blog-8696186.post-8385934850865487179</id><published>2011-08-31T19:31:19.018-03:00</published><updated>2011-08-31T19:31:19.018-03:00</updated><title type='text'>I don&amp;#39;t really expect this to bite me very oft...</title><content type='html'>I don&amp;#39;t really expect this to bite me very often. The return type is part of the contract, and everyone knows it even if the interpreter doesn&amp;#39;t know it, so whoever changed compute() would have known that they needed to inspect the code that calls it.&lt;br /&gt;&lt;br /&gt;Also, wouldn&amp;#39;t the unit tests of compute() have gone red when they made this change, since the unit tests insisted that the return type be numeric? So they would have had to change those unit tests to no longer insist on that, which &lt;i&gt;certainly&lt;/i&gt; should have clued them in that what they are doing is changing something that someone else relies on.&lt;br /&gt;&lt;br /&gt;But yeah, static type-checking is great when it is great.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/8385934850865487179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8696186/5904795609663683261/comments/default/8385934850865487179'/><link rel='alternate' type='text/html' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html?showComment=1314829879018#c8385934850865487179' title=''/><author><name>Zooko</name><uri>http://www.blogger.com/profile/17046522562803939443</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.sandywalsh.com/2011/08/pain-of-unit-tests-and-dynamically.html' ref='tag:blogger.com,1999:blog-8696186.post-5904795609663683261' source='http://www.blogger.com/feeds/8696186/posts/default/5904795609663683261' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1114110838'/></entry></feed>
