Archive for June, 2009

R is for Rocket

Saturday, June 20th, 2009

It’s curious how often the letter “R” seems to come up in science fiction, with its ray guns, robots, rocket ships, relativity drives, red dwarf stars and radiation shields. Consider the case of “R.U.R.”, whose title is an acronym for “Rossum’s Universal Robots”. The very name of Karel Capek’s foundational story suggests that R is for Robot – quite literally. I suspect that Isaac Asimov gave his famous robot detective the name R Daneel in homage to Mr. Capek.

But for me the letter R will always be associated with “R is for Rocket”, an anthology of Ray Bradbury stories which finally convinced my childhood self that science fiction was about far more than ray guns and space ships. The collection’s title was no doubt chosen to draw in the unwary thrill-seeking kid looking only for cheap space opera adventures. But when you actually read the thing, you find that most of the stories are about – gasp – human relationships. Of course any reader of Bradbury knows that the study of people, in all their fascinating fragility and complexity, is his not so secret agenda.

Not that this collection lacked for impact in the traditional SciFi sense. After all, it contains “A Sound of Thunder” – arguably the single most influential work ever written about the potentially pernicious effects of time travel. I love the fact that Mr. Bradbury is still around – eighty nine years old and still going strong.

Looking back on his work, I think my favorite (although it’s hard to choose) is a relatively unknown Bradbury novel that completely reversed the tenets of science fiction – “Dandelion Wine”. It’s about one ordinary summer in a small town in the life of a 12 year old boy (based largely on the author’s own childhood, I am told). Except that everything that happens seems completely magical. There are no objects of fantasy – no robots, aliens, laser weapons or spaceships. But all of the “ordinary” events the boy experiences possess essentially the same transcendent quality we associate with those fantastical things. To give one example among many, the boy refers to his grandfather as a time machine, because the old man can transport his grandson by telling adventures of his own youth, of a time long gone by.

Perhaps R is really for reading, reminiscence, relationships and Ray Bradbury.


Friday, June 19th, 2009

A number of years ago I was visiting my friend Mauricio in Rio de Janeiro. Mauricio had a beautiful house in the neighborhood of Lagoa, looking out over the water.

It happened that Mauricio’s guest room was also his library, and what a library! During my stay I spent happy hours exploring his huge and eclectic assortment of published works.

One book in particular, a small book I had somehow never heard of, was Richard Feynmann’s QED: The Strange Theory of Light and Matter.

I found out later that this book was based on four lectures he gave in 1985 at the University of Auckland, which are now available on-line in streaming video.

It’s actually a perfect example of the kind of P-code I was talking about yesterday, in this case a P-code for discussing quantum field theory in clear and easy to understand lay terms. In this book Feynmann set out to explain, in an intuitive and non-technical way, the theory of Quantum Electrodynamics – the theory (often abbreviated to “QED”) that describes how light interacts with electrons through space and time. Feynmann shared a Nobel prize in Physics in 1965 for helping to make this theory a lot more elegant and powerful.

The title of the book is also a really clever play on words, since Q.E.D. is also shorthand for Quad erat domenstrum, or “that which was to be proved” – the thing mathematicians write at the end of a successful proof of a theorm.

Not being a quantum physicist, or really having any particular knowledge of quantum physics, I picked up this slender volume that night in Mauricio’s guestroom/library with no confidence at all that I would be able to make heads or tails of it. To my surprise, Feynmann’s beautifully clear and simple prose began to take me through a wonderful world I hadn’t known about.

Feynmann also had a meta-message – that science, even very advanced science, does not need to be incomprehensible. With care and thought, even very sophisticated concepts can be explained clearly to a general audience.

And this delightful little book amply proved the point. For example, one thing I understood after reading it, a conundrum that had puzzled me since childhood, is the question of why light always travels along the shortest path between any two points. I had always wondered how light manages to know which is the shortest path.

