<?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/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5975524006824862804</id><updated>2012-01-19T11:40:57.460-08:00</updated><category term='linux'/><category term='p2p'/><category term='erlang'/><category term='law'/><category term='process'/><category term='bilski'/><category term='security'/><category term='comcast'/><category term='Room 101'/><category term='politics organisation antipattern Bruce_Sterling'/><category term='politics'/><category term='broadband'/><category term='elections'/><category term='Arrow'/><category term='rate capping'/><category term='real-time'/><category term='open source'/><category term='virgin'/><category term='terrorism'/><category term='configuration management'/><category term='petition'/><category term='ebook'/><category term='politics broadband'/><category term='patent'/><category term='economics'/><category term='software'/><category term='haskell'/><category term='functional programming'/><category term='religion'/><category term='bacula'/><category term='windows'/><category term='management'/><category term='backup'/><category term='morality'/><title type='text'>Paul's Pontifications</title><subtitle type='html'>Random musings on politics, economics and software</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>50</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-1347713568181353112</id><published>2011-11-18T11:45:00.000-08:00</published><updated>2011-11-24T13:19:02.122-08:00</updated><title type='text'>Enough with the blue LEDs!</title><content type='html'>The first blue LED was created by &lt;a href="http://en.wikipedia.org/wiki/Shuji_Nakamura"&gt;Shuji Nakamura&lt;/a&gt; in 1993.  It was a technical triumph, and Nakamura eventually managed to win a $9M bonus (after suing his employer).  Before then LEDs ranged from red to a slightly yellowish green, and nobody could figure out how to get the wavelengths any shorter.  Nakamura's LED was not merely slightly blue; it could go right up into the UV, and was amazingly bright.  Today I am typing this in a room illuminated by white LEDs that are made using this technology.    Slim, low powered LED-illuminated screens have been created, and blu-ray players use lasers with the same basic semiconductor combination to give us high definition movies on a disk.  Science and technology march on, hand in hand.&lt;br /&gt;&lt;br /&gt;But that's not what I want to write about.&lt;br /&gt;&lt;br /&gt;On Wednesday I plugged in a new cable modem, enabling faster broadband. On the front panel are two LEDs.  One is green and shows that the modem has locked on to a signal.  The other is blue and flashes.  So now I have this bright blue flashing light near me.  The coax cable comes into my office near my desk, so I can't move it far.  Fortunately I've been able to tuck it into a cubby-hole next to the bookshelf, so its not in my line of sight.  Without that I'd probably have had to put it inside a box or something just to hide the LED.&lt;br /&gt;&lt;br /&gt;I was not too surprised by the appearance of blue LEDs as an alternative to the old red and green back at the turn of the century; they were novel and eye-catching, which is what manufacturers need if they are to sell stuff.  But the trouble is that they are too eye catching; the piercing blue light is actually unpleasant to look at directly, and is far more intrusive than the quiet red and green.&lt;br /&gt;&lt;br /&gt;Some manufacturers seem to have got the idea.  I have a couple of USB hubs with blue LEDs, but they don't flash and they are sufficiently buried inside that you don't have the piercing gleam.  But this cable modem (its a Netgear SuperHub, by the way) doesn't follow that rule.  We also bought a moderately expensive audio system a few months ago, and that also has a piercingly bright blue LED on the front.  So when we watch TV we have this shining in our eyes just below.  We've got some relief by sticking some white tape over the LED, but we shouldn't have to do that.&lt;br /&gt;&lt;br /&gt;So could anyone reading this who works for a consumer electronics company please point the design department at this posting.  Remember guys; shining bright flashing lights in your customers' eyes may get their attention, but it won't get you repeat business.&lt;br /&gt;&lt;br /&gt;I &lt;a href="http://paulspontifications.blogspot.com/2008/03/things-id-put-in-room-101.html"&gt;wrote about this&lt;/a&gt; before, in 2008.  I'm disappointed to have the same problem three years later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-1347713568181353112?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/1347713568181353112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=1347713568181353112' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/1347713568181353112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/1347713568181353112'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2011/11/enough-with-blue-leds.html' title='Enough with the blue LEDs!'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-4772090832892508622</id><published>2011-05-22T10:03:00.000-07:00</published><updated>2011-05-23T12:09:52.268-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='management'/><title type='text'>Windows, Linux, ARM and Intel in a Zero Sum Game</title><content type='html'>Microsoft is talking about putting Windows 8 on ARM.  Intel is trying to play this down, talking about how Linux is already on ARM, and how Intel even supports Linux itself.  None of this makes sense unless you understand the position of Microsoft and Intel in the PC market.&lt;br /&gt;&lt;br /&gt;People often speak of the "Wintel" duopoly, which of course is a misnomer.  A duopoly is when two companies share a single market, at which point there is a risk of anti-competitive behaviour.  However Microsoft and Intel are not a duopoly, they are two near-monopolies.  Microsoft dominates the desktop operating system market, and Intel dominates the desktop CPU market.  Although both OS and CPU are necessary components in a desktop computer, this doesn't make their manufacturers a duopoly because even in the best of worlds they don't compete: increased market share for Microsoft is not at the expense of Intel.&lt;br /&gt;&lt;br /&gt;However this doesn't mean that everything can be all cozy between them, because in a broader sense they &lt;span style="font-weight: bold;"&gt;do&lt;/span&gt; compete.  Microsoft and Intel are players in the desktop PC "value chain" (actually, its a value network, or even more precisely, a value directed acyclic graph, and if you look closely you find it isn't even really acyclic because chip-makers buy PCs, but term "chain" is more often used so that is what I'll stick to).  This describes the way that money flows from PC buyers through vendors to manufacturers to parts makers to raw materials.&lt;br /&gt;&lt;br /&gt;If you are a player in a value chain then its pretty much a zero sum game; every time someone buys a PC their money bubbles back up through the value chain and everyone grabs their bit.  Your problem as a player is to get as much of this money as you can, which inevitably means that someone else gets less.  Value chains are characterised by dysfunctional relationships between people who need each other but nevertheless hate each others guts.&lt;br /&gt;&lt;br /&gt;There are two big strategic goals in a value chain.  The first is obvious, the second less so:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Make your bit a monopoly, so the rest of the value chain has to come to you to produce the product.  That way you can charge monopoly prices and hoover up all the money coming through the value chain.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Make everyone else's bits into generic commodities so that they can only compete by keeping prices low.  That way they &lt;span style="font-style: italic;"&gt;can't&lt;/span&gt; charge monopoly prices, which leaves more money for you.  That's the consequence of the zero sum game thing.&lt;/li&gt;&lt;/ol&gt;Once you understand the second goal you understand everything about Microsoft and Intel.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Microsoft makes very sure that Windows runs well on as wide a variety of hardware as possible in order to keep PC hardware a commodity business.&lt;/li&gt;&lt;li&gt;Intel makes sure that Linux runs nicely on Intel processors in order to create a competitor for Microsoft, so Microsoft will have to reduce its prices, thereby leaving more money for Intel.  I suspect Intel were also very supportive of Apple's move to Intel hardware for this reason, as well as the more obvious one of having a new channel.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Microsoft made sure that Windows runs well on AMD.  However AMD have never really recovered from Intel's "Intel Inside" marketing coup (where they paid box vendors to make it sound like "Intel Inside" was a big selling point, so lots of customers thought it was).  So now Microsoft need to create a new competitor for Intel, and have decided that ARM will fulfil this role nicely.  In the past they also did this with the DEC Alpha for the same reason.&lt;/li&gt;&lt;/ul&gt;ARM already plays nicely with Linux, which is quite a feat because ARM isn't a single processor; its an entire family.  If ARM have any sense they will make sure that this continues.  Microsoft are likely to try to pay ARM off to get it to remove support for Linux.  If ARM have any sense they will resist this because it will enable Microsoft to entrench itself as a mobile monopoly, thereby decreasing the amount of money available for ARM to grab for itself.&lt;br /&gt;&lt;br /&gt;Edit: "zero sum gain" -&amp;gt; "zero sum game".  That's what happens when you let your fingers do the thinking.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-4772090832892508622?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/4772090832892508622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=4772090832892508622' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4772090832892508622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4772090832892508622'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2011/05/windows-linux-arm-and-intel-in-zero-sum.html' title='Windows, Linux, ARM and Intel in a Zero Sum Game'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-6539291916059408404</id><published>2011-05-02T05:26:00.000-07:00</published><updated>2011-05-03T10:33:17.115-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='law'/><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='bilski'/><category scheme='http://www.blogger.com/atom/ns#' term='patent'/><title type='text'>Patent reduction redux</title><content type='html'>In &lt;a href="http://paulspontifications.blogspot.com/2011/04/patent-5893120-reduced-to-mathematical.html"&gt;my last post&lt;/a&gt; I presented a translation of &lt;a href="http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&amp;amp;Sect2=HITOFF&amp;amp;d=PALL&amp;amp;p=1&amp;amp;u=%2Fnetahtml%2FPTO%2Fsrchnum.htm&amp;amp;r=1&amp;amp;f=G&amp;amp;l=50&amp;amp;s1=5,893,120.PN.&amp;amp;OS=PN/5,893,120&amp;amp;RS=PN/5,893,120"&gt;a patent&lt;/a&gt; into Haskell.  This post went up on &lt;a href="http://news.ycombinator.com/item?id=2501639"&gt;Hacker News&lt;/a&gt; and &lt;a href="http://tech.slashdot.org/story/11/05/01/1746231/Patent-5893120-Reduced-To-Pure-Math"&gt;Slashdot&lt;/a&gt;, and I got over 25,000 page views plus a lot of comments.  There are too many comments to respond to individually, and many of them cover similar ground.  So here is a more general response to the main issues raised.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Its trivial&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Well, yes, in the computer science sense it is.  We all know that any algorithm can be written in any turing-complete language, and the Lambda Calculus is turing-complete.  QED.&lt;br /&gt;&lt;br /&gt;However when I read court judgements related to patentability this never gets mentioned, not because judges are too stupid to understand the point, but because as far as I can tell no lawyer has ever tried to put it in front of a judge.  I'm not sure exactly why this is, but I suspect that it is a combination of the general squishiness of the law (see below) and the fact that you want to base your case on a tried-and-tested legal theory rather than building something completely new.  From a lawyer's point of view an obscure mathematical theorem (most lawyers have never heard of Turing) looks like a very shaky foundation for a legal argument.&lt;br /&gt;&lt;br /&gt;So it seemed to me that if I could convert this abstract theoretical point about turing-complete languages into a practical demonstration that directly addressed a key point of law then it might make a big difference.  Sure its a small step for computer science, but it could be a giant leap for legal thinking.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The law is squishier than that&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Eben Moglen has said&lt;br /&gt;&lt;blockquote&gt;... the hacker belief that laws are form of code [creates] a particular frame of  analysis for legal questions. [...] one thing which lawyers around the world all share is an awareness of  the squishiness of law, it is by no means the hard arthropod carapace  for internal soft organs that non-lawyers have a tendency to assume it  is&lt;/blockquote&gt;Moglen is undoubtedly correct, and when I look at legal judgements I often seem to discern a judge trying to construe the facts and law in a way that will deliver what s/he believes to be justice in the wider human sense as well as in the strict legal sense.&lt;br /&gt;&lt;br /&gt;But judges are still constrained by the law; however much they might want to, they cannot look at evidence conclusively showing fact X plus a law saying "if X then Y", and then deliver a judgement of "not Y".  The trick is to provide incontrovertible evidence for X.  To extend Moglen's metaphor, the law may not have an arthropod carapace, but inside the squishy flesh it still has a rigid skeleton of of laws that judges cannot bend at will.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The law / lawmakers are too corrupt; they'll just legislate around this.&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I don't believe the application of the law in the US is anything like corrupt enough for this to be an issue.  The worst one can say about the application of American law is that effective legal representation can be bankruptingly expensive for the little guy.  But that's not a problem here.&lt;br /&gt;&lt;br /&gt;Lawmakers are an issue; the leadership of America is routinely for sale to any sufficiently large campaign contribution.  But the limits on patentability are long-standing and fundamental, and until the &lt;a href="http://en.wikipedia.org/wiki/State_Street_Bank_v._Signature_Financial_Group"&gt;State Street decision&lt;/a&gt; in 1998 it was generally understood that computer software and other information-processing algorithms were not patentable.  For the US legislature to change this basic principle of patent law seems unlikely.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Everything in the patent is prior art anyway.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Prior art is one of the most misunderstood things in patent law.  Each claim in a patent is an entire invention; there may well be things in the invention that are prior art, but unless you can show that everything in the whole claim existed in a single entity previous to the patent priority date then you don't have prior art.&lt;br /&gt;&lt;br /&gt;So the fact that hash tables and linked lists were well known before this patent is irrelevant.  Of course if anyone can show actual prior art that includes everything in one of the claims then I imagine that the Red Hat lawyers would like to hear of it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;But all patents can be reduced to a formula / number, so this argument would abolish all patents.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;This misunderstands patent law.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.law.cornell.edu/uscode/35/usc_sup_01_35_10_II_20_10.html"&gt;USC 35 II 10&lt;/a&gt; defines a patentable invention as&lt;br /&gt;&lt;blockquote&gt;... any new and useful process, machine, manufacture, or composition of matter, or any new and useful improvement thereof ...&lt;br /&gt;&lt;/blockquote&gt;This definition excludes mathematical formulae and physical facts from patentability.  Leaving aside the fact that it is also well known, the quadratic formula is not patentable because it is not a useful process, machine etc.&lt;br /&gt;&lt;br /&gt;The patent covers the physical realisation of the idea, not the idea itself.  So publication of the patented material in any form is fine in theory; that is the whole point of the patent system.  What you can't do is make and sell the patented invention.  (An exception has been carved out here for ready-to-run implementations of software patents on the grounds that they contribute to infringement by the users, which is bad law but not part of this argument).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The 120 patent recites a computer running the algorithms to create a useful improvement in performance, so that makes it patentable.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the State Street case the Court decided that a mathematical formula could form part of an invention, as long as the whole thing was a new and useful process, machine etc.  This was a radical departure from previous US decisions, but it matches current European law (I don't know which came first) where mathematical formulae and computer programs cannot be patented "as such", but can be patented as part of an invention that achieves a "technical effect" (which seems to mean the same as "new and useful improvement" in the US).&lt;br /&gt;&lt;br /&gt;However Bilski has now blown all that out of the water.  The Court in Bilski specifically declined to endorse anything in State Street, and instead decided that patentability should be decided in line with three other cases.  For more details see &lt;a href="http://paulspontifications.blogspot.com/2010/07/bilski-says-software-is-not-patentable.html"&gt;my post on this&lt;/a&gt;, but in essence it means that while a mathematical formula or algorithm can form part of a patented invention, it doesn't contribute anything to the novelty of that invention.  Even if the formula or algorithm is completely new, for the purposes of the patent it is treated as "well known".  Hence in the Diehr case (the rubber curing method) the invention was the use of a calculation to tell the mould when to open rather than a predetermined time interval.  The formula to do this was part of the patent, but the invention was its use in a new kind of machine; one that opened based on temperature readings rather than a timer.  On the other hand in the Flook and Benson cases the only novelty was in the formula; everything else was held to be already known, so the patents were disallowed.&lt;br /&gt;&lt;br /&gt;In Bilski the central component of the invention was a formula for hedging bets in energy markets.  All else was well known, so the patent was disallowed.  The Supreme Court said:&lt;br /&gt;&lt;blockquote&gt;Claims 1 and 4 explain the basic concept of hedging and reduce that concept to a mathematical formula. This is an unpatentable abstract idea, just like the algorithms at issue in Benson and Flook.&lt;/blockquote&gt;In this case the patent application itself contained the reduction of the concept to a mathematical formula.  But clearly if the claims had left the formula unstated and merely listed an equivalent series of steps or assemblage of "means" (e.g. "a multiplication means connected to an addition means") then this would have merely been a change in the drafting, and it is well established that you can't make something patentable just by changing the words in the claims.  So this leads to the following conclusion: any element of a patent claim that can be reduced to a mathematical formula is not patentable material, and the subsequent Section 102 analysis (to determine if the invention is new and non-obvious) must ignore it.&lt;br /&gt;&lt;br /&gt;So in the case of the 120 Patent, all the claims come down to "a general purpose digital computer running software that implements a bunch of mathematical formulae".  Running software on a computer is prior art, so there is no new invention here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-6539291916059408404?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/6539291916059408404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=6539291916059408404' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/6539291916059408404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/6539291916059408404'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2011/05/patent-reduction-redux.html' title='Patent reduction redux'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-4243851104214735204</id><published>2011-04-30T02:17:00.000-07:00</published><updated>2011-05-03T23:56:56.602-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='bilski'/><category scheme='http://www.blogger.com/atom/ns#' term='patent'/><title type='text'>Patent 5,893,120 reduced to mathematical formulae</title><content type='html'>I have &lt;a href="http://paulspontifications.blogspot.com/2010/07/bilski-says-software-is-not-patentable.html"&gt;previously argued&lt;/a&gt; that the Bilski ruling renders all software unpatentable in the US because any method of manipulating information (i.e an algorithm) can be translated into a Haskell program, every Haskell function is a formula in the Typed Lambda Calculus, and all the variants of the Lambda Calculus are part of mathematics.  Hence any algorithm can be reduced to a mathematical formula, which US patent law states is not patentable subject matter.&lt;br /&gt;&lt;br /&gt;The computer science community &lt;a href="http://www.pluto.it/files/meeting1999/atti/no-patents/brevetti/docs/knuth_letter_en.html"&gt;has tried&lt;/a&gt; to &lt;a href="http://www.groklaw.net/article.php?story=20110426051819346"&gt;explain this&lt;/a&gt; to the patent industry, but these explanations have fallen on deaf ears.  So I thought I would try a different tack.&lt;br /&gt;&lt;br /&gt;Google has just been &lt;a href="http://www.theinquirer.net/inquirer/news/2045786/google-loses-usd5-million-linux-patent-verdict"&gt;ordered to pay $5M&lt;/a&gt; for infringing &lt;a href="http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&amp;amp;Sect2=HITOFF&amp;amp;d=PALL&amp;amp;p=1&amp;amp;u=%2Fnetahtml%2FPTO%2Fsrchnum.htm&amp;amp;r=1&amp;amp;f=G&amp;amp;l=50&amp;amp;s1=5,893,120.PN.&amp;amp;OS=PN/5,893,120&amp;amp;RS=PN/5,893,120"&gt;patent 5,893,120&lt;/a&gt; (hereafter "Patent 120").  This patent covers a very simple data structure and the algorithms for manipulating it.  In fact much of the text of the patent is a pseudo-code implementation in a Pascal-like language.  So I thought I would provide a practical demonstration of what has, until now, been a theoretical proposition; the reduction of a software patent to set of mathematical formulae.  The result is below, and is also &lt;a href="http://hpaste.org/46182/patent__5893120"&gt;posted here&lt;/a&gt; (although I believe that the paste-bin will eventually expire).&lt;br /&gt;&lt;br /&gt;I chose this patent partly because it is comparatively simple (there are 95 lines of Haskell source code in the file), but also because it is potentially important; Google's "infringement" consisted of using Linux, which uses this algorithm.  Hence anyone using Linux is a potential target.&lt;br /&gt;&lt;br /&gt;Red Hat is reportedly seeking a declarative judgement that this patent is invalid, and Google is expected to appeal, so this is not over yet.  If anyone knows how I can contact their lawyers to draw these formulae to their attention, I'd be grateful.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Edit 1:&lt;/b&gt;A brief overview of the relationship between Haskell and the Lambda Calculus can be found &lt;a href="http://sucs.org/Knowledge/Articles/Lambda%20Calculus"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Edit 2:&lt;/b&gt;Of course a judge isn't going to know the Lambda Calculus from a lump of rock, but that is what expert witnesses are for.  Get a professor of mathematics from an internationally recognised university to testify that these are formulae in the Lambda Calculus, and that the Lambda Calculus is part of mathematics, and you have a sound legal proof.  The only thing the patent holders could do is find another professor to testify differently.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Edit 3:&lt;/b&gt;Sorry about the broken formatting.  If you want to review the code you can either &lt;a href="http://hpaste.org/46182/patent__5893120"&gt;look at this colourised version&lt;/a&gt; or copy and paste it into your favourite editor.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Edit 4: &lt;/span&gt;This post has been slashdotted.  Rather than try to respond to all the various comments individually I have posted a &lt;a href="http://paulspontifications.blogspot.com/2011/05/patent-reduction-redux.html"&gt;general response to the common themes&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In the meantime, here are the formulae:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;{- |&lt;br /&gt;&lt;br /&gt;The claims of United States Patent 5,893,120 may be reduced to a set&lt;br /&gt;of mathematical formulae expressed in the Typed Lambda Calculus, also&lt;br /&gt;known as System F.  This file contains these formulae.  The language&lt;br /&gt;used is Haskell, which is a version of System F with extra "syntactic&lt;br /&gt;sugar" to make it useful for practical purposes.&lt;br /&gt;&lt;br /&gt;It happens that formulae expressed in Haskell can also be transated by&lt;br /&gt;a Haskell compiler into executable computer programs.  However that&lt;br /&gt;does not make a Haskell function any less of a mathematical formula.&lt;br /&gt;Otherwise the quadratic formula&lt;br /&gt;&lt;br /&gt;&amp;gt;    x = (-b +/- sqrt (b^2 - 4ac))/2a&lt;br /&gt;&lt;br /&gt;would be rendered patentable subject material by the same argument.&lt;br /&gt;&lt;br /&gt;-}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;module Patent120 where&lt;br /&gt;&lt;br /&gt;import Data.Char (ord)&lt;br /&gt;&lt;br /&gt;-- The "ord" function defines a bijection between text characters and&lt;br /&gt;-- numbers.&lt;br /&gt;&lt;br /&gt;import Data.Map (Map)&lt;br /&gt;import qualified Data.Map as M&lt;br /&gt;&lt;br /&gt;-- The Data.Map module is a standard module defined entirely as a set&lt;br /&gt;-- of Haskell formulae, in the same way as this module.  The "import"&lt;br /&gt;-- means that these formulae are incorporated with the formulae given&lt;br /&gt;-- here.&lt;br /&gt;&lt;br /&gt;{-&lt;br /&gt;Claim 1. An information storage and retrieval system, the system&lt;br /&gt;comprising:&lt;br /&gt;&lt;br /&gt;  a linked list to store and provide access to records stored in a&lt;br /&gt;  memory of the system, at least some of the records automatically&lt;br /&gt;  expiring,&lt;br /&gt;&lt;br /&gt;  a record search means utilizing a search key to access the linked&lt;br /&gt;  list,&lt;br /&gt;&lt;br /&gt;  the record search means including a means for identifying and removing&lt;br /&gt;  at least some of the expired ones of the records from the linked list&lt;br /&gt;  when the linked list is accessed, and&lt;br /&gt;&lt;br /&gt;  means, utilizing the record search means, for accessing the linked&lt;br /&gt;  list and, at the same time, removing at least some of the expired ones&lt;br /&gt;  of the records in the linked list.&lt;br /&gt;-}&lt;br /&gt;&lt;br /&gt;-- | A record with Birth value below some threshold is considered "expired".&lt;br /&gt;type Birth = Integer &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- | Records in the list have their birth recorded, and also contain&lt;br /&gt;-- a key and a value.&lt;br /&gt;data Record k a = Record Birth k a&lt;br /&gt;&lt;br /&gt;-- | True iff the record is older than the threshold argument.&lt;br /&gt;expired t (Record b _ _)  =  b &amp;lt; t   -- | True iff the record matches the key. matches k (Record _ k1 _) = k == k1   -- | The value stored in a record. value (Record _ _ v) = v   -- | Records are stored in a linked list in the system memory. type Storage k a = [Record k a]   -- | The "search1" function includes a threshold age parameter. -- It returns both the items that match the key and the linked list -- with the expired items removed. --  -- The recitation of "means" cannot be used to disguise the formula -- given here.  Otherwise any mathematical formula could be patented -- by reciting e.g. "addition means" and "multiplication means" that are -- mechanically derived from the formula. search1 :: (Eq k) =&amp;gt; Birth -&amp;gt; k -&amp;gt; Storage k a -&amp;gt; (Storage k a, [a])&lt;br /&gt;search1 t k records = foldr nextItem ([], []) records&lt;br /&gt;  where&lt;br /&gt;     nextItem r@(Record b k2 v) (retained,found) =&lt;br /&gt;        (if b &amp;gt; t then r:retained else retained,&lt;br /&gt;         if k == k2 then v:found else found)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;{-&lt;br /&gt;Claim 2. The information storage and retrieval system according to&lt;br /&gt;claim 1 further including means for dynamically determining maximum&lt;br /&gt;number for the record search means to remove in the accessed linked&lt;br /&gt;list of records.&lt;br /&gt;-}&lt;br /&gt;&lt;br /&gt;-- | Similar to "search1", but with an added parameter for the maximum&lt;br /&gt;-- number of records to remove.&lt;br /&gt;search2 :: (Eq k) =&amp;gt; Int -&amp;gt; Birth -&amp;gt; k -&amp;gt; Storage k a -&amp;gt; (Storage k a, [a])&lt;br /&gt;search2 n t k = (\(_,x,y) -&amp;gt; (x,y)) . foldr nextItem (n,[],[])&lt;br /&gt;  where&lt;br /&gt;     nextItem r@(Record b k2 v) (n2,retained,found) =&lt;br /&gt;        (n2-1,&lt;br /&gt;         if b &amp;gt; t || n2 == 0 then r:retained else retained,&lt;br /&gt;         if k == k2 then v:found else found)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;{-&lt;br /&gt;Claim 3. A method for storing and retrieving information records using&lt;br /&gt;a linked list to store and provide access to the records, at least&lt;br /&gt;some of the records automatically expiring, the method comprising the&lt;br /&gt;steps of:&lt;br /&gt;&lt;br /&gt;  accessing the linked list of records,&lt;br /&gt;&lt;br /&gt;  identifying at least some of the automatically expired ones of the&lt;br /&gt;  records, and&lt;br /&gt;&lt;br /&gt;  removing at least some of the automatically expired records from the&lt;br /&gt;  linked list when the linked list is accessed.&lt;br /&gt;&lt;br /&gt;Claim 4. The method according to claim 3 further including the step of&lt;br /&gt;dynamically determining maximum number of expired ones of the records&lt;br /&gt;to remove when the linked list is accessed.&lt;br /&gt;-}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- | Claim 3 can be reduced to the same formula as Claim 1.  The use of&lt;br /&gt;-- a sequence of steps cannot disguise the fact that this represents&lt;br /&gt;-- a mathematical formula.  Otherwise it would be possible to patent&lt;br /&gt;-- any mathematical formula simply by reciting the steps in evaluating&lt;br /&gt;-- it. e.g. "step 3: the addition of the results of step 1 and step 2"&lt;br /&gt;search3 :: (Eq k) =&amp;gt; Birth -&amp;gt; k -&amp;gt; Storage k a -&amp;gt; (Storage k a, [a])&lt;br /&gt;search3 = search1&lt;br /&gt;&lt;br /&gt;-- | Likewise Claim 4 can be reduced to the same formula as Claim 2.&lt;br /&gt;search4 :: (Eq k) =&amp;gt; Int -&amp;gt; Birth -&amp;gt; k -&amp;gt; Storage k a -&amp;gt; (Storage k a, [a])&lt;br /&gt;search4 = search2&lt;br /&gt;&lt;br /&gt;{-&lt;br /&gt;Claim 5. An information storage and retrieval system, the system&lt;br /&gt;comprising:&lt;br /&gt;&lt;br /&gt;  a hashing means to provide access to records stored in a memory of the&lt;br /&gt;  system and using an external chaining technique to store the records&lt;br /&gt;  with same hash address, at least some of the records automatically&lt;br /&gt;  expiring,&lt;br /&gt;&lt;br /&gt;  a record search means utilizing a search key to access a linked list&lt;br /&gt;  of records having the same hash address,&lt;br /&gt;&lt;br /&gt;  the record search means including means for identifying and removing&lt;br /&gt;  at least some expired ones of the records from the linked list of&lt;br /&gt;  records when the linked list is accessed, and&lt;br /&gt;&lt;br /&gt;  meals, utilizing the record search means, for inserting, retrieving,&lt;br /&gt;  and deleting records from the system and, at the same time, removing&lt;br /&gt;  at least some expired ones of the records in the accessed linked list&lt;br /&gt;  of records.&lt;br /&gt;-}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- | Every key has a hash code.  Strings of characters may be used as&lt;br /&gt;-- keys.&lt;br /&gt;class (Eq k) =&amp;gt; Hashable k where&lt;br /&gt;  hash :: k -&amp;gt; Int  -- Every key has a hash code.&lt;br /&gt;&lt;br /&gt;instance Hashable Char where hash = ord&lt;br /&gt;&lt;br /&gt;instance (Hashable a) =&amp;gt; Hashable [a]  where&lt;br /&gt;  hash = foldr (\x h -&amp;gt; ((hash x + h) * 53 + 1) `mod` 1733) 0&lt;br /&gt;&lt;br /&gt;type HashedStore k a = Map Int [Record k a]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- | Access a hashed store with a function that returns the modified list of records.&lt;br /&gt;hashAccess5 :: (Hashable k) =&amp;gt;&lt;br /&gt;  (Storage k a -&amp;gt; (Storage k a, [a])) -&amp;gt; Birth -&amp;gt; k -&amp;gt; HashedStore k a -&amp;gt; (HashedStore k a, [a])&lt;br /&gt;hashAccess5 f t k store = (M.insert h retained store, result)&lt;br /&gt;  where&lt;br /&gt;     h = hash k&lt;br /&gt;     (retained, result) = case M.lookup h store of&lt;br /&gt;                             Just records -&amp;gt; f $ filter (expired t) records&lt;br /&gt;                             Nothing      -&amp;gt; ([], [])&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- | Search using hashAccess.&lt;br /&gt;search5 :: (Hashable k) =&amp;gt; Birth -&amp;gt; k -&amp;gt; HashedStore k a -&amp;gt; (HashedStore k a, [a])&lt;br /&gt;search5 t k = hashAccess5 srch t k&lt;br /&gt;  where srch store = (store, map value $ filter (matches k) store)&lt;br /&gt;&lt;br /&gt;-- | Insert using hashAccess.&lt;br /&gt;insert5 :: (Hashable k) =&amp;gt; Birth&lt;br /&gt;                             -- ^ Expiry threshold for old entries.&lt;br /&gt;                          -&amp;gt; Birth&lt;br /&gt;                             -- ^ Birth date for new entry.&lt;br /&gt;                          -&amp;gt; k -&amp;gt; a -&amp;gt; HashedStore k a -&amp;gt; HashedStore k a&lt;br /&gt;insert5 t b k v = fst . hashAccess5 (\store -&amp;gt; (Record b k v : store, [])) t k&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- | Delete using hashAccess&lt;br /&gt;delete5 :: (Hashable k) =&amp;gt; Birth -&amp;gt; k -&amp;gt; HashedStore k a -&amp;gt; HashedStore k a&lt;br /&gt;delete5 t k = fst . hashAccess5 (\store -&amp;gt; (filter (not . deleted) store, [])) t k&lt;br /&gt;  where deleted (Record _ k1 _) = (k == k1)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;{-&lt;br /&gt;Claim 6. The information storage and retrieval system according to&lt;br /&gt;claim 5 further including means for dynamically determining maximum&lt;br /&gt;number for the record search means to remove in the accessed linked&lt;br /&gt;list of records.&lt;br /&gt;-}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- | Access a hashed store with a function that returns the modified list of records.  The "Int"&lt;br /&gt;-- argument is the maxiumum number of expired records to remove.&lt;br /&gt;hashAccess6 :: (Hashable k) =&amp;gt;&lt;br /&gt;  Int -&amp;gt; (Storage k a -&amp;gt; (Storage k a, [a])) -&amp;gt; Birth -&amp;gt; k -&amp;gt; HashedStore k a -&amp;gt; (HashedStore k a, [a])&lt;br /&gt;hashAccess6 n f t k store = (M.insert h retained store, result)&lt;br /&gt;  where&lt;br /&gt;     h = hash k&lt;br /&gt;     (retained, result) = case M.lookup h store of&lt;br /&gt;                             Just records -&amp;gt; f $ filterN n (expired t) records&lt;br /&gt;                             Nothing      -&amp;gt; ([], [])&lt;br /&gt;     filterN _ _ [] = []&lt;br /&gt;     filterN n1 p (x:xs) = if n1 &amp;lt;= 0 || p x then x : filterN n1 p xs else filterN (n1-1) p xs    -- | Search using hashAccess. search6 :: (Hashable k) =&amp;gt; Int -&amp;gt; Birth -&amp;gt; k -&amp;gt; HashedStore k a -&amp;gt; (HashedStore k a, [a])&lt;br /&gt;search6 n t k = hashAccess6 n srch t k&lt;br /&gt;  where srch store = (store, map value $ filter (matches k) store)&lt;br /&gt;&lt;br /&gt;-- | Insert using hashAccess.&lt;br /&gt;insert6 :: (Hashable k) =&amp;gt; Int&lt;br /&gt;                          -&amp;gt; Birth&lt;br /&gt;                             -- ^ Expiry threshold for old entries.&lt;br /&gt;                          -&amp;gt; Birth&lt;br /&gt;                             -- ^ Birth date for new entry.&lt;br /&gt;                          -&amp;gt; k -&amp;gt; a -&amp;gt; HashedStore k a -&amp;gt; HashedStore k a&lt;br /&gt;insert6 n t b k v = fst . hashAccess6 n (\store -&amp;gt; (Record b k v : store, [])) t k&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- | Delete using hashAccess&lt;br /&gt;delete6 :: (Hashable k) =&amp;gt; Int -&amp;gt; Birth -&amp;gt; k -&amp;gt; HashedStore k a -&amp;gt; HashedStore k a&lt;br /&gt;delete6 n t k = fst . hashAccess6 n (\store -&amp;gt; (filter (not . deleted) store, [])) t k&lt;br /&gt;  where deleted (Record _ k1 _) = (k == k1)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;{-&lt;br /&gt;Claim 7. A method for storing and retrieving information records using&lt;br /&gt;a hashing technique to provide access to the records and using an&lt;br /&gt;external chaining technique to store the records with same hash&lt;br /&gt;address, at least some of the records automatically expiring, the&lt;br /&gt;method comprising the steps of:&lt;br /&gt;&lt;br /&gt;  accessing a linked list of records having same hash address,&lt;br /&gt;&lt;br /&gt;  identifying at least some of the automatically expired ones of the records,&lt;br /&gt;&lt;br /&gt;  removing at least some of the automatically expired records from the&lt;br /&gt;  linked list when the linked list is accessed, and&lt;br /&gt;&lt;br /&gt;  inserting, retrieving or deleting one of the records from the system&lt;br /&gt;  following the step of removing.&lt;br /&gt;&lt;br /&gt;Claim 8. The method according to claim 7 further including the step of&lt;br /&gt;dynamically determining maximum number of expired ones of the records&lt;br /&gt;to remove when the linked list is accessed. &lt;br /&gt;-}&lt;br /&gt;&lt;br /&gt;-- | As with Claim 3 vs Claim 1, the formulae for Claim 7 are the same as for Claim 5&lt;br /&gt;hashAccess7 :: (Hashable k) =&amp;gt;&lt;br /&gt;  (Storage k a -&amp;gt; (Storage k a, [a])) -&amp;gt; Birth -&amp;gt; k -&amp;gt; HashedStore k a -&amp;gt; (HashedStore k a, [a])&lt;br /&gt;hashAccess7 = hashAccess5&lt;br /&gt;&lt;br /&gt;search7 :: (Hashable k) =&amp;gt; Birth -&amp;gt; k -&amp;gt; HashedStore k a -&amp;gt; (HashedStore k a, [a])&lt;br /&gt;search7 = search5&lt;br /&gt;&lt;br /&gt;insert7 :: (Hashable k) =&amp;gt; Birth&lt;br /&gt;                             -- ^ Expiry threshold for old entries.&lt;br /&gt;                          -&amp;gt; Birth&lt;br /&gt;                             -- ^ Birth date for new entry.&lt;br /&gt;                          -&amp;gt; k -&amp;gt; a -&amp;gt; HashedStore k a -&amp;gt; HashedStore k a&lt;br /&gt;insert7 = insert5&lt;br /&gt;&lt;br /&gt;delete7 :: (Hashable k) =&amp;gt; Birth -&amp;gt; k -&amp;gt; HashedStore k a -&amp;gt; HashedStore k a&lt;br /&gt;delete7 = delete5&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- | And the formulae for Claim 8 are the same as for Claim 6&lt;br /&gt;hashAccess8 :: (Hashable k) =&amp;gt;&lt;br /&gt;  Int -&amp;gt; (Storage k a -&amp;gt; (Storage k a, [a])) -&amp;gt; Birth -&amp;gt; k -&amp;gt; HashedStore k a -&amp;gt; (HashedStore k a, [a])&lt;br /&gt;hashAccess8 = hashAccess6&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;search8 :: (Hashable k) =&amp;gt; Int -&amp;gt; Birth -&amp;gt; k -&amp;gt; HashedStore k a -&amp;gt; (HashedStore k a, [a])&lt;br /&gt;search8 = search6&lt;br /&gt;&lt;br /&gt;insert8 :: (Hashable k) =&amp;gt; Int&lt;br /&gt;                          -&amp;gt; Birth&lt;br /&gt;                             -- ^ Expiry threshold for old entries.&lt;br /&gt;                          -&amp;gt; Birth&lt;br /&gt;                             -- ^ Birth date for new entry.&lt;br /&gt;                          -&amp;gt; k -&amp;gt; a -&amp;gt; HashedStore k a -&amp;gt; HashedStore k a&lt;br /&gt;insert8 = insert6&lt;br /&gt;&lt;br /&gt;delete8 :: (Hashable k) =&amp;gt; Int -&amp;gt; Birth -&amp;gt; k -&amp;gt; HashedStore k a -&amp;gt; HashedStore k a&lt;br /&gt;delete8 = delete6&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-4243851104214735204?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/4243851104214735204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=4243851104214735204' title='59 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4243851104214735204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4243851104214735204'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2011/04/patent-5893120-reduced-to-mathematical.html' title='Patent 5,893,120 reduced to mathematical formulae'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>59</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-7811521855715558489</id><published>2011-04-20T23:52:00.000-07:00</published><updated>2011-04-21T00:20:46.447-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='elections'/><title type='text'>Why I am voting Yes to Alternative Vote</title><content type='html'>On May 5th the UK votes whether to change its electoral system from "first past the post" (FPTP) to "alternative vote" (AV).  In FPTP you put an X next to the name of one candidate, and the candidate with the biggest number of Xs wins.  In AV the first preferences are counted as for FPTP, but then the candidate with the lowest number of votes is eliminated and the second preferences of their voters are then counted towards the other candidates.  This process carries on until someone has more than 50% of the vote.&lt;br /&gt;&lt;br /&gt;When I was at University the Students Union used AV, and one year a man stood for the post of Womens' Officer under the name of "Captain Kirk".  Against him were two more conventional candidates standing on the Conservative and Labour platforms.&lt;br /&gt;&lt;br /&gt;When the votes were counted Captain Kirk got 49% of the first preference votes, with the Conservative getting 26% and Labour 25%.  Under FPTP Kirk would have won, but now the Labour candidate was eliminated and it turned out that all of the people who voted for her first had voted for the other woman as second preference.  So now the Conservative candidate had 26%+25%=51% of the vote, and Kirk was defeated.&lt;br /&gt;&lt;br /&gt;I'm well aware of the Arrow Impossibility Theorem, which shows that given an election with three or more candidates and three or more voters it is impossible to have a voting system that always delivers the right result, but it seems to me that this is rather like the fact that any programming language is logically equivalent to a Turing Machine; its true, but it doesn't mean that all (voting systems | programming languages) are equally good.  FPTP seems particularly prone to perverse outcomes, such as the election of a male Womens' Officer when the majority of the electorate wants a female.  Pretty much every election in the UK is a 2-horse-1-pony race, with the Liberal Democrats as the pony, and every election pundits discuss the impact of "tactical voting" as people who would like to elect the Lib Dems instead vote Labour for fear of otherwise "letting the Conservatives in".  Under AV they can simply vote Lib Dem first and Labour second.&lt;br /&gt;&lt;br /&gt;The anti-AV campaign's arguments seem to come down to:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;It will create more hung parliaments&lt;/span&gt;.  Possibly.  I don't see this as a bad thing.  The current coalition seems to be doing OK, and a coalition means that more of the electorate's views get represented in government.  Having a government elected by 40% of the people get 100% of the power seems to me rather undemocratic.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;It will empower the National Front&lt;/span&gt;.  For those who don't know, the National Front (NF) is an extreme right wing racist party, which occasionally does well in poor inner-city areas where the "immigrants are taking your jobs and houses" line gets a sympathetic hearing.  But equally, if most people object to the NF on principle then AV makes it much easier to vote against them; just put the NF at the bottom of your list.  That ensures that no matter how other people vote, your vote will count against the NF.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;The most popular person doesn't always win&lt;/span&gt;.  Well yes, if you define "most popular" as "winner under FPTP" then this is true; if AV didn't give a different result sometimes then there wouldn't be any difference.  The point about AV is that the candidates with the broadest support tend to win much more often, whereas FPTP is prone to producing winners who most of the electorate actively dislike.&lt;/li&gt;&lt;/ul&gt;So for these reasons I'm going to be voting YES to AV.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-7811521855715558489?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/7811521855715558489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=7811521855715558489' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/7811521855715558489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/7811521855715558489'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2011/04/why-i-am-voting-yes-to-alternative-vote.html' title='Why I am voting Yes to Alternative Vote'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-2613087031627867966</id><published>2011-04-20T11:11:00.000-07:00</published><updated>2011-04-20T14:08:35.494-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ebook'/><title type='text'>Why I am not buying an ebook reader</title><content type='html'>Being the kind of person with a lot of bookshelves and still not enough room to keep all my books, I wondered about moving to ebooks.  There is a lot to like in the concept; the idea of being able to take a significant chunk of my library with me when I am away from home is very attractive, as is being able to back up the whole lot somewhere off site.  With a waterproof cover for my ebook reader I could take it into the bath or just read when outdoors on a rainy day without worrying about the wet.   And of course you don't have to wait for days for a book to be delivered by Amazon.&lt;br /&gt;&lt;br /&gt;So I started looking for answers to the following questions:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1: What books are available in ebook format?  And for how much?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I picked a selection from the books I have around me now.  Terry Pratchett's books are on the Kindle for around £4.50 each, although "I Shall Wear Midnight" is £9.24.  Hang on a minute, the paperback of ISWM is only £3.49.  So for almost three times the price I get to save the book industry the cost of printing and shipping me a physical product?  I don't think so.  Even the older Pratchett books still cost more for the Kindle than in paperback. &lt;br /&gt;&lt;br /&gt;Looking elsewhere, the first four Google hits are for pirate torrents and Usenet indexers.  Then there is "Fictionwise", which seems to be Barnes &amp;amp; Noble in the US selling stuff on it's Nook.  Despite getting a hit in the Google search it seems that B&amp;amp;N don't actually sell any Pratchett.  Finally the Diesel e-book store has them for around $8 each, with ISWM for $10.  At the moment a dollar is about £0.61 although doing it through a credit card company is going to cost more.&lt;br /&gt;&lt;br /&gt;OK, what about some other books?  Robert Heinlein: there are four Kindle e-books out of the 32 novels and 59 short stories written by Heinlein.  Diesel does better, with 8 Heinlein books.  Baen also have some more Heinlein books.&lt;br /&gt;&lt;br /&gt;"Contact" by Carl Sagan is not available for Kindle.  Googling for "contact sagan ebook" turns up pages of pirate copies but nothing legitimate.&lt;br /&gt;&lt;br /&gt;Lois McMaster Bujold's &lt;span style="font-style: italic;"&gt;Vorkosigan&lt;/span&gt; saga I already have in ebook format because Baen included the entire opus on a CD with the latest volume.  Not only does it not have DRM, but it is licensed for free redistribution.  Kudos to Baen, and I hope the experiment works for them.&lt;br /&gt;&lt;br /&gt;The Matthew Shardlake stories by C.J. Sansom are all available for Kindle, for about the same price as the paperbacks.  They are also available in other ebook formats from Diesel for $13 each, which seems a bit steep even by ebook standards.&lt;br /&gt;&lt;br /&gt;"Next Stop Execution" by Oleg Gordievsky is not available on the Kindle or on Diesel.&lt;br /&gt;&lt;br /&gt;Some of Matt Ridley's books, including "The Red Queen", "Genome", and his latest "The Rational Optimist" are available on the Kindle, but "The Origin of Virtue" is not, which seems odd.  Diesel only has "The Rational Optimist".&lt;br /&gt;&lt;br /&gt;So my conclusion is that I can buy most of my existing library in ebook format, but not all.  Even then its going to be an expensive business to do it legally; we probably have around 1,000 books in our house (never actually counted), and  the cost of getting just half of them in ebook format is going to be in the thousands of pounds.  Ouch!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2: What about Digital Restrictions Management&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The attitude of most publishers here is best summed up by Barnes &amp;amp; Noble.  Its "LendMe(TM) technology" lets you lend a book to someone else for a maximum of two weeks exactly once.  Amazingly this is sold as a feature!  What planet are these people living on?  My wife and I both enjoyed C.J. Sansom's series of historical novels.  If we used ebook readers then we would both have to buy our own copies.  And our son is now starting to read my Terry Pratchett books, so make that three copies in some instances.&lt;br /&gt;&lt;br /&gt;And then there is the limit on transfers to new devices.  It seems from reports on the Web that ebooks can only be transferred to new devices a finite number of times.  After that, your books are stuck on your old devices.  So as I upgrade and replace my ebook readers over the years, as I am sure I will, eventually I will start having to keep my old readers around or else purchase their content yet again.  Also these transfers have to be mediated by the website you bought the ebook from; if they go out of business then your content is stuck.&lt;br /&gt;&lt;br /&gt;Of course I could resort to the pirate copies around the Net.  It seems like pretty much anything that is available in a DRM version is available unlocked for free.  As a test I downloaded a copy of "The Moon is a Harsh Mistress" from one such site, and sure enough I got an unencrypted PDF (which I could read on my Linux box as an added bonus).  I don't feel morally obligated to buy a whole new book just to shift formats: I've already paid the author for the words when I bought the dead-tree version.  (Or have I?  Some of my books were purchased second-hand.  Interesting conundrum there.)  But such "solutions" are inherently unreliable.  I also worry that I will be sucked into a life of copyright infringement; a little demon on my shoulder is asking me, if I'm going to the trouble of locating and downloading a pirate copy to escape the DRM, why bother buying a legitimate copy that I'm never actually going to look at?&lt;br /&gt;&lt;br /&gt;The list of things I can't do with a DRM'd ebook grows the more I think about it.  As our son grows out of books we have donated the old ones to his school library.  I've lent technical books to colleagues.  I've bought out-of-print books second hand.  I've borrowed books from libraries.  My parents read some of our books when they visit.  None of these things are possible with ebooks.&lt;br /&gt;&lt;br /&gt;So despite all the advantages, I think I'll pass for now.  Maybe in a few years the publishing industry will learn the same lessons that the music industry is learning about the futility of DRM and how to price electronic material, and more old books will be digitised.  Then I'll get an ebook reader.  But not now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-2613087031627867966?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/2613087031627867966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=2613087031627867966' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2613087031627867966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2613087031627867966'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2011/04/why-i-am-not-buying-ebook-reader.html' title='Why I am not buying an ebook reader'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-6931544567491384513</id><published>2010-10-30T02:45:00.000-07:00</published><updated>2010-10-30T03:26:02.704-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='real-time'/><category scheme='http://www.blogger.com/atom/ns#' term='Arrow'/><title type='text'>Is this an Arrow II: The Type System Strikes Back!</title><content type='html'>In my last post I asked about my EventStream and RTSP types, and asked if RTSP could be an arrow and what the behaviour of "&amp;amp;&amp;amp;&amp;amp;" should be.  You can see the first post with the type definitions &lt;a href="http://paulspontifications.blogspot.com/2010/10/is-this-arrow.html"&gt;here&lt;/a&gt;.  Jason Hart Priestley replied suggesting that "&amp;amp;&amp;amp;&amp;amp;" should be thought of as a join of two computations, which made a lot of sense.  So I went with that.&lt;br /&gt;&lt;br /&gt;Returning now to the definition of "first", consider:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;first ((*2) &gt;&gt;&gt; dup 5)&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;where "dup 5" emits two copies of every input event, the second one delayed by 5 seconds.  So if the input event was &lt;code&gt;[Event t (3, 3)]&lt;/code&gt; you would want the output to be &lt;code&gt;[Event t (6, 3), Event (t+5) (6, 3)]&lt;/code&gt;".&lt;br /&gt;&lt;br /&gt;But suppose that the input had two events like this: &lt;code&gt;[Event t (3,3), Event (t+1) (4,4)]&lt;/code&gt;.  What should the output be now?&lt;br /&gt;&lt;br /&gt;It seems to me that the output of the argument to "first" should be paired with the second value of the events that "caused" those outputs.  So the result should be:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;[Event t (3,6),&lt;br /&gt; Event (t+1) (4,8),&lt;br /&gt; Event (t+5) (3,6),&lt;br /&gt; Event (t+6) (4,8)]&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;However to get this you need to have every arrow track the "cause" of every output and tag the event with that information.  So you get &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;type TagEvent t a = (t, Event a)&lt;br /&gt;&lt;br /&gt;data EventStream t b c =&lt;br /&gt;   Emit {esEmit :: TagEvent t c, esFuture :: EventStream t b c, esHandle :: RTSP t b c}&lt;br /&gt;   | Wait {esHandle :: RTSP t b c} deriving Show&lt;br /&gt;&lt;br /&gt;newtype RTSP t b c = RTSP {runRTSP :: TagEvent t b →  EventStream t b c}&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The type "t" indicates the type of the tag for this kind of event.  Whenever an arrow emits an event in response to an input then it puts the tag from the input on the output.  In the case of "dup" the EventStream it returns from handling a new event will contain both the pending outputs (with the tags from previous input events) and the two new events with tags from the latest input.&lt;br /&gt;&lt;br /&gt;So now I can define two functions:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;esFirst :: EventStream (d, t) b c → EventStream t (b, d) (c, d)&lt;br /&gt;esFirst (Emit (Event t va, (vb, tag)) es k) =&lt;br /&gt;      Emit (Event t (va, vb), tag) (esFirst es) (rtspFirst k)&lt;br /&gt;esFirst (Wait k) = Wait $ rtspFirst k &lt;br /&gt;&lt;br /&gt;rtspFirst :: RTSP (d, t) b c →  RTSP t (b, d) (c, d)&lt;br /&gt;rtspFirst (RTSP r) = RTSP $ λ(Event t (va,vb), tag) -&gt;&lt;br /&gt;      esFirst $ r (Event t va, (vb, tag))&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The second item in the pair (of type "d") gets tacked on to the tag for the whole arrow and re-appended at the end.  Problem solved?  No.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;instance Arrow (RTSP t) where&lt;br /&gt;   arr f = RTSP $ λ(e, tag) →  Emit (fmap f e, tag) (Wait $ arr f) (arr f)&lt;br /&gt;   first = rtspFirst&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;GHC complains about the infinite type "t = (d, t)".  The problem is that the argument to rtspFirst has the type "RTSP (d, t) b c" but it needs to have the type "RTSP t b c".  So this version of RTSP isn't an arrow.  I have get rid of the type tag "t", but still have some way of having an arrow match causes with effects.  Is there some kind of type hackery that will do this?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-6931544567491384513?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/6931544567491384513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=6931544567491384513' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/6931544567491384513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/6931544567491384513'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2010/10/is-this-arrow-ii-type-system-strikes.html' title='Is this an Arrow II: The Type System Strikes Back!'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-4593707066593934920</id><published>2010-10-26T12:42:00.000-07:00</published><updated>2010-10-26T14:09:32.343-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='real-time'/><category scheme='http://www.blogger.com/atom/ns#' term='Arrow'/><title type='text'>Is this an Arrow?</title><content type='html'>&lt;p&gt;I've been thinking about what a native Haskell middleware would look like for a while.  One thing seemed obvious: it was going to have to be event-based.  So I started thinking about event&lt;br /&gt;streams.&lt;/p&gt;&lt;pre&gt;&lt;br /&gt; data Event a = Event  {&lt;br /&gt;    eventTime :: UTCTime&lt;br /&gt;    eventValue :: a&lt;br /&gt; } deriving (Show, Eq)&lt;br /&gt;&lt;br /&gt; instance Functor Event where&lt;br /&gt; fmap f (Event t v) = Event t (f v)&lt;br /&gt;&lt;br /&gt; -- | True if the first event occurs strictly before the second.&lt;br /&gt; isBefore :: Event a →  Event b →  Bool&lt;br /&gt; isBefore ev1 ev2 = eventTime ev1 &lt;/pre&gt;&lt;p&gt;The simplest representation of a stream of events is just an infinite list, so you can define an event processor as a function from one stream to another:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;br /&gt; type EventProcessor a = [Event a] -&gt; [Event a]&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Unfortunately this won't work.  Suppose that your program is going to emit an event&lt;code&gt;&lt;span style="font-family:Georgia,serif;"&gt; &lt;/span&gt;e1&lt;/code&gt; at time &lt;code&gt;t1&lt;/code&gt;, but an incoming event before &lt;code&gt;t1&lt;/code&gt; would make your program do something else.  In order to decide whether the next item in the output list is &lt;code&gt;e1&lt;/code&gt; you need to look at the time of the next input event.  But since that event hasn't happened yet you have to wait for it.  If it arrives after &lt;code&gt;t1&lt;/code&gt; then you have missed the deadline.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;What is needed is a way to reify the two possibilities here: either the next input event is before &lt;code&gt;t1&lt;/code&gt; or it is after it.  This leads to the following data structures:&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;   data EventStream b c =&lt;br /&gt;    Emit {esEmit :: Event c, esFuture :: EventStream b c, esHandle :: RTSP b c}&lt;br /&gt;    | Wait {esHandle :: RTSP b c} deriving Show&lt;br /&gt;  &lt;br /&gt; newtype RTSP b c = RTSP {runRTSP :: Event b →  EventStream b c}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;The "Emit" case embodies these two possibilities.  An interpreter function will process this as follows:&lt;/p&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;If no input event intervenes then it will emit the event &lt;code&gt;esEmit&lt;/code&gt; and call&lt;br /&gt;itself on &lt;code&gt;esFuture&lt;/code&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;On the other hand if an input event arrives before &lt;code&gt;esEmit&lt;/code&gt; then the function&lt;br /&gt;in &lt;code&gt;esHandle&lt;/code&gt; gets called instead, generating a replacement &lt;code&gt;EventStream&lt;/code&gt;&lt;br /&gt;representing a different future.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Finally the &lt;code&gt;Wait&lt;/code&gt; case allows the event stream to do nothing until an event&lt;br /&gt;arrives.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;The &lt;code&gt;RTSP&lt;/code&gt; stands for "Real Time Stream Processor".  It also handles the problem of what an event stream is supposed to do before the first event arrives.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Interestingly, both &lt;code&gt;EventStream&lt;/code&gt; and &lt;code&gt;RTSP&lt;/code&gt; are Categories.  The composition operator for &lt;code&gt;EventStream&lt;/code&gt; is simple in principle, although in&lt;br /&gt;practice all the different combinations of value and timings make it rather fiddly.  Here it is,along with a block comment that explains the logic if you are really interested.&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;  {-&lt;br /&gt;  The (.) operator for EventStream has to deal with several scenarios:&lt;br /&gt;  &lt;br /&gt;  1: (Wait k2)∘(Wait k1).  This is simple because the only possible event&lt;br /&gt;     is an input that is piped through the two RTSPs.&lt;br /&gt;  &lt;br /&gt;  2: (Wait k2)∘es1@(Emit e1 es1a k1).  In this case there are three timelines:&lt;br /&gt;     a) e1   : (k2 e1)∘es1a      -- Event e1 is passed to k2 and the result composed with es1a.&lt;br /&gt;     b) ev e1: (Wait k2)∘(k1 ev) -- e1 never happens.  Instead the input is passed to k1, which&lt;br /&gt;        generates a new event stream to be composed with k2.&lt;br /&gt;  &lt;br /&gt;     The code for case b is the "k" value in the "let" clause.&lt;br /&gt;  &lt;br /&gt;  3: es2@(Emit e2 es2a k2) es1@(Emit e1 es1a k1).  The logic here is similar to scenario&lt;br /&gt;     2, except that the timing of e2 has to be taken into account as well.  There are five basic&lt;br /&gt;     timelines. Let ev = the next input event and es2b = runRTSP k2 e1&lt;br /&gt;  &lt;br /&gt;     a) e2 e1    : Emit e2 (es2a∘es1a) (k2∘k1)&lt;br /&gt;     b) e1 e2    : k2 e1 ∘ es1a    -- e2 never happens because it is overridden by e1&lt;br /&gt;     c) ev ...   : es2∘(k1 ev)    -- ev overrides e1, and the new output is fed to es2.&lt;br /&gt;     d) e1 ev e2 : esProcess (es2b∘es1a) ev  -- e1 overrides e2, giving es1a and es2b to process ev.&lt;br /&gt;     e) e2 ev e1 : Emit e2 (es2a∘(k1 ev)) -- e2 is emitted, then ev overrides e1.&lt;br /&gt;  -}&lt;br /&gt;  instance Category EventStream where&lt;br /&gt;     -- id :: EventStream b c&lt;br /&gt;     id = Wait $ RTSP $ λe →  Emit e id id&lt;br /&gt;  &lt;br /&gt;     -- (.) :: EventStream  c d →  EventStream b c →  EventStream b d&lt;br /&gt;     (Wait k2)∘(Wait k1) =&lt;br /&gt;        Wait $ k2∘k1&lt;br /&gt;     es2@(Wait k2)∘es1@(Emit e1 es1a k1) =&lt;br /&gt;        let es = (runRTSP k2 e1)∘es1a&lt;br /&gt;            k = RTSP $ λev -&gt;&lt;br /&gt;               if ev `isBefore` e1&lt;br /&gt;                  then es2 ∘ runRTSP k1 ev        -- Timeline 2b&lt;br /&gt;                  else runRTSP (esProcess es) ev  -- Timeline 2a&lt;br /&gt;        in case es of&lt;br /&gt;           Emit e2 es2b _ →  Emit e2 es2b k&lt;br /&gt;           Wait _         →  Wait k&lt;br /&gt;     es2@(Emit e2 es2a k2)∘es1@(Wait k1) =&lt;br /&gt;        Emit e2 (es2a∘es1) (RTSP $ λev →  es2∘runRTSP k1 ev)&lt;br /&gt;     es2@(Emit e2 es2a k2)∘es1@(Emit e1 es1a k1) =&lt;br /&gt;        let k = RTSP $ λev -&gt;&lt;br /&gt;               if ev `isBefore` e1&lt;br /&gt;                  then es2∘runRTSP k1 ev          -- Timeline 3c&lt;br /&gt;                  else runRTSP (esProcess es) ev  -- Timeline 3d&lt;br /&gt;            es = (runRTSP k2 e1)∘es1a&lt;br /&gt;        in if e1 `isBefore` e2&lt;br /&gt;           then   -- Timelines 3b, 3c and 3d.  e2 never happens.&lt;br /&gt;              case es of&lt;br /&gt;                 Emit e3 es3 _ →  Emit e3 es3 k&lt;br /&gt;                 Wait _ →  Wait k&lt;br /&gt;           else   -- Timelines 3a, 3c and 3e.&lt;br /&gt;              Emit e2 (es2a∘es1) (esProcess es2∘k1)&lt;br /&gt;            &lt;br /&gt;  -- | Given a new input event to an existing event stream, this returns the&lt;br /&gt;  -- modified event stream.&lt;br /&gt;  esProcess :: EventStream b c →  RTSP b c&lt;br /&gt;  esProcess (Wait k) = k&lt;br /&gt;  esProcess (Emit eOut rest k) = RTSP $ λeIn -&gt;&lt;br /&gt;     if eIn `isBefore` eOut&lt;br /&gt;        then runRTSP k eIn&lt;br /&gt;        else Emit eOut (runRTSP (esProcess rest) eIn) k&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;And here is the matching RTSP instance:&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;  {-&lt;br /&gt;  The (.) operator for RTSP has to deal with a similar range of scenarios to that of EventStream.&lt;br /&gt;  The event that fires off the composed stream is e0.  This is passed to r1, giving es1, and the&lt;br /&gt;  first event from es1 is passed to r2, giving es2.  Hence these events must occur in order.  However&lt;br /&gt;  ev is a second input event that can arrive at any time after e0.&lt;br /&gt;  &lt;br /&gt;  The possible timelines are therefore:&lt;br /&gt;  &lt;br /&gt;     1: e0 e1 e2 ev: Emit e2 (es2a∘es1a) _  -- The basic case.  ev is passed to (es2a∘es1a)&lt;br /&gt;     2: e0 e1 ev e2: es2∘es1a               -- e1 has happened, but ev occurs before e2 is emitted.&lt;br /&gt;     3: e0 ev e1 e2: r2∘esProcess es1       -- e1 is overriden by ev.&lt;br /&gt;  -}&lt;br /&gt;  instance Category RTSP where&lt;br /&gt;     -- id :: RTSP b c&lt;br /&gt;     id = RTSP $ λev →  Emit ev id id&lt;br /&gt;     -- (.) :: RTSP c d →  RTSP b c →  RTSP b d&lt;br /&gt;     r2∘r1 = RTSP $ λe0 -&gt;&lt;br /&gt;        let es1 = runRTSP r1 e0&lt;br /&gt;        in case es1 of&lt;br /&gt;           Emit e1 es1a k1a -&gt;&lt;br /&gt;              let es2 = runRTSP r2 e1&lt;br /&gt;                  k = RTSP $ λev -&gt;&lt;br /&gt;                     runRTSP (if ev `isBefore` e1 then r2∘k1a else r2∘esProcess es1) ev&lt;br /&gt;              in case es2 of&lt;br /&gt;                    Emit e2 es2a k2a -&gt;&lt;br /&gt;                       Emit e2 (es2a∘es1a) k&lt;br /&gt;                    Wait k2a -&gt;&lt;br /&gt;                       Wait k&lt;br /&gt;           Wait k1a -&gt;&lt;br /&gt;              Wait (r2∘k1a)&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;So now we have shown that these two things are both Categories, can we make them Arrows?  The&lt;code&gt; Arrow&lt;/code&gt; class requires a definition of &lt;code&gt;first&lt;/code&gt; with the following types:&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;  first :: EventStream b c -&gt; EventStream (b, d) (c, d)  &lt;br /&gt;  first :: RTSP b c →  RTSP (b, d) (c, d)&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;This is where I run into problems.  &lt;code&gt;EventStream&lt;/code&gt; can't be an Arrow because the first argument might emit a value before any input is received.  At this point&lt;code&gt;&lt;span style="font-family:Georgia,serif;"&gt; &lt;/span&gt;first&lt;/code&gt; is supposed to pair up the output with some other value of type &lt;code&gt;d&lt;/code&gt;, but no such value exists.  So &lt;code&gt;EventStream&lt;/code&gt; can't be an Arrow.&lt;code&gt;&lt;span style="font-family:Georgia,serif;"&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/span&gt;RTSP&lt;/code&gt; doesn't have this problem because some value of type &lt;code&gt;d&lt;/code&gt; must have been passed in at the start, so this lets us define &lt;code&gt;first&lt;/code&gt;.  However from a semantic point of view it is not clear how this should deal with delays and subsequent events.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Its easy to write a &lt;code&gt;delay&lt;/code&gt; arrow: it simply echoes every incoming event with a fixed delay added to the event time.  Other variations on the theme are possible, such as a&lt;code&gt;&lt;span style="font-family:Georgia,serif;"&gt; &lt;/span&gt;dup&lt;/code&gt; arrow that echoes every input immediately and then again after a fixed delay, or an arrow that echoes every input as a &lt;code&gt;Right&lt;/code&gt; value, but also emits a&lt;code&gt;&lt;span style="font-family:Georgia,serif;"&gt; &lt;/span&gt;Left timeout&lt;/code&gt; value if no input is received after a defined delay.  There is clearly a whole family of combinators waiting to be written here.  But &lt;code&gt;first&lt;/code&gt; things&lt;code&gt;&lt;span style="font-family:Georgia,serif;"&gt; &lt;/span&gt;first&lt;/code&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;What should &lt;code&gt;first&lt;/code&gt; do if its argument is &lt;code&gt;delay 1&lt;/code&gt;?  Intuitively, &lt;code&gt;first&lt;/code&gt; puts the first item of the pair through its argument, but the second argument bypasses this processing.  However this would mean emitting one part of the result before the&lt;br /&gt;second.  What should it do with &lt;code&gt;dup 1&lt;/code&gt;?  And what do the answers imply for this&lt;br /&gt;expression?&lt;/p&gt;&lt;pre&gt;  delay 4 &amp;amp;&amp;amp;&amp;amp; delay 5&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;I don't have any good answers.  Maybe RTSP isn't an arrow, but that is a real nuisance.  Any ideas?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-4593707066593934920?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/4593707066593934920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=4593707066593934920' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4593707066593934920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4593707066593934920'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2010/10/is-this-arrow.html' title='Is this an Arrow?'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-2242719743154918182</id><published>2010-07-08T11:54:00.000-07:00</published><updated>2010-07-09T00:29:45.225-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bilski'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='patent'/><title type='text'>Bilski says software is not patentable</title><content type='html'>The US Supreme Court's decision &lt;a href="http://www.groklaw.net/pdf2/BilskiScotus08-964.pdf"&gt;In re Bilski&lt;/a&gt; doesn't say much, but I think it says more than perhaps Justice Kennedy intended.  In particular I think it is possible to argue that software is not a patentable subject matter.&lt;br /&gt;&lt;br /&gt;The Court rejected the "machine or transformation" test as being too narrow; it would seem to exclude things, including business methods, that are "processes" or "methods" under the usual English meanings of those words.  But the Court also refers to precedents in Benson, Flook and Diehr (three previous cases), and states that these were used to decide Bilski.  It follows that the principles in those precedents are the ones that should generally be applied.  Crucially the Court also declined to endorse anything in the State Street decision that originally opened the floodgates to software patents.&lt;br /&gt;&lt;br /&gt;The Benson case involved a patent for converting BCD into pure binary.  It was held to be an unpatentable abstract idea because the method in the patent was derived from a formula, and so a patent on the method was in effect a patent on the formula.&lt;br /&gt;&lt;br /&gt;The Flook case was for a patent on setting alarm thresholds based on a "mathematical algorithm".  Again the patent was overturned.  In this case a key principle made in the decision was that any mathematical algorithm must be assumed to be "well known".  This is a crucial point; a patent can include things that were already known, provided it combines them in a novel way, or with some novel element.  The invention has to be considered as a whole, but adding a "trivial post-solution activity" such as setting an alarm wasn't considered to be inventive enough if the formula used was considered to be part of prior art.  This means that any "mathematical algorithm" you might come up with is considered as "well known" &lt;span style="font-style: italic;"&gt;even if you are the first person to invent it&lt;/span&gt;.  It can go into a patent, but it doesn't add to the novelty.&lt;br /&gt;&lt;br /&gt;Diehr was concerned with a patent for curing rubber.  The patent described a machine that measured the mould temperature continuously, pushed the temperature readings through a "mathematical formula" (which was in fact very well known in practice as well as in the narrow legal sense), and opened the mould when the output reached a certain value.  The patent was upheld because the novelty lay in the use of continuous measurements to control mould opening, rather than a precomputed delay as had previously been the practice.  The fact that a formula was embedded in a computer program as part of the invention did not change this.&lt;br /&gt;&lt;br /&gt;So where does this leave software patents?  The Court followed the reasoning in the precedents to conclude that since the concept of "hedging" in the Bilski patent was reduced to a mathematical formula in Claim 4, that formula could not be considered a novel contribution.  Nothing else in the patent was novel, so they rejected it.&lt;br /&gt;&lt;br /&gt;Following this reasoning, it would seem that anything that can be reduced to a "mathematical formula" or "mathematical algorithm" is not patentable.  It is possible that Justice Kennedy made a layman's error in his thinking here by assuming that all "mathematical formulae" are concerned with real numbers, as were all the formulae considered in Bilski and the precedents listed.&lt;br /&gt;&lt;br /&gt;But of course any computer scientist or mathematician will tell you that this is not true.  The whole of &lt;a href="http://en.wikipedia.org/wiki/Discrete_mathematics"&gt;discrete mathematics&lt;/a&gt; is concerned with mathematical formulae and algorithms that are not related to real numbers.&lt;br /&gt;&lt;br /&gt;So it would seem that formulae and algorithms related to discrete mathematics would fall under this rule as well.  The Court uses the term "algorithm" and "formula" as synonyms, as indeed they are.  To see this, consider the QuickSort algorithm:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;If there are only 0 or 1 items in the list to be sorted then stop.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Take the first item from the list of things to be sorted.  Call this the "pivot".&lt;/li&gt;&lt;li&gt;Divide the rest of the items into two sublists; (a) those less than the pivot, and (b) the rest.&lt;/li&gt;&lt;li&gt;Apply this whole algorithm to each of the two sublists from step 3, thereby sorting the sublists.&lt;/li&gt;&lt;li&gt;Assemble the sorted list by taking the sorted sublist (a), appending the pivot, and then appending the sorted sublist (b).&lt;/li&gt;&lt;/ol&gt;This is clearly a method or process.  It is also an algorithm.  It can also be represented as a formula:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   sort [] = []&lt;br /&gt;sort [x] = [x]&lt;br /&gt;sort (pivot:rest) = sort sublistA ++ [pivot] ++ sort sublistB&lt;br /&gt;   where (sublistA, sublistB) = partition (&amp;lt; pivot) rest&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is QuickSort written in Haskell.  Every Haskell program has a well-defined translation to a formula in the Lambda Calculus, and the Lambda Calculus is part of mathematics.  Haskell is turing-complete, which means that any process that can be written as a sequence of steps for manipulating information of any sort can also be written as a Haskell program.  Therefore any such process can be reduced to a "mathematical formula".  Since mathematical formulae are not patentable subject matter it follows that no process for manipulating information is patentable subject matter.&lt;br /&gt;&lt;br /&gt;It might be argued that the use of the modifier "mathematical" by the Court is an attempt to distinguish mathematical formulae and algorithms from non-mathematical ones.  But in reality there is no such distinction.&lt;br /&gt;&lt;br /&gt;Merriam-Webster defines mathematics as:&lt;br /&gt;&lt;blockquote&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;the science of numbers and their  operations, interrelations, combinations, generalizations, and  abstractions and of space configurations and their structure,  measurement, transformations, and generalizations&lt;/blockquote&gt;This is a poor definition, since it seems to ignore many topics that are conventionally considered part of mathematics even though they have no apparent relationship to numbers, such as graph theory and topology.&lt;br /&gt;The Britannica is rather more useful, defining mathematics as:&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;[The] science of structure,  order, and relation that has evolved from counting, measuring, and  describing the shapes of objects.&lt;/p&gt; &lt;p&gt; It deals with logical reasoning and quantitative calculation. [...]&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;So is there a class of algorithms or formulae that is not "mathematical" in nature?  Clearly not.  If any algorithm can be recast as a formula.  If such a formula is a product of logical reasoning then it falls under the ambit of mathematics.  Even if we take the more limited definition of Merriam-Webster, Godel  showed how any logical statement can be recast as a statement of number  theory.&lt;br /&gt;&lt;br /&gt;Another possible objection to my argument is that mathematics is "abstract" while a process is "concrete".  But this is a distinction without a difference.  It suggests that the algorithm for QuickSort, expressed as a series of steps, is somehow more concrete than the equivalent formulation in Lambda Calculus.  Of course any formulation of QuickSort is going to be longer than the typical single line that non-mathematicians think of when presented with the phrase "mathematical formula", but this would imply that patentability is determined by length, which is clearly nonsense.  A mathematical formula that takes a dozen pages to write down is still a mathematical formula.&lt;br /&gt;&lt;br /&gt;So I have to conclude that anything capable of being expressed as a computer program is not patentable subject matter under US law.&lt;br /&gt;&lt;br /&gt;This probably extends to business method patents as well.  Since any business method is the manipulation of information, it follows that it can be written as a computer program (and in fact many Internet businesses have been built by doing exactly that).  Even if the business method requires human judgement at some point, that judgement can be treated simply as another input to the program.&lt;br /&gt;&lt;br /&gt;To return to where I started, the Supreme Court says that business methods are not a-priori unpatentable, since they are processes and methods.  Bilski may not have had sufficient novelty once the formula was stripped out, but the Court wanted to allow for the possibility of a set of business methods that were sufficiently novel.  However by following the court's own reasoning it is clear that this set is empty.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-2242719743154918182?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/2242719743154918182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=2242719743154918182' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2242719743154918182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2242719743154918182'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2010/07/bilski-says-software-is-not-patentable.html' title='Bilski says software is not patentable'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-4484041833472634798</id><published>2009-07-12T06:31:00.000-07:00</published><updated>2009-07-12T07:09:03.673-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='p2p'/><category scheme='http://www.blogger.com/atom/ns#' term='politics'/><title type='text'>How many copies is Jammie Thomas-Rasset responsible for?</title><content type='html'>So Jammie Thomas-Rasset &lt;a href="http://www.theregister.co.uk/2009/07/07/jammie_thomas_requests_trial_number_three/"&gt;did indeed&lt;/a&gt; download and share music using P2P.  Others have commented on the disproportionate nature of the penalty damages imposed in this case.  Here I want to address a narrower question: how many copies should she be charged for?&lt;br /&gt;&lt;br /&gt;The RIAA &lt;a href="http://www.riaa.com/newsitem.php?id=67AC2E75-E62A-1823-9604-FD0F15EF0F63"&gt;argues&lt;/a&gt; that Thomas-Rasset was sharing 1,700 audio files, and that 2.3 million P2P users had access to those files.  This is "the equivalent of standing on a street corner with approximately 150 CDs and giving away free copies to anyone who asks".&lt;br /&gt;&lt;br /&gt;But clearly Thomas-Rasset didn't actually create 2.3 million copies of those 1,700 files.  Even if she had, the people who downloaded the files must share some responsibility, since they actively chose to make copies (unlike Thomas-Rasset, who merely chose to make them available).  The RIAA seems to believe that because we don't know how many people actually downloaded these tracks from Thomas-Rasset's computer rather than someone else, that statutory damages are justified.&lt;br /&gt;&lt;br /&gt;But this begs an important question: if a million people decide to share and copy some music track over P2P, how many copies do they make?  The answer is quite obvious: one million users, one million copies.  Nobody is going to fill their disks with thousands of copies of the same song, and even if they did it wouldn't make any difference.&lt;br /&gt;&lt;br /&gt;(Actually quite a few users will have also made temporary copies on MP3 players and the like, but since doing that with a CD you own is fair use, that seems pretty irrelevant)&lt;br /&gt;&lt;br /&gt;So at most Thomas-Rasset is guilty of having made 1,700 illegal copies of 1,700 songs.  The fact that these songs were also available for others to download is irrelevant to the damages argument.  Maybe 1,000 people made copies of these songs, maybe none.  Civil law (which this is) is based on the balance of probabilities, and on the balance of probabilities the total responsibility of Thomas-Rasset for the copies made by the network of which she was a part is one copy of each song.  These songs are sold for download for a dollar each, which suggests that, absent punitive damages, Thomas-Rasset's true liability should be $1,700.  Even with triple damages for deliberate actions, that would still only be $5,100.&lt;br /&gt;&lt;br /&gt;But of course, this isn't about justice for artists, this is about the business model of the RIAA members.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-4484041833472634798?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/4484041833472634798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=4484041833472634798' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4484041833472634798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4484041833472634798'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2009/07/how-many-copies-is-jammie-thomas-rasset.html' title='How many copies is Jammie Thomas-Rasset responsible for?'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-3442118477234709685</id><published>2009-06-16T13:06:00.000-07:00</published><updated>2009-06-18T12:52:11.553-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Vote Windows, for No Tax On Sheep!</title><content type='html'>Once upon a time, so I have heard, there was an Australian politician who ran on a platform of "No Tax On Sheep".  None of the other candidates would have dreamed of trying to tax sheep.  Nevertheless, our hero won by a landslide.&lt;br /&gt;&lt;br /&gt;Its a nice trick; claim a common virtue, not because it differentiates you, but because it casts a subtle doubt on whether your competition has the same virtue.  It involves no actual lies, and you don't even need to name the competitors; they are all equally suspected, and must either ignore you or issue hasty and unconvincing claims to be just as good.&lt;br /&gt;&lt;br /&gt;Advertisers love this one.  In advertising "knocking copy" is the term for pointing out the defects in your competition.  But blatant knocking copy is usually counter-productive: potential customers see it as mean, and it also carries an implicit message that the product you are knocking is a significant competitor (otherwise why spend money knocking it).  But the "no tax on sheep" strategy neatly sidesteps this; you don't name your competitors and you don't say anything bad about them.  You merely imply that they are not as good as you.&lt;br /&gt;&lt;br /&gt;So its no surprise to see Microsoft using this strategy against Linux.  The &lt;a href="http://www.microsoft.com/windows/buy/netbooks/default.aspx"&gt;Microsoft page on Netbooks&lt;/a&gt; has this to say on why you want Windows on your Netbook:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;p class="list_after_para"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;For starters, you already know how to use it.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0); font-style: italic;"&gt; Windows also works with more devices and applications, and offers security features to help keep your PC and personal information safe.&lt;/span&gt; Here's a whole list of other Windows benefits:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p class=""&gt;&lt;strong style="font-style: italic;"&gt;Windows makes your life simpler.&lt;/strong&gt;&lt;span style="font-style: italic;"&gt; Windows is easy to set up and use.&lt;/span&gt; You already know your way around, which means you can get started right away and easily find everything you need. &lt;/p&gt;&lt;/li&gt;&lt;li style="font-style: italic;"&gt;&lt;p class=""&gt;&lt;strong&gt;Windows just works with your stuff.&lt;/strong&gt; With Windows, it's "plug and play"—meaning it works out-of-the-box with your PC applications and peripherals such as printers, digital still and video cameras, music players, and webcams. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class=""&gt;&lt;strong style="font-style: italic;"&gt;Windows gives you peace of mind.&lt;/strong&gt;&lt;span style="font-style: italic;"&gt; Windows comes with features and tools that help keep your family and personal information safe. When you install Internet Explorer 8 as your Internet browser, you get additional built-in security features that help protect against deceptive and malicious websites.&lt;/span&gt; &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class=""&gt;&lt;strong style="font-style: italic;"&gt;Windows comes with more goodies.&lt;/strong&gt;&lt;span style="font-style: italic;"&gt; With Windows running on your netbook PC, you get access to additional software and services provided for free, like Windows Live services, which help with photo editing and organization, instant messaging, and family computing safety—all of which are just a download away.&lt;/span&gt; &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I've highlighted the items which (in my opinion) apply to Linux as well.  About the only thing I can't honestly claim is the "Windows is familiar" line.  I can't deny that if you have only ever used Windows then Linux is going to be a bit different.  Its not huge, but there is no point pretending its zero either.&lt;br /&gt;&lt;br /&gt;So, I wonder, how could we turn this trick around?  What can we say about Linux that casts doubt on Windows?  To work, the implication has to be something that is &lt;a href="http://en.wikipedia.org/wiki/Truthiness"&gt;truthy&lt;/a&gt;, regardless of how true it actually is.  How about:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Won't send your files to the US government.  Linux has no stealth functionality, and it wasn't written by people with big Government contracts.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;No Blue Screen of Death!  Linux was designed to be reliable.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Puts you in charge.  You decide what software to install, and if you don't like it you can &lt;span style="font-style: italic;"&gt;always&lt;/span&gt; remove it.&lt;/li&gt;&lt;li&gt;No extra fees just to get a feature you thought you had already bought.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;But of course none of this will work in reality.  Deceit of any kind and open source are fundamentally incompatible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-3442118477234709685?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/3442118477234709685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=3442118477234709685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/3442118477234709685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/3442118477234709685'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2009/06/vote-windows-for-no-tax-on-sheep.html' title='Vote Windows, for No Tax On Sheep!'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-282137685559785543</id><published>2009-06-13T09:10:00.001-07:00</published><updated>2009-06-13T12:04:05.734-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='broadband'/><title type='text'>An Optimistic View of Net Neutrality</title><content type='html'>The Net Neutrality argument has been puttering along for a few years in the US, and is now starting to get going over here &lt;a href="http://arstechnica.com/tech-policy/news/2009/06/major-uk-isp-video-streamings-free-ride-is-over.ars"&gt;in the UK&lt;/a&gt; as well.&lt;br /&gt;&lt;br /&gt;On one side are the ISPs, most of whom are telephone and TV cable companies.  They are used to being a choke point between the consumer and the rest of the telecoms world, and their managers all have MBAs.  The latter point is important because analysing your position in the &lt;a href="http://en.wikipedia.org/wiki/Value_chain"&gt;value chain&lt;/a&gt; is a big part of the MBA curriculum, and everyone knows that being a commodity provider is a bad place to be.  So the ISPs are desperate to re-establish their choke-hold, which means doing something that forces the other players to treat with them rather than the competition.  Hence they want the right to cut deals with, for instance, streaming video providers.  If you want to see good quality TV over the Internet from the Foo Video Company, you have to go with an ISP that has a deal with Foo Video, which restricts your choice as a consumer and therefore allows the ISP to charge more.  The ISPs also want to charge Foo Video on the grounds that Foo must want its end users to get good quality video and will therefore pay for the privilege.&lt;br /&gt;&lt;br /&gt;Everyone else in the value chain (including the domestic Internet users) is up in arms at this prospect for the excellent reason that if the ISPs can capture some of the money flowing around this part of the economy then there will be less for everyone else.  They want the ISPs to be required to stay neutral on the grounds that anything else will increase prices (which, from the point of the ISPs, is the point) and restrict new developments because start-up companies won't have the financial and market muscle to cut the necessary deals.&lt;br /&gt;&lt;br /&gt;Unlike many commentators I believe that in the long run this argument will be irrelevant, and that whatever various governments do on the subject will make little or no difference, and I believe this because of &lt;a href="http://en.wikipedia.org/wiki/Metcalfs_Law"&gt;Metcalf's Law&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Bob Metcalf's original formulation of his law said that the value of a network is proportional to the square of the number of users.  In fact that is only true if everyone on the network is equally interested in communicating with everyone else.  In reality that isn't true, but whatever the pattern of communication the value of a network still rises more than linearly with its size, which is what matters.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The History of Metcalf's Law 1: Peering versus Transit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Back in the late 1990s there was a big argument over network peering.  There were big ISPs and little ISPs.   Big ISPs had all the same costs as little ISPs in running points of presence for modem users to phone into, but they also had to run long-haul bandwidth terminated by big routers.  A small ISP could hook into this infrastructure just by connecting to a big ISP, which gave the small ISPs a competitive advantage and left the big ISPs without a business case for running that vital long haul infrastructure.&lt;br /&gt;&lt;br /&gt;At the time the only kind of connection between two ISPs was "peering", which means that two ISPs share a connection point where they exchange traffic.   So the big ISPs implemented a new policy:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Henceforth peering connections would only be made between ISPs the same size, and would only carry traffic bound for customers of the other ISP.&lt;/li&gt;&lt;li&gt;Small ISPs could pay for "transit" connections to big ISPs.  A transit connection would carry traffic bound for anywhere.&lt;/li&gt;&lt;/ol&gt;There was a big argument over this change.  Small ISPs complained that this would lead to the "balkanisation of the Internet", by which they meant that customers of ISP X might not be able to communicate with customers of ISP Y.  But in practice that didn't happen.  The peering/transit distinction continues to be the mechanism by which the Internet is organised commercially, but the Internet was never balkanised because Metcalf's Law meant it was never in anyone's interest.&lt;br /&gt;&lt;br /&gt;To see why this is, consider what happens to the value of a network cut in half.  If the value of a network is purely proportional to the size then you now have two networks worth half as much each; the total value hasn't changed.  But Metcalf's Law says that the position is worse: the total value of two networks is less than the value of one big one.&lt;br /&gt;&lt;br /&gt;So the only way to make money from splitting a network in two is by capturing  value faster than you destroy it.  But there just isn't that much loose value floating around the Internet, and all the companies involved found that they made more money by keeping everyone connected.  So they did.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The History of Metcalf's Law 2: Walled Gardens&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Another bright idea floating around in the early days of the commercial Internet was the &lt;a href="http://en.wikipedia.org/wiki/Walled_garden_%28technology%29"&gt;Walled Garden&lt;/a&gt;.  This was pioneered by &lt;a href="http://en.wikipedia.org/wiki/Compuserve"&gt;Compuserve&lt;/a&gt; in the days before dial-up Internet access, but &lt;a href="http://en.wikipedia.org/wiki/Msn"&gt;MSN&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Aol"&gt;AOL&lt;/a&gt; were created with similar concepts.  The basic idea was to provide a premium branded information service that would be exclusively available to dial-up subscribers.  Internet access was added by these providers later because their customers demanded it, but the business model was based on selling a value-added subscription information service that would be better than the free Internet.&lt;br /&gt;&lt;br /&gt;The whole idea flopped.  Not enough subscribers were prepared to pay the premium.  The basic problem was, and is, that as soon as you put up a paywall between your content and non-subscribers you split the network in two: there is the bit you own, and the rest of the network.  Your bit is very small, and Metcalf's Law says that it therefore has a much lower value.  So nobody wants it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Metcalf's Law and Network Neutrality&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So what about the network neutrality debate?  If you googled for "balkanise Internet" a few years ago you got lots of articles from the 1990s arguing about ISP peering and transit fees.  Today the same search yields just as many arguments about network neutrality.&lt;br /&gt;&lt;br /&gt;The ISPs want to create a new version of the Walled Garden: information providers will pay to get better links to their end users, and certain protocols will get higher bandwidth than others.  And I believe that this will suffer the same fate as all the other attempts to fight Metcalf's Law.  An ISP that places artificial boundaries between Internet users (wherever they fit in the Internet's various value chains) is lessening the value of the Internet as a whole to those users.  If they make a significant difference to the user's experience then they are offering less value, and will lose market share as a result.  If they don't make a difference then nobody will care.  Either way its not a paying proposition.&lt;br /&gt;&lt;br /&gt;Therefore network neutrality will dominate because anything else is less valuable, and therefore will drive away customers.&lt;br /&gt;&lt;br /&gt;There is one application where non network-neutral services may survive for a while, which is TV over the Internet.  A DVD-quality video stream is around 5Mbits/sec, or about 2GBytes/hour, which is a bit too high to just transport over the Internet to a home internet connection.  Never mind what happens when two people in the same household want to watch different things.  So for a while it makes economic sense for ISPs to cut special deals with TV providers.  But that's nothing new: the economic model is identical to cable TV.  Existing cable TV companies would probably like to keep it that way, but their power to do so is very limited.  Sooner or later some combination of improved ADSL, fibre to the curb/home/street and wireless connections will provide commodity bandwidth high enough to carry decent video, and cable TV companies will cease to exist.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-282137685559785543?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/282137685559785543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=282137685559785543' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/282137685559785543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/282137685559785543'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2009/06/optimistic-view-of-net-neutrality.html' title='An Optimistic View of Net Neutrality'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-1474260946847001853</id><published>2009-05-02T07:38:00.000-07:00</published><updated>2009-05-02T08:35:37.834-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='politics broadband'/><title type='text'>UK to store more "communications data"</title><content type='html'>The UK has a rather odd regime for intercepting on-line communications.  The law distinguishes between the content of communications and "communications data" (such as a list of the telephone calls you have made).  Content cannot be used in criminal investigations, although it is widely believed that the security services intercept a lot of it as part of their general signals intelligence activity.  However "communications data" is available to pretty much any part of Government provided that a sufficiently senior person signs off on the request.  No warrant is needed.&lt;br /&gt;&lt;br /&gt;The UK Government is consulting on proposals to require ISPs to gather and store a lot more "communications data".  At present they basically have to take the IP header data: origin, destination, port number and protocol (TCP/UDP).  Volumes and times are likely to be recorded, and of course your DHCP lease so that they can tie a physical machine to the IP address.  So with this they can see that you browsed &lt;a href="http://www.bbc.co.uk"&gt;http://www.bbc.co.uk&lt;/a&gt;, but not what you actually read.  But the Government argues that this is increasingly insufficient.  If its investigating suspicious activity, such as a big purchase of fertilizer, then it needs to find out who the suspect is communicating with.  If the suspect uses an off-shore email service such as Gmail then the existing communications data regime can't get at this.&lt;br /&gt;&lt;br /&gt;So the Government's &lt;a href="http://www.homeoffice.gov.uk/documents/cons-2009-communications-data"&gt;proposed solution&lt;/a&gt; is to require ISPs to capture and store more data, including "third party data", which seems to mean anything inside the packets that helps to identify the people you are communicating with.&lt;br /&gt;&lt;br /&gt;The problem with this is that its an impossible job.  Most stuff that is even vaguely sensitive (like Gmail) is sent using HTTPS as a matter of course.  Even if this could be got over, communication data is simply too slippery a concept once you get away from IP headers.  For instance, MMORPGs like Runescape and World of Warcraft (and for that matter Second Life) have "chat" facilities that use game location to determine who can "hear" you.  Suppose a conspiracy decides to meet at the edge of a forest in Runescape: their location is exactly the sort of communications data that the Government wants to capture.  Doing so requires someone to reverse engineer the existing Runescape protocol and then write software to extract just that part of the data.  This software would then have to be run by every ISP in the UK, and the whole exercise repeated for every other multi-player game and interactive website.&lt;br /&gt;&lt;br /&gt;This would be a huge effort, but it would still fail to capture data about any criminal who had a modicum of technical knowledge, because there are too many options for setting up channels that the Government cannot intercept.  For instance encrypted messages could be left as Usenet posts.  &lt;a href="http://freenetproject.org/"&gt;Freenet&lt;/a&gt; exists specifically for avoiding surveillance.  And SSH tunnel services can let you use any Internet service without being tracked.&lt;br /&gt;&lt;br /&gt;So in effect the Government is proposing a huge technical boondoggle to do the impossible.  Not for the first time, and I'm sure it won't be for the last.&lt;br /&gt;&lt;br /&gt;My full response is available &lt;a href="http://www.scribd.com/doc/14853550/Communications-Data-Consultation"&gt;here&lt;/a&gt; in PDF format.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-1474260946847001853?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/1474260946847001853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=1474260946847001853' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/1474260946847001853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/1474260946847001853'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2009/05/uk-to-store-more-communications-data.html' title='UK to store more &quot;communications data&quot;'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-4798626579091442025</id><published>2009-04-05T13:10:00.000-07:00</published><updated>2009-04-05T13:48:13.418-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='politics organisation antipattern Bruce_Sterling'/><title type='text'>Bruce Sterling accused of sham marriage</title><content type='html'>I've just read on &lt;a href="http://blog.wired.com/sterling/2009/04/bruce-sterling.html"&gt;Bruce Sterling's blog&lt;/a&gt; that he and his Serbian wife have been accused of a "green card" marriage by the US immigration authorities.  They basically have a couple of weeks to prove to the authorities satisfaction that their marriage is not a sham.  If they cannot do so then Jasmina Sterling (nee Tesanovic) will be deported.&lt;br /&gt;&lt;br /&gt;This is wrong on many levels.  I've never met them, so I can't comment myself on the reality of their marriage, except to note that Bruce Sterling is a good looking wealthy intelligent over-achieving man, so I can't see that he needs to hire himself out as a husband-of-convenience, nor does it seem likely that he needed to offer a green card just to get a woman into his bed.&lt;br /&gt;&lt;br /&gt;(Aside: I also think it truly ironic that an organisation that takes 6 months to decide on a 3-month visitor's visa allows only a couple of weeks for them to put together evidence that their marriage is real).&lt;br /&gt;&lt;br /&gt;But US Immigration don't think like that.  It seems from what Sterling wrote that they check up on marriages between Americans and non-citizens, and look for the paper trail that would be generated by people living together: joint ownership of homes, bank accounts and the like.  And because of their somewhat nomadic existence it seems that Bruce and Jasmina don't have that paper trail.&lt;br /&gt;&lt;br /&gt;Students of organisational behaviour will recognise an anti-pattern here, although I don't know if its ever been written down.  It looks like this:&lt;br /&gt;&lt;br /&gt;Name: Chasing Reality&lt;br /&gt;&lt;br /&gt;Context: Enforcement of rules that mandate an ill-defined threshold of performance.&lt;br /&gt;&lt;br /&gt;Forces: People attempt to meet the performance threshold with minimum effort.  The enforcing authority becomes concerned that their effectiveness is being eroded.&lt;br /&gt;&lt;br /&gt;Supposed solution:  The enforcing authority requires increasingly stringent evidence of performance.  The rules about what is "sufficient" may also be kept secret or poorly defined to prevent people from engineering their evidence to follow the requirements.&lt;br /&gt;&lt;br /&gt;Resulting context: the enforcing authority becomes increasingly unable to judge real performance, and instead becomes obsessed with the production of evidence.  Success depends more on finding out what the real criteria are and meeting them than on actually performing the original task.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have seen this pattern before, although never with such horrendous consequences.   Some years ago a senior manager told me that he had a set of criteria for any application to spend money, but he would not tell anyone what they were for fear that all the applications would then meet those criteria.  When I visited the US many years ago, before the visa waiver programme, I had to provide evidence of solvency to get a visa, but was not told what "evidence of solvency" looked like (I photocopied a year of bank statements; it did the trick).&lt;br /&gt;&lt;br /&gt;Mr &amp;amp; Mrs Sterling are apparently required to meet a secret (or at least highly under-advertised) set of criteria for a "real" marriage.  When the US first controlled immigration I expect it only had to be a legal marriage, but sham marriages were an obvious problem.  So the Immigration people wanted to see wedding photos.  So sham couples hired photographers.  Then Immigration wanted to see you living together, so sham couples rented apartments.  And so it goes on.  The Immigration people are on an endless treadmill: whatever evidence they require will be produced, whether by sham couples or real ones.  Now its got to the point where the sham couples will actually have better evidence of their reality than real couples, because they are more aware of the need to generate it.  Or as &lt;a href="http://en.wikipedia.org/wiki/Granny_Weatherwax"&gt;Granny Weatherwax&lt;/a&gt; once put it, "Things that try to look like things often look more like things than things."&lt;br /&gt;&lt;br /&gt;Its also ironic that a writer with a great talent for spotting trends and capturing the zeitgeist should be caught up in exactly the kind of insane socio-political trend that he writes about so entertainingly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-4798626579091442025?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blog.wired.com/sterling/2009/04/bruce-sterling.html' title='Bruce Sterling accused of sham marriage'/><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/4798626579091442025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=4798626579091442025' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4798626579091442025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4798626579091442025'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2009/04/bruce-sterling-accused-of-sham-marriage.html' title='Bruce Sterling accused of sham marriage'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-3413366378067537263</id><published>2009-01-31T01:58:00.000-08:00</published><updated>2009-01-31T04:41:38.774-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><title type='text'>Bad banking drives out good</title><content type='html'>I heard this quote from the CEO of Standard Chartered Bank on &lt;a href="http://www.bbc.co.uk/programmes/b00h3v50"&gt;Radio 4's Today programme&lt;/a&gt; this morning, and it summarises the problem very well.  (Its also a reference to &lt;a href="http://en.wikipedia.org/wiki/Gresham%27s_law"&gt;Gresham's Law&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;Its become a commonplace to simply blame the credit crunch on "stupid, greedy bankers".  The trouble is, suppose you were a smart, frugal banker five years ago.  Your exceptional brains let you see that subprime self-certified mortgages were a bad idea, and therefore anything built on them was clearly going to collapse.  Therefore you weren't going to invest in that part of the market.&lt;br /&gt;&lt;br /&gt;The trouble is, you would have had years of below-average results.  Your clients and employers would be looking at your competitors and pointing out how bad your results were.  Even if your clients were prepared to listen to your explanations, many are under a legal obligation to maximise their investment returns, and their customers will be less sophisticated and correspondingly less willing to listen to complicated explanations about why their pension is so much less than their neighbours.&lt;br /&gt;&lt;br /&gt;So you get removed from your job, and someone else is put in who is willing to do what it takes to deliver market returns.&lt;br /&gt;&lt;br /&gt;Looked at from an abstract point of view the game resembles a "&lt;a href="http://en.wikipedia.org/wiki/Tragedy_of_the_commons"&gt;Tragedy of the Commons&lt;/a&gt;".  A banker who gets good returns while taking hidden risks is like the commoner who puts an extra cow on the common pasture.  He gets richer while all his neigbours get a little poorer.  So everyone else is forced to do likewise, even though everyone can see that collectively this is going to lead to ruin.  And so the game goes.&lt;br /&gt;&lt;br /&gt;The traditional solutions to the Tragedy of the Commons are:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Property rights.  Divide up the commons into individual plots and allocate them to the commoners.  Failing that, give each commoner a tradeable right to put exactly one cow on the commons.&lt;/li&gt;&lt;li&gt;Regulation.  Make a law that each person can only put one cow on the commons.&lt;/li&gt;&lt;/ol&gt;The question is, how to apply this to the finance industry.  In this case cows are equivalent to risk.  Banks have had "risk management" departments for years, but risk turns out to be &lt;a href="http://en.wikipedia.org/wiki/Black_swan_theory"&gt;very difficult to measure&lt;/a&gt;.  Its as if our commoners have invisible cows: verifying the numbers is impossible, although I've previously posted &lt;a href="http://paulspontifications.blogspot.com/2008/09/why-banks-collapsed-and-how-paper-on.html"&gt;a suggestion &lt;/a&gt;for making the cows more visible.&lt;br /&gt;&lt;br /&gt;So without this, what can we do to prevent the next big bust?  It doesn't look like there is anything.  As memories of this bust fade and the people who experienced it retire, a new generation of bankers will come along with a new ingenious method for hiding risk, and once again bad banking will drive out the good until the whole thing collapses once more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-3413366378067537263?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/3413366378067537263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=3413366378067537263' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/3413366378067537263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/3413366378067537263'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2009/01/bad-banking-drives-out-good.html' title='Bad banking drives out good'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-7869031836975555455</id><published>2009-01-26T11:23:00.001-08:00</published><updated>2009-01-26T12:03:43.724-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><title type='text'>Wikipedia and Britannica are Converging</title><content type='html'>Is there a network equivalent of market forces?  The crowdsource equivalent (or perhaps generalisation) of Adam Smith's "&lt;a href="http://en.wikipedia.org/wiki/Invisible_hand"&gt;Invisible Hand&lt;/a&gt;"?&lt;br /&gt;&lt;br /&gt;When I was in my early teens my school got the new edition of the Encyclopaedia Britannica in over 30 volumes costing around £1,000.   It was a huge wealth of authoritative information on just about everything.  I spent quite a few lunch hours just reading about stuff.&lt;br /&gt;&lt;br /&gt;In the 90s Microsoft bought out Encarta on CD-ROM.  It was a lot less information, but it cost a lot less than £1,000.  Britannica has been in trouble ever since.  Now there is Wikipedia, which is free, a bit less authoritative than Britannica, but has even more information and a great deal more mindshare.&lt;br /&gt;&lt;br /&gt;So Britannica has responded by taking a page out of Jimbo Wales's book; its going to &lt;a href="http://www.britannica.com/blogs/2008/06/britannicas-new-site-more-participation-collaboration-from-experts-and-readers/"&gt;start accepting user-generated content&lt;/a&gt;, albeit with a stiff editorial barrier to acceptance into the core Encyclopaedia.&lt;br /&gt;&lt;br /&gt;Meanwhile the latest controversy on Wikipedia is about whether &lt;a href="http://news.bbc.co.uk/1/hi/technology/7851400.stm"&gt;user-generated content needs more controls&lt;/a&gt;.  I say "more" because Wikipedia has always had some limits; locked pages, banned editors, and in extreme cases even the deletion of changes (as opposed to reversion, which preserves them in the page history).  Increasingly sophisticated editorial policies have been put in place, such as "No Original Research" (originally put in to stop crank science, but now an important guiding principle).&lt;br /&gt;&lt;br /&gt;When you look at Wikipedia's history there is a clear trend; every so often Wikipedia reaches a threshold of size and importance where its current level of openness doesn't work.  At this point Jimbo Wales adds a minimal level of editorial control.  Locked pages, for instance, were added because certain pages attracted unmanageably high levels of vandalism.&lt;br /&gt;&lt;br /&gt;It seems that Wikipedia and Britannica are actually converging on the same model from different ends of the spectrum: Wikipedia started out completely open and is having to impose controls to manage quality.  Meanwhile the Britannica started out completely closed and is having to allow in user-generated content because comissioning experts to write it is too expensive.  Somewhere in the middle is a happy medium that gets good quality content without having to charge subscribers.&lt;br /&gt;&lt;br /&gt;Not charging is important.  In these days of the hyperlink, an encyclopedia is not just a source of knowledge, it is a medium of communication.  If I want to tell people that they should read about the &lt;a href="http://en.wikipedia.org/wiki/Britannica"&gt;history of the Britannica&lt;/a&gt; then I refer to the Wikipedia page because very few people who read this are going to be able to follow a link to a Britannica article (even if I were a subscriber, which I am not).&lt;br /&gt;&lt;br /&gt;Wikipedia is often said to have been inspired by the "open source" model in that anyone can edit Wikipedia just as anyone can edit the Linux source code.  In fact the cases are not parallel.  The GPL allows me to download a copy of the Linux source code, hack it to my heart's content, and give copies of my new version to anyone who wants them.  What it does not do is authorise me to upload my version to &lt;a href="http://www.kernel.org/"&gt;kernel.org&lt;/a&gt; and pass it off as the work of Linus Torvalds.  Getting my changes into the official kernel means passing through a strict quality assurance process including peer review and extensive testing on multiple architectures. &lt;br /&gt;&lt;br /&gt;So I think that this proposal to create "flagged revisions" for editorial review moves Wikipedia towards the open source model rather than away from it.  Anyone will always be able to fork Wikipedia if they wish: the license guarantees it.  But the offical version at wikipedia.org will earn increasing trust as the quality assurance improves, just as the official version of the Linux kernel is trusted because of its quality assurance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-7869031836975555455?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/7869031836975555455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=7869031836975555455' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/7869031836975555455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/7869031836975555455'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2009/01/wikipedia-and-britannica-are-converging.html' title='Wikipedia and Britannica are Converging'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-6360194920783563572</id><published>2009-01-21T11:23:00.000-08:00</published><updated>2009-01-24T02:55:35.261-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>The next challenge for Linux</title><content type='html'>I was in the local branch of "Currys" (UK electrical and electronic goods chain) recently and had a look at the line-up of computers.  They had some little netbooks, and taped next to each one was a little note saying something to the effect of "This runs Linux, so it won't run Windows software".   It was a local version of a wider story about Linux:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;People buy netbooks and &lt;a href="http://gizmodo.com/5058953/linux-netbooks-returned-4x-more-than-xp-editions-says"&gt;then discover&lt;/a&gt; that Windows isn't part of the bundle, and they don't like it.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;A teacher found a student handing out Linux CDs and &lt;a href="http://linuxlock.blogspot.com/2008/12/linux-stop-holding-our-kids-back.html"&gt;accused him&lt;/a&gt; of pirating software.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.wkowtv.com/Global/story.asp?S=9667184"&gt;A student&lt;/a&gt; accidentally bought a Dell laptop with Ubuntu instead of Windows, and complained that she couldn't submit the Word documents required by her college (they say they are happy to accept OpenOffice.org documents) and the installation CD for her broadband service wouldn't install so she couldn't get the Internet (Ubuntu connects to the Internet just fine without it).  The local TV station picked up the story as a "consumer rights" case and was amazed to find a &lt;a href="http://addins.wkowtv.com/blogs/behindthenews/archives/84"&gt;virtual lynch mob&lt;/a&gt; chasing them for being less than enthusiastic about Ubuntu.  They quoted an expert saying that Ubuntu "isn't for everyone" and is more suited to tinkerers than people who just want to get stuff done.&lt;/li&gt;&lt;/ul&gt;Behind all this is what "everyone knows" about computers (everyone who isn't interested in computers for their own sake, that is):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;There are two sorts of computers: Apple Macs, and PCs.&lt;/li&gt;&lt;li&gt;Apple Macs run Apple software.  PCs run Windows software.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Windows is bundled with PCs.  On expensive PCs the bundle might include Office as well.&lt;/li&gt;&lt;li&gt;If you want extra software, you buy it at a store, take it home and stick the CD in the drive.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;This is how its been for almost 20 years (25 if you count the MSDOS era).  An entire generation has grown up knowing that if its a PC, it runs Windows.  They know it in the same way they know the sky is blue: its always been blue.&lt;br /&gt;&lt;br /&gt;Of course those of us who use Linux know different.  But for most people, Linux is something they might have heard about once or twice, but they didn't pay any attention and couldn't tell you anything about it.  Outside its current user base and their immediate circle of friends and family, Linux has zero mindshare.&lt;br /&gt;&lt;br /&gt;This is not another lament about &lt;a href="http://www.linuxtoday.com/infrastructure/2009012400135OSCYOO"&gt;Joe Sixpack&lt;/a&gt; being too stupid to understand Linux.  The problem is not that Linux is too complicated, its that Linux and Windows do things differently.  Imagine someone who was raised on Linux; how would they react to Windows?  Software installation would seem complicated and geeky, the single desktop would feel claustrophobic, and as for the idea of &lt;span style="font-style: italic;"&gt;paying&lt;/span&gt; for software...&lt;br /&gt;&lt;br /&gt;So I think we need to sort out a message to broadcast to the world and then focus on it.  I suggest the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Linux is an alternative to Windows and Apple.  It comes in several flavours.&lt;/li&gt;&lt;li&gt;Linux isn't easier or harder than Windows, but it is different, and it takes a while to get used to those differences.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Linux is bundled with a huge range of downloadable free software, including office, graphics and photographic packages.&lt;/li&gt;&lt;/ul&gt;So next time you see a story that misrepresents Linux please send a correction with these three points.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-6360194920783563572?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/6360194920783563572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=6360194920783563572' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/6360194920783563572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/6360194920783563572'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2009/01/next-challenge-for-linux.html' title='The next challenge for Linux'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-8434962905533324823</id><published>2008-12-14T12:48:00.000-08:00</published><updated>2008-12-14T12:59:20.030-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><title type='text'>Where did all the money go?</title><content type='html'>I've got a simple question about the Credit Crunch?  Where did all the money go?&lt;br /&gt;&lt;br /&gt;I've always thought of money as something that is "conserved" in the physics sense, like energy.  Money in = money out + money stored.  So when someone "loses" money it implies that someone else got it.  If I run a company that loses money, what it means is that I'm getting less money in than I'm spending on staff and supplies.  But the money hasn't disappeared, its just moved from my pockets to my suppliers (and their suppliers, and so on).&lt;br /&gt;&lt;br /&gt;But the financial institutions seem to have had billions of dollars disappear into thin air.  They got poorer, sometimes so poor that they went bust, but nobody seems to have become correspondingly richer.&lt;br /&gt;&lt;br /&gt;I guess this has something to do with fractional reserve banking, which I know doesn't conserve money.  Suppose I start with £1000 and put it in a bank.  The bank shows a balance of £1000, but it doesn't just hang on to my money, it loans £500 of it to Joe Bloggs, who spends it on a new TV, and the person who sold the TV also puts the money in the bank.  So now the bank has $1,500 on deposit even though our imaginary economy just started with £1,000.  So what happens if Joe can't pay the money back?&lt;br /&gt;&lt;br /&gt;Can someone enlighten me?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-8434962905533324823?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/8434962905533324823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=8434962905533324823' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/8434962905533324823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/8434962905533324823'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/12/where-did-all-money-go.html' title='Where did all the money go?'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-8686757860813801953</id><published>2008-11-05T13:18:00.000-08:00</published><updated>2008-11-05T14:21:57.176-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='terrorism'/><category scheme='http://www.blogger.com/atom/ns#' term='religion'/><category scheme='http://www.blogger.com/atom/ns#' term='politics'/><title type='text'>Fundamentalist terrorist assassination plot defeated</title><content type='html'>Tonight the British people celebrate the defeat of a terrorist assassination plot.  A group of disaffected men, followers of a foreign religion and egged on by propaganda from overseas and a radical cleric, planned a spectacular atrocity: they would blow up the entire government in one huge explosion.  The plot was foiled by the security services, who, responding to a tip-off, mounted a surveillance operation and arrested one of the plotters red handed as he prepared to detonate the explosives.  The rest of the gang were tracked down and shot or arrested when soldiers stormed their hideout.  In accordance with an executive order from the head of state the survivors were subsequently imprisoned, tortured, and executed after a show-trial.&lt;br /&gt;&lt;br /&gt;This happened over 400 years ago, on November 5th 1605.  The plotters were Catholics rather than Muslims, but apart from that the story sounds disconcertingly modern, although we tend not to go in for show trials these days: they went out of fashion with Stalin.&lt;br /&gt;&lt;br /&gt;Today the Gunpowder Plot is celebrated as Bonfire Night: Guy Fawkes (the one caught with the explosives) is still burned in effigy, and in some places the Pope gets the same treatment as well.  However, over the past 400 years the anti-Catholic content has almost entirely leached away: now its just an excuse to let off some fireworks.  A Catholic can join in the celebrations just as I (a Briton) joined in the 4th of July celebrations when I was living in the US.&lt;br /&gt;&lt;br /&gt;Maybe one day we will look back on 9/11 the same way.  I certainly hope so.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-8686757860813801953?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/8686757860813801953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=8686757860813801953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/8686757860813801953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/8686757860813801953'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/11/fundamentalist-terrorist-assassination.html' title='Fundamentalist terrorist assassination plot defeated'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-2613732856648004665</id><published>2008-10-28T13:47:00.001-07:00</published><updated>2008-10-28T14:58:06.853-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='petition'/><category scheme='http://www.blogger.com/atom/ns#' term='broadband'/><title type='text'>Petition on Broadband Advertising</title><content type='html'>I've become rather depressed about broadband advertising.  &lt;a href="http://paulspontifications.blogspot.com/2008/07/rate-cap-revisited.html"&gt;I found it&lt;/a&gt; very difficult to discover the web page describing my own ISPs &lt;a href="http://www.virginmedia.com/help/traffic-management.php"&gt;traffic policy&lt;/a&gt;. Furthermore if you compare it to &lt;a href="http://web.archive.org/web/20080124221316/http://www.virginmedia.com/help/traffic-management.php"&gt;this version&lt;/a&gt; from January on the Wayback Machine you can see that the headline speed on the "Large" package has gone up from 4Mbit/sec to 10Mbit/sec, but the evening download limit has merely increased from 800MB to 1,200MB, while extra restrictions have been added starting at 10am as well.  Somehow that 10MBit/sec upgrade doesn't feel so generous now: when I want to install Fedora 10 I'd better make sure I schedule the download to start after 9pm.&lt;br /&gt;&lt;br /&gt;Virgin Media, in common with most other ISPs, says that the few people who make heavy use of their broadband link reduce capacity for everyone else, and that providing truly "unlimited" service for these few would mean higher bills for everyone.  They do indeed have a point.  If I want truly unlimited service then I'm sure I can get it, for a price.  And the fact is that I probably don't want to pay the price.  The occasions when I do want a multi-gigabyte download are sufficiently rare that I can put up with scheduling around Virgin's traffic limits.&lt;br /&gt;&lt;br /&gt;So why am I depressed about it?  Its because my problem with finding Virgin Media's traffic management policy is not unusual.  A sample &lt;a href="http://www.google.co.uk/search?q=uk+isp+broadband"&gt;taken from Google&lt;/a&gt; found:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.talktalk.co.uk/products/broadband"&gt;TalkTalk&lt;/a&gt; have a 40GB monthly limit right up there on the front page, although I'm not sure if you can find out how much of your limit you have used this month.  What happens when you use it all?  Presumably you are cut off until next month.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://broadband.o2.co.uk/home/packages.jsp"&gt;O2&lt;/a&gt; claims "unlimited" usage, but if you search the site for the word "unlimited" you find that excessive use at peak times will lead to warnings and then account termination.  They don't define "excessive" or "peak time".  I couldn't find a link to this information from their list of broadband features; it certainly wasn't obvious.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.tiscali.co.uk/products/broadband/?code=ZZ-NL-12WU&amp;amp;srccode=COD_616"&gt;Tiscali&lt;/a&gt; have a &lt;a href="http://www.tiscali.co.uk/products/broadband/fair-usage-policy.html?code=ZZ-NL-12WU&amp;amp;srccode=COD_616"&gt;similar policy&lt;/a&gt;, except that after three warnings they limit your peak time speed.  They also don't define what "excessive" and "peak time" mean, and they don't say how long this will last or what the speed limit will be.  This page was two not-very-prominent links away from the package features list.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.fast.co.uk/broadband_faq.php"&gt;Fast&lt;/a&gt; actually sells a range of monthly capacity limits.  They warn you by email when you hit 90%, and when you go over 100% they throttle you down to 100kBit/sec.  Full marks!&lt;/li&gt;&lt;/ul&gt;So out of 5 providers (including Virgin) we have only one that makes all the limits and policies clear up-front while three try to hide behind weasel words and hard-to-find web pages.  This makes it difficult for consumers to figure out what they are buying.  Is Tiscali's unstated policy better or worse value for money that one of the Fast packages?  Even if its better at the moment, will it still be so next month?  As a consumer I have no way of knowing.  Worse yet, if I were a &lt;a href="http://networks.silicon.com/broadband/0,39024661,39323849,00.htm"&gt;technically naive consumer&lt;/a&gt; I might not even realise that the question needed asking.  "Unlimited" sounds much better than "40Gb monthly limit".&lt;br /&gt;&lt;br /&gt;I think that something needs doing about this.  However the Advertising Standards Authority have wimped out: they have declared that "unlimited" actually means "95% of users don't hit the limit in any given month".  So its hardly surprising that people are confused.&lt;br /&gt;&lt;br /&gt;Therefore I have started an &lt;a href="http://petitions.number10.gov.uk/broadbandcaps/"&gt;on-line petition&lt;/a&gt; at the Number 10 web site.  If you are a British citizen or resident then I urge you to sign it.  The petition calls on the Government to require ISPs to make all caps and limits on their services a prominent part of their advertising.  Only when they do so will consumers have a clear choice between different packages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-2613732856648004665?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/2613732856648004665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=2613732856648004665' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2613732856648004665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2613732856648004665'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/10/petition-on-broadband-advertising.html' title='Petition on Broadband Advertising'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-2494756244399069991</id><published>2008-10-26T14:07:00.000-07:00</published><updated>2008-10-26T16:03:34.320-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>SSDs and the return of the root partition</title><content type='html'>Back in the days when Unix was new to the world computers came with two sorts of mass storage: fast-small-expensive, and slow-big-cheap.  A minicomputer typically had one of each, so that frequently-used files could be kept in the fast unit while everything else was kept on the slow one.&lt;br /&gt;&lt;br /&gt;Unix was designed with this in mind, which is why to this day most programs on Unix and Linux are found in one of two directories: /bin holds the frequently used ones, and /usr/bin holds the less frequently used ones.  A similar arrangement applies to libraries, which are held in /lib and /usr/lib.  The idea was that the "root" partition was put on the fast small device, and the "user" partition went on the big one.  This led to some other restrictions as well; /bin and /lib together have to have all the software needed for a minimally functioning system, because until all that stuff is going the system can't mount /usr to get at the rest of it.&lt;br /&gt;&lt;br /&gt;All that became irrelevant in the age of the Linux PC because the entire system hung off one physical disk.  But maybe that is about to change.  Solid State Disks (SSDs) are entering the disk world.  They have zero mechanical latency and their read speed is blisteringly fast.  Write speed is more variable, but the new &lt;a href="http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3403"&gt;Intel product&lt;/a&gt; is &lt;a href="http://torvalds-family.blogspot.com/2008/10/so-i-got-one-of-new-intel-ssds.html"&gt;reported&lt;/a&gt; to be very fast.  It is also small (80GB) and expensive ($600).&lt;br /&gt;&lt;br /&gt;So it looks like the time has once again arrived for keeping the commonly used programs and libraries on a small fast disk and everything else on something big and slow.  The original root versus /usr division doesn't work for this of course: people want the system to fire up X windows, KDE or Gnome and a bunch of apps, not just a shell prompt.  But all of those things will fit very nicely onto one of these SSDs.  Better yet, the user files have now been shifted out from /usr (from which it got its name) and put in /home.  So this needs zero surgery to the standard Linux layout.&lt;br /&gt;&lt;br /&gt;For the average user $600 is a bit steep though.  What is actually needed here is something smaller and cheaper.  I run a well-populated version of Fedora, and my root partition with all the Fedora packages is under 10GB.  So I while I can't imagine blowing $600 (or whatever that is in £s these days) on 80GB of SSD, I could certainly imagine putting a 10GB version in for $100.  That would hold the Linux kernel, X Windows and all the apps, with enough room left over for /etc.  That would increase the speed of booting up, logging in and starting applications without greatly increasing the cost of the system, especially since that often involves reading lots of different files scattered around the disk.  Even better, most of this stuff is only written rarely, and then mostly in the background by system updates.  So the current poor write performance of most SSDs doesn't matter.&lt;br /&gt;&lt;br /&gt;(&lt;span style="font-weight: bold;"&gt;Update: &lt;/span&gt;I have of course forgotten that by default Unix and Linux keep track of the access time (atime) of files, which means that every time you read something a little metadata write happens.  So write performance does matter here).&lt;br /&gt;&lt;br /&gt;Looking around, the nearest product to this specification seems to be the &lt;a href="http://hothardware.com/News/OCZ_Core_Series_SSD_Vs_VelociRaptor_Sneak_Peek/"&gt;OCZ&lt;/a&gt; 32GB unit, which retails for a bit over £100 (say, around $170).  Thats bigger and more expensive than what I want, but hey, Moore's Law seems to be working so I'll just wait a bit.  I also note that all these products seem to be targetted at the laptop market, which makes sense given SSDs other advantages of low power consumption and physical robustness.  Maybe they should start thinking about the market for hybrid desktop systems as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-2494756244399069991?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/2494756244399069991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=2494756244399069991' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2494756244399069991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2494756244399069991'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/10/ssds-and-return-of-root-partition.html' title='SSDs and the return of the root partition'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-7283715115486346017</id><published>2008-09-23T12:12:00.000-07:00</published><updated>2008-09-26T13:12:34.430-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><title type='text'>Why the banks collapsed, and how a paper on Haskell programming can help stop it happening next time</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Trading Risk&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The financial system exists to trade three kinds of thing: money, commodities and risk.  Money and commodities are the easy bit.  Either I have £1,000 or I don't.  Similarly with commodities: either I have a barrel of oil or I don't.  But risk is a very different matter.  In theory risk is easy to quantify: just multiply the probability of something by the cost, and you have the expected loss.  But in practice its not so simple because the probability and cost may be difficult to quantify, especially for rare events (like, say, a global credit crunch).  Many of the factors that go into a risk model are subjective, so honest people can have genuine disagreements about exactly what the risk is.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Slippery Slope&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately risk assessment is not value-neutral.  Risk has negative value: you have to pay people to take it off you.  The higher the risk, the more you have to pay.  And because the amount of risk is always debatable this is a very slippery slope; the people paying others to take the risk away have every incentive to present a lower estimate.  Everyone can see that everyone else is doing the same, and so methods of hiding or downplaying risk migrate from dodgy dealing to open secret to standard practice.&lt;br /&gt;&lt;br /&gt;Specific examples abound throughout the recent history of the finance industry;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The retail mortgage houses that originally lent to "sub-prime" clients would hire valuers who were known to be on the generous side with their valuations.  So any valuer who wasn't so generous found their income drying up.  Background checks on clients were cut back, then eliminated.  Eventually borrowers were simply told what income to claim on the forms, regardless of what they actually earned.&lt;/li&gt;&lt;li&gt;These loans were then bundled up and sold.  The idea was that the buyers would each get a share of the incoming loan repayments.  Rights to this stream of money were divided into "tranches", the idea being that, for instance, Tranche 1 would get the first 34% of whatever money was due, Tranche 2 would get the next 33%, and Tranche 3 would get the last 33%.  When some borrowers defaulted (as some always do), Tranche 3 would lose out first, then Tranche 2.  Tranche 1 would only fail to get all their money if the overall repayment rate fell below 34%, which had never happened.  The game here was to persuade a credit rating agency that Tranche 1 was so safe that it was worthy of a "Triple A" rating, because that meant that banks, insurance companies and similar big financial institutions could legally buy this debt without having to put cash aside to cover potential losses.  The rating agencies earned fees for evaluating securities, so just like the house valuers they found it paid to be on the generous side.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;All these institutions had risk management departments who were supposed to watch out for excessively risky behaviour.  But in practice they found it very difficult to blow the whistle.   Risk managers tell stories of being given two days to review a deal that took ten people a month to negotiate, and of accusations of "not being a team player" when they questioned over-optimistic claims.  &lt;a href="http://bits.blogs.nytimes.com/2008/09/18/how-wall-streets-quants-lied-to-their-computers/"&gt;This story&lt;/a&gt; from the New York Times has some details.  Look through the comments after the story as well; many of them are by people with their own tales of risk.&lt;/li&gt;&lt;/ul&gt;None of this is new; similar behaviour has contributed to past financial crises.  In theory more regulation can prevent this, and everyone is now planning or demanding lots more regulation (even the banks).  But in practice regulation has failed repeatedly because the regulators always concentrate on the way it went wrong last time.  Regulations have to be written carefully, and the companies being regulated have to be given time to understand changes and put their compliance mechanisms in place.   This prevents regulators from moving as fast as the institutions they regulate.&lt;br /&gt;&lt;br /&gt;The regulators also don't have visibility of the information they need to assess systemic risk.  Systemic risk arises because financial companies are exposed to each other; if one institution fails, others have to write off any money it owed them, possibly pushing them into bankruptcy as well.  Regulators try to make companies insulate themselves by avoiding excessive risk and keeping some cash on hand, but without a clear picture of the risks being run by each company they have no way to tell if this is enough.&lt;br /&gt;&lt;br /&gt;The basic problem, I believe, is the food chain of risk management within each institution.  At the top are the negotiators and fund managers who design and package the securities.  Then the lawyers are bought in to specify the precise terms of the deal.  Somewhere along the way the "quants" will be asked to develop mathematical models, and at the bottom coders will be given the job of turning the models into executable code that will actually determine the real price and risks.  It is this food chain that needs to be rethought, because its hiding important information.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://research.microsoft.com/%7Esimonpj/papers/financial-contracts/contracts-icfp.htm"&gt;This 2000 paper&lt;/a&gt; by Simon Peyton Jones, Jean-Marc Eber and Julian Seward shows a way forwards.  It describes a Domain Specific Language embedded in &lt;a href="http://www.haskell.org/"&gt;Haskell&lt;/a&gt; for describing the rights and obligations imposed by a contract. Arbitrarily complicated contracts can be built up using a small collection of primitives.  Aggregations of these contracts can also be created, as can risks of default and bankruptcy.  This created quite a stir in the quantitative analysis world when it was presented, as it was the first time anyone had proposed a formal language for describing contracts.  Today the &lt;a href="http://www.haskell.org/haskellwiki/Haskell_in_industry"&gt;list of commercial Haskell users&lt;/a&gt; includes a number of financial institutions using this kind of technique to model their market positions.&lt;br /&gt;&lt;br /&gt;But on its own this is just a faster and more efficient way of getting the same wrong answer.  It doesn't solve the underlying problem of concealed systemic risk.  The solution has to be for big financial companies to reveal their positions to the regulators as formal models of the contracts they have written.  At the moment they don't even have to reveal all their contracts, but merely knowing the legal terms of a contract is only the first step.  Those terms have to be converted into a mathematical model.  That model probably already exists, but only as an internal artefact of the parties to the contract.  What ought to be happening is that the contract is specified in a well-defined mathematical language that can be converted into a model automatically.   If the regulators have this information about all the contracts entered into by all the finance companies then they can model the impact of, say, a downturn in the housing market or a jump in the price of oil, and if they see systemic risk looming then they can order the companies involved to take corrective action.  Unlike the various Risk Management departments they will be able to see the whole picture, and they don't have to worry about being "team players".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-7283715115486346017?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/7283715115486346017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=7283715115486346017' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/7283715115486346017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/7283715115486346017'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/09/why-banks-collapsed-and-how-paper-on.html' title='Why the banks collapsed, and how a paper on Haskell programming can help stop it happening next time'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-5937992111622031512</id><published>2008-09-07T05:26:00.000-07:00</published><updated>2008-09-07T11:34:09.138-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='comcast'/><category scheme='http://www.blogger.com/atom/ns#' term='rate capping'/><category scheme='http://www.blogger.com/atom/ns#' term='virgin'/><title type='text'>ISPs and Bandwidth</title><content type='html'>&lt;p&gt;This &lt;a href="http://www.slate.com/id/2199368"&gt;Slate article&lt;/a&gt; reminded me of some stuff about how the Internet works that isn't widely appreciated.  For a few years now ISPs have been complaining about "bandwidth hogs" while at the same time advertising high bandwidths for fixed prices.  Comcast has had its knuckles rapped for discriminating against particular traffic.  But this hides the real issues, which are to do with the structure of the market for long-haul infrastructure.&lt;/p&gt;&lt;p&gt;Your ISP has to pay for connection to the Internet in exactly the same way that you do: it pays a big telecom company like AT&amp;amp;T or Qwest.  The only exception is if your ISP &lt;span style="font-weight: bold;"&gt;is&lt;/span&gt; one of those companies, but even then the retail ISP business will be a separate division that has to "buy" bandwidth from its parent.  These &lt;a href="http://en.wikipedia.org/wiki/Tier_1_network"&gt;"tier 1 ISPs"&lt;/a&gt; don't publish price lists, but the general pricing structure looks a lot like the ones described in the Slate article, and for the same fundamental reason: capacity is limited.  So your local ISP may buy, say, 1 terabyte per day upstream and 2 terabytes downstream, with any traffic over those thresholds being charged per megabyte.  &lt;/p&gt;&lt;p&gt;Aside: Actually the whole thing is much more complicated: a retail ISP will generally buy connections to more than one upstream ISP, which may be either tier 1 or "tier 2" (with long-haul bandwidth but not global presence).  Often it will have multiple connections to each of these ISPs, each of which may have different price plans.  Any ISP may also have "peering" agreements with other ISPs of the same size.  These are free, but are not allowed to carry "transit" traffic destined for anywhere else.  Everyone always tries to offload traffic onto someone else as fast as possible, even if the resulting routes are not ideal.  Managing this mess to keep the customers happy at minimum cost is a key skill in the ISP business&lt;br /&gt;&lt;/p&gt;The retail ISPs are therefore caught between a rock and a hard place.  They are in a commodity business, but the traditional retail price plan of "all you can eat at a given bandwidth" doesn't match their cost structure.   Its a general rule that if you are in such a market and have a competitor who's price plan &lt;span style="font-weight: bold;"&gt;does&lt;/span&gt; match their cost structure then you are bound to make a loss, because the customers who find you cheaper are going to be the ones who cost you more than they pay, while the ones who would balance this by paying more than they cost find your competitor cheaper, so they go there instead.&lt;br /&gt;&lt;br /&gt;Thus ISPs will gradually converge on pricing plans that are simplified versions of the cost structure of their industry.  This will probably be based on a combination of peak-time limitations and traffic caps that give people an incentive to shift their heavy usage off-peak.  The winners will be the ones who can innovate.  The challenges are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;At any given point in time the network has a fixed bandwidth.  Hence the challenge is not to reduce the total amount of data moved but to even out usage.  Similarly heavy users are only a problem when they start pushing out other customers who might collectively pay more.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You can't force users to track their usage in detail.  Price plans that suddenly cut a customer off until tomorrow (or next month) are scary and unfriendly.  Plans that charge extra for heavy usage are even worse, especially for families with teenagers.  Throttling is more user-friendly.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Negotiate with your upstream ISPs to bring your costs into line with your pricing structure.  They, too, need to shift usage off-peak and will be prepared to offer pricing plans accordingly.  However their idea of "off-peak" may not be the same as a retail ISP with lots of home users.&lt;/li&gt;&lt;li&gt;Transparency will happen whether you want it to or not.  At least some end users are smart enough to detect traffic shaping and other tricks, and their results will be picked up by price-comparison sites for everyone else to read.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Application-specific traffic shaping (as tried by Comcast) won't work.  Customers and regulators both hate it, but more importantly it gets you into an arms race between stealth P2P protocols and your packet inspection software that you can't win.  However there is another option: offer your customers the opportunity to do their own traffic shaping.  For instance you could have a metered high-priority service for everyday browsing combined with an unmetered low priority service for bulk downloads.   The challenge is to give the customer a simple easy-to-use system that distinguishes between the two and (automatically as far as possible) uses the right one.&lt;br /&gt;&lt;br /&gt;In many ways the situation reminds me of 1997, when large ISPs first started to deny peering agreements to smaller competitors and made them pay for transit agreements instead.  There were many calls to ban the practice, and grave predictions of the "balkanisation of the Internet".  But in practice the economics of &lt;a href="http://en.wikipedia.org/wiki/Metcalfe%27s_law"&gt;Metcalf's Law&lt;/a&gt; guaranteed that a well-connected network would have more value than a disconnected network, and after that it was just a matter of how that extra value was distributed.  I believe that much the same thing will happen with bandwidth.  The Internet has most value when its pipes are full of traffic, and if there is demand for more bandwidth then there will be money to be made by providing it.  After that, its just a matter of working out who pays how much for what.  As long as the market remains competitive it will converge on the optimum solution, probably quite rapidly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-5937992111622031512?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/5937992111622031512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=5937992111622031512' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/5937992111622031512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/5937992111622031512'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/09/isps-and-bandwidth.html' title='ISPs and Bandwidth'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-6161989711843256881</id><published>2008-08-03T07:45:00.000-07:00</published><updated>2008-08-03T08:38:06.953-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>The Netwise Kids of Today</title><content type='html'>My son is keen on &lt;a href="http://www.habbo.co.uk/"&gt;Habbo&lt;/a&gt; (a virtual world ostensibly aimed at teenagers, but probably attracting a lot of pre-teen kids), and spends quite a bit of his pocket money on it.  We regard Habbo as a cynical method of separating kids from their money.  Lack of credit cards isn't a problem as you can buy Habbo credits using a mobile phone.  However we also regard that "I've just blown all my money on this junk" moment as a valuable learning experience, so we've let him take his pocket money in the form of Habbo credits bought with my Visa card.&lt;br /&gt;&lt;br /&gt;This being the Internet, a wide range of scams have appeared trying to separate kids from their virtual "furni"  bought with Habbo credits.  I'm not going to link to any directly because I suspect that they will be too short-lived, but a search for "&lt;a href="http://www.google.co.uk/search?q=habbo+cheat&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla:en-US:official&amp;amp;client=firefox-a"&gt;Habbo cheat&lt;/a&gt;" turns up a good selection.  Warning: turn your browser up to maximum paranoia before visiting any of these sites.&lt;br /&gt;&lt;br /&gt;My son told me enthusiastically about one of these sites that promised lots of free stuff.  He just had to fill in his Habbo username and password on a form, and come back in 24 hours.  I was horrified.  But no, my son reassured me, he had created a new empty Habbo account just for this experiment, so if it was a scam he wouldn't lose anything.  (Sure enough, he didn't gain anything either).&lt;br /&gt;&lt;br /&gt;I had never told him about throw-away accounts.  I had told him that the Internet is not always a friendly place, but I had not expected him to personally be the target of an attempted fraud.  Still less did I expect him to identify the fraud and devise a work-around.  There are adults who are dumber than this.  However I'm not posting this to boast about my clever son, because I've since found out that this is actually fairly typical.  The kids round here generally have Net access, either in their own homes or via a friend.  They play in a wide variety of virtual worlds.  They have learned, sometimes the hard way, about password security, how and where to write down account details so you don't forget them, not letting people "shoulder surf", and how to recognised various forms of fraud.  They talk about this stuff, exchanging war stories and security tips.&lt;br /&gt;&lt;br /&gt;Internet crime is still &lt;a href="http://www.theregister.co.uk/2007/03/19/fbi_crime_report_2006/"&gt;enjoying&lt;/a&gt; &lt;a href="http://news.bbc.co.uk/1/hi/technology/5377334.stm"&gt;its&lt;/a&gt; &lt;a href="http://www.vnunet.com/vnunet/news/2213551/fbi-reports-internet-crime"&gt;boom&lt;/a&gt; &lt;a href="http://security.itproportal.com/articles/2008/07/30/canadians-being-hit-harder-internet-crime/"&gt;years&lt;/a&gt; at the moment.  The archetypal victim is too computer-clueless to even understand what malware is, never mind defending against keylogging viruses or spotting phishing websites.  There are still many such people, but the next generation is growing up too Internet-savvy to be easily scammed.  They can list different categories of malware and describe their uses and how to defend against them.  They have grown up surrounded by the Internet, so taking measures to protect themselves from its hostile elements strikes them as entirely normal.  As they grow up they will take this attitude, and the associated knowledge, for granted.  My generation taught its parents how to program their video recorders.  The next generation is going to teach its parents how to secure their computers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-6161989711843256881?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/6161989711843256881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=6161989711843256881' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/6161989711843256881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/6161989711843256881'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/08/netwise-kids-of-today.html' title='The Netwise Kids of Today'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-2216390137502685128</id><published>2008-07-12T02:24:00.000-07:00</published><updated>2008-07-12T02:32:17.117-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rate capping'/><category scheme='http://www.blogger.com/atom/ns#' term='virgin'/><title type='text'>Rate Cap Revisited</title><content type='html'>In my last post I complained that I was being rate capped by Virgin Media.  I said I didn't mind them having a capping policy, but it ought to be public.   I also complained I wasn't getting the full bandwidth I was paying for.&lt;br /&gt;&lt;br /&gt;Turns out I was wrong on both counts.  Their rate capping policy is &lt;a href="http://www.virginmedia.com/help/traffic-management.php"&gt;here&lt;/a&gt;.  I did look for it before posting, and it could be easier to find.  But its there, its public, and it says everything I would expect it to.&lt;br /&gt;&lt;br /&gt;As for bandwidth, the "Large" package I am signed up for was originally for 4 Mbits, which is what I am getting.  Virgin are currently upgrading their network to give everyone 10Mbits, and my region is due to be upgraded this month.  However new customers get the full 10Mbits wherever they are.  I just looked at their headline offer and assumed it applied to me as well.&lt;br /&gt;&lt;br /&gt;So, I no longer have any issues with Virgin Multimedia.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-2216390137502685128?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/2216390137502685128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=2216390137502685128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2216390137502685128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2216390137502685128'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/07/rate-cap-revisited.html' title='Rate Cap Revisited'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-5166914804969468634</id><published>2008-07-05T05:37:00.000-07:00</published><updated>2008-12-12T18:37:47.958-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='rate capping'/><category scheme='http://www.blogger.com/atom/ns#' term='virgin'/><title type='text'>Rate Capped</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_HrI_hqoeVe8/SG9rT-G-joI/AAAAAAAAAAU/L3pM4KHIDGs/s1600-h/Rate+capped.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_HrI_hqoeVe8/SG9rT-G-joI/AAAAAAAAAAU/L3pM4KHIDGs/s320/Rate+capped.png" alt="" id="BLOGGER_PHOTO_ID_5219508483979644546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This is a screenshot from KDE System Guard showing my download speed for the Fedora Core 9 distribution DVD, around mid-day on Saturday.  After downloading 1.8GB I was suddenly slapped down to 100 kBytes/sec, which translates to around 1 Mbit/sec with all the packet overhead.  This happens consistently with various download sites, so I'm confident its my ISP.&lt;br /&gt;&lt;br /&gt;I'm paying &lt;a href="http://www.virginmedia.com/"&gt;Virgin Media&lt;/a&gt; for their "Unlimited" 10Mbit service (although I haven't seen anything over 500 kBytes/sec, which would mean around 5Mbit in reality).  I was never told that my download rate would be capped, although the fine print in the sign-up page points to their &lt;a href="http://allyours.virginmedia.com/html/legal/oncable/acceptableuse.html"&gt;AUP&lt;/a&gt;, which says in Section 7 that they reserve the right to restrict Internet services in any way at any time.&lt;br /&gt;&lt;br /&gt;However this post is not actually a complaint about rate capping.  ISPs are there to make money by providing a service, and as a rule you get what you pay for.  In theory if I want a better service all I have to do is switch ISPs, and possibly pay more money.  Our email address is routed through a domain I personally own, so we don't even have to tell anyone else that our household has switched ISPs.&lt;br /&gt;&lt;br /&gt;But how do I know that I'll get a better deal if I go elsewhere?  All retail ISPs offer basically the same terms, which consist of a big headline rate accompanied by a fine-print disclaimer pointing out that you might never get it.  If they have a rate-capping policy they certainly don't advertise it.&lt;br /&gt;&lt;br /&gt;I don't actually want a faster headline speed (although I'd be very happy to get the one I'm currently promised).  I don't even want a promise of "no rate caps": the ISP argument that heavy downloaders hurt responsiveness for all users is valid.  All I want is to be able to look at ISP adverts and figure out where the best value for money is.  That means the following information:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Ratio of customers to actual incoming bandwidth.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The rate-capping policy: e.g. capped rate and criteria for applying it.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Anybody know a UK ISP that actually provides this?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-5166914804969468634?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/5166914804969468634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=5166914804969468634' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/5166914804969468634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/5166914804969468634'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/07/rate-capped.html' title='Rate Capped'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_HrI_hqoeVe8/SG9rT-G-joI/AAAAAAAAAAU/L3pM4KHIDGs/s72-c/Rate+capped.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-8583031185960894139</id><published>2008-05-09T09:52:00.000-07:00</published><updated>2008-12-12T18:37:48.105-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Is Functional Programming the new Python?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_HrI_hqoeVe8/SCSQHEjQgYI/AAAAAAAAAAM/74Xh8brEyGs/s1600-h/programming_times.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_HrI_hqoeVe8/SCSQHEjQgYI/AAAAAAAAAAM/74Xh8brEyGs/s320/programming_times.png" alt="" id="BLOGGER_PHOTO_ID_5198438321047503234" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Back in 2004 Paul Graham wrote an essay on the &lt;a href="http://www.paulgraham.com/pypar.html"&gt;Python Paradox&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;if a company chooses to write its software in a comparatively esoteric language, they'll be able  to hire better programmers, because they'll attract only those who cared enough to learn it.  And for  programmers the paradox is even more pronounced: the language to learn, if you want to get a good job, is a language that people don't learn merely to get a job.&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Some tentative support for this theory comes from &lt;a href="http://www.cis.udel.edu/%7Esilber/470STUFF/article.pdf"&gt;a study of programming languages&lt;/a&gt; done in 2000.  The same task was given to over 80 programmers. The chart shows how long they took.  Obviously the average for some languages was a lot less than for others, but the interesting thing for the Python Paradox is the variability.  Java had huge variability: one developer took over 60 hours to complete the task.  Meanwhile the Python developers were the most consistent, with the lowest variance as a percentage of the mean.  I suspect (but can't prove) that this was because of the kind of programmers who wrote in Java and Python back in 2000.  Java was the language of the Web start-up and the dot-com millionaire, but Python was an obscure open source scripting language.  The Pythonistas in this study didn't learn it to get a job, but many of the Java programmers did.&lt;br /&gt;&lt;br /&gt;But if this study was repeated today I bet the spread for Python would be a lot larger.  Maybe still not as big as Java, but more like C++ or Perl.  Because today you can get a good job writing Python.  A quick check of jobs on dice.com found &lt;span class="WhiteText"&gt;1450&lt;/span&gt; Python jobs against 7732 C++ jobs and &lt;span class="WhiteText"&gt;15640&lt;/span&gt; jobs for Java.  Python hasn't taken over the world, but the jobs are there.&lt;br /&gt;&lt;br /&gt;So the smart employers and developers need something new to distinguish themselves from the crowd, and it looks like functional programming might be it.  Programming Reddit carries lots of cool stuff about Haskell, and job adverts are starting to list a grab-bag of functional languages in the "would also be an advantage" list.  For &lt;a href="http://seeker.dice.com/jobsearch/servlet/JobSearch?op=302&amp;amp;dockey=xml/c/6/c64c7a44c573ae552c6f51d26ea5237e@endecaindex&amp;amp;source=19&amp;amp;FREE_TEXT=haskell&amp;amp;rating=99"&gt;instance&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;- Programming experience with more esoteric and powerful languages for data manipulation (Ruby, Python, &lt;span style="background: transparent url(/assets/images/detail/default/highlite.gif) repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;Haskell&lt;/span&gt;, Lisp, Erlang)&lt;/blockquote&gt;So it looks like the with-it job-seekers and recruiters may be starting to use functional programming to identify each other, just as they used Python up to 2004.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt;  Oops.  I just remembered &lt;a href="http://enhyper.blogspot.com/2008/05/functional-programming-creeps-into-job.html"&gt;this post&lt;/a&gt; which started me thinking along these lines.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-8583031185960894139?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/8583031185960894139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=8583031185960894139' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/8583031185960894139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/8583031185960894139'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/05/is-functional-programming-new-python.html' title='Is Functional Programming the new Python?'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_HrI_hqoeVe8/SCSQHEjQgYI/AAAAAAAAAAM/74Xh8brEyGs/s72-c/programming_times.png' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-3819898445524789590</id><published>2008-05-04T23:50:00.000-07:00</published><updated>2008-05-05T08:01:27.158-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='process'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>An Under-Appreciated Fact: We Don't Know How We Program</title><content type='html'>I was talking to a colleague from another part of the company a couple of weeks ago, and I mentioned the famous &lt;a href="http://blogs.construx.com/blogs/stevemcc/archive/2008/03/27/productivity-variations-among-software-developers-and-teams-the-origin-of-quot-10x-quot.aspx"&gt;ten-to-one productivity variation&lt;/a&gt; between the best and worst programmers.  He was surprised, so I sketched some graphs and added a few anecdotes.  He then proposed a simple solution: "Obviously the programmers at the bottom end are using the wrong process, so send them on a course to teach them the right process."&lt;br /&gt;&lt;br /&gt;My immediate response, I freely admit, was to open and shut my mouth a couple of times while trying to think of response more diplomatic than "How could anyone be so dumb as to suggest that?".  But I have been mulling over that conversation, and I have come to the conclusion that the suggestion was not dumb at all.  The problem lies not with my colleague's intelligence but in a simple fact.  It is so basic that nobody in the software industry notices it, but nobody outside the industry knows it.  The fact is this: &lt;span style="font-style: italic;"&gt;there is no process for programming&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Software development abounds with processes of course: we have processes for requirements engineering, requirements management, configuration management, design review, code review, test design, test review, and on and on.  Massive process documents are written.  Huge diagrams are drawn with dozens of boxes to try to encompass the complexity of the process, and still they are gross oversimplifications of what needs to happen.  And yet in every one of these processes and diagrams there is a box which basically says "write the code", and ought to be subtitled "(and here a miracle occurs)".  Because the process underneath that box is very simple: read the problem, think hard until a solution occurs to you, and then write down the solution.  That is all we really know about it.&lt;br /&gt;&lt;br /&gt;To anyone who has written a significant piece of software this fact is so obvious that it seems to go without saying.  We were taught to program by having small examples of code explained to us, and then we practiced producing similar examples.  Over time the examples got larger and the concepts behind them more esoteric.  Loops and arrays were introduced, then pointers, lists, trees, recursion, all the things you have to know to be a competent programmer.  Like many developers I took a 3 year degree course in this stuff.  But at no point during those three years did any lecturer actually tell me how to program.  Like everyone else, I absorbed it through osmosis.&lt;br /&gt;&lt;br /&gt;But to anyone outside the software world this seems very strange.  Think about other important areas of human endeavor: driving a car, flying a plane, running a company, designing a house, teaching a child, curing a disease, selling insurance, fighting a lawsuit.  In every case the core of the activity is well understood: it is written down, taught and learned.  The process of learning the activity is repeatable: if you apply yourself sufficiently then you will get it.  Aptitude consists mostly of having sufficient memory capacity and mental speed to learn the material and then execute it efficiently and reliably.  Of course in all these fields there are differences in ability that transcend the mere application of process.  But basic competence is generally within reach of anyone with a good memory and average mental agility.  It is also true that motor skills such as swimming or steering a car take practice rather than book learning, but programming does not require any of those.&lt;br /&gt;&lt;br /&gt;People outside the software industry assume, quite reasonably, that software is just like all the other professional skills; that we take a body of knowledge and apply it systematically to particular circumstances.  It follows that variation in productivity and quality is a solvable problem, and that the solution lies in imposing uniformity.  If a project is behind schedule then people need to be encouraged to crank through the process longer and faster.  If quality is poor then either the process is defective or people are not following it properly.  All of this is part of the job of process improvement, which is itself a professional skill that consists of systematically applying a body of knowledge to particular circumstances.&lt;br /&gt;&lt;br /&gt;But if there is no process then you can't improve it.  The whole machinery of process improvement loses traction and flails at thin air, like Wiley Coyote running off a cliff.  So the next time someone in your organisation says something seemingly dumb about software process improvement, try explaining that software engineering has processes for everything except actually writing software.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt; Some of the discussion here, and on &lt;a href="http://reddit.com/r/programming/info/6i6m7/comments/"&gt;Reddit&lt;/a&gt; and &lt;a href="http://news.ycombinator.com/item?id=181316"&gt;Hacker News&lt;/a&gt; is arguing that many other important activities are creative, such as architecture and graphic design.  Note that I didn't actually mention "architecture" as a profession, I said "designing a house" (i.e. the next McMansion on the subdivision, not one of Frank Lloyd Wright's creations).  People give architects and graphic designers room to be creative because social convention declares that their work needs it.  The problem for software is that non-software-developers don't see anything creative about it.&lt;br /&gt;&lt;br /&gt;The point of this post is not that software "ought" to be more creative or that architecture "ought" to be less.  The point is that we need to change our rhetoric when explaining the problem.  Declaring software to be creative looks to the rest of the world like a sort of "art envy", or else special pleading to be let off the hook for project overruns and unreliable software.  Emphasising the lack of a foundational process helps demonstrate that software really does have something in common with the "creative" activities.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-3819898445524789590?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/3819898445524789590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=3819898445524789590' title='39 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/3819898445524789590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/3819898445524789590'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/05/under-appreciated-fact-we-dont-know-how.html' title='An Under-Appreciated Fact: We Don&apos;t Know How We Program'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>39</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-9144795731388754712</id><published>2008-03-29T13:15:00.000-07:00</published><updated>2008-04-25T16:22:43.935-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Room 101'/><title type='text'>Things I'd Put in Room 101</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Room_101_%28TV_series%29"&gt;Room 101&lt;/a&gt; was a BBC TV series named after George Orwell's torture chamber in the book 1984.  In it a guest would explain to a regular presenter why s/he wanted to consign half a dozen pet hates into oblivion.  Since the series has now ended I no longer have any hope of explaining to the British Public my pet hates, so I thought I'd do it here instead.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;One and Two Pence Pieces ("Coppers")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When the UK switched to decimal currency from pounds, shillings and pence (12 old pennies to a shilling, 20 shillings to a pound) the smallest of the new coins was the half penny piece, which was finally withdrawn in 1984 as inflation had made it unnecessary (the UK saw inflation pass 20% during the 1970s).  Since then inflation has been lower, but its still there.  The copper-coloured 1p and 2p coins have lost about half their value since 1984.  Today their only use is as change for something costing £1.99.  Since many things cost a penny under a round amount to prevent staff theft and make prices look lower, my wallet fills up with these big, unwieldy, almost worthless bits of metal.  Eventually you accumulate enough of them to give £2.09 to a shop assistant and get 10p change instead of 1p.  You often get a grateful smile as well: shops keep running out of these coins for the same reason we keep accumulating them.&lt;br /&gt;&lt;br /&gt;My wife is a teacher.  She tells me that secondary school children use these coins as missiles.  You can't ban children from carrying them, they are big enough to hurt if thrown hard, and only cost a penny or two each.&lt;br /&gt;&lt;br /&gt;The time has come to abolish these coins.  To be sure shops would sell stuff for £1.95 instead of £1.99, but this is an improvement in two ways: the 5p coin is smaller even than the 1p, and a half dozen 5p pieces can actually buy a bag of crisps.&lt;br /&gt;&lt;br /&gt;I imagine that having the smallest unit of cash bigger than the smallest unit of accounting is going to cause some headaches: how do you close an account containing £561.34?  But there must be ways around this.  When I visited Italy in about 1988 the smallest coin was 10 lira, then worth about 0.5p.  So they obviously coped with this question.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Having to Listen to the Guy in the Next Toilet Cubicle&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Its not him I hate, its the experience of having to listen to all the little noises.  I imagine he feels the same about me.  In fact I'm sure that the vast majority of you are cringing as you read this, because you know exactly what I'm talking about and hate it just as much.  So, if this is such an unpopular experience, why are toilets still being built with no audio privacy?&lt;br /&gt;&lt;br /&gt;I suspect that current toilet architecture dates back to the days when masturbation and homosexuality were seen as terrible evils.  You couldn't deny people privacy at home, but you could at least make sure they weren't doing anything unnatural in the public loo.  Today we are a bit more enlightened, and the justifications for denying us a bit of privacy no longer make any sense.  But somehow the architectural profession hasn't caught up.  I suspect that amongst architects everyone knows how to build a public or workplace toilet, and everyone assumes there must be some good reason why its that way, even if they don't know what it is themselves.  Or is there some British Standard specifying the minimum gap between floor and cubicle partition?&lt;br /&gt;&lt;br /&gt;When I worked for Marconi I visited their swank HQ in London a few times.  Their toilets had separate soundproofed cubicles.  What luxury!  Presumably the architects who designed the building back in the 1920s thought that the superior specimens of manhood who would inhabit it would be safe from unnatural vices, and only the lower classes needed to be monitored.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Blue Indicator LEDs&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;The invention of the blue LED was a technological triumph.  It paved the way for higher densities of optical storage and also made efficient LED lighting a feasible proposition.  So I don't want to get rid of the blue LED altogether.  What I do want to get rid of is the use of blue LEDs as indicator lights in computer equipment because they are so much brighter than the older red and green ones.  Red and green LEDs light up enough to show you that they are on, but blue ones are positively dazzling.  Having one of these in your field of view is annoying; you have to avoid looking at it because the after image will make it difficult to look at anything else for several seconds.  I bought a couple of USB disk drive enclosures a while ago, and not only had the designers included perspex sides with blue LEDs in them, but they had also slaved these LEDs to disk activity so that they flashed and flickered.  They shipped these horrible things with leads that had even more flickering blue LEDs.  Aaarghh!&lt;br /&gt;&lt;br /&gt;The plague of blue LEDs seems to have abated somewhat, but its not gone.  My new laptop has almost all green indicator lights, except the Bluetooth indicator is blue.  It doesn't flicker with activity, but I've still stuck some masking tape over it.  This looks ugly, but it does diffuse the blue enough to be tolerable.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cellphones that play music through a tiny speaker&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Why someone thought this was a good idea I don't know.  Its probably not down to one person, more a combination of marketing-driven design and engineering compromise leading to something totally horrible, like deciding your house needs repainting before you sell it, but the only paint you can find is sickly pink.  Yes, you've repainted the room as per the requirements from Marketing, but you'd have done better not to bother.&lt;br /&gt;&lt;br /&gt;In the case of the cell phone, I imagine the conversation went something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Marketing&lt;/span&gt;: We want our phone to be the next ghetto blaster.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Engineering&lt;/span&gt;: Ye canna break the laws of physics Jim.   Phones are too small to reproduce low frequencies at high volume.  Thats why nobody has done it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Marketing&lt;/span&gt;: OK, so its not going to be the greatest sound reproduction.  But you're a great engineering team.  We have faith that you can rise to this challenge.  Besides, we've already paid for the advertising, so its too late for you to back out.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Engineering&lt;/span&gt;: Well, I suppose if you shifted all the frequencies up an octave or two you could at least hear  the music, but its going to sound...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Marketing&lt;/span&gt;: Great.   Just great.  "Make it so!" &lt;grins, claps="" engineer="" on="" shoulder=""&gt;.&lt;br /&gt;&lt;br /&gt;So last weekend one of my son's friends came over with his new cell phone playing what sounded like Bohemian Rhapsody sung by &lt;a href="http://en.wikipedia.org/wiki/Pinky_and_Perky"&gt;Pinky and Perky&lt;/a&gt;, except that it wasn't meant as a joke.  It was probably the most nauseating musical experience of my life.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Distorted Muzak&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Another musical one.  I don't  mind muzak most of the time: shopping is boring, and sometimes they play something I like.  But every so often I find myself in a shop that gets its muzak from some kind of satellite radio muzak channel (I gather chain stores often do this because the supplier takes care of copyright licensing).  But the signal is weak or the antenna has drifted or something, and the sound is heavily distorted.  Muzak is supposed to put you in a relaxed mood in order to make parting with money less stressful, and good muzak does this.  Badly distorted muzak just makes me want to get out as fast as possible.  But its no good trying to complain.  "Its company policy to have music" says the spotty youth at the customer service desk.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Candles on Restaurant Tables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is another visual distraction, worse even than blue LEDs.  Candles are brighter, and they flicker more.  Restaurant owners don't even have the excuse that candles are the latest cool technology; they are thousands of years old.  So why is it still considered a good idea to put one in between two people who want to look at each other?&lt;br /&gt;&lt;br /&gt;Because it draws my eye, I feel compelled to fiddle with it.  I wave my fingers through the flame and toy with the softening wax around the edge.  Then I remind myself that this behaviour probably drives other people up the wall and put my hands away, for a couple of minutes until I find myself doing it again.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/grins,&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-9144795731388754712?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/9144795731388754712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=9144795731388754712' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/9144795731388754712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/9144795731388754712'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/03/things-id-put-in-room-101.html' title='Things I&apos;d Put in Room 101'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-6712537023400522138</id><published>2008-03-19T14:05:00.000-07:00</published><updated>2008-03-19T15:29:33.534-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='politics'/><title type='text'>Why Voting Machines Can't Add Up</title><content type='html'>Ed Felten is &lt;a href="http://www.freedom-to-tinker.com/?p=1266"&gt;continuing his excellent work&lt;/a&gt; exposing the broken state of electronic voting machines.  Many people are wondering how such software can have been allowed out by its developers.  The discrepancies don't (at the moment) seem to be a result of fraud, just very buggy software.&lt;br /&gt;&lt;br /&gt;Voting machines are obviously important, so their &lt;a href="http://www.eac.gov/voting%20systems/voting-system-certification/2005-vvsg"&gt;development is regulated&lt;/a&gt;.  I've never worked in the voting machine industry, but I have worked in another kind of federally regulated software: medical devices.  So I know how regulated software projects work, and how they don't.&lt;br /&gt;&lt;br /&gt;The fundamental problem underlying this is that nobody in the world actually knows how to write software that reliably does what you want.  There are quite a lot of people who can write such software, but if you ask them how its done they basically waffle.  Most of them agree on a list of steps to take, starting with writing down exactly what the software is supposed to do.  Various attempts have been made to codify this list, and they all look pretty similar.  The voting machine standards are just another variation on this theme.&lt;br /&gt;&lt;br /&gt;However this is all cargo-cult engineering.  We know that the people who can summon up the magic cargo planes do it by putting things over their ears and saying magic words, but it doesn't follow that if we put things on our ears and say the same magic words the cargo will appear.  So it is with software engineering.  You can write Requirements Documents and Class Diagrams and Test Scenario Documents and Test Execution Reports until you run out of paper, but it won't make any difference if you don't have the &lt;a href="http://www.munnecke.com/islands/qwan.htm"&gt;Quality Without a Name&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Imagine you are managing a development project to build a voting machine.  Your mission is to get the thing on the market.  You have been given a bunch of programmers, half a human factors person and a quarter of an industrial designer.  The time available isn't long enough, but you know its no use complaining about that because its not your boss's fault, or even the CEO's fault.  Its the fault of the people at Big Competitor who are planning to release their product just in time to tie up the whole market, so if you don't deliver the product at the same time then its not going to matter who's fault it was, the whole division is going to get laid off anyway.  You could get some more people if really wanted, but you know that more people aren't actually going to speed things up.&lt;br /&gt;&lt;br /&gt;The Quality Department have downloaded the voting machine regulations and someone has been going through them and writing down a list of the things they say you have to do and the order they have to be done in.  This is very good.  In fact you send the Head of QA a little note saying how helpful his minion has been to your project, because now you have something to aim at.  Project Management is mostly a matter of getting your hoops lined up so that you and your minions can jump through them as quickly as possible, and the QA minion has done the regulatory hoops for you.  The regulations boil down to a list of documents that have to be shown to the inspectors (who you are going to hire, but thats another story).  Each document has a list of things it must contain, and some of those things have to be traceable to other things.  All you need to do now is start allocating people to things on the list and getting them ticked off.  The list is long, but you have one big advantage: &lt;span style="font-weight: bold;"&gt;there is nothing to say how good any of these documents have to be.&lt;/span&gt;  They don't have to be good, they just have to exist.&lt;br /&gt;&lt;br /&gt;One of these documents is called "source code".  Of course that one &lt;span style="font-style: italic;"&gt;does&lt;/span&gt; have some quality requirements on it: its got to pass a bunch of tests.  But the tests themselves don't have any quality requirements; like everything else they just have to exist.  And passing the tests is the only quality requirement on the code.  Once the independent laboratory you hired has run the tests and said "pass" you are over the finishing line and you can start selling these things.&lt;br /&gt;&lt;br /&gt;This means that you have a very strong motivation to keep the testing to the minimum you can get away with.  The regulations say you have to have a test for each item in the original requirements document, and this test has to be run once.  If your software fails a test then you get to fix it, and if the fix was small enough you can get away without repeating all the other tests as well.  During this whole time your eyes are fixed on the finishing line: the objective is to get this thing over the line.  What happens to it after that is someone else's problem.&lt;br /&gt;&lt;br /&gt;When you look at these machines from a project manager's point of view you start to see how they got to be so unreliable.  "Quality Assurance" is primarily a matter of making sure you get all the items in the regulations ticked off; it has nothing at all to do with the original meaning of the word "quality".  Ironically the regulations may actually do more harm than good because they divert energy from real quality onto generating the required inches of documentation.&lt;br /&gt;&lt;br /&gt;Over the years I've spent a lot of time trying to figure out how to fix this problem, and I still don't have an answer.  Abolishing private companies is a cure worse than the disease, and it won't cure the disease anyway because it won't abolish projects and the need to manage them.  Software Engineering has a bad case of Quality Without A Name, and there is no prospect of it getting better soon. &lt;br /&gt;&lt;br /&gt;However in the limited domain of voting machines I believe the best cure is sunlight: we may not be able to define quality in software, but we know it when we see it.  The source code for voting machines must be published.  The manufacturers will scream and shout about their precious IPR and trade secrets.  This is nonsense.  Any voting machine must have a well defined version of someone's software running, so any illegal copying will generate a cast-iron audit trail back to the perpetrator.  And there are no real trade secrets in voting machines: counting votes is not, when it comes down to it, a particularly complicated problem.  The voting machine manufacturers will make just as much money as they do now.  In fact they'd probably make more because if the machines were trustworthy then people would learn to trust them.  However the &lt;span style="font-style: italic;"&gt;first&lt;/span&gt; vendor to start publishing their source code will be at a disadvantage because everyone else can pinch bits of it with very little risk of detection (and if they get caught they can just blame a rogue programmer).  So the regulations on voting machines should be changed to &lt;span style="font-style: italic;"&gt;require&lt;/span&gt; the publication of the code (and other design documentation too, while we are about it).  That will create a real requirement for quality source code.  Until then we are stuck with the current mess.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-6712537023400522138?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/6712537023400522138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=6712537023400522138' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/6712537023400522138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/6712537023400522138'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/03/why-voting-machines-cant-add-up.html' title='Why Voting Machines Can&apos;t Add Up'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-8980378981722940451</id><published>2008-01-10T10:42:00.000-08:00</published><updated>2008-01-12T01:24:49.376-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Why Haskell is Good for Embedded Domain Specific Languages</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Domain-specific_programming_language"&gt;Domain Specific Languages&lt;/a&gt; (DSLs) are attracting some &lt;a href="http://qcon.infoq.com/london/tracks/show_track.jsp?trackOID=83"&gt;attention&lt;/a&gt; these days.  They have always been around, of course: Emacs Lisp is a DSL, as are the various dialects of Visual Basic embedded in MS Office applications.  And of course Unix hands know YACC (now Bison) and Lex (now Flex).&lt;br /&gt;&lt;br /&gt;However creating a full-blown language is a lot of work: you have to write a parser, code generator / interpreter and possibly a debugger, not to mention all the routine stuff that every language needs like variables, control structures and arithmetic types.  An embedded DSL (eDSL) is basically a short cut if you can't afford to do that.  Instead you write the domain-specific bits as a library in some more general purpose "host" language.  The uncharitable might say that "eDSL" is just another name for "library module", and its true there is no formal dividing line.  But in a well designed eDSL anything you might say in domain terms can be directly translated into code, and a domain expert (i.e. a non-programmer) can read the code and understand what it means in domain terms.  With a bit of practice they can even write some code in it.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://archive.eiffel.com/eiffel/projects/calfp/page.html"&gt;This paper&lt;/a&gt; describes an eDSL for financial contracts built in Eiffel which worked exactly that way.  It doesn't talk about "domain specific language" because the term hadn't been invented back then, but the software engineers defined classes for different types of contracts that the financial analysts could plug together to create pricing models.  Its interesting to compare it with &lt;a href="http://research.microsoft.com/%7Esimonpj/Papers/financial-contracts/contracts-icfp.htm"&gt;this paper&lt;/a&gt; about doing the same thing in Haskell.&lt;br /&gt;&lt;br /&gt;But eDSLs have problems.  The resulting programs are often hard to debug because a bug in the application logic has to be debugged at the level of the host language; the debugger exposes all the private data structures, making it hard for application programmers to connect what they see on the screen with the program logic.  The structure of the host language also shows through, requiring application programmers to avoid using the eDSL functions with certain constructs in the host language.&lt;br /&gt;&lt;br /&gt;This is where Haskell comes in.  Haskell has three closely related advantages over other languages:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Monads.  The biggest way that a host language messes up an eDSL is by imposing a flow of control model.  For example, a top-down parser library is effectively an eDSL for parsing.  Such a library can be written in just about any language.  But if you want to implement backtracking then its up to the application programmer to make sure that any side effects in the abandoned parse are undone, because most host languages do not have backtracking built in (and even Prolog doesn't undo "assert" or "retract" when it backtracks).  But the &lt;a href="http://www.haskell.org/ghc/docs/latest/html/libraries/parsec/Text-ParserCombinators-Parsec.html"&gt;Parsec library&lt;/a&gt; in Haskell limits side effects to a single user-defined state type, and can therefore guarantee to unwind all side effects.  More generally, a monad defines a model for flow of control and the propagation of side effects from one step to the next.   Because Haskell lets you define your own monad, this frees the eDSL developer from the model that all impure languages have built in.  The ultimate expression of this power is the Continuation monad, which allows you to define any control structure you can imagine.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Laziness.  Haskell programmers can define infinite (or merely very large) data structures because at at any given point in the execution only the fragment being processed will actually be held in memory.  This also frees up the eDSL developer from having to worry about the space required by the evaluation model.  (&lt;span style="font-weight: bold;"&gt;update&lt;/span&gt;: this isn't actually true.  As several people have pointed out, while laziness can turn O(n) space into O(1), it can also turn O(1) into O(n).  So the developers do have to worry about memory, but lazy evaluation does give them more options for dealing with it.)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The type system allows very sophisticated constraints to be placed on the use of eDSL components and their relationships with other parts of the language.  The Parsec library mentioned above is a simple example.  All the library functions return something of type "Parser foo", so an action from any other monad (like an IO action that prints something out) is prohibited by the type system.  Hence when the parser backtracks it only has to unwind its internal state, and not the rest of the universe.&lt;/li&gt;&lt;/ol&gt;There are other programming languages that are good for writing eDSLs, of course.  Lisp and Scheme have callCC and macros, which together can cover a lot of the same ground.  Paul Graham's famous "&lt;a href="http://www.paulgraham.com/avg.html"&gt;Beating the Averages&lt;/a&gt;" paper talks about using lots of macros, and together with &lt;a href="http://www.freepatentsonline.com/6205469.html"&gt;his patent&lt;/a&gt; for continuation-based web serving it is pretty clear that what he and Robert Morris actually created was an eDSL for web applications, hosted in Lisp.&lt;br /&gt;&lt;br /&gt;But  I still think that Haskell has the edge.  I'm aware of the Holy War between static and dynamic type systems, but if I you put a Haskell eDSL in front of a domain expert then you only have to explain a compiler type mismatch message that points to the offending line.  This is much easier to grasp than some strange behaviour at run time, especially if you have to explain how the evaluation model of your eDSL is mapped down to the host language.  Non-programmers are not used to inferring dynamic behaviour from a static description, so anything that helps them out at compile time has to be a Good Thing.  And its pretty useful for experienced coders too.&lt;br /&gt;&lt;br /&gt;(Update: I should point out that monads can be done in any language with lambdas and closures, and &lt;a href="http://pastie.caboo.se/137859"&gt;this&lt;/a&gt; is pretty cool.  But only in Haskell are they really a native idiom)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-8980378981722940451?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/8980378981722940451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=8980378981722940451' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/8980378981722940451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/8980378981722940451'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2008/01/why-haskell-is-good-for-embedded-domain.html' title='Why Haskell is Good for Embedded Domain Specific Languages'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-1300717958273958106</id><published>2007-11-29T13:26:00.000-08:00</published><updated>2007-11-29T14:17:29.347-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='law'/><category scheme='http://www.blogger.com/atom/ns#' term='comcast'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Is Comcast's Packet Spoofing a Federal Crime?</title><content type='html'>The EFF has &lt;a href="http://www.eff.org/wp/packet-forgery-isps-report-comcast-affair"&gt;gathered evidence&lt;/a&gt; showing that Comcast is deliberately disrupting P2P traffic by spoofing RST packets to appear to come from the other end of the connection.  See the EFF report for the technical details.&lt;br /&gt;&lt;br /&gt;The US Criminal Code &lt;a href="http://www.usdoj.gov/criminal/cybercrime/1030NEW.htm"&gt;Title 18 Part 1 Title 47 Section 1030&lt;/a&gt; covers "Fraud and Related Activity In Connection With Computers".  I'm not a lawyer, but here is my understanding of the relevant bits of the statute (quotes from the statute are in italics):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Jursidiction: &lt;/span&gt;a "Protected Computer" is defined, amongst other things, as any computer "&lt;span style="font-style: italic;"&gt;which is used in interstate or foreign commerce or communication,    including a computer located outside the United States that is used in a manner    that affects interstate or foreign commerce or communication of the United States&lt;/span&gt;".  In other words if your computer is on the Internet, even if its outside the US, then its a Protected Computer.  That includes anything connected via Comcast, and anything that talks to any computer connected via Comcast.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Offence:&lt;/span&gt; there are two things to prove here:&lt;ol&gt;&lt;li&gt;That someone employed by Comcast "&lt;span style="font-style: italic;"&gt;knowingly causes the transmission of a program, information,    code, or command, and as a result of such conduct, intentionally causes damage    without authorization, to a protected computer&lt;/span&gt;".  Damage is defined as "&lt;span style="font-style: italic;"&gt;any impairment to the integrity    or availability of data, a program, a system, or information&lt;/span&gt;".  A spoof RST packet instructs the receiving computer to drop a TCP connection, so it is a command that impairs the availability of data.  I have no direct evidence that these packets were sent knowingly, but I find it difficult to imagine a scenario in which they were sent by accident.&lt;/li&gt;&lt;li&gt;That this action caused "&lt;span style="font-style: italic;"&gt;loss to 1 or more persons during any 1-year period &lt;/span&gt;[...]&lt;span style="font-style: italic;"&gt; aggregating at least $5,000 in value&lt;/span&gt;".   "Loss" is defined as "&lt;span style="font-style: italic;"&gt;any reasonable cost to any victim,    including the cost of responding to an offense, conducting a damage assessment,    and restoring the data, program, system, or information to its condition prior    to the offense, and any revenue lost, cost incurred, or other consequential    damages incurred because of interruption of service&lt;/span&gt;".  This is a bit tricky, but people do value their time.  $10 per hour is a pretty low wage, and many professionals charge many times that.  If failed P2P connections have cost 500 Comcast users 1 hour each in wasted time then this threshold has been reached.  You might also be able to make a case purely on the cost of running a computer and keeping it connected via Comcast.  The professional IT people who have taken the time to run tests with packet sniffers could certainly count their time at a professional rate as "responding to an offence" and "conducting a damage assessment".  There is also some evidence that Comcast inadvertently disrupted other protocols, including Lotus Notes and Windows Remote Desktop.  These are used commercially and their disruption would have real financial impact.  So while a detailed accounting remains to be done, it certainly looks likely that the $5,000 threshold has been reached.&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;"&gt;Penalty&lt;/span&gt;: "&lt;span style="font-style: italic;"&gt;a fine under this title or imprisonment for not more than 5 years,    or both, &lt;/span&gt;[if] &lt;span style="font-style: italic;"&gt;the offense was committed for purposes of commercial advantage    or private financial gain&lt;/span&gt;".  Comcast's attempts to block P2P protocols are prompted by their desire to keep costs down while seeming to offer an unrestricted service.  That counts as "commercial advantage".&lt;br /&gt;&lt;br /&gt;So it certainly looks like a Section 1030 offense has been committed that could see someone put in the pen for five years.  Any Comcast customers want to call the FBI?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-1300717958273958106?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/1300717958273958106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=1300717958273958106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/1300717958273958106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/1300717958273958106'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/11/is-comcasts-packet-spoofing-federal.html' title='Is Comcast&apos;s Packet Spoofing a Federal Crime?'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-8003410769055309781</id><published>2007-11-27T12:00:00.000-08:00</published><updated>2007-11-27T13:29:06.028-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Disruptive Innovation and the Walmart Linux PC</title><content type='html'>The Everex TC2502 is being sold by Walmart for $200 (no monitor included), assuming it hasn't sold out a second time.  Part of the reason its so cheap is that it runs Linux and OpenOffice.org instead of Windows and MS Office.  The first run sold out within days, which is a strong clue that it was a lot more popular than expected.  This doesn't mean popular in an absolute sense, just more than Walmart and Everex expected when they decided how many to get in stock.  But its the relative popularity that counts: Walmart and Everex produced this box because they calculated they would turn a profit on whatever number they expected to sell.  So the fact that they sold out fast means two things:&lt;ol&gt;&lt;li&gt;A bigger profit than expected, which is nice for Walmart and Everex.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Cheap Linux-based PCs have a market niche big enough to make them worth-while.  Other manufacturers will have taken note.  Expect imitators.&lt;/li&gt;&lt;/ol&gt;Anyone who has read &lt;a href="http://www.amazon.co.uk/Innovators-Dilemma-Technologies-Cause-Great/dp/0875845851/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1196194306&amp;amp;sr=8-1"&gt;The Innovator's Dilemma&lt;/a&gt; will recognise this pattern: a market incumbent listens to its best (i.e. richest and most profitable) customers, and in consequence makes its products bigger, better and progressively more expensive.  The incumbent also finds it unprofitable to compete with narrow niche offerings at the bottom, because they are low quality and aimed at poor customers that can't afford the market leader.  So it forgoes the bottom end of the market and concentrates on its nice profitable high-end models.  However over time the bottom-end offerings improve, and so become a cost-effective choice for more and more customers.  Eventually this starts to make serious inroads into the sales of the incumbent.  But by then its too late.  The incumbent must choose between cutting prices to compete with the newcomer or else continue to see its market share erode.  Neither option will bring back the glory days, and historically many such companies went out of business surprisingly fast.&lt;br /&gt;&lt;br /&gt;I'm quite sure that Bill Gates and Steve Ballmer have read The Innovator's Dilemma and seen this coming.  There is a &lt;a href="http://www.mindtools.com/pages/article/newTED_97.htm"&gt;bit of MBA strategy theory&lt;/a&gt; that sums up their position nicely.  Plot their product lines on a chart with two axes; market share and growth potential.  The high-share-low-growth lines are "cash cows": they should be milked, and the profits put into high-growth lines.  Eventually all cash-cows turn into dogs (low-share-low-growth) and these should be killed off.  You just have to hope that by then you have some new cash cows to replace them.&lt;br /&gt;&lt;br /&gt;Microsoft has two cash-cows (Windows and Office), and Microsoft has indeed been milking them for all they are worth.  The money has been ploughed into a bunch of ventures over the years, but none of them look like becoming future cash cows.&lt;br /&gt;&lt;br /&gt;Now we may be entering the final act.  People have talked about Linux as a disruptive technology for the last decade, and for server operating systems it definitely has been.  Its effectively killed off proprietary Unix, and put a serious dent in Windows.  Microsoft continues to fight a rearguard action in this market, but its reliance on big corporate customers is becoming more and more obvious as it tries to separate its premium products (which rich big companies will still reliably pay for) from its lower end offerings.  But on the desktop Windows and Office have continued to reign supreme.&lt;br /&gt;&lt;br /&gt;Now for the first time in a decade a competing office suite is starting to nibble at the toes of the incumbent.  Its not going to make a dent in Microsoft's quarterly numbers just yet, but the future can only go one way.  Microsoft sells Windows and Office to PC builders for less than the retail prices, but it cannot let Windows and Office go onto a PC that sells for $200 because they would be giving it away: it would actually be cheaper to buy the PC with the software than to buy the software alone at retail prices.  But as more people find that bottom-end hardware with Linux and OpenOffice.org makes a perfectly useful home PC at a fraction of the cost of the Microsoft alternative, so the market will grow.  Microsoft may try to segment the market by offering a cut-down version of MS Office (maybe Word with a 20 page limit), but they are competing with a fully featured product.  No matter what they do to Windows and Office, Linux and OpenOffice.org are going to look like better value to anyone who is on a tight budget.&lt;br /&gt;&lt;br /&gt;Initially it will just be cash-strapped consumers who buy these boxes (students in particular are going to love them).  But this is a one-way street.  Every consumer who buys one of these boxes is a consumer who is never going to buy a Microsoft box again, even when they get rich.  Why pay more to learn a different set of software?  And they'll tell their friends about how well it works too.  The flow of money into multiple vendors coffers will stimulate investment and competition.  All the vendors will want a slicker, more fully featured Linux offering with a bigger repository of instantly downloadable free (in both senses) software.  The resulting competition will be downright Darwinian, and the offerings are going to get very good very fast.  Everybody is going to race up-market as fast as possible because thats where the real money is.  At the moment that money is being taken by Microsoft, but not for long.&lt;br /&gt;&lt;br /&gt;Add to this the famous network effects.  Part of the reason MS Office dominates is that you need it to exchange documents with everyone else.  But if that stops being true then another good reason to pay for MS Office disappears as well.&lt;br /&gt;&lt;br /&gt;So I predict that Microsoft is going to be in serious trouble, probably within the next few years.  Their existing cost base is tuned to making and selling ever bigger and better versions of their cash cows, and there is no way that they can cut this back to compete with Linux and OpenOffice.org on a cost basis.  But if they can't compete then their cash cows are going to turn into dogs before they can be replaced.  So Microsoft will be left with two dogs, a bunch of ventures that require investment, and no cash flow.  Sure they have big cash reserves they can burn through, but thats not going to be enough even if their investors let them do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-8003410769055309781?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.walmart.com/catalog/product.do?product_id=7754614' title='Disruptive Innovation and the Walmart Linux PC'/><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/8003410769055309781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=8003410769055309781' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/8003410769055309781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/8003410769055309781'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/11/disruptive-innovation-and-walmart-linux.html' title='Disruptive Innovation and the Walmart Linux PC'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-4851161339536038311</id><published>2007-11-23T10:26:00.000-08:00</published><updated>2007-11-23T10:57:45.398-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='politics'/><title type='text'>Its the disks that are the problem, not losing them</title><content type='html'>The UK news this week has been full of stories about the loss of 2 disks (presumably CDs or DVDs) containing all 25 million Child Benefit records.  For those outside the UK, Child Benefit is several pounds a week paid to the mother of every child (i.e. under 16) in the UK.  In most cases it gets paid directly into a nominated bank account.&lt;br /&gt;&lt;br /&gt;This is one of the biggest data losses ever, if not the biggest.  The government has been at pains to point out that the disks are probably just mislaid, and they don't contain enough data for criminals to actually use.  Meanwhile the Opposition has been alleging government incompetence and calling for them to "get a grip".  People are being advised to keep an eye on their bank accounts and not use their childrens' names as passwords.&lt;br /&gt;&lt;br /&gt;All this misses the point.  The problem was not that a couple of disks got lost, it is that a comparatively junior person could burn the entire database to a couple of disks, apparently on his/her own initiative, and without further controls.  There was a time when copying 25 million records would have required substantial resources, such as an overnight run on the mainframe and a boxful of tapes.  The sheer volume of data made it physically difficult to copy, or to lose.  However Moore's Law has turned that big, slow, expensive job into a few minutes with a CD burner.  If those two disks were CDs then the whole lot would also fit on a £10 thumb drive, or even a cell phone.  The story referenced above suggests that in the past the National Audit Office (the place where the disks in question never arrived) have made their own copies and sent them to outside auditors.  None of the commentators seem to have realised that the most probably route for the data to get into the hands of criminals is not the loss of an authorised copy but the creation and distribution of unauthorised copies.&lt;br /&gt;&lt;br /&gt;There are supposed to be procedures in place, but its no surprise that they are not being followed; when was the last time you reached for the Company Procedure Manual to check on the detailed procedure for some simple action?  Its also too easy to blame the middle manager who decided that a written procedure was better than implementing a software access control system.  Given a choice between implementing costly access controls and writing a procedure for making copies, which would you chose?  Now try it again, but imagine that your annual evaluation is going to suffer if you "waste" money doing something that has no positive benefit on your departmental targets.&lt;br /&gt;&lt;br /&gt;I would like to think that this incident will be a wake-up call for the civil service to revamp its data control procedures.  However I doubt it.  A scapegoat has already fallen on his sword (to mix the commonest metaphors).  The government is keen to show it is doing something, but mostly to counter the opposition claims of incompetence.  And the opposition is more interested in a ministerial scalp than in actually pushing for effective action.  What is really needed is an audit of all databases containing UK citizen personal information, followed by a study into the necessary forms of access and the implementation of software-based authorization and logging mechanisms.  But nobody in authority seems to be thinking along those lines.&lt;br /&gt;&lt;br /&gt;The sad thing is that the Ministry of Defence has had hundreds of years experience in dealing with sensitive and secret data, and they have become quite good at it.  Perhaps they should give the rest of the government some lessons.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-4851161339536038311?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://news.bbc.co.uk/1/hi/uk_politics/7108532.stm' title='Its the disks that are the problem, not losing them'/><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/4851161339536038311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=4851161339536038311' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4851161339536038311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4851161339536038311'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/11/its-disks-that-are-problem-not-losing.html' title='Its the disks that are the problem, not losing them'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-472010927411756000</id><published>2007-09-20T11:38:00.000-07:00</published><updated>2007-09-23T05:55:59.662-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='morality'/><title type='text'>The Rise of Modern Morality</title><content type='html'>Every so often I read a letter in a newspaper or some other forum about "&lt;a href="http://www.google.co.uk/search?hl=en&amp;amp;q=decline+morality&amp;amp;btnG=Google+Search&amp;amp;meta="&gt;the decline of modern morality&lt;/a&gt;", in which the writer laments the failing moral standards of private and public life.  I'm old enough to have been reading these articles for two or three decades now, and I've seen some samples of the same genre from past times.  Elvis Presley caused a &lt;a href="http://graphics8.nytimes.com/packages/pdf/archives/elvis-presley-on-milton-berle-show-06-06-1956.pdf"&gt;moral panic&lt;/a&gt; in 1956 by gyrating his hips on stage, and this was cited by commentators at the time as corrupting the morals of young people.  Much has been written about the &lt;a href="http://en.wikipedia.org/wiki/Moral_panic"&gt;sociology of moral panics&lt;/a&gt; and I don't propose to repeat it here.  Instead I want to argue that, far from declining, modern morality is actually superior to moralities of the past (and I use the plural deliberately).&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In 1970 in the UK it was not only legal but widely accepted practice to pay a woman less than a man for doing the same job.  Women who wanted a life outside of home making and child rearing were seen as aberrant, and often regarded with scorn.&lt;/li&gt;&lt;li&gt;In 1960 in America many parts of the country segregated public facilities by race, with black people consistently and blatantly short-changed.  This invidious system was widely supported by prominent politicians and churchmen.&lt;/li&gt;&lt;li&gt;Even into the 1970s in Australia aborigine children were &lt;a href="http://www.eniar.org/stolengenerations.html"&gt;forcibly removed from their parents&lt;/a&gt; and placed in institutions where they were denied proper education and were terribly vulnerable to physical and sexual abuse.  Again, this programme was considered perfectly proper and moral by the standards of the time.&lt;/li&gt;&lt;li&gt;There was a standing assumption for many years that unmarried mothers should immediately give up their children for adoption.  In Ireland they were also incarcerated in the "&lt;a href="http://en.wikipedia.org/wiki/Magdalen_Asylum"&gt;Magdalene Laundries&lt;/a&gt;".  Other countries had similar systems.  Strangely, the fathers were left to go free.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;For most of the 20th century, when it became necessary to remove children from their parents because of neglect or abuse little thought was given to keeping siblings together: they would be split up to suit the convenience of potential adopters or fosterers.&lt;/li&gt;&lt;li&gt;Until recent years in most Western countries, homosexuals were persecuted and discriminated against, both by the law and by society at large.&lt;/li&gt;&lt;li&gt;Until the 90s in the UK drink-driving was considered a minor peccadillo.  Drivers convicted of the offence were more likely to encounter sympathy at the unfair attitude of the legal system than censure at their reckless disregard for the safety of others.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Not all of these evils are completely gone, but in all cases there has been a substantial moral shift.  I know that some readers will look at some of this list, especially the tolerance of homosexuality, and regard this as evidence of moral decay rather than ascent.  But this brings up another issue I have with the Cassandras of moral decay: their belief in moral absolutism; that right and wrong are entirely self-evident, and that any deviation stems from lack of morality rather than a genuine disagreement over what the moral course is.&lt;br /&gt;&lt;br /&gt;The problem with moral absolutism is that (in its commonest form) it asserts that the perfect moral code has already been revealed and the only possible improvement is in closer adherence to that code.  However I describe myself as a &lt;a href="http://en.wikipedia.org/wiki/John_Stuart_Mill"&gt;Liberal Utilitarian&lt;/a&gt; (although I confess I haven't actually read any of Mill's work).  Hence I see "the greatest good of the greatest number" as a basic moral principle, while at the same time acknowledging that there may be a lot of disagreement about exactly what that means and how to bring that about.  Liberal utilitarianism recognizes no absolute moral imperative apart from the general principle that life, liberty and the pursuit of happiness are good things.  However by retaining that anchor it avoids the charge often leveled by the Absolutists that those who question their moral code are "relativists" who believe that any moral code is as good as any other.  Liberal utilitarianism examines the impact of moral rules on the real people affected by them.  If different rules would have a better outcome then those rules are automatically better.  I see the arguments (both past and ongoing) about freedom, equal opportunities and tolerance to be a part of this process, and I see a steady improvement through history.  Those who object to the current crop of improvements in morality because they contradict their particular absolutist code would do well to read their history books.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-472010927411756000?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/472010927411756000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=472010927411756000' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/472010927411756000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/472010927411756000'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/09/rise-of-modern-morality.html' title='The Rise of Modern Morality'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-9016566040432856440</id><published>2007-09-07T13:07:00.000-07:00</published><updated>2007-09-08T00:27:06.134-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='bacula'/><title type='text'>Windows Disaster Recovery with Bacula</title><content type='html'>A few days ago my wife asked me to look at her computer.  Programs were taking ages to respond even to a simple mouse click, or just crashed.  And the system box kept making odd clicking noises.&lt;br /&gt;&lt;br /&gt;I confirmed her diagnosis of a failing hard drive and shut the computer down.  The following lunchtime I drove to the nearest PC World and bought a replacement hard drive.  I normally buy mail-order, but we wanted the computer back up as soon as possible.  That evening I removed the faulty drive and installed the new one, and I also stuck in some extra RAM while I had the case open.  Then it was time to find out if my rather sketchy disaster recovery plan was going to work.&lt;br /&gt;&lt;br /&gt;I run &lt;a href="http://fedoraproject.org/"&gt;Fedora&lt;/a&gt; on my own box, and both computers are backed up using &lt;a href="http://www.bacula.org/"&gt;Bacula&lt;/a&gt;.  This is designed for backing up lots of computers to tape drives, but it also supports backup to disk drives.  I have two USB drives, keep one plugged in, and swap them every month or so.  I use the default Bacula backup schedule of a weekly full dump on both machines and nightly incremental dumps.  Most of the Bacula components only run on Unix, but there is also a Windows client installed on my wife's computer (which runs Windows XP SP2).  Bacula configuration is rather hairy, but if you have more than one computer its well worth the effort.&lt;br /&gt;&lt;br /&gt;The big headache for restoring Windows is the &lt;a href="http://www.codinghorror.com/blog/archives/000939.html"&gt;Registry&lt;/a&gt;.    After previous bad experiences with this horrible blob of data I had made sure the registry was backed up by using regedit to dump the registry contents to a file before each Windows backup, so I hoped it would be OK.  There are also problems with other files in C:\Windows that are constantly in use and therefore unwritable during system restore.&lt;br /&gt;&lt;br /&gt;The Bacula manual pointed me at &lt;a href="http://www.nu2.nu/pebuilder/"&gt;Bart PE Builder&lt;/a&gt;, which generates a Live CD version of Windows XP.   It suggested that you might be able to run Bacula in this environment to get around these problems.  Bacula ran fine, but I couldn't get the drivers for the network card to install, so that wouldn't work.&lt;br /&gt;&lt;br /&gt;Instead I re-installed Windows XP SP1 from the original CD and ran Bacula there.  The restore duly dumped copies of C: and D:  in C:/temp/restore/c and /d.  (The computer has two partitions because it used to have two drives.  My wife got used to having C: and D: drives and various programs had been configured to look for data on D:, so I kept the layout even when it went back to a single drive.).  Then I booted under the Bart PE disk, deleted the existing contents of C: (except for /temp) and copied the restored contents into the root directories.  Then for the big test: would it reboot?&lt;br /&gt;&lt;br /&gt;Well, sort of.  The login screen came up, but when I tried to log in the computer hung.  I tried rebooting in safe mode, and then in "safe mode with console", which seemed to be the bare minimum.  That at least got me a command line, so I ran regedit and imported the registry copy that had been created by the last backup.  This warned me that some registry keys could not be modified and claimed that the changes had failed.  I rebooted again, and this time found that I could log in, but pretty much all the settings had been forgotten.  Office wanted to re-install itself, and every time I started Word it asked for my name and initials twice.  This suggested that important parts of the registry were not only still not recovered, but also unwritable.&lt;br /&gt;&lt;br /&gt;Windows also decided that it was running on new hardware, and badgered me to activate it.  So I did.  I then tried logging in as a different user and restoring the registry again in the hope that being a different user would lock different bits of registry.  This merely overwrote the new activation data and Windows now point blank refused to let me log in at all until I activated it again.  So I tried.  This time it told me that I had exceeded my activation limit and would have to phone up for activation.  So I did.  Windows gave me a 36 digit number and a robot on the other end of the phone line told me to type in the number.  Then a polite gentleman named "Fred" with an Indian accent asked me how many computers I had Windows installed on and why I needed to activate it.  Then he gave me another 36 digit number to type into Windows to activate it.  This worked.  But when I logged in Windows wasn't behaving any better.&lt;br /&gt;&lt;br /&gt;A bit of Googling reminded me of something I should have remembered much earlier: Windows occasionally checkpoints its critical state, including the Registry, and you can wind it back to a previous known good state using the System Restore function.  So I located a checkpoint from before all the trouble started, restored Windows to that state and rebooted.&lt;br /&gt;&lt;br /&gt;When I tried to log in I got immediate joy: the desktop background had been restored.  This suggested that the registry was now intact.  But this restore had also overwritten the registration data, and Windows once again demanded to be activated before I could log in.  Back to the phone, this time to a polite woman named June with a much stronger Indian accent who asked me the same questions and gave me yet another 36 digit number to type in.  This time everything worked.  Disaster recovery was completed.&lt;br /&gt;&lt;br /&gt;I'd like to thank the authors of Bacula for their excellent backup program.  It saved both of us a lot of heartache.  In the past I've found it too easy to neglect backups, and sometimes our computers have gone for months without being backed up.  When I got it properly configured (not a trivial task) Bacula made  backups automatically with minimal intervention by me (basically, swapping USB drives occasionally).  That meant I had a good recent backup to work from.&lt;br /&gt;&lt;br /&gt;I'd also like to thank  &lt;a href="http://www.nu2.nu/contact/bart/"&gt;Bart Lagerweij&lt;/a&gt;, author of Bart PE.  I could probably have managed by booting Knoppix and using its NTFS driver capture facility, but having a native Windows environment made life much easier.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-9016566040432856440?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/9016566040432856440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=9016566040432856440' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/9016566040432856440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/9016566040432856440'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/09/windows-disaster-recovery-with-bacula.html' title='Windows Disaster Recovery with Bacula'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-2079781155350765091</id><published>2007-09-01T05:10:00.000-07:00</published><updated>2007-09-01T07:37:54.225-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='erlang'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Composability and Productivity</title><content type='html'>This was posted to my &lt;a href="ttp://cogito.blogthing.com/"&gt;original blog&lt;/a&gt; on January 7th 2007.  It was also &lt;a href="http://programming.reddit.com/info/xeto/comments"&gt;discussed on Reddit&lt;/a&gt;, so please do not repost it.&lt;br /&gt;&lt;br /&gt;----------------------------------------------------&lt;br /&gt;&lt;p&gt;My &lt;a href="http://paulspontifications.blogspot.com/2007/08/no-silver-bullet-and-functional.html"&gt;earlier post&lt;/a&gt; about increased productivity through functional programming stirred up a good deal of comment. A number of people replied that the libraries are more important than the language. More recently a similar point has been made by &lt;a href="http://kawagner.blogspot.com/2007/01/what-makes-programming-language-more.html"&gt;Karsten Wagner&lt;/a&gt;, who argues that code reuse is what makes languages productive.&lt;/p&gt;  &lt;p&gt;I remember the early days of OO, when it was argued by many people (me amongst them) that OO languages would finally let us write reusable software. There was optimistic talk of “software factories”, and Brad Cox gave lots of talks about how software could now finally move from craft to engineering discipline, built on the back of libraries of reusable code. So the entire industry went for C++, but the easy creation of reusable software remained elusive. That is not to say you can’t ever produce reusable software in the language, but it is not significantly easier than in C.&lt;/p&gt;  &lt;p&gt;Karsten accurately pins the reason why C++ failed to deliver: memory management. Back in those old days I was trying to explain to people why &lt;a href="http://en.wikipedia.org/wiki/Eiffel_programming_language"&gt;Eiffel&lt;/a&gt; would be so much more productive than C++, and garbage collection was a big part of it.&lt;/p&gt;  &lt;p&gt;The reason why GC is so important lies in a more general principle called composability. Composability means that you can put two bits of code together and important correctness properties will be preserved automatically. This does not mean, of course, that the composition is automatically correct in a wider sense, but it does mean that you don’t introduce new bugs merely by sticking two things together.&lt;/p&gt;  &lt;p&gt;Imagine two modules of code in a non-GC language like C or C++. Module X creates an object and hands a reference to that object over to Module Y. At some point in the future X will delete that object. However it is only safe to do so once Y has finished with it. So if X and Y were written independently then it is quite possible that Y will hang on to the reference longer than X expects. In short, manual memory management is not composable, because the composition of X and Y can introduce stale pointer bugs that were not present in either X or Y.&lt;/p&gt;  &lt;p&gt;In a language with GC this is a non-problem: the collector will reap the object once it sees that both X and Y have finished with it. X can therefore forget about the object in its own time without having to know anything about Y. But programmers in non-GC lanuages have to resort to a number of workarounds. Either objects have to be copied unecessarily (which leads to stale data bugs instead of stale pointer bugs), or else some kind of reference counting or similar scheme must be employed. Reference counting is of course merely an ad hoc, informally-specified, bug-ridden, slow implementation of GC, and therefore stands as a classic example of &lt;a href="http://en.wikipedia.org/wiki/Greenspun%27s_Tenth_Rule"&gt;Greenspun’s Tenth Rule&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;But programming languages contain other examples of non-composable constructs. The current biggest offender is shared memory concurrency using locking. If X takes locks Foo and Bar, and Y takes locks Bar and Foo (in those orders), then sooner or later they are going to deadlock with X holding Foo and Y holding Bar. Ironically Java has the biggest problems here.&lt;/p&gt;  &lt;p&gt;Surprisingly, program state generally is a source of non-composability. Mutable state is actually another form of manual memory management: every time you over-write a value you are making a decision that the old value is now garbage, regardless of what other part of the program might have been using it. So suppose that X stores some data in Y, and then Z also stores some other data in Y, overwriting what X did. If X assumes that its old data is still there then it is going to be in trouble. Either X needs to defensively check for new data, or Y needs to tell X about the change (the Observer pattern). Whichever way, the addition of Z to the system can introduce bugs that stem from the composition of modules rather than the modules themselves.&lt;/p&gt;  &lt;p&gt;Another example is the Command pattern, which includes a method to “undo” a previous command. Why undo it? Because the global state has been changed. Get rid of the concept of a single unique state for the entire application and you get rid of the problem.&lt;/p&gt;  &lt;p&gt;On a more prosaic level, many library modules have some internal state, and so require an initialisation call to “set things up”. Who exactly is responsible for this initialisation? If you compose two modules together then they may both imagine themselves soley responsible for making this initialisation call, and hence it will be done twice.&lt;/p&gt;  &lt;p&gt;It is a truism of programming that “integration” is the most difficult and risky (from a scheduling point of view) part of developing a large system. Integration basically means composing together all the units to try to get a working system. And the biggest integration problems are due to the non-composability of the units. A defect within a unit is fairly easy to identify, but composition bugs are down to the interaction of two separate units in some unforseen way, which makes it correspondingly more difficult to pin them down.&lt;/p&gt;  &lt;p&gt;So what would a language look like if it got rid of all of these non-composable constructs?  The answer, basically, is &lt;a href="http://www.haskell.org/"&gt;Haskell&lt;/a&gt;. The underlying goal of functional language designers is to make everything completely composable. Haskell is the language that has advanced furthest towards this goal.&lt;/p&gt;  &lt;p&gt;Erlang is pretty good as well. It doesn’t eliminate state, but it does keep it confined to individual processes: there are no shared memory locks. Processes have to communicate according to shared protocols, but this is a manageable dependency on a common abstraction. Even within a process the shared state can be reduced by careful use of functional programming rather than imperative. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-2079781155350765091?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/2079781155350765091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=2079781155350765091' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2079781155350765091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2079781155350765091'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/09/composability-and-productivity.html' title='Composability and Productivity'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-3466931970259430157</id><published>2007-08-27T11:59:00.000-07:00</published><updated>2007-08-28T07:54:44.228-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='politics'/><title type='text'>Tax as Percentage of GDP</title><content type='html'>In the 17th century French economist Jean Baptiste Colbert said "The art of taxation consists in so plucking the goose as to obtain the largest possible amount of feathers with the smallest possible amount of hissing”.  His observation is as true today as it was then.&lt;br /&gt;&lt;br /&gt;Whenever the government in the UK decides to charge for something, especially if it was previously free, it is in turn charged with "&lt;a href="http://www.macmillandictionary.com/new-words/031114-stealth-tax.htm"&gt;stealth taxation&lt;/a&gt;".  I don't know about other countries, but I imagine that the politics are similar.  There is often a good reason why the government wants to levy a charge, which often has nothing to do with its overall level of income.  An example is the recent proposal to charge by the kilo for &lt;a href="http://news.bbc.co.uk/1/shared/bsp/hi/pdfs/16_7_07_bincollections.pdf"&gt;domestic refuse collection&lt;/a&gt;: the "polluter pays" principle is generally recognised as sound and "free" rubbish collection is increasingly expensive.  &lt;a href="http://news.bbc.co.uk/1/hi/wales/4988326.stm"&gt;But not everyone agrees:&lt;/a&gt;&lt;br /&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Mother-of-five Mandy Price, who has just begun to recycle but still produces an average of nine bin liners of rubbish a week, said the assembly could not justify introducing such a policy in the wake of council tax rises. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;She said: "You pay your council tax for the local authority to come and collect your rubbish, so why should we pay more?"&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;  &lt;/span&gt;&lt;/p&gt;In other words, the charge is perceived primarily as just another source of revenue rather than an attempt to shift the costs onto the people who actually use the service the most.  The government response is always to say that this is going to be offset by lower taxes elsewhere (in this case, council tax), but this makes a very unconvincing soundbite.&lt;br /&gt;&lt;br /&gt;Gross Domestic Product is a standard way of measuring the overall economic activity in a nation or economic area, and the usual way of measuring the tax burden on an economy is the ratio of taxation to GDP.  For instance, &lt;a href="http://www.reform.co.uk/website/economy/taxation/internationalcomparisons.aspx"&gt;Reform&lt;/a&gt; points out that the US takes 26.4% of GDP as tax, whereas the UK takes 35.8%.  Of course, these figures are almost useless for international comparison because they don't say what the tax pays for.  In the UK most health care is paid for by the government out of general taxation whereas in the US it is mostly paid for privately by employer-funded health schemes that get a tax break.  The NHS is funded out of taxation, and so is charged to the government's account, but a scheme partly funded by a tax &lt;span style="font-style: italic;"&gt;reduction&lt;/span&gt; (as in the US) is not.  If the US were to eliminate the tax break and subsidise these schemes directly instead then the basic nature of the system would not change one whit, but the proportion of US GDP taken in tax would increase.  The US spends around 16% of GDP on health care (compared to about 8% in the UK).  From an employer's point of view taxation and healthcare are both just costs of doing business, and the overall burden of general taxation and healthcare in the US is actually higher than in the UK.  As always you get what you pay for, but a worrying amount of political debate seems to revolve around which ledger the payment is recorded in.&lt;br /&gt;&lt;br /&gt;However one place where such figures would be useful (but never seem to be used) is in domestic political arguments.  The Liberal Democrats used to have a policy of adding 1% to the rate of income tax in order to fund improved education.  Meanwhile the Tories are struggling with a reputation for aggressive cost-cutting in public services in order to fund tax cuts, and the Labour government has been increasing taxes in order to spend more on public services (with notable lack of effect, but thats another issue).&lt;br /&gt;&lt;br /&gt;What I would like to see is for each party to declare a target level of taxation as a percentage of GDP.  That gets their macro-economic policy on taxation out in the open, without confusing it with a lot of micro-economic questions over how it is collected.  Thats not to say that those micro-economic questions are unimportant, but they need to be separated from the macro-economic debate about the overall level of taxation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-3466931970259430157?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/3466931970259430157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=3466931970259430157' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/3466931970259430157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/3466931970259430157'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/08/tax-as-percentage-of-gdp.html' title='Tax as Percentage of GDP'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-2631935957638029641</id><published>2007-08-22T10:57:00.000-07:00</published><updated>2007-08-22T11:41:48.628-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration management'/><title type='text'>Microsoft versus FOSS Configuration Management</title><content type='html'>This was originally posted to my old blog on December 3rd 2006.  It was also &lt;a href="http://programming.reddit.com/info/txsw/comments"&gt;discussed on Reddit&lt;/a&gt; at the time, so please do not repost it.&lt;br /&gt;&lt;br /&gt;--------------------------------------&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.joelonsoftware.com/items/2006/11/24.html"&gt;Joel Spolsky&lt;/a&gt; writes about the Vista shutdown menu and its excess of confusing options (what exactly &lt;em&gt;is&lt;/em&gt; the difference between Hibernate and Sleep?).    Moishe Lettvin, who happened to have worked on that menu, chimed in with an &lt;a href="http://moishelettvin.blogspot.com/2006/11/windows-shutdown-crapfest.html"&gt;explanation&lt;/a&gt; of why it came out that way, which included a fascinating insight into how Microsoft handles configuration management.&lt;/p&gt;  &lt;p&gt; For the uninitiated, configuration management is a lot more than just version control. It includes managing all the libraries and tools used in a build, and if multiple components are being incorporated into the final product then it also involves keeping track of those. The goal is to be able to go back to some build that happened last year, repeat the build, and come out with the same MD5 checksum at the end. Stop and think about what that involves for a minute. Its highly non-trivial. (And some compilers happen to make it impossible by using multiple threads, so that two consecutive builds generate the same code, but with functions in a different order. Under some high integrity quality regimes this actually matters).&lt;/p&gt;  &lt;p&gt;The Microsoft problem is that they have thousands of people working on Vista, and a simple repository with everyone checking stuff in and out simply won’t scale. So they have a tree of repositories about 4 deep. Each developer checks stuff in to their local repository, and at intervals groups of repositories are integrated into their local branch. Hence the changes propogate up the tree to the root repository, from where they then propogate back down the other branches.&lt;/p&gt;  &lt;p&gt;The trouble is, propgation from one side of the tree to the other can take a month or three. So if developer A and developer B need to collaborate closely but are on distant branches of the build tree then their code takes ages to propogate between them.&lt;/p&gt;  &lt;p&gt;Now consider the case of open source software. The Linux kernel and Windows are actually organised in very similar ways: Linus owns the master repository, people like Alan Cox own sub-repositories, and handle integration up to Linus. Sub-repository owners are responsible for QA on the stuff they merge in, just like in Windows.&lt;/p&gt;  &lt;p&gt;So why is Windows Vista in trouble, but free / open source software is not? After all, GNU/Linux overall has tens of thousands of people developing for it, and thousands of packages of which the kernel is just one. Worse yet, these tens of thousands of people are not properly organised and have very little communication. Microsoft can at least order all its programmers to work in certain ways and conform to certain standards.&lt;/p&gt;  &lt;p&gt;Actually this disconnection is a strength, not a weakness.  &lt;a href="http://www.melconway.com/research/committees.html"&gt;Conway’s Law&lt;/a&gt; says the structure of any piece of software will duplicate the structure of the organisation that created it. So in Microsoft there are lots of programmers who all talk to one another, and this leads to software where all the bits are inter-dependent in arbitrary ways. Open source developers, on the other hand, are spread around and have very narrow interfaces between each other. This leads to software with narrow well defined interfaces and dependencies.&lt;/p&gt;  &lt;p&gt;Dependencies are the crucial thing here: if I am writing a new application that uses, lets say, the Foobar library, then I will want to depend on a stable version. If I write to the API in the daily snapshot then my code could suddenly break because someone submits a patch that changes something. So I write to the last stable release. If I &lt;em&gt;really&lt;/em&gt; need some feature that is still being developed by the Foobar team then I can use it, but that is an exceptional case and I won’t be releasing my application until the Foobar feature stabilises. &lt;/p&gt;  &lt;p&gt;Dependency management is probably the most important contribution of open source to software engineering. The requirement first became obvious under Windows, with “DLL hell”: different applications installed and required different dynamic libraries, and conflicts were inevitable. Then Red Hat users encountered a similar problem in “RPM hell”, in which they had to manually track the dependencies of any package they wanted and download and install them.&lt;/p&gt;  &lt;p&gt;As far as I know Debian was the first distribution to really solve the dependency problem with apt-get. These days Fedora has yum and pirut, which do essentially the same job. Its not a simple job either. A program may have a dependency not just on Foobar, but on Foobar version 1.3.*, or anything from 1.3 onwards but not 2.*. Meanwhile some other package may depend on Foobar 1.6 onwards, including 2.*, and yet a third package requires Foobar 2.1 onwards. It is the job of apt-get and its relatives to manage this horrendous complexity.&lt;/p&gt;  &lt;p&gt;(Side note: I remember when OO software was young in the nineties, people thought that the biggest challenge for resuable software was searching repositories. They were wrong: it is dependency management).&lt;/p&gt;  &lt;p&gt;Open source also has a clear boundary to every package and a very precise process for releasing new versions. So when the new version of Foobar comes out anyone interested finds out about it. Any changes to interfaces are particularly carefully controlled, so I can easily tell if the Foobar people have done anything to break my application. If they have I can carry on depending on the previous version until I can resolve the problem. Then before my application finds its way into, say, Fedora, it has to be integrated into an explicit dependency graph and checked for conflicts with anything else. &lt;/p&gt;  &lt;p&gt;Microsoft doesn’t do this. Vista is effectively a big blob of code with lots of hidden dependencies and no effective management of what depends on what. No wonder they are in trouble.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-2631935957638029641?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/2631935957638029641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=2631935957638029641' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2631935957638029641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/2631935957638029641'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/08/microsoft-versus-foss-configuration.html' title='Microsoft versus FOSS Configuration Management'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-5727721235329443774</id><published>2007-08-19T02:33:00.000-07:00</published><updated>2007-08-19T04:40:25.766-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><title type='text'>Anatomy of a new monad</title><content type='html'>The monad described here was originally written in response to &lt;a href="http://article.gmane.org/gmane.comp.lang.haskell.cafe/27670"&gt;a posting&lt;/a&gt; by Chad Scherrer on Haskell-Cafe:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;I need to build a function&lt;br /&gt;buildSample :: [A] -&gt; State StdGen [(A,B,C)]&lt;br /&gt;&lt;br /&gt;given lookup functions&lt;br /&gt;f :: A -&gt; [B]&lt;br /&gt;g :: A -&gt; [C]&lt;br /&gt;&lt;br /&gt;The idea is to first draw randomly form the [A], then apply each&lt;br /&gt;lookup function and draw randomly from the result of each.&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I suggested Chad try using ListT for the non-determinism, but this didn't work, so I decided to try solving it myself.  I discovered that actually ListT doesn't work here: you need a completely custom monad.  So here it is.  Hopefully this will help other people who find they need a custom monad.  This isn't meant to be yet another ab-initio monad tutorial: try reading the &lt;a href="http://en.wikibooks.org/wiki/Haskell"&gt;Wikibook&lt;/a&gt; or &lt;a href="http://www.haskell.org/all_about_monads/html/"&gt;All About Monads&lt;/a&gt; if you need one.&lt;br /&gt;&lt;br /&gt;The basic idea of the MonteCarlo monad is that each action in the monad returns a list of possible results, just like the list monad.  However the list monad then takes all of these possible results forwards into the next step, potentially leading to combinatorial explosion if you can't prune the tree somehow.  It was this explosion that was giving Chad problems when he scaled up his original solution.  So instead the MonteCarlo monad picks one of the results at random and goes forwards with that.&lt;br /&gt;&lt;br /&gt;Picking a random element means we need to thread a random number generator StdGen as a form of monadic state.  So the monad type looks like this:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;newtype MonteCarlo a = MonteCarlo {runMC :: StdGen -&gt; (StdGen, [a])}&lt;/pre&gt;&lt;/blockquote&gt;This is based on the state monad, except that the type parameter "s" is replaced by StdGen.  I could have used the state monad here, but it would have meant working its "bind" and "return" into MonteCarlo, which would have been more trouble than it was worth.&lt;br /&gt;&lt;br /&gt;Picking a random item from a list is going to be necessary, and as seen below it is actually needed more than once.  So:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;-- Internal function to pick a random element from a list&lt;br /&gt;pickOne :: [a] -&gt; StdGen -&gt; (StdGen, a)&lt;br /&gt;pickOne xs g1 = let (n, g2) = randomR (0, length xs - 1) g1 in (g2, xs !! n)&lt;/pre&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Monad instance&lt;/span&gt;&lt;br /&gt;Now for the Monad instance declaration.  In this we have to declare the bind function (&gt;&gt;=) and the return function.&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;instance Monad MonteCarlo where&lt;br /&gt; MonteCarlo m &gt;&gt;= f  = MonteCarlo $ \g1 -&gt;&lt;br /&gt;    let&lt;br /&gt;       (g2, xs)  = m g1&lt;br /&gt;       (g3, x)   = pickOne xs g2&lt;br /&gt;       (g4, f')  = case xs of&lt;br /&gt;                      []   -&gt; (g2, mzero)&lt;br /&gt;                      [x1] -&gt; (g2, f x1)&lt;br /&gt;                      _    -&gt; (g3, f x)&lt;br /&gt;    in runMC f' g4&lt;br /&gt;&lt;br /&gt; return x = MonteCarlo $ \g -&gt; (g, [x])&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;The return function shows the minimal structure for a Monte-Carlo action: wrapped up in the MonteCarlo type is a function that takes a StdGen state and returns the state (in this case unmodified) along with the potential results.  If the action had used the generator then the result pair would have had the new generator state instead of the old one.&lt;br /&gt;&lt;br /&gt;The bind (&gt;&gt;=) is a bit more complicated.  The type for monadic bind is:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;(&gt;&gt;=) :: m a -&gt; (a -&gt; m b) -&gt; m b&lt;/pre&gt;&lt;/blockquote&gt;In the MonteCarlo instance of Monad this becomes:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;(&gt;&gt;=) :: MonteCarlo a -&gt; (a -&gt; MonteCarlo b) -&gt; MonteCarlo b&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;The job of bind is to take its two arguments, both of which are functions under the covers, and compose them into a new function.  Then it wraps that function up in the MonteCarlo type.&lt;br /&gt;&lt;br /&gt;We unwrap the first argument using pattern matching to get the function inside "m".  The second parameter "f" is a function that takes the result of the first and turns it into a new action.&lt;br /&gt;&lt;br /&gt;The result of the bind operation has to be wrapped up in MonteCarlo.  This is done by the line&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;MonteCarlo $ \g1 -&gt; &lt;/pre&gt;&lt;/blockquote&gt;The "g1" lambda parameter is the input generator state for this action when it is run, and the rest of the definition is the way we compose up the functions.  We need to call the first function "m" to get a result and a new generator state "g2", and then feed the result into the second argument "f".&lt;br /&gt;&lt;br /&gt;The "let" expression threads the random generator manually through the first two random things we need to do:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Get the possible results of the first argument as a list.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Pick one of these at random.&lt;/li&gt;&lt;/ol&gt;However there is a twist because the result set could be empty.  This is interpreted as failure, and the "MonadPlus" instance below will explain more about failing.  In addition the result set could also be a single item, in which case there is no need to generate a random number to pick it.  So the f-prime value is the result of applying "f" to whatever item was picked, or an empty list if the "m" action returned an empty list.  We also avoid getting a new generator state if the random pick was not needed.&lt;br /&gt;&lt;br /&gt;Finally we use "runMC" to strip the MonteCarlo type wrapper off the second result, because the whole thing is being wrapped by the MonteCarlo type constructor at the top level of bind.&lt;br /&gt;&lt;br /&gt;And there you have it.  In summary, when defining an instance of "bind" you have to construct a new function out of the two arguments by extracting the result of the first argument and passing it to the second.  This then has to be wrapped up as whatever kind of function is sitting inside your monadic action type.  The arguments to this hidden function are the monadic "state" and therefore have to be threaded through bind in whatever way suits the semantics of your monad.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;MonadPlus instance&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;MonadPlus is used for monads that can fail or be added together in some way.  If your underlying type is a Monoid then its a good bet that you can come up with a MonadPlus instance from the "mempty" and "mappend" functions of the Monoid.  In this case the underlying type is a list, so the "mempty" is an empty list and the "mappend" is concatenation.&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;instance MonadPlus MonteCarlo where&lt;br /&gt;  mzero = MonteCarlo $ \g -&gt; (g, [])&lt;br /&gt;  mplus (MonteCarlo m1) (MonteCarlo m2) = MonteCarlo $ \g -&gt;&lt;br /&gt;     let&lt;br /&gt;       (g1, xs1) = m1 g&lt;br /&gt;       (g2, xs2) = m2 g1&lt;br /&gt;     in (g2, xs1 ++ xs2)&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Here the "mzero" returns an empty list.  The bind operation interprets an empty list as failure, and so indicates this to its caller by returning an empty list.  Thus a single failure aborts the entire computation.&lt;br /&gt;&lt;br /&gt;"mplus" meanwhile threads the random number state "g" through the two arguments, and then returns the results concatenated.  The bind operation will then pick one of these results, so "mplus" has become a kind of "or" operation.  However note that the alternation is done over the results, not the original arguments.  If you say "a `mplus` b" and "a" returns ten times as many results as "b" then the odds are 10:1 that you will be getting one of the results of "a".&lt;br /&gt;&lt;br /&gt;One important combinator introduces a list of items to pick one from.&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;-- | Convert a list of items into a Monte-Carlo action.&lt;br /&gt;returnList :: [a] -&gt; MonteCarlo a&lt;br /&gt;returnList xs = MonteCarlo $ \g -&gt; (g, xs)&lt;/pre&gt;&lt;/blockquote&gt;Finally we need to be able to run a MonteCarlo computation.  You could do this using runMC, but that gives you the full list of results for whatever the last action was, which is not what you want.  Instead you want to pick one of them at random.  So there is a runMonteCarlo function that looks an awful lot like the bind operation, and for similar reasons.  This returns a Maybe type with "Just" for success and "Nothing" for failure.&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;-- | Run a Monte-Carlo simulation to generate a zero or one results.&lt;br /&gt;runMonteCarlo :: MonteCarlo a -&gt; StdGen -&gt; Maybe a&lt;br /&gt;runMonteCarlo (MonteCarlo m) g1 =&lt;br /&gt;  let&lt;br /&gt;     (g2, xs) = m g1&lt;br /&gt;     (_,  x)  = pickOne xs g2&lt;br /&gt;  in case xs of&lt;br /&gt;     []   -&gt; Nothing&lt;br /&gt;     [x1] -&gt; Just x1&lt;br /&gt;     _    -&gt; Just x&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Exercises for the reader:&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Add a new combinator allowing access to the random number generator.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Each computation returns only a single result, but Monte Carlo methods depend on statistical analysis of many results.  How should this be done?&lt;/li&gt;&lt;li&gt;Can we introduce a "try" combinator to limit the scope of failure?&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-5727721235329443774?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/5727721235329443774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=5727721235329443774' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/5727721235329443774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/5727721235329443774'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/08/anatomy-of-new-monad.html' title='Anatomy of a new monad'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-4371525377932636510</id><published>2007-08-19T01:40:00.000-07:00</published><updated>2007-08-19T02:32:06.603-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>New Software Technology: Blockage On Line</title><content type='html'>This was originally posted to my &lt;a href="http://cogito.blogthing.com/2006/12/14/new-software-technology-blockage-on-line/"&gt;old blog&lt;/a&gt; on December 14th 2006.  It was &lt;a href="http://programming.reddit.com/info/uu7k/comments"&gt;discussed on Reddit&lt;/a&gt; so please don't repost it there.  Since it was posted &lt;a href="http://lambda-the-ultimate.org/node/2287"&gt;even stronger evidence&lt;/a&gt; has emerged showing the productivity increase from functional languages.&lt;br /&gt;-----------------------------------------------------&lt;br /&gt;&lt;br /&gt;This is the promised posting about why new software technology finds it so difficult to gain acceptance even when major improvements are likely.&lt;br /&gt;&lt;br /&gt;To give you some idea of the scale of the problem, in 1997 Ulf Wiger wrote a paper entitled &lt;a href="http://www.erlang.se/publications/Ulf_Wiger.pdf"&gt;Four-fold Increase in Productivity and Quality&lt;/a&gt;. It described a practical experience with a mature technology (the Erlang language) on a significant new system by a large company.&lt;br /&gt;&lt;br /&gt;Now Ulf Wiger is a well known proponent of Erlang, so the uncharitable might suspect some degree of bias and selective reporting. But however skeptical one might be of Ulf Wiger’s claims it would be a big stretch to think that he had invented or imagined the whole thing. The most likely explanation is that the reported results are broadly accurate.&lt;br /&gt;&lt;br /&gt;So how come we are not all now programming in Erlang? I believe the answer lies in the “hill climbing” approach that most companies take to optimising their behaviour.&lt;br /&gt;&lt;br /&gt;If you are lost on a foggy mountain then one way to reach the top is to simply head up hill. You don’t need a map or compass to tell which way that is, and eventually you will reach a point where every way is downhill. That is the top. Businesses are very much in this situation. There are lots of things a business could do that might work to increase profits. Some are big steps, others are small. The likely result, especially of big steps, is shrouded in fog. So the best thing is to move up the hill of profitability in small steps. Eventually you get to the top, and then you can rest for a while.&lt;br /&gt;&lt;br /&gt;The trouble with this algorithm is that you are likely to have climbed a foothill, and when the fog clears you see that the real mountain is somewhere else.&lt;br /&gt;&lt;br /&gt;Here the analogy breaks down because unlike real mountains the business environment keeps changing. Mountains go up and down over millions of years. In business the equivalent happens much faster. In fact many businesses have to run as fast as they can just to keep up with the foothills.&lt;br /&gt;&lt;br /&gt;So now what happens when someone claims to have discovered a huge mountain in the distance? Three questions will immediately occur to the managers:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Is it real?&lt;/li&gt;&lt;li&gt;Will we survive long enough in the Lowlands of Unprofitability to get there?&lt;/li&gt;&lt;li&gt;Will it still be there when we arrive?&lt;/li&gt;&lt;/ol&gt;All three are extremely good questions, and I’ll analyse them in detail below. For brevity I’ll talk about new programming languages but the same arguments apply to many new software technologies, especially the ones that affect the way that you program.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Is it real?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Managers in the software business are bombarded by sales pitches for things that will make their software faster, cheaper and better. 90 out of 100 of these pitches are for pure snake oil. A further 9 are stuff that will work, but nowhere near as well as advertised. The last 1 will change the world, and possibly make you a fortune if you time it right. The trouble is, how do you find that diamond in all the dross? Each new sales pitch requires a lot of time and effort to evaluate, most of which will give no return on the investment. And in the meantime there are those foothills to keep up with. So managers learn to listen to the sales pitch, nod sagely, and then carry on as before.&lt;br /&gt;&lt;br /&gt;I say “managers” because they are usually the ones who make the decisions, and are therefore the target of the sales pitches. Sometimes they can be evaded. The early days of Linux adoption were punctuated by anecdotes of IT managers declaring that Linux was verboten in their shop, only to be gently told that it was already running some piece of key infrastructure.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Will we survive long enough to get there?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At first sight a new programming language looks simple to deploy: just start using it. Unfortunately things are not that simple.&lt;br /&gt;&lt;br /&gt;Any significant project is going to require a team of developers, and then on-going maintenance and development of new versions. This means putting a team of people together who all know the language, and then keeping them on the staff. Do you train them? If so how long is it going to take them to get productive? In the days of the great OO paradigm shift it was generally agreed to take months. On the other hand you could hire them, but how many people out there know the language? Probably not very many. Either way, if somebody leaves then replacing them will be problematic.&lt;br /&gt;&lt;br /&gt;A software house that has been earning money for a while will have been doing so on the back of some body of software (the exception being pure “body shops” who just write code for customers). This software is the major strategic asset of the company, and in practice most of the development effort in the company is devoted to maintaining and extending existing packages. The only way that you can apply a new programming language to an existing software package is to throw away and rewrite the whole thing. At the very least this is a huge and risky enterprise: revenue from the old legacy will drop off fast if you stop developing it, and in the meantime you just have to hope that the new system gets delivered on time and on budget, because if it doesn’t you will go bust. Of course a rewrite of this sort will eventually be necessary, but the sad thing is that by then the company is not in good enough financial shape to take the project on.&lt;br /&gt;&lt;br /&gt;Most software companies have diversified and do not depend on one monolithic software asset, so in theory you could do the rewrites one system at a time. This is still expensive and risky, but at least you don’t have to bet the company. But typically each major asset has a division looking after it, and from within the division the sums look just the same as for a smaller company with one big asset. So the only people who can make such a decision are the board of directors. I’ll come back to this point later.&lt;br /&gt;&lt;br /&gt;The last option for a new programming language is a completely new product line. Here you are starting with a clean sheet. You still have training and recruitment issues, not to mention long term support, and you have to put together a whole new toolchain for the developers, but the proposition does at least look sensible.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Will it still be there when we arrive?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;New technologies often don’t hit the big time. If the suppliers go out of business, or the open source community loses interest, then anyone who adopted the technology early is going to be left high and dry. A previous employer of mine opted for &lt;a href="http://en.wikipedia.org/wiki/Transputer"&gt;Transputers&lt;/a&gt; in a big digital signal processing project. The Transputer was technically ideal, but then INMOS went out of business.&lt;br /&gt;&lt;br /&gt;Geoffrey Moore has described a “chasm” between the Innovator market (who will buy anything just because it is new) and the Early Adopters (who make a rational decision to invest in new things). I’m not convinced that there is really a chasm: people seem to have continuous variations rather than discrete types. But either way there is a real obstacle here. In effect everyone is waiting for everyone else to jump first.&lt;br /&gt;&lt;br /&gt;So those were the rational reasons why companies tend to avoid new technology. Now for the, err, less rational reasons.&lt;br /&gt;&lt;br /&gt;Most of these come down to the fact that companies are not like &lt;a href="http://criticalinquiry.uchicago.edu/images/daston31n1img2.jpg"&gt;Hobbe’s Leviathan&lt;/a&gt;. As described in &lt;a href="http://www.amazon.com/Tipping-Point-Little-Things-Difference/dp/0316346624"&gt;The Tipping Point&lt;/a&gt;, once you get past about 150 people in an organisation the people in it cannot keep track of everyone else. Hence you find lots of people at all levels working hard to optimise their bit, but inadvertently messing up the stuff done by someone else. Bear with me while I take you on a short tour of the theory and practice of management motivation.&lt;br /&gt;&lt;br /&gt;Companies try hard to reward people who do the Right Thing (at least, the Right Thing for the company). This generally means short term evaluation on how they are doing at their main task. Sales people, for instance, get paid partly by commission, which is a very direct linkage of short term performance to pay. Other people get annual bonuses if their bosses recommend them for it, and of course promotion happens from time to time. And its backed up by social pressure as well: these people are being rewarded for doing the Right Things, and everyone else takes note.&lt;br /&gt;&lt;br /&gt;All of this is absolutely vital for a company to survive: you have to keep your eye on the ball, nose to the grindstone and ear to the ground. However, as Clayton Christensen describes in &lt;a href="http://www.businessweek.com/chapter/christensen.htm"&gt;The Innovator’s Dilemma&lt;/a&gt;, it also leads to a problem when a “disruptive technology” arrives.&lt;br /&gt;&lt;br /&gt;An example of what goes wrong was &lt;a href="http://en.wikipedia.org/wiki/Xerox_PARC"&gt;Xerox PARC&lt;/a&gt;. As is well known, the researchers at PARC pretty much invented the modern Office software suite, along with graphical user interfaces, laser printers and ethernet. The usual myth has it that Xerox executives were too dumb to realise what they had, but the real story is more interesting. Xerox did actually go to market with a serious office machine, called Xerox Star. You or I could sit down at one of those things and feel right at home. But when it was launched in 1981 it only sold 25,000 units, which was far too few to make a profit.&lt;br /&gt;&lt;br /&gt;The reason (I believe, although I haven’t seen this anywhere else) is that Xerox salesmen (and they were almost all men at that time) were experts at selling big photocopiers to big companies. That was the bread-and-butter of Xerox business, and the quarterly bonuses of those salesmen depended on doing that as much as possible. Anything else was a distraction. So when this funny computer thing appeared in their catalog they basically ignored it. If someone specifically asked for some I’m sure that any salesman would be happy to fill the order, but they weren’t going to waste valuable face time with corporate buyers trying to explain why a whizzy and very expensive piece of equipment was going to revolutionise everything. So Xerox concluded that there was no market for networked desktop computers and sold the whole concept off to Steve Jobs in exchange for some Apple stock.&lt;br /&gt;&lt;br /&gt;Christensen has a number of other examples of this phenomenon, all of which are market based. This is probably because you can observe the market behaviour and success of a company, whereas just about everything else they do tends to be visible only on the inside, and often not even then. But the same logic applies.&lt;br /&gt;&lt;br /&gt;Suppose you are a project manager, entrusted with Project X to develop some new software. You have had your plans and associated budget approved by the Committee That Spends Money (every company has one, but the name varies). And then some engineer walks into your office and starts talking about a programming language, ending with “… so if you used this on Project X you could do it for a quarter of the cost”.&lt;br /&gt;&lt;br /&gt;Now, strange to relate, a project manager will not actually be rewarded for coming in 75% under budget. Instead he (even today it is usually “he”) will be told off for not submitting a better estimate. Senior managers do not like padded estimates because it prevents the money being invested more profitably elsewhere. Coming in a bit under your original estimate is OK: it shows you are a good manager. But coming in way under shows you are either bad at estimation or just plain dishonest (managers watch Star Trek too). Besides, you already have approval for your original plan, so why bother changing course now?&lt;br /&gt;&lt;br /&gt;But you have also been around a bit longer than this engineer, and have seen some technology changes. So you ask some pertinant questions, like who else has used it, how long it will take the programmers to learn it, and where the support is going to come from. At the end of this you conclude that, even if this technology is as good as claimed, if you use it on Project X you stand a very good chance of blowing your entire budget just teaching your programmers to use it. This will not get you promoted, and might even get you fired for incompetence. So you thank the engineer for bringing this matter to your attention, promise to look into it carefully, and show him the door.&lt;br /&gt;&lt;br /&gt;So now the engineer tries going up the ladder. Next stop is the Product Manager, who looks after the product line that Project X will fit into. He can see that there just might be a case for making the investment, but he has already committed to a programme of improvements and updates to the existing product line to keep it competitive. His annual bonus depends on delivering that plan, and this new language will obviously disrupt the important work he has been entrusted with. So he too thanks the engineer and points him out of the door.&lt;br /&gt;&lt;br /&gt;Next stop is the Chief Technology Officer. He is vaguely aware of programming languages, but being a wise man he seeks advice from those who understand these issues (most geeks will find this surprising, but very few senior managers got there by being stupid). Meaning, of course, the project and product managers mentioned earlier, possibly with a trusted engineer or two as well.&lt;br /&gt;&lt;br /&gt;These engineers know about programming. In fact they owe their position to knowing more about it than anyone else. This new language will make that valuable knowledge obsolete, so they are not well disposed to it. On top of that they find the technical arguments in favour of the new language highly unconvincing. Paul Graham has christened this phenomenon &lt;a href="http://www.paulgraham.com/avg.html"&gt;The Blub Paradox&lt;/a&gt;. If you haven’t already read his essay please do so: it explains this far better than I ever could.&lt;br /&gt;&lt;br /&gt;In short, everyone in the company with any interest in the selection of a new programming languge can see a lot of very good reasons why it would be a bad idea. The only people who disagree are the ones who have taken the trouble to learn a new language and understand its power. But they are generally in a minority of one.&lt;br /&gt;&lt;br /&gt;And this is true in every company. Every company has a few eccentric engineers who try to explain why this or that new technology would be a great investment. Sometimes they are even right. But they are almost never taken seriously. And so great technologies that could actually save the world a great deal of money on software development (not to mention improve quality a lot as well) languish on the shelf.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-4371525377932636510?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/4371525377932636510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=4371525377932636510' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4371525377932636510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4371525377932636510'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/08/new-software-technology-blockage-on.html' title='New Software Technology: Blockage On Line'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-1195763849127901523</id><published>2007-08-13T09:44:00.000-07:00</published><updated>2007-08-13T10:02:43.331-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Why Making Software Companies Liable Will Not Improve Security</title><content type='html'>&lt;p&gt;(((This was originally posted to my old blog on January 28th 2007.  However my host Blogthing went down almost immediately thereafter, so as far as I know almost nobody saw it.  I'm now reposting it in response to the recent &lt;a href="http://news.bbc.co.uk/1/hi/technology/6938796.stm"&gt;House of Lords report&lt;/a&gt; on e-crime.  Bruce Schneier has &lt;a href="http://www.schneier.com/blog/archives/2007/08/house_of_lords.html"&gt;commented approvingly&lt;/a&gt; on the report, including its recommendations for liability for security defects in software.   So I think that now is a good time to repost this, including to Reddit.)))&lt;br /&gt;&lt;/p&gt;&lt;p&gt;----------------------------------&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Bruce Schneier has &lt;a href="http://www.schneier.com/blog/archives/2007/01/information_sec_1.html"&gt;written&lt;/a&gt; that the way to improve the current lamentable state of computer security is to impose mandatory liability on vendors for security breaches. I disagree: I think that this would have little positive impact on security, but a lot of negative impacts on the software industry generally, including higher prices, increased barriers to entry, and general reduced competition.&lt;/p&gt;  &lt;p&gt;This is a bit worrying: Schneier is a remarkably clever guy who understands software, security and (at least a bit of) economics. His understanding may well exceed mine in all three areas . I’m used to nodding in agreement whenever I read his words, so to find myself shaking my head was a strange experience. Hence this blog post: whether I turn out to be right or wrong, I will at least have scratched the itch.&lt;/p&gt;  &lt;p&gt;So, to the argument:&lt;/p&gt;  &lt;p&gt;On the face of it, Schneier’s argument is impecable economics. Security is an “externality”, meaning that all of us pay the price for bad security, but only the software vendor pays the price for good security. In theory we should demand secure software and pay higher prices to get it, but in practice most people cannot accurately evaluate the security of a software system or make an intelligent trade-off about it. So system vendors (including, but not limited to, Microsoft) find it is more cost effective to trumpet their wonderful security systems while actually doing as little as possible. Security is more of a PR issue than a technical issue.&lt;/p&gt;  &lt;p&gt;So the Economists Solution is to push the costs of bad security back on to the vendor, where they rightfully belong. Therefore you and I should be able to sue someone who sells us software with security defects. That way if we suffer from virus infections, spambots or phishing because some software somewhere was defective, we should be able to sue the manufacturer, just as I could sue a car manufacturer if I am hurt in a crash due to defective brakes.&lt;/p&gt;  &lt;p&gt;So far, so fine.  But now imagine you are a small software company, such as the one run by &lt;a href="http://www.joelonsoftware.com/"&gt;Joel Spolsky&lt;/a&gt;. You sell a product, and you are making a reasonable living. Then one day a process server hands you a writ alledging that a cracker or crackers unknown found a defect in your software, and used it to cause series of security breaches for many of your customers, followed by downtime, loss of business, theft from bank accounts, and a total of a million dollars of damages. It could easily put you out of business. Even if the claim is slim and the damages inflated, you could still have a big legal bill.&lt;/p&gt;  &lt;p&gt;Obviously this is not useful: the point is to encourage the vendors to do better, and while hanging the worst one occasionally may encourage the others, doing so by a lottery won’t.&lt;/p&gt;  &lt;p&gt;Part of the problem is that the economic logic calls for unlimited liability. So it doesn’t matter whether you sold the software for $5 or $5,000, you are still on the hook for all damages due to security defects. Of course the law could move to a limited liability model, capping it at, say, the price of the software, but that is still too big for most companies to pay out. Even if it was 10% of the price of the software, Microsoft is probably the only company with a big enough cash pile to survive an incident that hit 50% of its users. But 10% of the price of a piece of software is going to be only a very tiny fraction of the real cost of a security incident. It looks a lot more like a fine than real liability.&lt;/p&gt;  &lt;p&gt;So if you are a software vendor then how do you protect yourself from such an incident? Of course you can tighten up your act, which is the whole point. But no amount of checking and careful architecture is going to protect you from the occasional defect that blows everything wide open.&lt;/p&gt;  &lt;p&gt;You could buy insurance. Lots of professions have to carry liability insurance: its just a cost of doing business. Insurers will want to see you take proper steps to avoid claims, but will then cover you for the ones that do happen. Or, more or less equivalently, there could be a “safe harbour” clause in the liability law. If you can show that you have taken all proper steps to ensure the security of your system then its just bad luck for the customer and you are not liable.&lt;/p&gt;  &lt;p&gt;The trouble with both of these solutions is that we do not have any way of deciding what the “proper steps” to either maintain your insurance cover or stay in the safe harbour are. There are lots of good practices which are generally thought to improve security, but they actually depend more on motivated people than anything else. From the developers point of view, the need to develop secure software is replaced by the need to reach the safe harbour. If the approved practices say you do X then you do it, and ensure that a written record exists to prove that you did it. Whether doing X actually improves the security of your product is irrelevant.&lt;/p&gt;  &lt;p&gt;I’ve seen this effect personally. For a while I worked in an industry where software defects *do* give rise to unlimited liability, and where the government inspectors check that you are following the approved process. The industry was medical devices, and the government department was the FDA. The entire focus was on the paper trail, and I mean paper: signed and dated pieces of paper were all that counted unless you could prove that your CM system was secure according to yet another complicated and onerous set of rules (which we couldn’t). Worse yet, the inspectors wanted to see that you worked from the same records they were auditing, so you couldn’t even keep the training records on a database to find out who still needed what training: it was the signature sheet or nothing. In theory we weren’t even allowed to do software development on a computer, although in practice the inspectors merely noted that we were not in compliance on that point.&lt;/p&gt;  &lt;p&gt;The impact of these rules on everyday work was huge and often counterproductive. For instance, it might have been a good idea to run lint or a similar tool on our C code. But this could never become part of the official process because if it was then the inspectors would ask to see the output (i.e. the dated, signed printout from a particular run), annotated with the written results of the review of each warning showing how it had either been resolved or why it could be ignored. Even if this could have been done on the computer, the overhead would have been huge. So it was cheaper not to put lint in the official process, and the resulting loss in real quality didn’t cost us anything.&lt;/p&gt;  &lt;p&gt;(Actually individual programmers did compile with gcc -Wall at least some of the time, which is the modern equivalent. But because this wasn’t part of the official process I don’t know how many did so, and there was certainly no independent review of their decisions to fix or ignore warnings).&lt;/p&gt;  &lt;p&gt;And despite our best efforts it was simply impossible to comply with 100% of the rules 100% of the time. The FDA knows this of course, so its inspectors just hang someone from time to time to encourage the others. Most of the QA people in the industry are ex-FDA people, so they know how the system works.&lt;/p&gt;  &lt;p&gt;(Side note: in 1997 the FDA justified their regulation of medical device design on the grounds that over 50% of device recalls were due to design defects. I never saw any figures for the design defect recall rate *after* they imposed these regulations).&lt;/p&gt;  &lt;p&gt;In short, I believe that any attempt to impose quality on software by inspection and rule books is doomed to failure. This approach works in manufacturing and civil engineering because there a good safe product *is* the result of following the rules. But software engineering is nowhere near that mature, and may never be because software is always invented rather than manufactured: as soon as we reduce the production of some category of software to a set of rules that guarantees a good result we automate it and those rules become redundant.&lt;/p&gt;  &lt;p&gt;So, back to security. Much as I dislike the current state of computer security, I don’t see liability or regulation as answers. I’ve seen regulation, and I don’t think liability would look any different because it always comes down to somebody outside the company trying to impose good practice by writing a rule book for software development that the company must follow (and prove it has followed) on pain of bankruptcy.&lt;/p&gt;  &lt;p&gt;It might be argued that an insurance market would seek the least onerous and most effective rulebook. I disagree. All forms of insurance have the fundamental problems of “moral hazard” and “asymmetrical information”, both of which come down to the fact that the development company knows a lot more about its risk than the insurer. From the outside it is very difficult to tell exactly what a software company is doing and how well it is doing it. As long as security improvement requires time and thought I cannot see any effective way to tell whether the right amount of thought has been dedicated to the subject.&lt;/p&gt;  &lt;p&gt;At the top I said that enforcing liability would increase costs and barriers to entry, and thereby reduce competition.&lt;br /&gt;Obviously risk brings cost, either in the money that has to be set aside to cover it or to pay insurance. The extra work required to preserve evidence of good practice will also increase costs. Finally, these costs will fall hardest on the start-up companies:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;They are always short of money anyway&lt;/li&gt;&lt;li&gt;Setting up the process requires up-front work, and having your process inspected by possible insurers to get a quote is going to be expensive too&lt;/li&gt;&lt;li&gt;Maintaining the evidentiary chains is particularly hard when you are trying to modify your product in response to early feedback&lt;/li&gt;&lt;li&gt;Insurers will prefer companies with an established track record of good practice and secure software, so start-ups will have to pay higher prices &lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;Put all of these together, and it really does add to the costs for small companies.&lt;/p&gt;  &lt;p&gt;But suppose despite all the obstacles listed above we have our software, and its more secure. Not totally secure, of course, because there ain’t no such thing. Lets say its a web framework, along the lines of Rails or Twisted. It gets incorporated into a banking system, along with a web server, a database, an open source token-based security system and a set of front-end web pages written by a bunch of contractors being bossed about by some project manager employed by the bank. And despite everyone’s best efforts, next month a few thousand people have their accounts cleaned out. It seems they fell for a targetted trojan that performed a man-in-the-middle attack and then used a defect in the web pages to inject SQL commands that, due to another defect in the database, were able to disable the bank’s monitoring of suspicious transactions. Lawyers representing the customers, the bank, all the contractors various liability insurance companies, the database vendor and the web framework vendor are suing or threatening to sue. Industry observers think it will be a good year or two before some kind of settlement is arrived at. And what about the open source developers of the security system? It seems that the ones in the UK will be fine, but the ones in the US have already received writs. The law says that developers are only liable if they received payment for the development, so they thought they were safe. But their project web server was partly funded by a donation from the bank, and according to the database vendor’s lawyers that is enough to establish liability.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-1195763849127901523?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/1195763849127901523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=1195763849127901523' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/1195763849127901523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/1195763849127901523'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/08/why-making-software-companies-liable.html' title='Why Making Software Companies Liable Will Not Improve Security'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-3641923941436763930</id><published>2007-08-12T04:06:00.000-07:00</published><updated>2007-08-12T04:12:34.892-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='erlang'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Responses to 'Silver Bullets Incoming!'</title><content type='html'>(((&lt;br /&gt;These are the responses originally posted to "Silver Bullets Incoming".  Many of these responses are worth reading in their own right, and I'd like to thank the respondants for taking the time for such thoughtful posts.&lt;br /&gt;&lt;br /&gt;Please do not post this to reddit, as it has already been discussed there under the original URL.&lt;br /&gt;)))&lt;br /&gt;&lt;ol class="commentlist"&gt;&lt;li class="graybox" id="comment-47"&gt;    &lt;cite&gt;Stephen&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-47" title="Saturday, December 9th, 2006 at 4:38 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="47'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-47" title=""&gt;December 9th, 2006 at 4:38 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=47"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Paul:&lt;/p&gt;  &lt;p&gt;I enjoyed your first article quite a bit - it got me thinking about technical language issues again (always fun).&lt;/p&gt;  &lt;p&gt;I’d like to comment on your update to the original article. Specifically, I have some comments regarding C++&lt;/p&gt;  &lt;p&gt;C++ is not an “old” language, incorporating many language features of more “modern” languages, including exceptions, automatic memory management (via garbage collection libraries and RIIA techniques), and templates, a language feature that is only available in C++, and that provides support for generic programming and template metaprogramming, two relatively new programming paradigms. Yes, C++ has been around a while, but until I see programmers constantly exhausting the design and implementation possibilities of C++, I won’t call the language “old.”&lt;/p&gt;  &lt;p&gt;C++ was not designed to support just OO programming: From “Why C++ Isn’t Just An Object-Oriented Programming Language” (http://www.research.att.com/~bs/oopsla.pdf):&lt;/p&gt;  &lt;p&gt;“If I must apply a descriptive label, I use the phrase ‘multiparadigm language’ to describe C++.”&lt;/p&gt;  &lt;p&gt;Stroustrup identifies functional, object-oriented, and generic programming as the three paradigms supported by C++, and I would also include metaprogramming (via C++ templates or Lisp macros) as another paradigm, though it is not often used by most developers.&lt;/p&gt;  &lt;p&gt;Of course, we should also keep in mind Stroustrup’s statement regarding language comparisons (”The Design and Evolution of C++”, Bjarne Stroustrup, 1994, p.5): “Language comparisons are rarely meaningful and even less often fair.”&lt;/p&gt;  &lt;p&gt;Take care, and have a good weekend!&lt;/p&gt;  &lt;p&gt;Stephen&lt;/p&gt;  &lt;p&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-48"&gt;    &lt;cite&gt;pongba&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-48" title="Tuesday, December 12th, 2006 at 11:26 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="48'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-48" title=""&gt;December 12th, 2006 at 11:26 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=48"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;I found it so weird that, on the one hand you argue that haskell is fast( to the extend that it might be even faster than some compiling language such as C++), while on the other hand you said “where correctness matters more than execution speed its fine today”.&lt;br /&gt;Does that sound paradoxical?&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-50"&gt;    &lt;cite&gt;Another Paul&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-50" title="Tuesday, December 12th, 2006 at 3:59 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="50'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-50" title=""&gt;December 12th, 2006 at 3:59 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=50"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Paul:&lt;/p&gt;  &lt;p&gt;“I think that Dijkstra had it right: a line of code is a cost, not an asset. It costs money to write, and then it costs money to maintain. The more lines you have, the more overhead you have when you come to maintain or extend the application”&lt;/p&gt;  &lt;p&gt;By that measure, there’s no such thing as an asset. Think about that a moment - someone buys a general ledger or CAD/CAM system and modifies it as companies do. Either system reduces staff, provides more accurate information much more quickly, and renders the company more competitive. Take it away and what happens? &lt;/p&gt;  &lt;p&gt;It’s been my experience that while these systems require maintenance (and sometimes a lot) they usually result in a net reduction in staff and the cost of doing business. And some types of systems provide a clear competitive edge as well. I think that makes many systems just as much an asset as a house, factory building, or a lathe.&lt;/p&gt;  &lt;p&gt;Interesting article.  Thanks.&lt;/p&gt;  &lt;p&gt;Another Paul&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-52"&gt;    &lt;cite&gt;BobP&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-52" title="Tuesday, December 12th, 2006 at 6:07 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="52'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-52" title=""&gt;December 12th, 2006 at 6:07 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=52"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;&gt;&gt; An order of magnitude is a factor of 10, no less&lt;/p&gt;  &lt;p&gt;&gt; Well, the Wikipedia entry does say about 10. All this stuff is so approximate that anything consistently in excess of 5 is close enough.&lt;/p&gt;  &lt;p&gt;0.5 orders of magnitude = power(10.0,0.5) = sqrt(10.0) = 3.1623 (approx)&lt;br /&gt;1.5 orders of magnitude = power(10.0,1.5) = sqrt(1000.0) = 31.623 (approx)&lt;/p&gt;  &lt;p&gt;If we are rounding off, a factor of 4 is about one order of magnitude; also, a factor of 30 is about one order of magnitude.&lt;br /&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-53"&gt;    &lt;cite&gt;&lt;a href="http://www.jerf.org/iri/" rel="external nofollow"&gt;Jeremy Bowers&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-53" title="Tuesday, December 12th, 2006 at 6:36 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="53'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-53" title=""&gt;December 12th, 2006 at 6:36 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=53"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;You missed my point with Python, or at least failed to address it.&lt;/p&gt;  &lt;p&gt;My point wasn’t that Python is also good. My point was that you lept from “10x improvement” to “it must the chewy functional goodness!” But your logic falls down in the face of the fact that Python, Perl, Ruby, and a number of &lt;i&gt;non-&lt;/i&gt;functional languages that &lt;i&gt;also&lt;/i&gt; have a 10x improvement over C++, therefore it clearly is &lt;i&gt;not&lt;/i&gt; a sound argument to just leap to the conclusion that “it must be the chewy functional goodness!” when there are clearly other factors in play.&lt;/p&gt;  &lt;p&gt;I’m not criticizing Haskell or functional programming, I’m criticizing your &lt;i&gt;logic&lt;/i&gt;, and you’ve still got nothing to back it up.&lt;/p&gt;  &lt;p&gt;(This is par for the course for a claim of a silver bullet, though.)&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-54"&gt;    &lt;cite&gt;Sam Carter&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-54" title="Tuesday, December 12th, 2006 at 8:14 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="54'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-54" title=""&gt;December 12th, 2006 at 8:14 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=54"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;“Libraries and languages are complicit: they affect each other in important ways. In the long run the language that makes libraries easier to write will accumulate more of them, and hence become more powerful.”&lt;/p&gt;  &lt;p&gt;This argument has a large flaw in it, namely the current state of libraries doesn’t reflect this claim. The largest and most powerful collection of libraries seem to be .NET, CPAN, and the Java libs, certainly not Lisp libraries.&lt;/p&gt;  &lt;p&gt;But the advocates of Lisp would argue that it’s the most powerful language, and it’s clearly been around for a long time, yet the Lisp community has not accumulated the most powerful collection of libraries. So unless the next 40 years are going to be different from the previous 40 years, you can’t really assert that language power is going to automatically lead to a rich set of libraries.&lt;/p&gt;  &lt;p&gt;I stand by my original comment to the previous article that programming is more about APIs and libraries than about writing their own code, and that if you are focused on measuring code-writing performance, you are just measuring the wrong thing.&lt;/p&gt;  &lt;p&gt;I also disagree with the claim that this is unmeasurable because doing a real-world test is too expensive. As long as the project is solvable in a few programmer-weeks, you can test it out with different languages. I took a computer science class (Comp314 at Rice) where we were expected to write a web browser in 2 weeks. It wouldn’t be that hard to have a programming test which incorporated a database, a web or GUI front end, and some kind of client/server architecture, e.g. implementing a small version of Nagios, or an IM client, or some other toy application.&lt;/p&gt;  &lt;p&gt;I’m sorry but writing a command line application that parses a CSV file and does some fancy algorithm to simulate monkeys writing Shakespeare is about as relevant to modern software engineering as voodoo is to modern medicine.&lt;br /&gt;&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-55"&gt;    &lt;cite&gt;Paul Johnson&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-55" title="Tuesday, December 12th, 2006 at 8:27 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="55'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-55" title=""&gt;December 12th, 2006 at 8:27 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=55"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;pongba:&lt;/p&gt;  &lt;p&gt;I’m arguing that Haskell programs are faster to *write*. Execution speed is a much more complicated issue. FP tends to lose in simple benchmarks, but big systems seem to do better in higher level languages because the higher abstraction allows more optimisation.&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-56"&gt;    &lt;cite&gt;Paul Johnson&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-56" title="Tuesday, December 12th, 2006 at 10:54 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="56'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-56" title=""&gt;December 12th, 2006 at 10:54 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=56"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Another Paul:&lt;/p&gt;  &lt;p&gt;The functionality that a package provides is an asset, but the production and maintenance of each line in that package is a cost. If you can provide the same asset with fewer lines of code then you have reduced your liabilities.&lt;/p&gt;  &lt;p&gt;Paul.&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-strike: crap flooding, 3 --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-57"&gt;    &lt;cite&gt;Paul Johnson&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-57" title="Tuesday, December 12th, 2006 at 11:12 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="57'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-57" title=""&gt;December 12th, 2006 at 11:12 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=57"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Jeremy Bowers:&lt;/p&gt;  &lt;p&gt;Teasing apart what it is about Haskell and Erlang that gives them such a low line count is tricky, because it is more than the sum of its parts. One part of it is the high level data manipulation and garbage collection that Python shares with functional languages. Another part of it is the chewy functional gooodness. Another part, for Haskell at least, is the purity. OTOH for Erlang it is the clean and simple semantics for concurrency.&lt;/p&gt;  &lt;p&gt;What I see in the results from the Prechelt paper is that Python was, on average, about 3 times better than C++ while the average Haskell program (from a sample of 2) was about 4 times better. Actually the longer Haskell program was mine, and I was really embarassed when someone else showed me how much simpler it could have been.&lt;/p&gt;  &lt;p&gt;In terms of pure line count I have to conceed that Python and Haskell don’t have a lot to choose between them. A 25% improvement isn’t that much. Its a pity we can’t do a controlled test on a larger problem: I think that Haskell’s type system and monads are major contributors to code that is both reliable and short. Unfortunately I can’t prove it, any more than I could prove that garbage collection was a win back in the days when I was advocating Eiffel over C++.&lt;/p&gt;  &lt;p&gt;Paul.&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-strike: crap flooding, 3 --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-58"&gt;    &lt;cite&gt;Paul Prescod&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-58" title="Tuesday, December 12th, 2006 at 11:59 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="58'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-58" title=""&gt;December 12th, 2006 at 11:59 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=58"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;If you cannot “tease apart” what it is about Haskell and Erlang that makes them so productive then you cannot say that any one improvement is a silver bullet. It just feels truthy to you. Furthermore, if you are presented with counter-examples in the form of Python and Ruby then surely you must discard your thesis entirely. The best you can say is that there exist non-functional languages that are 10 times less productive than some functional languages for some projects.&lt;/p&gt;  &lt;p&gt;Duh.&lt;br /&gt;&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-59"&gt;    &lt;cite&gt;Paul Johnson&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-59" title="Wednesday, December 13th, 2006 at 12:26 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="59'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-59" title=""&gt;December 13th, 2006 at 12:26 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=59"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Sam Carter:&lt;/p&gt;  &lt;p&gt;On languages with expressive power gathering libraries; point mostly conceeded, although Perl certainly is a very expressive language, so I don’t think it supports your point, and .NET has Microsoft paying its mongolian hordes, so its not a fair comparison.&lt;/p&gt;  &lt;p&gt;There are two sorts of libraries: general purpose ones (e.g. data structures, string manipulation, file management) that get used in many applications, and vertical libraries (HTTP protocol, HTML parsing, SMTP protocol) that are only useful in specific applications. There is no hard dividing line of course, but the usefulness of a language for general purpose programming depends on the language and its general purpose libraries. The vertical libraries have a big impact for applications that use them, but not elsewhere. So I would generally judge a language along with the general purpose libraries that are shipped with it. The special purpose libraries are useful as well, but its a secondary consideration.&lt;/p&gt;  &lt;p&gt;Paul.&lt;/p&gt;  &lt;p&gt;&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-strike: crap flooding, 3 --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-60"&gt;    &lt;cite&gt;Paul Johnson&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-60" title="Wednesday, December 13th, 2006 at 12:33 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="60'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-60" title=""&gt;December 13th, 2006 at 12:33 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=60"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Sam Carter (again):&lt;/p&gt;  &lt;p&gt;Sorry, just looked back at your post and realised I’d forgotten the second point.&lt;/p&gt;  &lt;p&gt;A worthwhile test is going to take about 10 versions to average out the impact of different developers. So thats 2 weeks times 10 coders is 20 developer-weeks, or almost half a man-year. Say a coder is on $30K per year and total cost of employment is three times that (which is typical). Round numbers $40-50 per language. Ten languages will cost the best part of half a million dollars to evaluate. Not small beer.&lt;/p&gt;  &lt;p&gt;Of course you could use students, but on average they will know Java or Javascript better than Python or Haskell, so how do you correct for that?&lt;/p&gt;  &lt;p&gt;Paul.&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-strike: crap flooding, 3 --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-61"&gt;    &lt;cite&gt;pongba&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-61" title="Wednesday, December 13th, 2006 at 7:10 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="61'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-61" title=""&gt;December 13th, 2006 at 7:10 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=61"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;blockquote&gt;&lt;p&gt; I’m arguing that Haskell programs are faster to *write*. Execution speed is a much more complicated issue. FP tends to lose in simple benchmarks, but big systems seem to do better in higher level languages because the higher abstraction allows more optimisation. &lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;I always hear people saying that, but I really don’t get it.&lt;br /&gt;I know that *theoretically* abstraction( or non-side-effect, etc) gives more opportunity for optimization, but I have never seen people show some real data that can *really* prove it.&lt;br /&gt;One question constantly annoys me - If higher-level of abstraction allows more optimization, then why .NET put the burden of discriminating value-types and reference-types on us programmers. Shouldn’t the referential-transparency-ness be better at this?&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt;  &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-62"&gt;    &lt;cite&gt;Jonathon Duerig&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-62" title="Wednesday, December 13th, 2006 at 10:58 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="62'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-62" title=""&gt;December 13th, 2006 at 10:58 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=62"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;I have two specific (and one general) criticisms to make about your line of argumentation:&lt;/p&gt;  &lt;p&gt;First, I think you do not adequately address the criticisms about lines of code as a metric. The cost of a line of code is the sum of five factors: (a) Difficulty of formulating the operation involved (original coder*1), (b) Difficulty of translating that operation into the target programming language (original coder*1), � Difficulty of parsing the code involved to understand what the line does (maintainer*n), (d) Difficulty of later understanding the purpose of that operation (maintainer*n), and (e) Difficulty of modifying that line while keeping it consistent with the rest of the program (maintainer*n).&lt;/p&gt;  &lt;p&gt;(a) and (b) are done only once, but �, (d), and (e) are done many times whenever the program needs to be fixed or modified. Brooks’ argument was specifically that in the general case the time for (a) is more than 1/9 the time for (b), and the time for (d) is more than 1/9 the time for � and (e). This is important because (a) and (d) are both language and tool independent.&lt;/p&gt;  &lt;p&gt;When comparing the lines of code from different languages, it is important to realize that the formulation of the operations and the understanding of purpose are spread across those lines. And the verbosity of the language usually doesn’t impede either of these problems (unless it is extreme).&lt;/p&gt;  &lt;p&gt;For instance, take the creation of an iterator or enumeration in C++ or Java respectively and compare that to creating a fold function in Scheme. These are roughly equivalent tasks. In C++, an iterator is defined first by defining a class with various access operators like * and -&gt; and ++ and — and then implementing them. This adds a lot of baggage because there are half a dozen or so functions that must be defined and there is a separate class specification. In constrast, a scheme fold function is much simpler from the language perspective. A single function is defined rather than half a dozen. It will almost certainly have fewer lines, possibly by 4 or 5 times.&lt;/p&gt;  &lt;p&gt;But let us look at what the creation of the iterator or fold function means from the perspective of items (a) and (d). Both of these are common idioms in their respective languages, so all of the code specifically dealing with iteration/folding is trivial to conceptualize and trivial to understand the purpose of. The difficulty in writing either a custom iterator or a custom fold function lies within the subtleties of the iteration. If it is a tree, what information needs to be maintained and copied to successive iterations (whether that be in the form of state, or in the form of argument passing)? Are there multiple kinds of iterations? How would they be supported? (For example, sometimes a user wants to traverse a tree in pre-order, sometimes in post-order, sometimes in-order, and sometimes level by level in a breadth-first order.) These are the questions which the original coder and the later maintainers will have to contend with. And these are really orthogonal to lines of code counts.&lt;/p&gt;  &lt;p&gt;But there is another factor at work here which makes lines of code a faulty cross-language measurement. Every language has a grain to it. If you program with the grain, then any difficulty will be easily solved by the tools in the language. If you program against the grain, then you will run into difficulty after difficulty. This applies to fundamental language properties. You can bypass the type system in C++ and avoid all the type checks, but it is cumbersome and unpredictable if you do it wrong. Ruby allows you to be much more flexible with types and provides a safety net. If you try to enforce a more strict typing in Ruby, then you will have to fight the language every step.&lt;/p&gt;  &lt;p&gt;But the grain of the language also includes the question of scale. Some languages provide a lot of flexibility. They allow compact and loose representations of programs which can be customized to the problem domain easily. These languages include Scheme and Ruby and Haskell. These flexible languages are very useful for small projects with one or a few developers because they can be metaphorically molded to fit the hand of the person who wields them. But there is a trade-off because they tend to be more difficult to use in large groups because it is harder for others to undestand what it going on. This is a fundamental trade-off that programming languages must make. And it means that a language which is great at one end of the spectrum will likely be lousy at the other end. And this is reflected in the lines of code required for a particular scale of problem.&lt;/p&gt;  &lt;p&gt;My second criticism is in regard to your discussion of state. You point out that Brooks considered managing of state to be a major essential difficulty of programming and you then claim that functional languages obviate this difficulty and hypothesize this as the reason that they can be a silver bullet.&lt;/p&gt;  &lt;p&gt;I believe that you have misunderstood the kind of state the Brooks was referring to. He was not talking about run-time state but compile-time state. He was not talking about what variables are changed at run-time. He was talking about the interactions between components of the program. These interactions are still there and just as complex in functional languages as in imperative languages.&lt;/p&gt;  &lt;p&gt;Second, even when considering just the run-time state, the referential transparency of functional languages simplifies only the theoretical analysis of a program. As far as a normal programmer who is informally reasoning about what a program does, the programmer must consider how state is transformed in the same way whether or not a modified copy is made or a destructive write is made. This is the same kind of reasoning.&lt;/p&gt;  &lt;p&gt;Finally, I have seen many people talk about getting an order of magnitude improvement by finding some incredible programming tool. Functional programming is not unique in that respect. But in my experience this is more likely to be about finding a methodology that suits the persons mindset than about finding the one true language or system. Somebody who thinks about programming in terms of a conceptual universe that changes over time will be an order of magnitude less effective in a functional environment. And somebody who thinks about programming in terms of a conceptual description of the result which is broken up into first class functions will be an order of magnitude less effective in an imperative environment.&lt;/p&gt;  &lt;p&gt;I have programmed in both imperative and functional languages. I know and understand the functional idioms and have used them. My mindset tends to the empirical. I am a less effective programmer in such languages. But I have seen programmers who can pull a metaphorical rabbit out of a hat while tapdancing in them. This says to me that evangelism about functional languages or empirical languages is fundamentally misguided regardless of the side.&lt;br /&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-63"&gt;    &lt;cite&gt;Paul Johnson&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-63" title="Wednesday, December 13th, 2006 at 7:20 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="63'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-63" title=""&gt;December 13th, 2006 at 7:20 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=63"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Jonathon Duerig:&lt;/p&gt;  &lt;p&gt;I had decided not to respond to any further comments and instead get on with my next article. But yours is long and carefully argued, so it merits a response regardless. Its also nice to be arguing the point with someone who knows what a fold is.&lt;/p&gt;  &lt;p&gt;You make the point that during maintenance the difficulty of later understanding the purpose of an operation is language independent. I’m not so sure. A maintainer may suspect that a C++ iterator is truly orthogonal, but it can’t be taken for granted. There may be a bug hiding in those methods, or perhaps someone fixed a bug or worked around a problem by tweaking the semantics in an irregular way. Also a lot of the understanding of a piece of code comes from context, and it helps a lot to be able to see all the context at once (why else would 3 big monitors be a selling point for coding jobs?). So terse code makes it a lot easier to deduce context because you can see more at once.&lt;/p&gt;  &lt;p&gt;(Aside: I remember in my final year project at Uni going into the lab at night because then I could get two VT100s to myself).&lt;/p&gt;  &lt;p&gt;You say that Scheme, Ruby and Haskell can be moulded to fit the hand of the user, making them more productive for single person tasks, but less productive for groups because of mutual comprehension difficulties.&lt;/p&gt;  &lt;p&gt;This is hard to test because of the lack of statistics, but Haskell is strongly typed and the community has already developed conventions and tools for documentation and testing (Haddock and QuickCheck). I can see that Scheme macros can be used to construct an ideosyncratic personal language, but I really don’t see how this could happen in Haskell. Things that get done with macros in Scheme are usually done with monads in Haskell, but whereas Scheme macros are procedural monads are declaritive and must conform to mathematical laws, making them tractable. My experience with Haskell monads is that you generally build a monadic sub-language in a single module and provide libraries for it in some other modules (e.g. Parsec), and that the end result is intuitive and simple to use. But maybe I’ve only been exposed to well-designed monads.&lt;/p&gt;  &lt;p&gt;On the subject of state and informal reasoning: personally I use whatever reasoning forms that will work. In debugging a particularly complex monad I once resorted to writing out the algebraic substitutions long-hand in order to understand how the bind and return operators were interacting. It worked, and I got the monad to do what I wanted. I routinely use informal algebraic reasoning of this sort in simpler cases in order to understand what my program is doing. Any informal reasoning must be a hasty short-hand version of what a full formal proof would do, and it follows that language features that make full formal proof easier will make the informal short-hand mental reasoning easier too.&lt;/p&gt;  &lt;p&gt;Pure functions are particularly valuable when trying to understand a large program because you don’t have to worry about the context and history of the system for each call; you just look at what the function does to its arguments. In a real sense this is as big a step forwards as garbage collection, and for the same reason: any time you overwrite a value you are effectively declaring the old value to be garbage. Functional programs (at least notionally) never require you to make this decision, leaving it up to the GC and compiler to figure it out for you based on the global system context. Thus complex design patterns like Memento and Command are rendered trivial or completely obsolete.&lt;/p&gt;  &lt;p&gt;Finally you talk about the many over-hyped technologies in this industry. Yes, hype is a common problem. Those of you who think you have a silver bullet are very annoying for those of us who actually do. &lt;img src="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21_files/icon_smile.gif" alt=":-)" class="wp-smiley" /&gt; &lt;/p&gt;  &lt;p&gt;Paul.&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt;&lt;!-- X-spaminator-strike: url dashes, 1 --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-64"&gt;    &lt;cite&gt;Paul Johnson&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-64" title="Wednesday, December 13th, 2006 at 7:34 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="64'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-64" title=""&gt;December 13th, 2006 at 7:34 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=64"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Jonathon Duerig:&lt;/p&gt;  &lt;p&gt;I had decided not to respond to any further comments and instead get on with my next article. But yours is long and carefully argued, so it merits a response regardless. Its also nice to be arguing the point with someone who knows what a fold is.&lt;/p&gt;  &lt;p&gt;You make the point that during maintenance the difficulty of later understanding the purpose of an operation is language independent. I’m not so sure. A maintainer may suspect that a C++ iterator is truly orthogonal, but it can’t be taken for granted. There may be a bug hiding in those methods, or perhaps someone fixed a bug or worked around a problem by tweaking the semantics in an irregular way. Also a lot of the understanding of a piece of code comes from context, and it helps a lot to be able to see all the context at once (why else would 3 big monitors be a selling point for coding jobs?). So terse code makes it a lot easier to deduce context because you can see more at once.&lt;/p&gt;  &lt;p&gt;(Aside: I remember in my final year project at Uni going into the lab at night because then I could get two VT100s to myself).&lt;/p&gt;  &lt;p&gt;You say that Scheme, Ruby and Haskell can be moulded to fit the hand of the user, making them more productive for single person tasks, but less productive for groups because of mutual comprehension difficulties.&lt;/p&gt;  &lt;p&gt;This is hard to test because of the lack of statistics, but Haskell is strongly typed and the community has already developed conventions and tools for documentation and testing (Haddock and QuickCheck). I can see that Scheme macros can be used to construct an ideosyncratic personal language, but I really don’t see how this could happen in Haskell. Things that get done with macros in Scheme are usually done with monads in Haskell, but whereas Scheme macros are procedural monads are declaritive and must conform to mathematical laws, making them tractable. My experience with Haskell monads is that you generally build a monadic sub-language in a single module and provide libraries for it in some other modules (e.g. Parsec), and that the end result is intuitive and simple to use. But maybe I’ve only been exposed to well-designed monads.&lt;/p&gt;  &lt;p&gt;On the subject of state and informal reasoning: personally I use whatever reasoning forms that will work. In debugging a particularly complex monad I once resorted to writing out the algebraic substitutions long-hand in order to understand how the bind and return operators were interacting. It worked, and I got the monad to do what I wanted. I routinely use informal algebraic reasoning of this sort in simpler cases in order to understand what my program is doing. Any informal reasoning must be a hasty short-hand version of what a full formal proof would do, and it follows that language features that make full formal proof easier will make the informal short-hand mental reasoning easier too.&lt;/p&gt;  &lt;p&gt;Pure functions are particularly valuable when trying to understand a large program because you don’t have to worry about the context and history of the system for each call; you just look at what the function does to its arguments. In a real sense this is as big a step forwards as garbage collection, and for the same reason: any time you overwrite a value you are effectively declaring the old value to be garbage. Functional programs (at least notionally) never require you to make this decision, leaving it up to the GC and compiler to figure it out for you based on the global system context. Thus complex design patterns like Memento and Command are rendered trivial or completely obsolete.&lt;/p&gt;  &lt;p&gt;Finally you talk about the many over-hyped technologies in this industry. Yes, hype is a common problem. Those of you who think you have a silver bullet are very annoying for those of us who actually do. &lt;img src="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21_files/icon_smile.gif" alt=":-)" class="wp-smiley" /&gt; &lt;/p&gt;  &lt;p&gt;Paul.&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-strike: crap flooding, 3 --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt;&lt;!-- X-spaminator-strike: url dashes, 1 --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-67"&gt;    &lt;cite&gt;&lt;a href="http://www.telegraphics.com.au/" rel="external nofollow"&gt;Toby&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;  &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-67" title="Friday, December 15th, 2006 at 7:36 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action=" comment="67'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20Silver%20Bullets%20Incoming%21#comment-67" title=""&gt;December 15th, 2006 at 7:36 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=67"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Since I happened to stumble upon an actual Dijsktra cite just now, I thought I’d add it here (having read and appreciated your original post a few days ago).&lt;/p&gt;  &lt;p&gt;In EWD513, “Trip Report E.W. Dijsktra, Newcastle, 8-12 September 1975,” he writes,&lt;/p&gt;  &lt;p&gt;“The willingness to accept what is known to be wrong as if it were right was displayed very explicitly by NN4, who, as said, seems to have made up his mind many years ago. Like so many others, he expressed programmer productivity in terms of ‘number of lines of code produced’. During the discussion I pointed out that a programmer should produce solutions, and that, therefore, we should not talk about the number of lines of code produced, but the number of lines used, and that this number ought to be booked on the other side of the ledger. His answer was ‘Well, I know that it is inadequate, but it is the only thing we can measure.’. As if this undeniable fact also determines the side of the ledger….”&lt;/p&gt;  &lt;p&gt;That is the edited version as printed in “Selected Writings on Computing: A Personal Perspective”. The original text can be found in the EWD Archive, at &lt;a href="http://www.cs.utexas.edu/users/EWD/transcriptions/EWD05xx/EWD513.html" rel="nofollow"&gt;http://www.cs.utexas.edu/users/EWD/transcriptions/EWD05xx/EWD513.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-3641923941436763930?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/3641923941436763930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=3641923941436763930' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/3641923941436763930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/3641923941436763930'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/08/responses-to-silver-bullets-incoming.html' title='Responses to &apos;Silver Bullets Incoming!&apos;'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-6509025562662608666</id><published>2007-08-12T04:01:00.000-07:00</published><updated>2007-08-12T04:05:05.955-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='erlang'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Original responses to '"No Silver Bullet" and Functional Programming'</title><content type='html'>(((&lt;br /&gt;These are the comments originally appended to the article.  Many of them are thoughtful and worth reading in their own right.&lt;br /&gt;&lt;br /&gt;As with the article, please do not submit this to reddit.&lt;br /&gt;)))&lt;br /&gt;&lt;br /&gt;&lt;ol class="commentlist"&gt;&lt;li class="graybox" id="comment-2"&gt;    &lt;cite&gt;&lt;a href="http://clabs.org/" rel="external nofollow"&gt;Chris Morris&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-2" title="Thursday, December 7th, 2006 at 6:51 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="2'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-2" title=""&gt;December 7th, 2006 at 6:51 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=2"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;”    experts in several different languages were given a simplified spec taken from a real problem and asked to implement it.”&lt;/p&gt;  &lt;p&gt;So, was the use of Haskell an integral part of simplifying the original spec given to the experts in the first place? To me, the essential difficulties of programming are in figuring out what the hell to really build in the first place. None of the programming languages in that study helped them do that. They skipped the bulk of the essential difficulties and went right into studying the effects on the accidental portion.&lt;br /&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-3"&gt;    &lt;cite&gt;Craig&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-3" title="Thursday, December 7th, 2006 at 7:41 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="3'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-3" title=""&gt;December 7th, 2006 at 7:41 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=3"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;I really enjoyed that, looking forward to your next blog.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-4"&gt;    &lt;cite&gt;Functional Lover&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-4" title="Thursday, December 7th, 2006 at 8:21 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="4'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-4" title=""&gt;December 7th, 2006 at 8:21 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=4"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;You know why? Because all the colleges have been brainwashed by Java. Damned be they.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-5"&gt;    &lt;cite&gt;Paul Johnson&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-5" title="Thursday, December 7th, 2006 at 8:26 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="5'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-5" title=""&gt;December 7th, 2006 at 8:26 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=5"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;There has been some discussion of this at &lt;a href="http://discuss.joelonsoftware.com/default.asp?joel.3.424533.12" rel="nofollow"&gt;http://discuss.joelonsoftware.com/default.asp?joel.3.424533.12&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Paul.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-6"&gt;    &lt;cite&gt;Jonathan Allen&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-6" title="Thursday, December 7th, 2006 at 9:04 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="6'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-6" title=""&gt;December 7th, 2006 at 9:04 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=6"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;From the study referenced:&lt;/p&gt;  &lt;p&gt;&gt; 1. The NSWC experiment was conducted in a very short time-frame with very little direct funding. Thus many corners had to be cut, including significant simplification of the problem itself; the largest of the prototypes was only 1200 lines of code.&lt;/p&gt;  &lt;p&gt;&gt; 2. The geo-server specification was by nature ambiguous and imprecise, thus leading to some variation in the functionalities of the developed prototypes. (On the other hand, the specification is probably typical of that found in practice, especially during requirements acquisition.)&lt;/p&gt;  &lt;p&gt;&gt; 3. The participants were trusted entirely to report their own development metrics. In addition, not all of the participants attended the first meeting at NSWC; those who did attend were advantaged.&lt;/p&gt;  &lt;p&gt;&gt; 4. No guidelines were given as to what exactly should be reported. For example, development times usually included documentation time, but there were major variations in the code-size/documentation-size ratios. In addition, different methods were used to count lines of code for each language, and it is not clear how one line of code for one language relates to that of another.&lt;/p&gt;  &lt;p&gt;&gt; 5. The review panel had very little time to conduct a really thorough review. For example, none of the code was actually run by the panel; they relied on the written reports and oral presentations.&lt;/p&gt;  &lt;p&gt;The problem was grossly simplified, the code was rushed, the line count and time spent numbers questionable, and the final application never run. &lt;/p&gt;  &lt;p&gt;This is your proof? &lt;/p&gt;  &lt;p&gt;We don’t even know what those 85 lines of Haskel actually work with good inputs, let alone if they correctly responded to bad data.&lt;br /&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-7"&gt;    &lt;cite&gt;&lt;a href="http://www.adit.co.uk/" rel="external nofollow"&gt;Mike Griffiths&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-7" title="Thursday, December 7th, 2006 at 10:50 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="7'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-7" title=""&gt;December 7th, 2006 at 10:50 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=7"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;I think you re missing the point with regard to the whole process of software development. Even orders of magnitude improvements in the process of writing code have no impact upon the problem of writing the right code - defining right as “fit for the required purpose” once the problem domain exceeds a remarkably small limit.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-8"&gt;    &lt;cite&gt;v&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-8" title="Thursday, December 7th, 2006 at 1:22 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="8'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-8" title=""&gt;December 7th, 2006 at 1:22 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=8"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;While the arguments you present in the bulk of your post are convincing, the hard data presented hardly seems so. How does low LOC = high productivity except in the wierd world where CMM makes sense?&lt;/p&gt;  &lt;p&gt;What gets put down as code is but the distill of all the knowledge stored in a programmer’s head, and functional languages do demand a higher overhead of that storage space than imperative ones (more for historical reasons, i admit, but there it is).&lt;/p&gt;  &lt;p&gt;Moreover, code building tools reduce the effort to actually input those high LOCs with automation that is improving by the day.&lt;/p&gt;  &lt;p&gt;Can you present a better quantitative metric than LOC counts for functional languages being an order of magnitude better?&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: short field, 1 --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-11"&gt;    &lt;cite&gt;thomas lackner&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-11" title="Thursday, December 7th, 2006 at 3:07 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="11'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-11" title=""&gt;December 7th, 2006 at 3:07 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=11"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;You should link to information about the STM implementation in Haskell.. sounds very interesting.&lt;/p&gt;  &lt;p&gt;I refuse to comment on the constant debate about programmer efficency, as I’m sure the same program would be 72 characters in K/Q!&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt;  &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-12"&gt;    &lt;cite&gt;&lt;a href="http://www.hxa7241.org/" rel="external nofollow"&gt;hxa7241&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-12" title="Thursday, December 7th, 2006 at 3:27 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="12'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-12" title=""&gt;December 7th, 2006 at 3:27 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=12"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;I have recently translated a minimal global illumination renderer from C++ to OCaml. It is about half the size — similar to the Ruby translation. The difference is in having class interfaces defined separately, and other small things.&lt;/p&gt;  &lt;p&gt;The implication that functional is so much more compact and simple than imperative is wrong. Look at the granularity of abstractions: they are practically the same. If you still code with the same sized building blocks it will demand similar effort.&lt;/p&gt;  &lt;p&gt;Also, well-made imperative code has many restrictions on state interaction. It is not so far away from functional code.&lt;/p&gt;  &lt;p&gt;The only forseeable way to greatly improved productivity is with reuse: more, better libraries/frameworks and ways of using them. (As Brooks says.)&lt;br /&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-13"&gt;    &lt;cite&gt;Achilleas Margaritis&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-13" title="Thursday, December 7th, 2006 at 3:48 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="13'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-13" title=""&gt;December 7th, 2006 at 3:48 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=13"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;As always, benchmarks are biased.&lt;/p&gt;  &lt;p&gt;Getopt is a parser.&lt;/p&gt;  &lt;p&gt;You can write a command line parser in a few lines of code in C++ using a library like boost::Spirit. For example (code not tested, just an illustration):&lt;/p&gt;  &lt;p&gt;rule letter = range(’a', ‘z’) | range(’A', ‘Z’);&lt;br /&gt;rule digit = range(’0′, ‘9′);&lt;br /&gt;rule alphanumeric = digit | letter;&lt;br /&gt;rule id = *letter &lt;&lt; *alphanumeric;&lt;br /&gt;rule num = +digit;&lt;br /&gt;rule cmdLine = *('-' &lt;&lt; (id | num));&lt;/p&gt;  &lt;p&gt;There are many tasks in which functional programs are shorter and more concise, but these advantages are not due to the functional nature of a program, but due to design choices (better syntax, no semicolons, lambda functions etc). These advantages can happily exist in imperative languages too. The only difference is referential transparency, but, for me, it gets in the way.&lt;/p&gt;  &lt;p&gt;Can we please see a MVC application with Haskell where the model is cleanly separated from the view?&lt;/p&gt;  &lt;p&gt; &lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-14"&gt;    &lt;cite&gt;Achilleas Margaritis&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-14" title="Thursday, December 7th, 2006 at 3:59 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="14'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-14" title=""&gt;December 7th, 2006 at 3:59 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=14"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;As always, results are biased.&lt;/p&gt;  &lt;p&gt;The command line parser could be written in C++ with a Spirit-like framework like this:&lt;/p&gt;  &lt;p&gt;rule id = letter &lt;&lt; *alphanumeric;&lt;br /&gt;rule num = +digit;&lt;br /&gt;rule cmdline = *('-' &lt;&lt; (id | num));&lt;/p&gt;  &lt;p&gt;The advantages of FP come from concepts that can also be used in imperative languages: lambda functions and closures (Smalltalk/Ruby), simplified syntax (Ruby), etc. On the other hand, in pure FPs many things are unnecessarily complex.&lt;/p&gt;  &lt;p&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-strike: crap flooding, 3 --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-15"&gt;    &lt;cite&gt;anonymous&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-15" title="Thursday, December 7th, 2006 at 5:22 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="15'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-15" title=""&gt;December 7th, 2006 at 5:22 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=15"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Your argument about the lack of states in functional programs is fundamentally flawed. FP-s appear to have no states simply because they describe what would happen (sort of.) However, in order for a FP to, well, run, someone, somewhere, must pull a lever so that the wheels start turning according to the spec of the FP, and what ticks under the FP ultimately does have state. I am not suggesting that there are no gains from functional programming, but the notion you offer is bogus as it stands.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-strike: short field, 1 --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-16"&gt;    &lt;cite&gt;Edward Ocampo-Gooding&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-16" title="Thursday, December 7th, 2006 at 5:23 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="16'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-16" title=""&gt;December 7th, 2006 at 5:23 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=16"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;A popular excuse for why programming folks all don’t immediately jump into functional programming is because it’s not as intuitive a paradigm as the procedural style.&lt;/p&gt;  &lt;p&gt;I’d like to see a psychology study that measures programming proficiency vs. time trained with “fresh” students unaware of either paradigm and have two separate groups be trained.&lt;br /&gt;I &lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-17"&gt;    &lt;cite&gt;You wish&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-17" title="Thursday, December 7th, 2006 at 5:34 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="17'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-17" title=""&gt;December 7th, 2006 at 5:34 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=17"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;And yet Lisp, which is considered a functional language, has been around since 1962 (it was spec’ed in 1958), and Brooks doesn’t point to it in his paper. Functional programming isn’t new, and it is certainly not a silver bullet.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-19"&gt;    &lt;cite&gt;Sam Carter&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-19" title="Thursday, December 7th, 2006 at 8:04 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="19'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-19" title=""&gt;December 7th, 2006 at 8:04 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=19"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;The reason why the whole world isn’t using functional languages is very simple: shitty library support. The real silver bullet for most programmers is access to large, high quality libraries, with the primary examples being the .NET runtime, or Java’s libraries. Programming tests that require writing 100% of the code from scratch are just flat out inaccurate, because you are measuring the wrong thing. The bulk of modern development time isn’t writing code from scratch. It’s writing code that interfaces with libraries for networking, or XML parsing, or database handling, or whatever (see &lt;a href="http://www.joelonsoftware.com/articles/LordPalmerston.html" rel="nofollow"&gt;http://www.joelonsoftware.com/articles/LordPalmerston.html&lt;/a&gt; for a fuller treatment of this topic). The functional programming language community is more interested in marginalizing their access to external systems rather than making it easier (research into monads being a great example of that).&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-strike: crap flooding, 3 --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-20"&gt;    &lt;cite&gt;&lt;a href="http://www.knowing.net/" rel="external nofollow"&gt;Larry O'Brien&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-20" title="Thursday, December 7th, 2006 at 8:50 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="20'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-20" title=""&gt;December 7th, 2006 at 8:50 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=20"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;I intended to post the URL of some thoughts on your post, but your comment engine diagnoses dashes in URLs as indicative of spam. (Not so, I think.) Anyhow, &lt;a href="http://www.knowing.net/PermaLink,guid,659c9535-6674-48f9-a4f9-8bc34fe724b5.aspx" rel="nofollow"&gt;http://www.knowing.net/PermaLink,guid,659c9535-6674-48f9-a4f9-8bc34fe724b5.aspx&lt;/a&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-21"&gt;    &lt;cite&gt;Paul&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-21" title="Thursday, December 7th, 2006 at 9:39 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="21'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-21" title=""&gt;December 7th, 2006 at 9:39 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=21"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Comparing Haskell to C compares a variety of design parameters at once: strong versus weak-ish typing, garbage collection versus hand collection, high level data types versus low-level ones, different libraries etc.&lt;/p&gt;  &lt;p&gt;Based on my experience with functional languages and other high-level languages like Python, Ruby, Smalltalk, Javascript, Perl, C#, REXX etc,, I would guess that those other factors are MUCH MORE likely to be relevant than just the functional programming paradigm.&lt;/p&gt;  &lt;p&gt;In addition, comparing lines of code for PROTOTYPING is pretty uninteresting. I’d like to compare lines of code for a functional application used by customers. What if the design decisions in a particular language are focused on robustness and maintainability?&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-22"&gt;    &lt;cite&gt;&lt;a href="http://www.knowing.net/" rel="external nofollow"&gt;Larry O'Brien&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-22" title="Thursday, December 7th, 2006 at 10:19 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="22'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-22" title=""&gt;December 7th, 2006 at 10:19 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=22"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;I’ve posted a reply at my blog. Unfortunately, I can’t paste the exact permalink, which your comment engine wrongly insists are spam.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-strike: crap flooding, 3 --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-23"&gt;    &lt;cite&gt;&lt;a href="http://www.foobar.com/" rel="external nofollow"&gt;Indeed You Wish&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-23" title="Thursday, December 7th, 2006 at 10:19 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="23'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-23" title=""&gt;December 7th, 2006 at 10:19 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=23"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Certain problems are more easily solved with certain tools — let’s not fool ourselves, and believe FP solves all problems better.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt;  &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-24"&gt;    &lt;cite&gt;Jeff&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-24" title="Thursday, December 7th, 2006 at 10:37 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="24'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-24" title=""&gt;December 7th, 2006 at 10:37 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=24"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;You can make any language look good by comparing it to C++. If being functional is the magic bullet, then why do stateful languages like Python, Perl, Ruby, Lua, Lisp, etc. always do just as well as Haskell in this sort of omparison?&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-25"&gt;    &lt;cite&gt;Stuart Dootson&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-25" title="Thursday, December 7th, 2006 at 11:29 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="25'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-25" title=""&gt;December 7th, 2006 at 11:29 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=25"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Unlike the rest of your commenters (as far as I can tell), I *have* used Haskell for real-world problems, and can confirm that (for the problems I’ve used it for), it is significantly more productive than imperative languages like Java, C++ or Ada.&lt;/p&gt;  &lt;p&gt;I don’t think it’s quite ready for the maistream, but it’s definitely got promise.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-27"&gt;    &lt;cite&gt;Not Silver But Still Very Good&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-27" title="Friday, December 8th, 2006 at 12:54 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="27'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-27" title=""&gt;December 8th, 2006 at 12:54 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=27"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;I’m very sceptical about LOC as a measure. However, here’s a very recent informal data point, which I’m mentioning partly because it’s notable for the relatively controlled nature of the comparison: Lucian Wischik at Microsoft recently had to rewrite a 6,000 line F# program in C# (C# was required for unrelated reasons). It became 30,000 lines (references to comments by Lucian below). Now, this comparison is with essentially the same .NET libraries (F# adds a few minor libraries), the same (talented) programmer, the same .NET runtime, the same performance profile, the same problem specification, and the C# code has the advantage of being a reimplementation. &lt;/p&gt;  &lt;p&gt;See Lucian’s comments on the Google group at microsoft.public.dotnet.languages.csharp at &lt;a href="http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/tree/browse_frm/thread/38a144ceaf101030/fb4664a7e4c27cf6?rnum=11&amp;q=F%23&amp;amp;_done=%2Fgroup%2Fmicrosoft.public.dotnet.languages.csharp%2Fbrowse_frm%2Fthread%2F38a144ceaf101030%2F38d9aa4dbda50892%3Flnk%3Dgst%26q%3DF%23%26rnum%3D1%26#doc_814fd26871c2c6b7" rel="nofollow"&gt;http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/tree/browse_frm/thread/38a144ceaf101030/fb4664a7e4c27cf6?rnum=11&amp;q=F%23&amp;amp;_done=%2Fgroup%2Fmicrosoft.public.dotnet.languages.csharp%2Fbrowse_frm%2Fthread%2F38a144ceaf101030%2F38d9aa4dbda50892%3Flnk%3Dgst%26q%3DF%23%26rnum%3D1%26#doc_814fd26871c2c6b7&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;More extensive analysis of the differences by Lucian at &lt;a href="http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_frm/thread/38a144ceaf101030/38d9aa4dbda50892?lnk=gst&amp;q=f%23&amp;amp;rnum=1#38d9aa4dbda50892" rel="nofollow"&gt;http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_frm/thread/38a144ceaf101030/38d9aa4dbda50892?lnk=gst&amp;q=f%23&amp;amp;rnum=1#38d9aa4dbda50892&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-strike: excessive links, 3 --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-28"&gt;    &lt;cite&gt;Josh S&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-28" title="Friday, December 8th, 2006 at 1:53 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="28'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-28" title=""&gt;December 8th, 2006 at 1:53 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=28"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;“However, in order for a FP to, well, run, someone, somewhere, must pull a lever so that the wheels start turning according to the spec of the FP, and what ticks under the FP ultimately does have state.”&lt;/p&gt;  &lt;p&gt;That’s not the point. The point is that an FP utilizes a framework that *safely* translates from an abstract language without a concept of state to a concrete language that is basically nothing but state. &lt;/p&gt;  &lt;p&gt;Likewise, object oriented languages do not actually have objects — whether they are detected at compile time or run time, they ultimately map to swaths of memory and functions. &lt;/p&gt;  &lt;p&gt;It’s all smoke and mirrors. But it’s the magic of the smoke and mirrors that enhance our productivity. By building the funnel from a “safe”, “imaginary” language to the “dangerous”, “unproductive” one, we eliminate the problems inherent at the lower level.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-29"&gt;    &lt;cite&gt;Joel&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-29" title="Friday, December 8th, 2006 at 2:41 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="29'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-29" title=""&gt;December 8th, 2006 at 2:41 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=29"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Functional programming is not usually adopted because so many real-world systems are almost entirely side-effects. Look at all the things a shell script does; it’s changing system state. What’s that JDBC app doing? Changing database state.&lt;/p&gt;  &lt;p&gt;In the world of web applications, you’re always doing I/O.  It’s almost all I/O.  And that is state (of your I/O streams).&lt;/p&gt;  &lt;p&gt;I’ve been looking at Erlang a lot recently. I have a serious jones for its concurrency constructs. They are as awesome as advertised. But man, you can’t do a decent thing with strings in that language. Seriously, it’s not much better than C. Python, Perl, even Lisp can do a lot of manipulation of the strings - things you have to do in parsing protocols and HTML and so on. But Erlang here is almost a non-starter. Ugh!&lt;/p&gt;  &lt;p&gt;Then there is the subject of libraries. Some major languages provide many things you don’t have to reimplement. But do the functional languages? Lisp has been around the longest, but try getting a gui library that works on all of (SBCL,CMUCL,CLisp). Or a decent GUI on Erlang at all. Even Paul Graham, champion of Lisp as Solution To Everything, admits that you need massive libraries to be useful - it’s a goal he has for Arc.&lt;/p&gt;  &lt;p&gt;At least Haskell has GTK+ bindings. I haven’t explored Haskell enough to comment on it. I just wonder why folks haven’t used it to do Yahoo! Store. If it’s that good, it will make someone money.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-31"&gt;    &lt;cite&gt;&lt;a href="http://ummyeah.com/" rel="external nofollow"&gt;fez&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-31" title="Friday, December 8th, 2006 at 5:07 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="31'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-31" title=""&gt;December 8th, 2006 at 5:07 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=31"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;I would love to see a shootout between the various web frameworks (including any based on functional languages).&lt;/p&gt;  &lt;p&gt;Something like the following:&lt;br /&gt;- well-defined spec&lt;br /&gt;- basic CRUD functionality for the most part&lt;br /&gt;- some integration(s) with a third-party API (thus existing off the shelf libraries will be of use)&lt;/p&gt;  &lt;p&gt;Let the best coders from each language duke it out. Record time spent for each segment of app development &amp; log all commits to a Subversion repository.&lt;/p&gt;  &lt;p&gt;Have a panel of neutral judges look at not just the time spent but also feature completeness and any other niceties the teams added in the time alotted, and give a score to each team.&lt;/p&gt;  &lt;p&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: short field, 1 --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-33"&gt;    &lt;cite&gt;&lt;a href="http://ulf.wiger.net/weblog" rel="external nofollow"&gt;Ulf Wiger&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-33" title="Friday, December 8th, 2006 at 1:20 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;amp;comment="33'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-33" title=""&gt;December 8th, 2006 at 1:20 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=33"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;More references were asked for. Here’s one:&lt;/p&gt;  &lt;p&gt;“Comparing C++ and Erlang for Motorola Telecoms Software”&lt;br /&gt;carried out by Heriot-Watt University together with Motorola.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.erlang.se/euc/06/proceedings/1600Nystrom.ppt" rel="nofollow"&gt;http://www.erlang.se/euc/06/proceedings/1600Nystrom.ppt&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Two applications were re-written from C++ to Erlang, and one of the applications was benchmarked. The pure Erlang version was 2-3x faster, much more robust, and had 1/3rd to 1/18th the number of lines of code, depending on how you compare the libraries. Detailed analysis suggested:&lt;/p&gt;  &lt;p&gt;“- Code for successful case – saves 27%&lt;br /&gt;- Automatic memory management – saves 11%&lt;br /&gt;- High-level communications – saves 23%” (slide 31)&lt;/p&gt;  &lt;p&gt;Like all other studies, this one can certainly be debated. Does anyone have a reference to a study concluding that functional programming does NOT lead to a productivity increase?&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-34"&gt;    &lt;cite&gt;tndal&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-34" title="Friday, December 8th, 2006 at 3:04 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;amp;comment="34'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-34" title=""&gt;December 8th, 2006 at 3:04 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=34"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;You omitted that ISI Relation Lisp scored the most rapid development time by far: less than half the time required by Haskell. &lt;/p&gt;  &lt;p&gt;Although the line count was greater, this version of Lisp cleaned the floor with Haskell as a productivity tool. And Relational Lisp is a mirror of Prolog.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt;  &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-35"&gt;    &lt;cite&gt;Jason&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-35" title="Friday, December 8th, 2006 at 6:42 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;amp;comment="35'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-35" title=""&gt;December 8th, 2006 at 6:42 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=35"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Some points:&lt;/p&gt;  &lt;p&gt;- LOC does not imply that less effort was involved in crafting the Haskell solution. Just less effort in typing it in.&lt;/p&gt;  &lt;p&gt;- Some problems have greater susceptibility to different approaches. One small “real world” problem is completely inadequate.&lt;/p&gt;  &lt;p&gt;- Double-blind experiments in this regard are, in fact, impossible, so this will remain a bench-race forever.&lt;/p&gt;  &lt;p&gt;—&lt;br /&gt;Jason&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-36"&gt;    &lt;cite&gt;&lt;a href="http://wagerlabs.com/" rel="external nofollow"&gt;Joel Reymont&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-36" title="Friday, December 8th, 2006 at 7:51 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;amp;comment="36'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-36" title=""&gt;December 8th, 2006 at 7:51 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=36"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Paul, you may be interested in the latest article in my blog. See “Re-birth of a trading platform”. &lt;a href="http://wagerlabs.com/2006/12/8/re-birth-of-a-trading-platform" rel="nofollow"&gt;http://wagerlabs.com/2006/12/8/re-birth-of-a-trading-platform&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;    Thanks, Joel&lt;br /&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-37"&gt;    &lt;cite&gt;&lt;a href="http://www.knowing.net/" rel="external nofollow"&gt;Larry O'Brien&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-37" title="Friday, December 8th, 2006 at 7:51 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;amp;comment="37'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-37" title=""&gt;December 8th, 2006 at 7:51 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=37"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Jason: “LOC does not imply that less effort was involved in crafting the Haskell solution. Just less effort in typing it in.”&lt;/p&gt;  &lt;p&gt;Not so. In industrial systems, lines of code produced per month is essentially constant, regardless of language. Also, defect rates per KLOC is essentially constant, regardless of language. (ref. Capers Jones works on “language levels”) (In small programs, you definitely see greater variation.) &lt;/p&gt;  &lt;p&gt;I agree with your other points. &lt;/p&gt;  &lt;p&gt;&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-38"&gt;    &lt;cite&gt;&lt;a href="http://www.knowing.net/" rel="external nofollow"&gt;Larry O'Brien&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-38" title="Friday, December 8th, 2006 at 7:57 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;amp;comment="38'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-38" title=""&gt;December 8th, 2006 at 7:57 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;comment=38"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;“Not Silver But Very Good” ref’s Lucian’s claims. The threads have little substance. I’ve been following Lucian’s Website and I feel that a grain of salt is called for. For instance, he wrote an F# program that displays a teapot in Direct3D; fair enough, but he makes it sound like the lighting and manipulation in 3D comes from a few lines of F# when, in fact, the “teapot in a viewport” is canned functionality that can be done in a few lines of _any_ language.&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-strike: crap flooding, 3 --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt;  &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-40"&gt;    &lt;cite&gt;&lt;a href="http://ben.moseley.name/" rel="external nofollow"&gt;Ben Moseley&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-40" title="Friday, December 8th, 2006 at 9:24 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="40'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-40" title=""&gt;December 8th, 2006 at 9:24 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=40"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;The thrust of your article is very close to the thrust of our “Out of the Tar Pit” paper which investigates FP (along with the relational model) as being very relevant to the Silver Bullet question - &lt;a href="http://web.mac.com/ben_moseley/frp/paper-v1_01.pdf" rel="nofollow"&gt;http://web.mac.com/ben_moseley/frp/paper-v1_01.pdf&lt;/a&gt; . &lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-strike: crap flooding, 3 --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-45"&gt;    &lt;cite&gt;Not Silver But Still Very Good&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-45" title="Saturday, December 9th, 2006 at 3:26 am"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="45'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-45" title=""&gt;December 9th, 2006 at 3:26 am&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=45"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Re the teapot - you’ve got the wrong guy: Lucian works at Microsoft, and has never touched a DirectX teapot. I think you’re thinking of Flying Frog consultancy.&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author check --&gt;&lt;!-- X-spaminator-strike: empty field - author url, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="" id="comment-46"&gt;    &lt;cite&gt;&lt;a href="http://ulf.wiger.net/weblog" rel="external nofollow"&gt;Ulf Wiger&lt;/a&gt;&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-46" title="Saturday, December 9th, 2006 at 12:50 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="46'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-46" title=""&gt;December 9th, 2006 at 12:50 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=46"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;I totally disagree with the idea that LOC wouldn’t matter. It’s not just a matter of the effort of typing in the code. Much of that extra code often represents “unnecessary” detail that distracts the reader, hides the core logic, and which also needs to be maintained. I’ve seen projects that have problems with keeping “boilerplate” code consistent when the system gets complex enough. Some projects resort to using modeling languages that generate the boilerplate. When judged as programming languages, these tools are usually quite crappy, but their supporters defend them based on the opinion that it’s still a lot better than having to code the stuff by hand. But there are good programming langugages that work at the same abstraction level as those modeling tools. We’ve also found that the learning curve for e.g. Erlang is much shorter than for e.g. UML or C++, contrary to the statement that FPLs would be more difficult to learn, or less intuitive.&lt;/p&gt;  &lt;p&gt;My own conclusions are based on 10 years of working in and around very large software projects, with code volumes in the order of hundreds of thousand lines, or even millions. I’ve had the opportunity to review several projects using C++, UML, Java and Erlang. I get the feeling that many of the comments above come from very limited comparisons. That’s ok - you have to start somewhere. For me, it took 2-3 months to properly un-learn C++ and OO when I first started with Erlang.&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt; &lt;/p&gt;       &lt;/li&gt;&lt;li class="graybox" id="comment-65"&gt;    &lt;cite&gt;anonymous&lt;/cite&gt; Says:&lt;br /&gt;   &lt;!--&lt;small class="commentmetadata"&gt;&lt;a href="#comment-65" title="Thursday, December 14th, 2006 at 12:57 pm"&gt;&lt;/a&gt; after publication.  &lt;a href="'http://cogito.blogthing.com/wp-admin/post.php?action="editcomment&amp;comment="65'"&gt;e&lt;/a&gt; &lt;/small&gt;--&gt;    &lt;small class="commentmetadata"&gt;&lt;a href="file:///home/paj/Documents/Blog/Paul%E2%80%99s%20Pontifications%20%C2%BB%20Blog%20Archive%20%C2%BB%20%E2%80%9CNo%20Silver%20Bullet%E2%80%9D%20and%20Functional%20Programming#comment-65" title=""&gt;December 14th, 2006 at 12:57 pm&lt;/a&gt;  &lt;a href="http://cogito.blogthing.com/wp-admin/post.php?action=editcomment&amp;amp;comment=65"&gt;e&lt;/a&gt; &lt;/small&gt;         &lt;p&gt;Josh S:&lt;/p&gt;  &lt;p&gt;“That’s not the point. The point is that an FP utilizes a framework that *safely* translates from an abstract language without a concept of state to a concrete language that is basically nothing but state.”&lt;/p&gt;  &lt;p&gt;Brooks was talking about the complexity arising out of the sheer multitude of possible states (or combinations thereof). In FP, you retain (at least in part) this very complexity in order to be able to produce any useful behavior, and whether this complexity is state-based or not, is totally irrelevant.&lt;/p&gt;  &lt;p&gt;What’s left to argue about is whether complexity is significantly reduced by imposing the stateless view, and I for one am still a bit sceptical about any radical claims on that account, especially if well-designed programs/systems from both domains are compared.&lt;/p&gt;  &lt;p&gt;Another point that comes to mind is that, paradoxically, FP actually inhibits stateful programming when you need it (and you almost always do when designing and implementing systems,) by making the complexity of combining states explicit. Inherently stateful models, on the other hand, will let you hide some of this complexity, be it at the still-present risk of coming up with something inconsistent.&lt;/p&gt;  &lt;p&gt;It pays to note that, compared to the current state of the art in PP/OOP, the FP way of combining state is clunky even with the help of monads and monad transformers, in case you wanted to bring those into the argument.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-6509025562662608666?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/6509025562662608666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=6509025562662608666' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/6509025562662608666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/6509025562662608666'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/08/original-responses-to-no-silver-bullet.html' title='Original responses to &apos;&quot;No Silver Bullet&quot; and Functional Programming&apos;'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-4173070726431682418</id><published>2007-08-12T03:50:00.000-07:00</published><updated>2007-08-12T04:06:08.968-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='erlang'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Silver Bullets Incoming!</title><content type='html'>((( This was originally posted on December 8th 2006 on Blogthing. It is reposted here because Blogthing seems to be permanently down. The original was posted to &lt;a href="http://programming.reddit.com/info/ujjm/comments"&gt;Programming Reddit&lt;/a&gt; and extensively discussed at the time, so please do not resubmit this version.)))&lt;br /&gt;&lt;br /&gt;-----&lt;br /&gt;&lt;p&gt;First, an apology to those who have tuned in to read about the obstacles to technology adoption. I will get to it, but first I wanted to respond to the staggering set of comments to my post about functional programming. In addition to the ones here there is the thread I started at &lt;a href="http://discuss.joelonsoftware.com/default.asp?joel.3.424533.27"&gt;Joel On Software&lt;/a&gt; and over 100 posts at &lt;a href="http://programming.reddit.com/info/twtt/comments"&gt;programming.reddit.com&lt;/a&gt;.  Wow!&lt;/p&gt;  &lt;p&gt;Some people tried to post here first, but postings are held for moderation even if you don’t get flagged as a spammer. Blogthing is apparently configured to reject URLs with hyphens, even though Blogthing puts hyphens in its own URLs. Anyway, one bit of pond scum posted a bit of JavaScript which automatically redirected a browser to some other site, so be glad you didn’t have to deal with that. &lt;/p&gt;  &lt;p&gt;Also I’m sorry I couldn’t moderate more often, but I’m afraid that work and family take priority.&lt;/p&gt;  &lt;p&gt;Anyway, on to some responses.  I’m going to tackle the more common themes in no particular order:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Lines of code is a lousy metric&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;I think that Dijkstra had it right: a line of code is a cost, not an asset. It costs money to write, and then it costs money to maintain. The more lines you have, the more overhead you have when you come to maintain or extend the application.&lt;/p&gt;  &lt;p&gt;Many people asked about development time, or pointed out that the Relational Lisp version in the US Navy study took even less time than the Haskell. However development time is often not available, when reported it is highly dependent on the programmer in question, and may not always be reported accurately (how do you count the time you spent thinking about the problem when driving to work?).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://page.mi.fu-berlin.de/%7Eprechelt/Biblio/jccpprt_computer2000.pdf"&gt;One study&lt;/a&gt;, which I am annoyed with myself for not remembering earlier, did collect coding time and found it highly variable, but on average the terser languages took proportionately less time. Implementations for the specimen problem in that study also exist in &lt;a href="http://haskell.org/haskellwiki/Phone_number"&gt;Haskell&lt;/a&gt; and &lt;a href="http://www.flownet.com/ron/papers/lisp-java/"&gt;Lisp&lt;/a&gt;. The average Haskell program was 57 lines, the average Lisp program was 119 lines, and the average Python program was about 80 (from the graphs in the article). C, C++ and Java all had averages around 240. The shortest program was in Haskell, with a mere 27 lines. The next shortest appears to be a Python program at about 40 lines.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;It was just a toy problem, so not representative&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;True, but non-toy problems are too expensive to run statistical tests on. The Erlang ATM switch was a non-toy problem, but it was also not a controlled study with a statistically valid number of independent implementations. You can’t have both (unless you are an eccentric millionaire).&lt;/p&gt;  &lt;p&gt;As several people pointed out, the &lt;a href="http://icfpcontest.org/"&gt;Annual ICFP Programming Contest&lt;/a&gt; provides a non-toy problem and a tight deadline every year. Its a level playing field: the problems are hard and open ended, and any language may be used. Functional languages always dominate the top ten, and for the last 3 years the winners have used Haskell (although last year it was one of several languages used by the winners).&lt;/p&gt;  &lt;p&gt;&lt;em&gt;This kind of problem is obviously suited to functional languages, so they look artificially good&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;I hope I have cited a sufficiently wide range of problem domains, from text processing to geometry to telecoms, to be able to argue otherwise.&lt;/p&gt;  &lt;p&gt;There is nothing in the way that functional programming languages work that necessarily fits them to a niche domain, although they do tend to shine particularly in applications requiring complex algorithms and symbolic rather than numeric computation. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Libraries matter more than languages&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Libraries and languages are complicit: they affect each other in important ways. In the long run the language that makes libraries easier to write will accumulate more of them, and hence become more powerful.&lt;/p&gt;  &lt;p&gt;There is no sharp dividing line between language and library. For example, Haskell has no loop construct built in to the language. Instead there are functions in the standard library to do the job of loops. Conversely Perl has regular expressions as a built-in type, whereas most languages treat them as a library. Therefore the programming environment as a whole should be judged, with language and libraries combined. I don’t know how well the studies above did this. I do know that the US Navy study did not have STL for C++ because it hadn’t been invented then.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;C++ is an old language: you should compare it with modern languages like Python&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Fair enough. Haskell is an order of magnitude better than C++, and maybe Java. Against Python it is merely significantly better.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;An order of magnitude is a factor of 10, no less&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Well, the Wikipedia entry does say &lt;em&gt;about&lt;/em&gt; 10.  All this stuff is so approximate that anything consistently in excess of 5 is close enough.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;You can do functional programming in C++ with Boost&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Yes I know. This argument reminds me of the early days of OO, when people argued that OO languages were not necessary because you could do the same thing in C with structures of function pointers. Yes you &lt;em&gt;could&lt;/em&gt;, but it was a masochistic exercise. I haven’t played around with Boost, but I suspect the same applies. Trying to retrofit ideas from one paradigm into a language designed for another is generally a bad idea.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Python has functional programming stuff, so why do I need Haskell or Erlang?  Anyway, purity just gets in the way.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;You want Erlang for big, distributed, highly concurrent systems.  There is simply nothing comparable.&lt;/p&gt;  &lt;p&gt;If you aren’t persuaded by the scalability argument for purity then try this: the purity of Haskell lets the compiler do lots more optimisations. You could write code in either language to apply a series of maps and folds to a list, but Python would (AFAIK) generate all the intermediate lists, while the Haskell compiler would apply a deforestation transform to eliminate all the intermediate lists and therefore be lots faster. The Haskell compiler can do this because the intermediate functions are guaranteed not to have side effects, and therefore the order of execution can be rearranged at will.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Haskell isn’t ready for prime time yet&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;True, but its pretty close. The wxHaskell and Hs2GTK GUI libraries are currently being updated, database access works fine, GHCi is getting a debugger, and people are already using it for &lt;a href="http://www.galois.com/cufp/"&gt;real work&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I wouldn’t recommend using Haskell on a 50-programmer-year bet-the-company project just yet, but for a small agile project where correctness matters more than execution speed its fine today. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-4173070726431682418?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/4173070726431682418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=4173070726431682418' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4173070726431682418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4173070726431682418'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/08/this-was-originally-posted-on-december.html' title='Silver Bullets Incoming!'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-5142749515670766362</id><published>2007-08-06T14:28:00.000-07:00</published><updated>2007-08-06T14:57:54.045-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='erlang'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>“No Silver Bullet” and Functional Programming</title><content type='html'>(((This was originally posted on December 6th 2006 on Blogthing.  It is reposted here because Blogthing seems to be permanently down.    The original was posted to &lt;a href="http://programming.reddit.com/info/twtt/comments"&gt;Programming Reddit&lt;/a&gt; and extensively discussed at the time, so please do not resubmit this version.)))&lt;br /&gt;&lt;p&gt;-----&lt;/p&gt;&lt;p&gt;This post is about &lt;a href="http://www-inst.eecs.berkeley.edu/%7Emaratb/readings/NoSilverBullet.html"&gt;No Silver Bullet &lt;/a&gt;by Fred Brooks. If you haven’t already read this paper then trust me, you really should. It says a lot, and it says it far better than I ever could.&lt;/p&gt;In this post I’m going to look at this paper in the context of functional programming. Brooks thesis is that there will be no technology that brings an order-of-magnitude improvement in software productivity “in the next ten years” (i.e. in the years 1987 - 97).  This is because most of what makes software difficult to write is “essential” complexity (i.e. inherent to the problem) rather than “accidental” complexity (i.e. bought in by the implementation technology).&lt;br /&gt; &lt;p&gt;Brooks’ career had in fact spanned the adoption of a silver bullet. High level languages had replaced assembler, and led to an order of magnitude improvement in productivity. Brooks argued that assembler has a very high accidental complexity, but high level languages like C and Ada had already disposed of most of this, leaving only the essential complexity. Therefore the big wins had all been achieved, and only small incremental improvements were left.&lt;/p&gt;In fact Brooks has already been proved right. It is now almost 20 years after he wrote, and no order-of-magnitude step has occured in mainstream software. Things have certainly gotten better, and some application domains have improved by an order of magnitude thanks to application frameworks. Ruby On Rails is certainly that much better for writing web apps than raw C on top of sockets. But outside of these niches software is still not much easier to write than in 1987. OO helped, but not by an order of magnitude. Garbage collection also helped, but again not by an order of magnitude.&lt;br /&gt; &lt;p&gt;Brooks argument that only essential complexity was left is founded in the size of the&lt;br /&gt;state space of software. As the data and necessary processing increases, so the number of possible states grows. The data and processing are inherent to the problem, and so are therefore essential&lt;br /&gt;rather than accidental: any technology must grapple with the same complexity.&lt;/p&gt; &lt;p&gt;But now lets look at this argument in the context of functional programming.  Back in 1993 the US Navy ran a &lt;a href="http://www.mcs.vuw.ac.nz/courses/COMP432/2006T2/docs/HaskellvCjfp.pdf"&gt;little test of prototyping languages&lt;/a&gt;: experts in several different languages were given a simplified spec&lt;br /&gt;taken from a real problem and asked to implement it. Some results:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Ada 83:  767 lines&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Ada 95: 800 lines&lt;/li&gt;&lt;/ul&gt;  &lt;ul&gt;&lt;li&gt;C++: 1195 lines&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Haskell: 85 lines&lt;/li&gt;&lt;/ul&gt;So on that particular problem Haskell really was an order of magnitude better than conventional languages. Other studies have confirmed this result, although usually with somewhat lower degrees of improvement. Ulf Wiger wrote a paper called &lt;a href="http://www.erlang.se/publications/Ulf_Wiger.pdf"&gt;Four-fold Increase in Productivity and Quality &lt;/a&gt;about the use of Erlang in an ATM switch, although in the paper Wiger claimed to have seen as much as a 10-fold reduction in line count when C++ code was rewritten in Erlang. The Haskell implementation of &lt;a href="http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/base/System/Console/GetOpt.hs?rev=1.13.2.1;content-type=text%2Fplain"&gt;getOpt &lt;/a&gt;took a mere 13% of the line count of the GNU C version. However you slice it, it looks like functional programming can deliver between 4 and 10-fold reduction in line count.&lt;br /&gt; &lt;p&gt;But is this truly a reduction in complexity, or is it just packing that the same into fewer lines? I believe the former, for two reasons.&lt;br /&gt; &lt;/p&gt;&lt;p&gt;First, Wiger reports that defect count fell in proportion to line count (i.e. defects per thousand lines of code was constant, but with fewer lines the Erlang code had proportionately fewer bugs). This strongly suggests&lt;br /&gt;that Erlang was indeed hiding accidental complexity from the developers.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Second, “pure” functional code has no side effects and stores no state. Thus it completely evades two kinds of accidental complexity that are inherent to any conventional “imperative” code:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;If the program lacks state, then there is no way that the number of states can become a problem.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;The order in which statements are executed, and hence the execution trace of the program, is completely irrelevant. Thus execution order is revealed as a major source of accidental complexity which Brooks mistook for essential complexity, but which is eliminated in pure functional programs.&lt;/li&gt;&lt;/ul&gt;Of course not everything can be pure functional. Erlang has functions with side effects, and so the order of execution matters for those. But they are only used when necessary  e.g. for I/O). If the bulk of the code employs only pure functions then it gains these benefits in proportion.&lt;br /&gt;&lt;br /&gt;Haskell goes even further than Erlang.  Stateful code is fenced off by the type system using a mathematical construct called a &lt;a href="http://www.nomaware.com/monads/"&gt;monad&lt;/a&gt;, and fragments of monadic code can be passed around and stitched together without the side effects escaping to mess up the pure code. Within a monad most of the usual vices of imperative programming are possible (although an uninitialised variable takes real effort). But like Erlang the bulk of Haskell code does not in fact have side effects, and the resulting lack of state makes Haskell programs easy to understand and safe to modify.&lt;br /&gt; &lt;p&gt;There is one more source of complexity that Brooks did not in fact tackle in his paper: concurrency. In 1987 concurrency was not a major problem in most systems. But today it is becoming a serious headache.  Today applications are increasingly distributed and concurrent, and the urrent trend towards multi-core CPUs will make concurrent programming a real imperative for high performance applications. But concurrency is very hard to get right first time, and very hard to debug when you get it wrong. In other words it is a huge source of accidental complexity.&lt;br /&gt; &lt;/p&gt;&lt;p&gt;Both Erlang and Haskell tackle concurrency. Erlang was designed for telecom applications, which require both concurrency and reliability in large amounts. Erlang implements a simple message passing model of&lt;br /&gt;concurrency with light weight threads based on Hoare’s CSP formalism.  This represented the state of the art when it was designed in the late 1980s and is still far more robust than the Java model of object-as-monitor.&lt;/p&gt; &lt;p&gt;Haskell, on the other hand, has recently introduced “software transactional memory” (STM), which provides transactional semantics for ordinary variables. This was originally tried during the 1990s, but the overhead of tracking every access to every variable made it too slow for practical use. But the Haskell&lt;br /&gt;implementation cleverly exploits both the rarity of state in Haskell programs and the way the type system fences it in. Side effects can occur within a transaction, but only to special STM variables. The type checker guarantees that these side effects cannot escape from the transaction until it is committed. Thus a transaction can be tried, rolled back, and retried as often as necessary without any change in&lt;br /&gt;the behaviour of the program.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Both of these systems are very effective at removing the accidental complexity of concurrency. Erlang&lt;br /&gt;programmers think in terms of concurrent servers and clients exchanging information, where each individual server acts as a transactional machine and no client can ever see the server state half way through a transaction. Haskell provides much more direct transactional semantics, but the overall result is the same: the programmer can ignore the concurrency on their own bit of program without having to worry about the rest of the system. &lt;/p&gt; &lt;p&gt;So: is functional programming an actual bona-fide silver bullet as defined by Brooks? I believe it is.&lt;br /&gt;Functional programming is based on a sound theory of scalable software engineering, and the empirical evidence clearly and consistently supports the theory.&lt;/p&gt; &lt;p&gt;So if its so good, why isn’t the whole world using it?  That will be the subject of my next blog.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-5142749515670766362?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/5142749515670766362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=5142749515670766362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/5142749515670766362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/5142749515670766362'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/08/no-silver-bullet-and-functional.html' title='“No Silver Bullet” and Functional Programming'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-30884599451801951</id><published>2007-08-05T04:40:00.000-07:00</published><updated>2007-08-05T07:16:17.650-07:00</updated><title type='text'>Planning to port my old posts</title><content type='html'>I used to have my blog on &lt;a href="http://cogito.blogthing.com/"&gt;Blogthing.&lt;/a&gt;  However that seems to be more or less permanently down now, so I've retrieved my old posts from the &lt;a href="http://web.archive.org/web/*/http://cogito.blogthing.com/"&gt;Wayback Machine&lt;/a&gt; and will be reposting them here in the next couple of days.  I'll also post the comments as separate pages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-30884599451801951?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/30884599451801951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=30884599451801951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/30884599451801951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/30884599451801951'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/08/planning-to-port-my-old-posts.html' title='Planning to port my old posts'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-4246218510203242979</id><published>2007-08-05T02:22:00.000-07:00</published><updated>2007-08-05T04:12:09.810-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><title type='text'>Homo Economicus and Other Straw Men</title><content type='html'>Quite a lot of political arguments seem to depend on whether the economists have got it right.  Broadly speaking (and yes, this is a horribly broad generalization with lots of counterexamples) the economists tend to favour more "conservative" policies such as trade liberalisation, low taxation and deregulation, which presents a problem for people who disagree with these policies.&lt;br /&gt;&lt;br /&gt;Economics tries to be an academic discipline that is above politics.  Whilst it doesn't always succeed, it does favour arguments with intellectual rigour over soundbites and statistical evidence over anecdotes.  So if you are a politician or pundit who disagrees with the majority of economists then you have some explaining to do.&lt;br /&gt;&lt;br /&gt;The most common starting point for such an attack is the "rational actor" assumption that lies at the foundation of most economic models.  This makes a number of assumptions about people:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;People only care about money.  Actually this is an extra simplifying assumption.  The basic rational actor theory supposes that people seek to maximise "utility" (i.e. whatever it is that makes them happy).  In practice economists usually have to equate this with money on the assumption that money buys happiness.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;They are universally greedy and amoral, and so if someone sees a way to get money then they will automatically go for it regardless of the consequence for others.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;They see no difference between options that have the same "expected value".  In other words they would see no difference between $10,000 in their pocket and a 10% chance of $100,000.&lt;/li&gt;&lt;li&gt;They are stunningly intelligent and informed, able at the drop of a hat to calculate which of half a dozen cell phone plans (each with its own combination of peak, off-peak, weekend, roaming, subscription charges, bundled handsets and monthly minutes) is going to minimise their phone bill for the next year.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;This is not a pretty picture of human beings.  It also has some obvious gaps.  Why do people give to charity?  In some cases they might be buying prestige and status, but thats not a universal explanation.  More generally, why do some highly talented people prefer to work as teachers (notoriously underpaid) or go and work helping extremely poor people (some of whom are poor because they are mentally unstable, violent, drunk, or just have very bad personal hygiene).  Whatever made Linus Torvalds write Linux it wasn't an expectation of monetary gain.  Yes, he's got a job out of it, but there are are less risky and more lucrative ways of exploiting a talent like that than giving something away.  For that matter I've written a bit of &lt;a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Ranged-sets-0.1.0"&gt;open source software&lt;/a&gt; myself.  According to classical economic theory I should have spent that time beavering away at work earning myself a promotion.&lt;br /&gt;&lt;br /&gt;The mythical human being who behaves like this is often termed "homo economicus"; economic man.  He is such a gross approximation to real human beings that I often think of h. economicus as a &lt;a href="http://www.xkcd.com/"&gt;stick figure portrait.  &lt;/a&gt;For those who disagree with the "economic conservative" consensus this is a clear point of attack: demonstrate that  economics rests on such shaky foundations and you can cast doubt on the conclusions.  However this is very much a straw man attack.  Economists use homo economicus because it makes economic questions analytically tractable, not because it leads them to pre-defined answers.  In this they closely resemble scientists from other disciplines who will use linear approximations rather than precise models because they are analytically tractable.  The key question is whether the analysis is sensitive to the difference between the simplified model and reality.&lt;br /&gt;&lt;br /&gt;And the economic models based on h. economicus do seem to match with reality reasonably well.  Countries with high levels of taxation, protectionist policies and generous social benefits really do seem to wind up with a lot more slums and shanty towns than countries with low taxation, open trade and limited social support.  If protectionist policies were good for people as a whole then an economic embargo ought to be welcomed as an opportunity to build up national industries, when in fact its real impact can be economic destruction.&lt;br /&gt;&lt;br /&gt;So I generally take a dim view of political platforms that dismiss economics.  Economists are not always right (an old joke says that if you laid all the economists in the world end to end they still wouldn't reach a conclusion).  But before I will vote for a politician who disagrees with the mainstream economic consensus I'd want to see a detailed rebuttal explaining exactly why the economists are wrong in this case.  And complaining about h. economicus isn't going to cut it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-4246218510203242979?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/4246218510203242979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=4246218510203242979' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4246218510203242979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/4246218510203242979'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/08/homo-economicus-and-other-straw-men.html' title='Homo Economicus and Other Straw Men'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-3454291973194831379</id><published>2007-02-12T09:56:00.001-08:00</published><updated>2007-02-12T09:58:01.232-08:00</updated><title type='text'>Previous Posts</title><content type='html'>I've decided to relocate my blog.  &lt;a href="http://cogito.blogthing.com/"&gt;Blogthing&lt;/a&gt; has been unreliable, so I'll try here instead.&lt;span class="down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-3454291973194831379?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://cogito.blogthing.com/' title='Previous Posts'/><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/3454291973194831379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=3454291973194831379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/3454291973194831379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/3454291973194831379'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/02/previous-posts.html' title='Previous Posts'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5975524006824862804.post-5056338258716401945</id><published>2007-02-12T09:56:00.000-08:00</published><updated>2007-02-18T12:00:10.912-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Haskell for Alphas and Betas</title><content type='html'>A few times now I've seen or heard an argument that goes like this:&lt;br /&gt;&lt;blockquote&gt;Haskell is fine for people with the &lt;a href="http://www.catb.org/%7Eesr/jargon/html/appendixb.html"&gt;Hacker Nature&lt;/a&gt;, but there is no way that the average &lt;a href="http://www.catb.org/%7Eesr/jargon/html/C/code-monkey.html"&gt;Code Monkey&lt;/a&gt; is ever going to grok recursion, let alone &lt;a href="http://en.wikipedia.org/wiki/Monads_in_functional_programming"&gt;monads&lt;/a&gt;.  Therefore Haskell is doomed for use in the Real World, and will forever remain a plaything of academics and &lt;a href="http://www.paulgraham.com/avg.html"&gt;over-enthusiastic start-up companies&lt;/a&gt;.&lt;br /&gt;&lt;/blockquote&gt;Lets call the people who can define new monads "Alphas" and the rest of the developers "Betas".  First of all, its worth noting that most, if not all the people who make this assertion are in fact Alphas, and they might be surprised at how much some other people can understand.  But I can accept that there are people out there who generate software, but for whom software is not a primary skill.   For example a physicist who writes a numerical simulation of particle interaction in Fortran, or a financial trader who's understanding of how to price a swaption is embedded in Excel.  And of course the favourite example: people who's primary job is the design of dynamic web applications and who know just enough  to query a SQL database and convert the results into HTML.  Some of these people are capable of groking the monad laws, but they are not interested in theoretical computer science.  So how will they do in Haskell?&lt;br /&gt;&lt;br /&gt;I think a clue comes from &lt;a href="http://archive.eiffel.com/eiffel/projects/calfp/page.html"&gt;an experience report on Eiffel&lt;/a&gt;.  The application was for financial derivatives back in the 90s.  The developers used Eiffel to create a library of classes (which would now be called an &lt;a href="http://www.mockobjects.com/files/evolving_an_edsl.ooplsa2006.pdf"&gt;embedded domain specific language&lt;/a&gt;) for derivative construction.  It sounds not unlike &lt;a href="http://research.microsoft.com/%7Esimonpj/Papers/financial-contracts/contracts-icfp.htm"&gt;the one proposed by Simon Peyton Jones&lt;/a&gt; in Haskell.  Once the developers had generated a library of Eiffel classes, the people who understood derivatives could use the existing library to describe esoteric financial contracts and define the pricing algorithms associated with them.&lt;br /&gt;&lt;br /&gt;This is the way that Haskell should go in the future. The Alphas can formalise the problem domain in a way that saves the Betas from having to understand any advanced stuff like GUIs, database access, and all the other stuff that makes our lives so interesting.&lt;br /&gt;&lt;br /&gt;Excel is very much a case in point here.  It has been called "the most popular functional programming language in the world", although of course it is not Turing Complete.  But it shows that many people can get their heads around a system of linked equations, and even simple recursion where necessary.&lt;br /&gt;&lt;br /&gt;But the real beauty of Haskell is that it doesn't have any built-in concept of flow of control.   This may sound like an odd advantage, but it allows an embedded DSL to have a monad embodying its own domain-specific notion of control flow in which the cause-and-effect model follows the model of the domain experts rather than the rest of the language.  Parsec (the recursive descent parser library for Haskell) is a good example: a parsing action can have side effects, but anything that happened in a failed parse is guaranteed to be invisible.  Coming up with Parsec took some Alpha brains, but now any Beta can write a parser in Haskell without worrying about the interaction of side effects and backtracking.&lt;br /&gt;&lt;br /&gt;Environments such as &lt;a href="http://www.cs.kent.ac.uk/projects/vital/"&gt;Vital&lt;/a&gt; may help to push this even further by providing an intuitive spreadsheet-like front end, but many of the Betas don't actually need it: they are happy with expressing their knowledge in source code; they just want a language that thinks the same way they do.&lt;br /&gt;&lt;br /&gt;So I really don't think that Haskell has to be a closed world to the Betas.  The Alphas will interpret the domain as a library of monad combinators, and the Betas can just use the library without worrying about details like the exact flow of control.  Over time some of the Betas will come to understand and be promoted to Alphas, and the rest will continue to code unabated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5975524006824862804-5056338258716401945?l=paulspontifications.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paulspontifications.blogspot.com/feeds/5056338258716401945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5975524006824862804&amp;postID=5056338258716401945' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/5056338258716401945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5975524006824862804/posts/default/5056338258716401945'/><link rel='alternate' type='text/html' href='http://paulspontifications.blogspot.com/2007/02/haskell-for-alphas-and-betas.html' title='Haskell for Alphas and Betas'/><author><name>Paul Johnson</name><uri>http://www.blogger.com/profile/07353083601285449293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry></feed>
