Thursday, December 31, 2009

Happy New Reading Year!

Today, a friend of mine wrote in his Facebook status that one of his resolutions for 2010 was to "read a book." I have not determined yet, although I intend to clarify this, whether this was a facetious comment, or whether he meant that his work and life have been so hectic in 2009 that he could not find the time to read a book. I think it may well be the latter, unfortunately. As someone said, it's better to be a pessimist because you're rarely disappointed.

His post led me to two thoughts. One is that I have read more books in 2009 than probably in several preceding years. The second one is that my Kindle has helped me read more.

On the first point, those who know that I retired in May 2009 will of course understand how suddenly the necessary time materialized to enable me to read more. I'm no longer filling personnel appraisals that no one will care about, or redoing slides three times because the boss at level N+1 is afraid that the current version isn't right (and is too long) for level N+2, etc. You can't create time, but when circumstances permit, you can stop wasting it.

My retirement present was a Kindle 2, with which I rapidly discovered, stingy as I am, that there was great value to be obtained because Amazon has many classics, not longer copyrighted, available for download for free. Just a few days ago, I found out that this also now extends to French classics in the original language, although I have not taken advantage of this yet. Actually, I would also like to find some Spanish or German texts, so that I can improve (for the former) or try to recover (for the latter) my knowledge of these languages.