I mean, what would happen if some light were to guess incorrectly and take the wrong path, not realizing its mistake until it got almost all the way to its destination? Would it then need to excuse itself, go back and try again? And if not, does that mean that light is psychic, able to predict the future?

Feynmann explained that light actually goes in every direction and takes all possible paths, radiating out from any point into all headings at once, somewhat like the ripples that form when you drop a pebble into a pond. But because light has a phase, it turns out that all of these possible paths arrive at any point in space in such a way that their energies cancel out and add up to zero.

All the paths that is, except the one path that happens to be the shortest path. Along just that one path, the phases all add up constructively, rather than destructively. To an observer who doesn’t know what’s really going on, it looks as though the light has only traveled along this one shortest path.

Note that as strange as this description of reality may seem, it actually provides a cause and effect reason for why light travels the way it does, with no need to resort to the phrase “because it just does”.

Things actually get lovelier and more interesting than the way I’m describing them, but why spoil the fun? You should read it for yourself. The important thing is that Feynmann doesn’t just claim these things – he leads you, step by clear and careful step, through the why and how of everything.

And along the way he amply proves his point: That it is indeed possible to make even the most advanced science fun and accessible to a non-expert.


P code

Thursday, June 18th, 2009

Continuing yesterday’s theme of the connection between concepts used in programming and concepts in the larger culture, there is a concept in computer science of a “P code”, which is short for pseudo-code. It comes up because when you’re trying to make a computer language. You could build the language directly from the underlying machine instructions, but that’s often really hard to do, and it kind of wires you in to that particular set of machine instructions.

So what people sometimes do is create a made-up machine, one that doesn’t really exist, but that happens to be really easy to work with, if you’re trying to implement a computer language. Instead of spending months trying to figure out how to turn a very high level description into a very low level set of computer instructions, you find some nice middle ground between high level and low level, and you do the translation in two steps:

If you design the P-code carefully, it turns out that this is much easier than trying to translate in a single step. Of course a lot hinges on how good your P-code is.

There are many other situations in society where the gap between “high level description” and “low level description” is very large, to the point where there is a real problem. For example, most casual political conversations in our country tend to be vastly oversimplified, with all issues painted in black and white and every argument reduced to a kind of pointless jingoism that merely reaffirms one’s pre-formed opinion. I have noticed that in the U.S., it is extremely difficult for a Democrat and a Republican to sustain a political conversation for more than about a minute. After that, each ends up expending most of their effort simply trying to hide the fact that they believe the other to be completely insane.

Similarly, it is very hard for the average U.S. citizen to accurately follow a legal brief or ruling from the bench. Legal language, which sounds superficially like English, is actually a form of technical description – the words and phrases don’t really mean what you might think they mean, if you didn’t know their technical interpretation. And there are similar language problems with medicine, engineering, physics, architecture, psychology, anthropology, biology, literary analysis, and many other fields.

It’s not that people in these fields are trying to be obscure. It’s more that in order to get serious work done in a field, you need to develop a kind of shorthand, so that when you get together with other people who are equally serious and focused, you can get right to work on the problems at hand, without continually needing to start from scratch.

When faced with something like a legal document or a scientific paper, people who are not in a given field generally throw up their hands and give up trying to understand what is going on. The distance between expert knowledge and common knowledge is simply too great. The net result is that most people get shut out of real discussion about a lot of important issues.

But suppose we were to introduce, in every field, a field-appropriate pseudo-code? Not something thrown together dismissively as a sop to the masses, but rather a serious yet accessible way of expressing important concepts in that field, one that was carefully and thoughtfully constructed, with serious intent. To do this properly in any given field it would be necessary to get mindshare from both experts and laypeople, and it would probably be necessary to iterate a few times before the right balance is reached.

It might be productive to make this a general paradigm, to assume that citizens are capable of thoughtful, intelligent discourse, but that the proper scaffolding – an accurate yet accessible language – is needed to bridge the gap between expert knowledge and truly conversant non-expert knowledge.

