Rigidly defined areas of doubt and uncertainty.

Monday, August 30, 2004

More books

I bought a couple of new books at the weekend. (I don't think I enjoy buying anything else as much as I enjoy buying books.) They are: Ursula K Le Guin's version of Lau Tzu's Tao Te Ching, and Fred Brooks classic book of software development The Mythical Man Month.

I find it quite relaxing to lose myself in the pithy and inscrutable sayings of an ancient Chinese philosopher, just reading and re-reading until it makes some kind of sense.

I've just scanned The Mythical Man Month so far. Chapter 18 has a good summary of the chapters. The diagram in the first chapter "The Tar Pit" illustates the order of magnitude difference in development time between a program you might write for yourself and a programming systems product that could be sold. I think everyone involved in a programming project, incuding the client, should see that diagram before they start.

Free software and the parable of the broken window

Two sites I was reading recently O'Reilly's online book Open Sources and the Bubblegeneration blog gave me an interesting insight into the economics of software, free and otherwise. Bubblegeneration mentioned the parable of the broken window. In this story the breaking of a shopkeepers window is seen as a positive stimulus to the local economy because the shopkeeper gives money to the glazier, who then gives it to the baker to buy bread, who then gives it to the cobbler to buy shoes etc. The fallacy of this argument is easy to see in such a simple case, but in real life similar arguments are made all the time. In the case of software, the lightbulb went off when I read this quote from the GNU manifesto in the chapter Future of Cygnus Solutions: An Entrepreneur's Account of Open Sources:

There is nothing wrong with wanting pay for work, or seeking to maximize one's income, as long as one does not use means that are destructive. But the means customary in the field of software today are based on destruction.

Extracting money from users of a program by restricting their use of it is destructive because the restrictions reduce the amount and the ways that the program can be used. This reduces the amount of wealth that humanity derives from the program. When there is a deliberate choice to restrict, the harmful consequences are deliberate destruction.

The reason a good citizen does not use such destructive means to become wealthier is that, if everyone did so, we would all become poorer from the mutual destructiveness.

The use of the word 'destruction' made the parallels with the broken window story obvious to me. The broken window creates work, but it reduces opportunities to spend money on other things and so does not increase overall wealth.

Good to know that free software has some economic theory behind it as well as good intentions. Accounts like those of Red Hat and Cygnus (now part of Red Hat) in Open Sources provide some good practical evidence as well.

Tuesday, August 03, 2004

PHP annoyances

Paul mentioned a PHP annoyance on his blog, so I'll add to the list with somehting a bit more fundamental. Why isn't null interpreted as an empty array by foreach and other array operators? I find myself writing $list=array() as a failsafe throughout my code. This kind of book-keeping code is out of place in a dynamically typed language.