So here's my May-December reading list:
  • Treasure Island, by Robert Louis Stevenson
  • Frankenstein, by Mary Shelley
  • The Adventures of Sherlock Holmes, by Sir Arthur Conan Doyle
  • The Return of Sherlock Holmes, ibid., because one can never read too many good short stories
  • The Legend of Sleepy Hollow, by Washington Irving
  • Pride and Prejudice by Jane Austen (what a delight!)
  • The Autobiography of Benjamin Franklin (they don't make people like this any more)
  • Travels in the United States by William Priest (not as good as Alexis de Tocqueville, but still interesting)
  • The Legends of King Arthur (the version by Sir James Knowles)
  • The Notebooks of Leonardo da Vinci (I have only read a small portion of this text, which does not contain the drawings, and is very heavily annotated, making it a rather more scholarly exercise than I was intending
  • A Tramp Abroad, Vol. 1, by Mark Twain
Currently, I am reading Gulliver's Travels by Jonathan Swift. Yes, it is about very small people and very big people and very weird people, but it is also a very smart, and very daring for the time, criticism of the politics and mores of Europe. The first focus of these imaginary travels to Lilliput and Brobdingnag and other fantasy lands is to convey the idea that everything is relative. As if that wasn't provocative enough, Swift then proceeds to let his foreign characters express incredulity and shock at what Gulliver tells them of the common practices of Europeans. For example, explaining the concept of war to the Houyhnhnms, who don't know it, he writes, "Neither are any wars so furious and bloody, or of so long a continuance, as those occasioned by difference in opinion, especially if it be in things indifferent." Which is eerily reminiscent of Wallace Sayre's saying, which I have been fond of repeating to professors I know, at least when no weapon other than their repartee is available, that “The politics of the university are so intense because the stakes are so low.” Except that Swift was being more daring by attributing this behavior to people who did have the power to do harm to him. And he wasn't putting his potential defenders on his side by adding, a few pages later, that "there was a society of men among us, bred up from their youth in the art of proving, by words multiplied for the purpose, that white is black, and black is white, according as they are paid." No modern lawyer joke really approaches this level of sarcasm, and the following pages just get worse, of if your prefer, better.

I have also downloaded, and intend to read next:
  • The Picture of Dorian Gray by Oscar Wilde
  • The Prince by Machiavelli
  • The War of the Worlds by H.G. Wells (which I only read in French translation several decades ago)
I have downloaded samples, for later purchase, of:
  • 30 novels (!) by Jules Verne, in French, in a single file. I'll have to pace myself. I do own an illustrated print edition of Vingt mille lieues sous les mers, so I can skip the electronic version of that one, but I never read most of the other books.
  • The Spell, by Alan Hollinghurst. I am very fond of his other two books The Swimming Pool Library and The Line of Beauty, which I read just a few years ago in print.
  • In the same vein is At Swim, Two Boys by Jamie O'Neill, which I know from the sample will be hard to read because of the Irish dialect, which is faithfully reproduced, and also because of the emotions that will swell until the fatal climax of the book (yes, I've read the synopsis).
I'm not sure there is a conclusion to this chronicle of my reading progress in 2009 and plans for 2010, but here are two observations. First, e-book readers, which some understandably decry for the loss of the special feel and smell of paper books, can actually help you read more, simply because of their convenience. I can carry a large number of books at one time, switch from one to another, keep my place in each book, look up a rare word in the Oxford dictionary on the fly, all within a small box about as long and wide, and half as thick, as a regular book. Secondly, there is a lot of literature out there that can be had for free (only on an e-book reader), and it is often the best literature ever written. As for modern books, they do cost some money, but much less that a hardcover book, often less than even a paperback, and they download in about thirty seconds. So even though I still like to browse in bookstores, this is at least an additional option to get back in touch with the power of words, expertly manipulated by the best writers in the world, dead or alive.

Sunday, December 20, 2009

Mathematics and Computation

I have a whole list of things I want to do over the holidays, but I finally managed to put together something that had been bugging me for a while, which is an "illustration and defense" of recursive programming, at least as long as it is done intelligently by considering the mathematical properties of the problem being solved.

The issue itself is not new, nor is my solution to its traditional example, the Fibonacci series. But I have attempted to create a clear, end-to-end explanation of the whole issue and its resolution, which I did not find elsewhere.

To do this, I experimented (as far as I am concerned, at least) with the knol format. Knols are Google's answer to Wikipedia -- a collection of elements of knowledge that are published by specific authors, and kept under their guardianship, rather than being a collective article where the individual contributions tend to get lost, and a team of editors may need to police the contributions.

I am not taking sides in the knol-vs.-Wikipedia debate here, let alone in the higher level discussion about "wisdom of experts" vs. "wisdom of crowds." Enough ink has been used on this, including by myself in a past Cutter Consortium e-update entitled "Control vs. Collaboration: Web 2.0 Meets Knowledge Management." But I wanted to see what it was like to author a knol, and I am rather impressed with the functionality of the application. In terms of ease of use, it's not unlike Blogger, as a matter of fact, but the knol editor offers additional functionality, such as an equation editor, which I really needed for this particular paper.

Which leads me to the second thing I had to practice, namely LaTeX, the mathematical typesetting language derived from my Stanford mentor Don Knuth's TeX language. I've used LaTeX several times in my life, most recently to compose equations in Schlumberger's internal Wikipedia. The equation editor for knols uses LaTeX too, so I had to relearn some features in order to display the equations I needed for my article.

And finally, I really wanted to program the various algorithms and run them, both to measure the time they took to execute in order to illustrate my points about performance, and also for the sheer fun of programming. I suppose that the use of "fun" and "programming" in the same sentence makes me a certifiable geek after all. So I quickly taught myself Python, which is not very hard when you have used several other languages, and installed a Python interpreter on my laptop. While I have only scratched the surface of what Python can do (I have not used its most complex data structures, or its object-oriented features) I am rather impressed by the elegance of the language. The almost austere syntax (no semicolons everywhere, no braces all over like in C, no "begin/end" pairs like in Pascal) seems to actually decrease the chances of making errors: even though I wrote extremely small programs for the Fibonacci calculations, each of them was correct on the first try, which was unbelievable given that I had not programmed, even as an amateur, in over 20 years.

Another reason I like Python is that it implements an idea that Bertrand Meyer and I had when we wrote our French textbook on programming methods over 30 years ago. In the book, we used an invented algorithm description language, which was a sort of Algol or Pascal in which we indicated blocks of code through indentation. To clarify the levels of indentation, we drew vertical lines to the left of each indented block of code instead of using keywords like "begin ... end" or curly braces (my friend Tahar tells me that when he was learning computer science in Algiers, just a few years ago, his professor used our textbook and was very adamant about the use of these vertical lines in students' homework). So it was refreshingly familiar to me to discover that Python also uses indentation meaningfully, to convey the structure of the program, thus getting rid of other forms of block delimiters.

So, knol + LaTeX + Python = the finished product, which I just published tonight, and which you can find here. Let me know what you think, if you are so inclined.

Monday, December 7, 2009

Religious Tolerance on the Runway

Dear American Airlines,

I would like to commend the flight attendant who announced "Welcome to Los Angeles and Happy Holidays" when our full plane, flight 427 from Austin, landed at LAX tonight. It's nice that a professional service person in the U.S. recognizes that we live in a multi-cultural, multi-confessional society.

And to the loud lady in seat 6B, accompanying a girls soccer team, apart from the fact that you should definitely find a better hairdresser or stop pretending you're blonde, because yours is a color not found in nature, listen up: I heard your nasty comment about "Happy Holidays" vs. "Merry Christmas." I also heard that, when your companion in 6A asked you what you had said, you didn't have the guts to explain yourself, but just muttered "oh, nothing." Look, you cowardly bigot: last time I read the Constitution, the First Amendment included the so-called anti-establishment clause. In other words, your religion doesn't legally have standing above others, or above the absence thereof. This plane probably contained Muslims, Hindus, Buddhists, Jews, Christians (or people like you who pretend to be Christians), and at least one atheist (that would be the guy in 6F, me). The American Airlines flight attendant welcome respected them all by wishing "happy holidays." Your ignorant comment did not.

You should be a role model to the teenage girls you accompanied. Instead, you're a disgrace to your own country's Founding Fathers.

There.