I think the most important insight to draw from computer science P-code is that the best solution is not likely to be a watered down version of expert knowledge, not merely a “[fill in the blank] For Dummies”. Rather, it is likely to be something uniquely crafted to its purpose, a language of discourse for a particular field which is optimized for a rapid learning curve and a lack of specialized jargon, a common ground that makes sense to both expert and non-expert.

Perhaps if we work seriously at constructing enough field-specific P-codes, we might end up with a general approach to making them, and to knowing whether they are going to be up to the job. And we all might just end up with fewer pointless arguments around the water cooler.


Wednesday, June 17th, 2009

People who program computers have a notion of things being “Object Oriented”, or “O O” in the parlance. This is considered to be a good thing, and yet software systems that use this principle are generally described as “objected oriented programming systems” or OOPS – an acronym which may be tempting fate, to say the least.

The basic notion is borrowed from the physical world – that everything is thought of as an object, whether it be a number, a tree structure, a list of email addresses, or a computer program. You can “talk” to an object by sending it a message, then proceeding to “listen” to what the object has to say for itself. This is admittedly a strangely anthropomorphic way to treat things in a computer.

The real power of this approach comes from the fact that an object can belong to classes of objects that talk or listen in a particular way, and that these classes can be nested one inside the other, which allows you to refer to objects in progressively more specific ways.

We actually do this all the time in the real world. For example, a fruit is a kind of thing to eat, an apple is a particular kind of fruit, and a crabapple is a particular kind of apple. Depending upon what you’re trying to communicate, you might be more or less specific: “I had fruit for desert,” or “I had an apple”, or “I ate a yummy crabapple”.

Similarly, in a computer program, a component is something that you can see in a user interface, a button is a kind of component (one you can click on), and a pop-up button is a kind of button (one that goes away after you click on it). The whole object oriented thing is really a convenient a way of organizing things to make it easier to program, by using concepts that we already understand from real life.

I sometimes wonder whether there are other programming ideas we could borrow from the real world, and how far we could go with those analogies. For example, could we start to think of software objects as being mutual friends? As political rivals? As lovers? In other words, why can’t software objects see each other as objects of affection, or emnity? Or desire?

It might be useful to have a programming object be jealous of another, wishing to wreak revenge. Or for two objects vying to be best friends with the same third object. Presumably this object of their affection would need to decide which of the other two it liked the best – the one with the fancy attributes it just connected with yesterday, or the old reliable object it has been hanging out with since Windows 2000.

We might be able to get ideas about how to organize our programs by looking at the classics – Joyce, Austen, Nobokov, Shakespeare – to understand new and expressive forms of relationships between the things that go on inside a computer program.

For example, a powerful supervisory programming object may have spawned three daughter objects, each of which now claims to be carrying out its commands, but only one of which is truly loyal. Of course the spawning object might not correctly guess which of its daughter objects is the loyal one, and this could have tragic consequences.

Similarly, we could use the evolving relationship between Beatrice and Benedict as a model for error correction, or the path finding techniques of Leopold Bloom to design random walk algorithms, or model message passing protocols after the protocols used by Elizabeth Bennett and Mr. Darcy for, well, message passing.

With a little out of the box thinking, object oriented programming might never again be the same.

N + 1

Tuesday, June 16th, 2009

The other day over dinner my dining companion, a fairly regular reader of this blog, accused me of being an optimist. Well, perhaps “accused” is not the best word. But in the moment I did feel that the characterization was, in a way, limiting. I certainly have my dark side, which I draw upon quite often. For example, my post of five days ago was a recollection of what was certainly a dark and daunting time for me. But I suppose she meant that the general tone of my writing is one of perpetually bouncing back, looking for the light at the end of the tunnel. Or as Winston Churchill once said: “If you’re going through hell, keep going.”

I have a theory about this. Namely, I suspect that people who play with mathematics, in particular those of us who have grown up doing that from childhood, tend to be optimists. After all the central premise of math is that the Universe is a never-ending curiosity shop, with something new and exciting waiting just around the corner, or maybe on that next shelf over there.

