<?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"
	>
<channel>
	<title>Comments on: There is no One Answer</title>
	<atom:link href="http://enfranchisedmind.com/blog/2007/09/29/there-is-no-one-answer/feed/" rel="self" type="application/rss+xml" />
	<link>http://enfranchisedmind.com/blog/2007/09/29/there-is-no-one-answer/</link>
	<description>Robert Fischer and Brian Hurt on Punditry, Programming Languages, and Other Religious Issues</description>
	<pubDate>Thu, 20 Nov 2008 08:39:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Enfranchised Mind &#187; Looking for Quotes</title>
		<link>http://enfranchisedmind.com/blog/2007/09/29/there-is-no-one-answer/#comment-33810</link>
		<dc:creator>Enfranchised Mind &#187; Looking for Quotes</dc:creator>
		<pubDate>Wed, 05 Nov 2008 17:33:32 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/29/383#comment-33810</guid>
		<description>[...] quote about how everything has limits. (Hrm, I should check There Is No One Answer and the posts linked off [...]</description>
		<content:encoded><![CDATA[<p>[...] quote about how everything has limits. (Hrm, I should check There Is No One Answer and the posts linked off [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://enfranchisedmind.com/blog/2007/09/29/there-is-no-one-answer/#comment-31748</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Tue, 09 Oct 2007 01:47:24 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/29/383#comment-31748</guid>
		<description>See, here is where we differ.  I don't see static typing as "banal and trivial" at all- but rather "basic, fundamental, and necessary".  I'd love to spend all my time discussing "deeper" concepts (and, in fact, I do spend most of my time talking about deeper concepts)- but it's hard to discuss the possibility of journeying to the moon with someone who still beleives the earth is flat.  "Can't we drop the whole is the earth flat or round debate and move on to more interesting arguments in physics?"  Um, no, not while the vast majority of people still believe it to be flat.

Looking back over my blog posts, my recent obsession has been much more about lazy, concurrent, asynchronous, and deferred computation rather than just static typing.  Unfortunately, the trick with asynchronous computation in all of it's form is less expressing the asynchronicity, so much as expressing it &lt;EM&gt;correctly&lt;/EM&gt;.  To my knowledge, asynchronous computation is by far the hardest thing programmers are doing right now.  

And one of the reasons it's so hard is that it is very easy to write code that mostly works, and only occasionally doesn't.  Which is why, of the two main ways we have to validate code correct (testing and typing), testing is useless in the face of this problem.  Unless you're willing to have unit tests that take days to run (yes, I have had to track down race conditions that only happened once every several days, even under extreme test loads).  Typing, on the other hand, being the country cousin of code correctness proofs, has a lot of promise in attacking the problem.  But it is very easy, in my mind at least, to make the argument that static typing is necessary (even if not sufficient) to solve the problem.  So any deep post I do make is liable to have static typing as a prerequisite, either implicitly or explicitly.

Another point I will make is that typing is, itself, a deeper subject than most programmers know.  I've been kind of reluctant to delve into the subject in a deep way myself, because I know how little I really know about the subject.  But here's a little something to whet your whistle on the subject, and maybe make you stare off into space a little bit.  Consider the type 'a -&#62; ('a -&#62; 'b) -&#62; 'b.  There are two ways to interpret this.  One is as an (Ocaml/SML style) type- this is the type of a function that takes an argument of type a and returns a function that takes an argument of a function that takes a type a and returns a value of type b, and returns a value of type b.

Another way to read this is as a statement in propositional logic: if statement a is true, this implies that if statement a implies statement b, then statement b is true.  Here, the -&#62; operator means "implies", not "function type".  By constructs like this, it can be seen that every correctly typed program is, by looking at it in a different way, a proof in propositional logic.

After digesting this for a bit, it should come as no surprise that the "patron saints" of functional programming- Alonzo Church, Haskell Curry, etc.- weren't studying programming or computation, they were studying the foundations of mathematical logic.</description>
		<content:encoded><![CDATA[<p>See, here is where we differ.  I don&#8217;t see static typing as &#8220;banal and trivial&#8221; at all- but rather &#8220;basic, fundamental, and necessary&#8221;.  I&#8217;d love to spend all my time discussing &#8220;deeper&#8221; concepts (and, in fact, I do spend most of my time talking about deeper concepts)- but it&#8217;s hard to discuss the possibility of journeying to the moon with someone who still beleives the earth is flat.  &#8220;Can&#8217;t we drop the whole is the earth flat or round debate and move on to more interesting arguments in physics?&#8221;  Um, no, not while the vast majority of people still believe it to be flat.</p>
<p>Looking back over my blog posts, my recent obsession has been much more about lazy, concurrent, asynchronous, and deferred computation rather than just static typing.  Unfortunately, the trick with asynchronous computation in all of it&#8217;s form is less expressing the asynchronicity, so much as expressing it <em>correctly</em>.  To my knowledge, asynchronous computation is by far the hardest thing programmers are doing right now.  </p>
<p>And one of the reasons it&#8217;s so hard is that it is very easy to write code that mostly works, and only occasionally doesn&#8217;t.  Which is why, of the two main ways we have to validate code correct (testing and typing), testing is useless in the face of this problem.  Unless you&#8217;re willing to have unit tests that take days to run (yes, I have had to track down race conditions that only happened once every several days, even under extreme test loads).  Typing, on the other hand, being the country cousin of code correctness proofs, has a lot of promise in attacking the problem.  But it is very easy, in my mind at least, to make the argument that static typing is necessary (even if not sufficient) to solve the problem.  So any deep post I do make is liable to have static typing as a prerequisite, either implicitly or explicitly.</p>
<p>Another point I will make is that typing is, itself, a deeper subject than most programmers know.  I&#8217;ve been kind of reluctant to delve into the subject in a deep way myself, because I know how little I really know about the subject.  But here&#8217;s a little something to whet your whistle on the subject, and maybe make you stare off into space a little bit.  Consider the type &#8216;a -&gt; (&#8217;a -&gt; &#8216;b) -&gt; &#8216;b.  There are two ways to interpret this.  One is as an (Ocaml/SML style) type- this is the type of a function that takes an argument of type a and returns a function that takes an argument of a function that takes a type a and returns a value of type b, and returns a value of type b.</p>
<p>Another way to read this is as a statement in propositional logic: if statement a is true, this implies that if statement a implies statement b, then statement b is true.  Here, the -&gt; operator means &#8220;implies&#8221;, not &#8220;function type&#8221;.  By constructs like this, it can be seen that every correctly typed program is, by looking at it in a different way, a proof in propositional logic.</p>
<p>After digesting this for a bit, it should come as no surprise that the &#8220;patron saints&#8221; of functional programming- Alonzo Church, Haskell Curry, etc.- weren&#8217;t studying programming or computation, they were studying the foundations of mathematical logic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reg Braithwaite</title>
		<link>http://enfranchisedmind.com/blog/2007/09/29/there-is-no-one-answer/#comment-31738</link>
		<dc:creator>Reg Braithwaite</dc:creator>
		<pubDate>Wed, 03 Oct 2007 14:01:02 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/29/383#comment-31738</guid>
		<description>Gentlemen, *please*!

Brian, take what you will from my post, but my intent was to suggest that we stop talking about this exact subject (static typing, unit testing, both, neither) and start taking about what makes programs *good*.

I admit, on a banal and trivial level, not having "typing errors" is a desirable thing. But Brian, of your whole brain, I suspect less that 1/1,000,000th of 1% is devoted to eliminating these errors. So when I read this post, I am thinking, "I am missing nearly all of Brian's thoughts about great software."

Now of course, we can fire up the flames and say "not having typing errors is neither banal, nor trivial." But we would be confusing the necessary with the sufficient. It is necessary that we eliminate such errors. But it is not sufficient to write great software.

I exhort you both (yes, you too my friend Obie) to burn your bras... err... blankets and get back to the stuff that's exciting. The stuff that's deep. To writing posts that will make me drop what I'm doing and stare into space while mulling over your ideas.</description>
		<content:encoded><![CDATA[<p>Gentlemen, *please*!</p>
<p>Brian, take what you will from my post, but my intent was to suggest that we stop talking about this exact subject (static typing, unit testing, both, neither) and start taking about what makes programs *good*.</p>
<p>I admit, on a banal and trivial level, not having &#8220;typing errors&#8221; is a desirable thing. But Brian, of your whole brain, I suspect less that 1/1,000,000th of 1% is devoted to eliminating these errors. So when I read this post, I am thinking, &#8220;I am missing nearly all of Brian&#8217;s thoughts about great software.&#8221;</p>
<p>Now of course, we can fire up the flames and say &#8220;not having typing errors is neither banal, nor trivial.&#8221; But we would be confusing the necessary with the sufficient. It is necessary that we eliminate such errors. But it is not sufficient to write great software.</p>
<p>I exhort you both (yes, you too my friend Obie) to burn your bras&#8230; err&#8230; blankets and get back to the stuff that&#8217;s exciting. The stuff that&#8217;s deep. To writing posts that will make me drop what I&#8217;m doing and stare into space while mulling over your ideas.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://enfranchisedmind.com/blog/2007/09/29/there-is-no-one-answer/#comment-31737</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Wed, 03 Oct 2007 01:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/29/383#comment-31737</guid>
		<description>The fundamental fallacy of Obie's statement is the assumption that increased risk causes the programmer to exercise increased care- in other words, that the reason programmers create bugs is because they're lazy and they don't care.  There are programmers for whom this is true- but dynamic typing doesn't help them either, as it doesn't change the fundamental fact that they're lazy and apathetic.  But the vast majority of programmers I've worked with are neither- but they &lt;EM&gt;are&lt;/EM&gt; human.    Mistakes will be made.  The only question is what the cost of those mistakes are.

Dan: if you want to have real fun, grab an open-source C/C++ project, and then turn on &lt;EM&gt;all&lt;/EM&gt; warnings.  Not just the default ones, not just the -W -Wall ones (there are dozens of optional warnings GCC has that are not turned on by -W -Wall), all of them.

Brian</description>
		<content:encoded><![CDATA[<p>The fundamental fallacy of Obie&#8217;s statement is the assumption that increased risk causes the programmer to exercise increased care- in other words, that the reason programmers create bugs is because they&#8217;re lazy and they don&#8217;t care.  There are programmers for whom this is true- but dynamic typing doesn&#8217;t help them either, as it doesn&#8217;t change the fundamental fact that they&#8217;re lazy and apathetic.  But the vast majority of programmers I&#8217;ve worked with are neither- but they <em>are</em> human.    Mistakes will be made.  The only question is what the cost of those mistakes are.</p>
<p>Dan: if you want to have real fun, grab an open-source C/C++ project, and then turn on <em>all</em> warnings.  Not just the default ones, not just the -W -Wall ones (there are dozens of optional warnings GCC has that are not turned on by -W -Wall), all of them.</p>
<p>Brian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Fischer</title>
		<link>http://enfranchisedmind.com/blog/2007/09/29/there-is-no-one-answer/#comment-31736</link>
		<dc:creator>Robert Fischer</dc:creator>
		<pubDate>Tue, 02 Oct 2007 18:55:16 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/29/383#comment-31736</guid>
		<description>&lt;em&gt;From years of experience, I can tell you that having a compiler as a security blanket dampens the amount of testing and enthusiasm applied to same that happens on an average team. It’s one of the strongest reasons that I prefer dynamically-typed languages.&lt;/em&gt;

In my experience, the amount of testing and enthusiasm required to maintain the TDD discipline is overwhelmed by the level of ambiguity in dynamic languages.  It's one of the strongest reasons that I prefer statically-typed languages.

How do you see the compiler's type warnings as dampening the testing/enthusiasm?  I'm looking for practical examples out of your experience here.  I've never encountered this claim before, and I'm really curious about it, because it is so out of whack with my experience.</description>
		<content:encoded><![CDATA[<p><em>From years of experience, I can tell you that having a compiler as a security blanket dampens the amount of testing and enthusiasm applied to same that happens on an average team. It’s one of the strongest reasons that I prefer dynamically-typed languages.</em></p>
<p>In my experience, the amount of testing and enthusiasm required to maintain the TDD discipline is overwhelmed by the level of ambiguity in dynamic languages.  It&#8217;s one of the strongest reasons that I prefer statically-typed languages.</p>
<p>How do you see the compiler&#8217;s type warnings as dampening the testing/enthusiasm?  I&#8217;m looking for practical examples out of your experience here.  I&#8217;ve never encountered this claim before, and I&#8217;m really curious about it, because it is so out of whack with my experience.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://enfranchisedmind.com/blog/2007/09/29/there-is-no-one-answer/#comment-31735</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 02 Oct 2007 16:11:39 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/29/383#comment-31735</guid>
		<description>Honestly. "Having the compiler as a security blanket"?

The average programmer ignores the feedback from the compiler completely, as well as feedback from unit tests and type information. For most programmers if nothing outright prevents the program from running they consider it good.

If you doubt me on this, grab any open source project out there, run through it's build procedure, and see if you can even keep up with the amount of warnings generated by the "safety blanket". Very, very few development teams seem to care what the compiler says.

My opinion is that strong typing, Ocaml style or otherwise strictly enforced, is one of the best first steps to proper code and bug prevention because it *prevents execution* if there is an error. It can't be ignored and passed down the line until it is fixed.

For projects, the best practices should involve using a strongly typed language and requiring a *clean* unit test run before packaging. This won't prevent bugs, but it is a good start on preventing obvious bugs, leaving more developer time for dealing with the less obvious bugs.</description>
		<content:encoded><![CDATA[<p>Honestly. &#8220;Having the compiler as a security blanket&#8221;?</p>
<p>The average programmer ignores the feedback from the compiler completely, as well as feedback from unit tests and type information. For most programmers if nothing outright prevents the program from running they consider it good.</p>
<p>If you doubt me on this, grab any open source project out there, run through it&#8217;s build procedure, and see if you can even keep up with the amount of warnings generated by the &#8220;safety blanket&#8221;. Very, very few development teams seem to care what the compiler says.</p>
<p>My opinion is that strong typing, Ocaml style or otherwise strictly enforced, is one of the best first steps to proper code and bug prevention because it *prevents execution* if there is an error. It can&#8217;t be ignored and passed down the line until it is fixed.</p>
<p>For projects, the best practices should involve using a strongly typed language and requiring a *clean* unit test run before packaging. This won&#8217;t prevent bugs, but it is a good start on preventing obvious bugs, leaving more developer time for dealing with the less obvious bugs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Obie</title>
		<link>http://enfranchisedmind.com/blog/2007/09/29/there-is-no-one-answer/#comment-31734</link>
		<dc:creator>Obie</dc:creator>
		<pubDate>Tue, 02 Oct 2007 15:20:15 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/29/383#comment-31734</guid>
		<description>From years of experience, I can tell you that having a compiler as a security blanket dampens the amount of testing and enthusiasm applied to same that happens on an average team. It's one of the strongest reasons that I prefer dynamically-typed languages.</description>
		<content:encoded><![CDATA[<p>From years of experience, I can tell you that having a compiler as a security blanket dampens the amount of testing and enthusiasm applied to same that happens on an average team. It&#8217;s one of the strongest reasons that I prefer dynamically-typed languages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://enfranchisedmind.com/blog/2007/09/29/there-is-no-one-answer/#comment-31732</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Mon, 01 Oct 2007 22:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/29/383#comment-31732</guid>
		<description>Ryan: You're falling directly into the fallacy I was adressing- assuming that static typing and unit testing are mutually exclusive.  Or, at least if you have one, you don't need the other.  And that therefor, if I advocate using static typing, I must be advocating not using unit testing.  It's not a case of either or: in fact, I'm an advocate of using both.

Static typing, in a language with a good type system (by which I explicitly &lt;EM&gt;exclude&lt;/EM&gt; Java, #, C++, and Pascal, and instead mean languages like SML, OCaml, and Haskell) can check for more errors, and more subtle errors, than most people suspect.  It can be used to enforce constraints like "you can not ansynchronously read a file descriptor opened for synchronous I/O" or "a Postgresql cursor may not be used outside of the transaction it is declared in" (both of these I've seen enforced in Ocaml).  And when it gives a gaurantee, it means it.  And when the constraint is violated, the compiler tells you exactly where- file, line number, even what columns are the problem.  I've occassionally seen Ocaml be 20 lines off (where the problem really was was 20 lines away from where Ocaml thought the problem is), but 99% of the time it's dead on.  It's a great advantage to debugging, let me tell you.  And it comes free with your language.

But you're right that it doesn't catch all errors.  Neither does.  Neither does the &lt;EM&gt;combination&lt;/EM&gt;.  But the more errors are caught, and sooner, the better.</description>
		<content:encoded><![CDATA[<p>Ryan: You&#8217;re falling directly into the fallacy I was adressing- assuming that static typing and unit testing are mutually exclusive.  Or, at least if you have one, you don&#8217;t need the other.  And that therefor, if I advocate using static typing, I must be advocating not using unit testing.  It&#8217;s not a case of either or: in fact, I&#8217;m an advocate of using both.</p>
<p>Static typing, in a language with a good type system (by which I explicitly <em>exclude</em> Java, #, C++, and Pascal, and instead mean languages like SML, OCaml, and Haskell) can check for more errors, and more subtle errors, than most people suspect.  It can be used to enforce constraints like &#8220;you can not ansynchronously read a file descriptor opened for synchronous I/O&#8221; or &#8220;a Postgresql cursor may not be used outside of the transaction it is declared in&#8221; (both of these I&#8217;ve seen enforced in Ocaml).  And when it gives a gaurantee, it means it.  And when the constraint is violated, the compiler tells you exactly where- file, line number, even what columns are the problem.  I&#8217;ve occassionally seen Ocaml be 20 lines off (where the problem really was was 20 lines away from where Ocaml thought the problem is), but 99% of the time it&#8217;s dead on.  It&#8217;s a great advantage to debugging, let me tell you.  And it comes free with your language.</p>
<p>But you&#8217;re right that it doesn&#8217;t catch all errors.  Neither does.  Neither does the <em>combination</em>.  But the more errors are caught, and sooner, the better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://enfranchisedmind.com/blog/2007/09/29/there-is-no-one-answer/#comment-31728</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 01 Oct 2007 14:42:10 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/29/383#comment-31728</guid>
		<description>It's good to know you agree.</description>
		<content:encoded><![CDATA[<p>It&#8217;s good to know you agree.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Allen</title>
		<link>http://enfranchisedmind.com/blog/2007/09/29/there-is-no-one-answer/#comment-31727</link>
		<dc:creator>Ryan Allen</dc:creator>
		<pubDate>Mon, 01 Oct 2007 05:16:42 +0000</pubDate>
		<guid isPermaLink="false">http://enfranchisedmind.com/blog/archive/2007/09/29/383#comment-31727</guid>
		<description>Static Typing doesn't check for correct behaviour, it just checks all your types. Type errors aren't the only kinds of bugs you can encounter. I would go as far to say that bugs in code behaviour can be just as devastating as an incorrect type in either static or dynamic languages. 

The professionals I know working with Java and .NET are practising test driven development and continuous integration.

And yes, TDD doesn't catch all bugs either, but at least you can add regression tests when you find some. Oh, and it's automated. That's also good.</description>
		<content:encoded><![CDATA[<p>Static Typing doesn&#8217;t check for correct behaviour, it just checks all your types. Type errors aren&#8217;t the only kinds of bugs you can encounter. I would go as far to say that bugs in code behaviour can be just as devastating as an incorrect type in either static or dynamic languages. </p>
<p>The professionals I know working with Java and .NET are practising test driven development and continuous integration.</p>
<p>And yes, TDD doesn&#8217;t catch all bugs either, but at least you can add regression tests when you find some. Oh, and it&#8217;s automated. That&#8217;s also good.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
