Why learning R code makes me feel like a megapode

Excerpt: Last Chance To See by Douglas Adams (Chapter 2: Here Be Chickens)

In the afternoon, accompanied by Kiri and a guard, we went off to explore. We found no dragons, but as we thrashed recklessly through the undergrowth, we encountered instead a bird, and it was one that I felt very much at home with.

I have a well-deserved reputation for being something of a gadget freak, and am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand. Ten seconds, I tell myself, is ten seconds. Time is valuable and ten seconds’ worth of it is well worth the investment of a day’s happy activity working out a way to save it.

The bird we came across was called a megapode, and it has a very similar outlook on life.

It looks a little like a lean, sprightly chicken, though it has the advantage over chickens that it can fly, if a little heavily, and is therefore better able to escape from dragons, which can only fly in fairy tales, and in some of the nightmares with which I was plagued while trying to sleep on Komodo.

The important thing is that the megapode has worked out a wonderful labour-saving device for itself. The labour it wishes to save is the time-consuming activity of sitting on its nest all day incubating its eggs, when it would be out and about doing things.

I have to say at this point that we didn’t actually come across the bird itself, though we thought we glimpsed one scuttling through the undergrowth. We did, however, come across its labour-saving device, which is something that it’s hard to miss. It was a conical mound of thickly packed earth and rotting vegetation, about six feet high and six feet wide at its base. In fact, it was considerably higher than it appeared because the mound would have been built on a hollow in the ground, which itself would have been about three feet deep.

I’ve just spent a cheerful hour of my time writing a program on my computer that will tell me instantly what the volume of the mound was. It’s a very neat and sexy program with all sorts of pop-up menus and things, and the advantage of doing it the way I have is that on any future occasion on which I need to know the volume of a megapode nest, given its basic dimensions, my computer will give the answer in less than a second, which is a wonderful saving of time. The downside, I suppose, is that I cannot conceive of any future occasion that I am likely to need to know the volume of a megapode nest, but no matter: the volume of this mound is a little over nine cubic yards.

What the mound is is an automatic incubator. The heat generated by the chemical reactions of the rotting vegetation keeps the eggs that are buried deep inside it warm – and not merely warm. By judicious additions or subtractions of material from the mound, the megapode is able to keep it at the precise temperature that the eggs require in order to incubate it properly.

So all the megapode has to do to incubate its eggs is merely to dig three cubic yards of earth out of the ground, fill it with three cubic yards of rotting vegetation, collect a further six cubic yards of vegetation, build it into a mound, and then continually monitor the heat it is producing and run about adding bits or taking bits away.

And thus it saves itself all the bother of sitting on its eggs from time to time.

(And of calculating univariate stats with a piece of paper and a pencil!)

This entry was posted in Reflections. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s