There are many different philosophies in this world, religions, sects, ways of trying to metaphysically frame our existence. After all, existence itself is an ultimate mystery. A mystery that includes not just the astonishing fact of the glorious human mind we each possess, but also the human tendency towards playfulness in using that mind. How fortunate we are that playfulness, the sheer joy of exercising our minds and bodies, provides such a supreme source of pleasure. Of course it’s not all that surprising that our species would derive pleasure from a quality which so improves its odds of survival. That’s just common sense.

But mathematical playfulness in particular has a uniquely charming quality. Even as simple an expression as N + 1 suggests a world of possibilities. I think this quality is linked to that fact that it doesn’t matter what N is – it could be five or 33 or 1048577. When I say “N + 1”, or “N × N” or NN, I’m not thinking about the number itself. Rather I’m thinking about a property of the Universe, a simple way to discover things about all numbers everywhere.

It’s like being in a house where every door can lead to a new room you’ve never visited. And each of those rooms contains other doors, so you can wander and explore as long as you want, without ever running out of new adventures. As a framing device for existence, the mindset that goes along with this process has certain advantages. The joy that comes from mathematical exploration leads to a very real experience of each new day as a fresh possibility for adventure. And yes, I think the general sense of this joy, of having options to explore, does indeed have a way of seeping into everything else.

Which, I guess, makes me an optimist. Opto ergo optimum


Monday, June 15th, 2009

Mmmm… That is the feeling in my mind,
When I think of you, a spiritual feeling,

When I am lost, to call me back to healing
The nearest thing I have to faith. I find

That when I think upon your lovely face
All sad confusion melts away like rain

Mmmm… this feeling soothes away my pain
The nearest I will ever be to grace.

How strange for me who’s lived without belief
And never had much use for church or god

That none of this should come across as odd
To find in you my anchor and my reef

      You give meaning to my very world around
      Mmmm… I think of you and I am found

L Systems

Sunday, June 14th, 2009

There was a time when people believed that a lot of different complex systems could be reduced to very simple descriptions, if only you could come up with the right mathematical key. Through various eras there have been tantalizing suggestions that this might work. In the 1960s and 1970s this concept was epitomized by catastrophe theory, originated by the french mathematician René Thom, which people hoped would be able to predict everything from wars to stock market crashes, by modeling them as simple shapes in higher dimensions.

In the 1980s computer graphics got its own version of this phenomenon in the form of L Systems, short for “Lindenmayer Systems”, named for the person who first came up with them. The basic idea is that you keep making grammatical substitutions to simple strings of symbols, generally replacing short sequences with longer sequences. If you think of each little sequence as a physical shape, like a tree branch, it becomes easy to build really cool fractal shapes that have some of the quality of real plants:

Using this general technique you can build up some really lovely computer graphic forms:

This is very exciting, until you realize that you can only use such a technique to produce variants on a narrow range of forms. I can use L-Systems to produce trees, but not elephants or rocks or mountains. If I want to get mountains, I might use a different set of techniques – generally known as fractal subdivision – originally developed by Benoit Mandelbrot and implemented in various ways by Richard Voss and others (including me, as it happens):

L-Systems can produce many different kinds of plants, but they more or less only produce different kinds of plants, whereas the fractal subdivision techniques only produce all different kinds of mountain terrains. None of these things really do what they at first seem – to create a robust recipe for dehydrated diversity – a few simple equations that can generate the entire Universe.

In a sense, the seeming ability to get something from nothing – to produce the endless variety of forms found in nature using only a few simple formulas – is an illusion, a kind of intellectual Ponzi scheme. For a while it seems as though you can generate anything using only some simple set of rules, but soon you hit a wall, and then you realize you need more and more rules, and different rules.

Natural complexity seems to defeat all human attempts to oversimplify and tame it. And maybe that’s a good thing.

