Categories
Books

Book: The God of Small Things

A beautiful and haunting story with wonderful prose. Very good.

Categories
Books

Book: Into the Green

A light and somewhat fluffy fantasy novel with music as the centerpiece.

Categories
Books Programming

Book: The Unix Philosophy

A summary of the UNIX design philosophy, this book is a bit out of date and needs a more abstract and less dogmatic second edition.

I was rather disapointed by ‘The UNIX Philosophy’ (TUP). First of all, the book feels out of date. This feeling is partly due to the fact that TUP was published in 1995 and thus many of the examples are anachronistic. However, the datedness of TUP also stems from a second flaw — some of the tenets of the UNIX philosophy outlined in the book are too concrete and thus appear to conflict with some present-day practices which many ‘UNIX people’ would not, I think, consider improper. Finally, the book sometimes presents practical (and thus adaptable) design principles as unshakeable articles of faith in the UNIX Religion.

It is a measure of the speed of change in technology and the world at large that a technical book published in 1995 can seem so behind the times. For example, the chapter on the principle of software leverage and the utility of ‘borrowing’ the work of others doesn’t mention the Free Software/Open Source phenomena, perfect examples of the power of sharing work with others to gain leverage. Of course those two movements were, respectively, relatively unknown and non-existent at the time. In the chapter on the “small is beautiful” principle, an example using the popularity of compact cars becomes a quaint reminiscence given the current (in the US at least) consumer predilection for SUVs.

Gancarz should not be blamed for failing to predict the future, but these anachronisms point to the need for a fresh edition. Furthermore, there are more serious problems in TUP.

Gancarz considers only two possibilities for implementation languages (C and shell scripts) whereas today we are presented with a host of common alternatives such as Perl, Python, and numerous others. This limitation in the variety of example languages would not be a problem if the philosophical “Tenets” presented in TUP could be applied to new languages to get the ‘UNIX slant’ on their utility.

However, consider Tenet 7: “Use Shell Scripts to Increase Leverage and Portability”. Although Gancarz presents his Tenets as abstract principles, it is hard to imagine a more concrete engineering principle. (Use *Bourne* shell scripts? Use *this* Bourne shell script?) I think that interpreted languages like Perl have many of the same advantages that Gancarz attributes to shell scripts, but Tenet 7 seems to rule out Perl and friends as potential alternatives to C.

Then there is Tenet 5: “Store Numerical Data in Flat ASCII Files”. Gancarz compares flat ASCII files with proprietary binary formats and concludes that ASCII solutions are more portable and thus more powerful. Simple enough, but what about open binary formats (such as the datastore for a freely available open-source database) or hierarchical text file formats (such as the increasingly popular XML)? An open binary format seems to circumvent at least some of Gancarz’s objections, but certainly not all. XML, although stored in ASCII, is not amenable to manipulation with standard UNIX tools like ‘cut’ and ‘paste’. Does the Unix philosophy rule out every data format except for flat ASCII? Tenet 5 seems to say that it does.

It seems to me that Tenet 5 and Tenet 7, rather than being “Tenets” at all, are really particular applications of the more general design principles of Portability (Gancarz’s Tenet 4) and Software Leverage (Tenet 6). Those last two tenets are general principles that can be applied in a wide range of situations and are thus useful as engineering rules of thumb. And, I should mention, Gancarz ably argues their merits.

But the idea that portability and leverage lead inevitably to shell scripts and flat ASCII files seems suspect. Surely there are some engineering situations where, say, a Perl script would provide all the portability and leverage that a shell script could. If you have ever tried to write a truly portable shell script, you know that it’s not necessarily easier than writing portable Perl!

In other words, traditional rules of thumb must be re-evaluated in the light of new situations and new experience. But Gancarz seems to place the UNIX philosophy beyond reproach. Consider the following passage (p. 103).

They [the Tenets] are the bedrock upon which the UNIX world sits. No one could strongly contest them and rightfully consider oneself a “UNIX person.” To do so would invite suspicion by the UNIX community that you lack commitment to UNIX and what it stands for.

I would hope that level-headed members of the UNIX community would accept criticism with open-minded skepticism, not suspicion! Any engineering philosophy that discourages questioning the basis of itself is more like a cult than an engineering discipline. Engineering always involves tradeoffs and tradeoffs require a cost-benefit analysis. The UNIX philosophy outlined by Gancarz is the distillation of many years of cost-benefit analyses and engineering experiences of the members of the UNIX community, not a set of maxims proclaimed by the very first UNIX Zen Master that the rest of the community now follows without question.

But the UNIX community, and software engineering in general, is still relatively young and therefore still has much to learn. A book on the UNIX philosophy should emphasize the practical and adaptable nature of its teachings as a living (and thus changing) design philosophy and not as unquestionable orthodoxy.

Categories
Books

Book: To Say Nothing of the Dog

A fairly funny detective story with time travel and a little chaos theory. The mystery writer is present in the story in the form of the “continnum”, a never-explained phenomenon which attempts to prevent historians who travel back in the past from messing up history too much by arranging for all kinds of doubtful coincidences in order to fix things and solve the crime.

In addition to numerous references to 1930’s mystery authors, like Agatha Christie, there are quite a few references to a 19th century novel called Three Men in a Boat (To Say Nothing of the Dog). Having never read that book, I probably missed a number of nods to that, apparently famous, British comedy by Jerome K. Jerome.

Categories
Books

Book: The Selfish Gene

An engrossing discussion of selfishness and altruism from the point of view of evolutionary theory. Most of the ‘selfishness’ and ‘altruism’ in the book are unconscious evolutionary strategies for individuals and for genes rather than the conscious intentions normally implied by those terms.

Categories
Books

Book: The Extended Phenotype

In the last chapter of The Selfish Gene (added in the second edition) Dawkins summarized The Extended Phenotype, but recommended skipping the chapter and reading the whole book. So that’s what I did, and I was not disappointed. Dawkins considers this book to be his best and Daniel Dennet, in the afterward for the second edition, says it is required reading for modern students of neo-Darwinism.

Categories
Books

Book: The Broken God

Although set in the future, this book is more like high fantasy than sci-fi and technology is basically treated like magic. There are also strong mystical overtones throughout. I do like high fantasy, but that genre has to walk a fine line between earnestness and just pure silliness. I think this book is more of the latter than the former. The book is also told from the point of view of a single character and with 900 pages to get through the single reference point gets old fast, or at least it did for me.

Also, when reading this book I kept remembering David Brin’s brilliant polemic against elitism in Star Wars and our myths in general. I think a similar charge could be leveled at The Broken God.

Categories
Books

Book: Smoke and Mirrors

A devastating account of the war on drugs in the US. If you think the current approach to the war on drugs is basically correct, you need to read this book. And if you don’t, this book will confirm your suspicions.

Categories
Books

Book: Shards of Honor

A good sci-fi adventure with interesting and well-drawn characters. The book leans more towards plot and character development than technological speculation.

Categories
Books

Book: A People’s History of the United States

A riveting account of United States history from the point of view of those not in power. A nice antidote to traditional histories that focus on politics, wars, and “great men”.