November 2007 Archives

Navel Ratings

| No Comments | No TrackBacks

Mr Joseph Mouratt, owner of the Gallipoli Restaurant in Bishopsgate, City, explained: 'I have discovered that City gentlemen with their wives have different views about how near a belly dancer may dance. I have instructed the eleven dancers — five men and six women — how to behave. If there is a titled dignitary in the room they dance only on the stage.' Mr Mouratt added: 'If there are City sheriffs, aldermen or councillors they may dance within four feet. Bankers may be approached at two feet and insurance executives at one foot.'
From the Daily Mirror,
quoted in This England 1965-1968: Selections from the 'This England' column of the 'New Statesman', edited by Audrey Hilton.

A Different Man

| No Comments | No TrackBacks

Now, if you are thinking along the same lines as Heraclitus ['You can't step into the same river twice'], you might say, 'Aha! But the body is never the same. Body cells are constantly dying off and being replaced, or just dying.' I once had a friend who wanted to use this as a central plank in his petition for divorce, on the grounds that he was no longer the same person as the one who married his wife several years ago. A little philosophy is a dangerous thing.
From Mark Rowlands's book The Philosopher at the End of the Universe: Philosophy Explained through Science Fiction Films.

No × in Sex

| No Comments | No TrackBacks

For generations of mathematicians, prime numbers have always had an almost mystical appeal. "I even knew of a mathematician who slept with his wife only on prime-numbered days," Graham [Ronald Graham, friend of Erdős] said. "It was pretty good early in the month — two, three, five, seven — but got tough toward the end, when the primes are thinner, nineteen, twenty-three, then a big gap till twenty-nine. But this guy was seriously nuts. He's now serving twenty years in the Oregon State Penitentiary for kidnapping and attempted murder."
From The Man Who Loved Only Numbers, Paul Hoffman's biography of Paul Erdős.

I've put up the Excelsior SF generator documentation as a new article in the LiteratePrograms Wiki. To quote the wiki's Welcome page:

LiteratePrograms is a unique wiki where every article is simultaneously a document and a piece of code that you can view, download, compile, and run by simply using the "download code" tab at the top of every article. See Insertion sort (C) for a simple example. To date we have 435 articles.

Based on Donald Knuth's concept of literate programming, LiteratePrograms is a collection of code samples displayed in an easy-to-read way, collaboratively edited and debugged, and all released under the liberal MIT/X11 License (see Copyrights) so that anyone can use our code and text for any purpose.

The wiki lists programs in 67 languages.

For more on Literate Programming, see This site starts by quoting Donald Knuth's Literate Programming (1984), from Literate Programming, CSLI, 1992, page 99:

I believe that the time is ripe for significantly better documentation of programs, and that we can best achieve this by considering programs to be works of literature. Hence, my title: "Literate Programming."

Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.

The practitioner of literate programming can be regarded as an essayist, whose main concern is with exposition and excellence of style. Such an author, with thesaurus in hand, chooses the names of variables carefully and explains what each variable means. He or she strives for a program that is comprehensible because its concepts have been introduced in an order that is best for human understanding, using a mixture of formal and informal methods that reinforce each other.

Q: What's red and invisible?
A: No tomatoes!

As a follow-up to the  science-fiction plot-generating spreadsheet I blogged in September, here's a "real-world" example that came up in some consultancy I've been doing with my Excelsior spreadsheet generator.

The spreadsheet, and an explanation, is linked from In it, column A contains a yellow table of strings; only those starting with "X" are to be put into the yellow table in column C.

Gaps are closed up, so that, for example, the second string placed in column C is one cell below the first.

There's an intermediate table in column B, in which I calculate the positions in column A of the strings to be placed in column C. This "index table" uses INDEX and OFFSET. Essentially, its first element is the position of the first string we want to keep. Its second element is the position of the first string beyond that. And so on. The calculation is complicated by the need to handle non-matches and boundary conditions, but the basic idea is fairly simple. The key is to think in terms of recursing over tables, as though they were functions in a "normal" programming language. From discussions such as Limit a Listbox in Dick Kusleika's Daily Dose of Excel blog, it seems doing this directly in Excel can be quite difficult.

The SF generator also used recursion, to work its way through the network of plot events. 

Who Needs Google?

| No Comments | No TrackBacks

In early spring or late summer we'd cycle out of the town and set fire to the moors. The moors were either withered and pale after winter, like an old man's beard, or tinder-dry at the end of October. We called it tatching — collecting fire with a handful of dead grass, and setting a new fire a couple of yards away. That way it spread. A contour of flames could stretch for two or three miles, creeping forward, leaving a black and smoking landscape behind, like the surface of a planet too close to the sun. There was no real danger. The fire always came to a stop at the first road or the edge of a reservoir. But the fire brigade arrived all the same, to do battle with the advancing ranks of flames. I haven't seen the moors on fire for fifteen years. It isn't the climate, it's the kids. They can't go messing about on the hills because their backsides are welded to comfy chairs and their eyes are glued to computer screens and video games. Major tree surgery wouldn't shift them from their seats, they're grafted on for good. They say they're surfing the Web, that they're cruising the Information Superhighway. But they're not. They're garbage pickers, stumbling around inside a cosmic dustbin.
From the novel Little Green Man by Simon Armitage.

About this Archive

This page is an archive of entries from November 2007 listed from newest to oldest.

September 2007 is the previous archive.

December 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.