K – 12

Saturday, June 13th, 2009

In the U.S. when we talk about children we throw around the phrase “K – 12”, meaning “Kindergarten through twelfth grade”, the school years that start roughly at the age of five, the average age at which kids enter Kindergarten, through eighteen, the average age at which they graduate high school. It’s a useful and very practical term, but like many useful and practical terms it is also a two edge sword. When you put a label on something, there is a tendency for the label to reduce the thing it is trying to describe, and something essential can get lost in that reduction.

Children in this age range constitute an extremely large segment of our population. To those of us who are now adults, they are basically the next edition of us. Rightly, we want each of those children to have the best possible shot at “Life, Liberty and the Pursuit of Happiness”, as our Declaration of Independence phrases it. And so we have put into place an elaborate institutional structure, a kind of educational pipeline, to guide their young minds through into adulthood.

We grownups have all gone through the process, and usually we don’t think much about it, except perhaps in a pro forma way. In our memory of those years we generally tend to block out those parts of the experience that don’t fit the model. But every once in a while, actual memories break through, pushing aside any conveniently pastoral Potemkin recollections.

For example, my real memories of middle school (grades 6-8) – not the ones I generally pretend to have – are of complete terror and chaos. I spent a large chunk of those years in fear of getting beat up. To put it bluntly, from the point of view of a child who was a little younger and a little smaller, the school was a complete jungle. Big kids lorded over little kids, and there was a distinct pecking order, which for boys was determined by physical might. I was one of those pesky little kids who was too smart for his own good, who didn’t always have enough sense to keep my mouth shut, and fairly often I would pay the price.

What strikes me now about this situation is that we, the children, all understood how completely irrelevant were the adults charged with supervising us. It was a bit like those old “Peanuts” cartoons in which the adult voices heard off screen are not even comprehensible. Yes, every once in a while somebody would get hauled into the Assistant Principal’s office, but those actions didn’t seem to correlate to what was actually happening on the ground, so to speak.

For one thing, there was a strict code of honor that was understood by all children – I suspect on an instinctive level. Simply put, you did not rat out other kids to the grown-ups, even if you got beat up. After all, those other kids were your peers – you lived with them every day. And you already knew that the grownups had no idea what was going on, what any of us were really going through.

This reign of terror in my life lasted for about three years or so, roughly from the time kids around me started going through puberty until the year I myself suddenly shot up in height and stopped being a natural target. The same odd activities that had made me stand out and gotten me into trouble in middle school – like spending large chunks of the day reading through the Encyclopedia – were now perfectly acceptable, placing me in a well understood and even respected category within the high school social structure.

I sometimes think that our entire conception of K – 12, our view of the young among us as little plants to systematically nurture into bigger plants – like some sort of human hydroponic assembly line – is deeply flawed, but not because of some failure of educational theory. Rather because the entire institutional structure does not deal first and foremost with the actual people themselves, does not even begin to respect – or even acknowledge – the immense pressures and terrors that they are dealing with every day.

Some years ago I found myself back at my old middle school, for the first time in many years, to see a play that my niece’s class was putting on. During intermission I was hanging out with some of my parents’ friends outside the auditorium. Since they knew I had gone to this same school, they asked me whether being here brought back any memories. “Yes,” I said, as the memories suddenly came flooding back. I pointed to the boy’s restroom down the hall. “I got beat up in there.” Then I pointed in the direction of the science wing. “I also got beat up in that hallway.” One by one I pointed out the various locations where I had been met with violence, each time and place now crystal clear in my mind.

My parents’ friends seemed appalled. “Don’t you have any happy memories?” they asked. I thought about this for a few moments, and then I nodded, glad to have something positive to report. “Yes, one. Inside the auditorium, by the stage door on the left side, just where it connects to the music practice rooms. There was one time, in sixth grade, when I almost got beat up right there.”

I continued, now smiling at the happy memory. “But I didn’t.”


Friday, June 12th, 2009

My dad’s middle name is J. I think it might officially be “Jay”, but I have never once seen it written out like that. When I was a child I was fascinated and quite impressed that he had white envelopes printed up with a return address that started “Dr. Seymour J Perlin”. There was always a long row of these envelopes, in the bottom drawer of his old wooden desk. Throughout my childhood I was very pleased by the fact that my father had such a short and mysterious middle name – in my young mind it added to his already considerable mystique.

I was somewhat more ambivalent about my own middle name. To provide some context, my brother is two years older, and therefore was always the leader – the one who had read the books I wasn’t quite ready for, who had the record albums by music groups I had not quite yet heard of, as well as all of the other wondrous qualities conferred upon older siblings. For example, Mark’s favorite color was blue. When I was five or six years old this made me sad, because it meant that wonderful color was already spoken for. At various times I tried out red, or green, and a few others, but none of them ever felt right. What I really wanted was blue. But I had arrived too late on the scene, and blue, alas, was already taken.

The same goes for the number five – Mark’s favorite number. He even put it up on his bedroom door, as a big cutout digit – in blue, if I recall correctly. I pretended to be satisfied with the number three – a clear also-ran, compared with five – but I suspect that I fooled no one.

Mark’s middle name is “William” – obviously a big win all around. One of those noble names they give to English princes, it also suggests William Tell. In my mind I could practically see my brother, a heroic figure larger than life, shooting that apple off somebody’s head, while Rossini’s famous overture played in the background. Of course I had no idea at the time that the “William Tell Overture” was by Rossini – I just knew it as the theme music to the “Lone Ranger” – which made it even cooler.

I, on the other hand, have the middle name “H”. I’m still not sure exactly what my parents were thinking, but there it is, on my official birth documents. It’s not even a letter you can finesse into a full word, like J into Jay. Just a single orphan letter, sitting all alone. Some years ago I got into trouble down in Rio de Janeiro because the government official who was supposed to extend the visa on my passport refused to believe that anybody could have legally entered their lovely country with a single letter for a middle name. He demanded to know my full middle name, so that I would not be declared an illegal undesirable. It took quite a bit of persuading (and possibly a bribe) on the part of my hosts before the man would relent and stamp my obviously suspect visa application.

Although there was a time, when I was around five, that I thought I had an actual middle name. Specifically, I believed my middle name was “Horowitz”. I think of this as my “Horowitz” period – the year during which my brother took to referring to me as “Kenny Horowitz Perlin”. His logic was impeccable: Apparently there was a boy in his second grade class at school named “Mark Horowitz”. Employing the logic of parallels (my brother was very good at logic), he declared that since a “Mark Perlin” had been followed by a “Kenny Perlin”, a “Mark Horowitz” must therefore surely imply a “Kenny Horowitz”.

I, being only five years old, felt in no position to argue.

I did not realize

Thursday, June 11th, 2009

I did not realize
When first I saw the eyeglass case
Lying there, between rows G and H
That these were to be the last moments
Where trust was understood

If the woman had but turned
When I had asked about the case, perhaps then
The crisis would have been diverted,
The car swerved away, the falling boulder missed
And we never would have known

For if I had but known
I would have savored those few seconds
Inhaled their essence, remembered each one
But why should I have thought that everything
Would in a moment change?

Trust is a delicate thing
Its beauty held aloft on angel’s wings
But trust can be broken by even a word
And once broken, it merely lies there, and defies you
To put back the pieces

These lines are ragged, yes I know
Not the usual thing, something else
Something you might have written, in that other time
That time long ago time, not that long ago, or shall we say
Once upon a time

For had the woman turned
When I asked about the case, perhaps then
The crisis would have been averted,
The car swerved away, the falling boulder missed
And we never would have known

How close we had come
To disaster unforetold, to trust destroyed
Its broken wings fluttering feebly, but alas
The car did not swerve away, the boulder hit its mark
And we are undone