Some bizarre thoughts on the nature of programming...

Peter Smet peter.smet at flinders.edu.au
Tue Jun 22 20:52:05 UTC 1999


Since this list is pretty diverse and the topics are wide ranging, I'd like
to throw up some thoughts that have nothing whatsoever to do with Squeak.

Programming is fundamentally wrong. It asssumes some kind of central
controller organizing a sequence of events to get the correct outcome. OO
helps a little in this regard, but not much. OO helps to decentralize some
of the behaviour. The reason programming is fundamentally wrong is
exemplified in the following scene:

<Scene I> Two giraffes conversing on the Serengeti

Bob: God, I am so pissed off!
Stretch: What is the problem?
Bob: It's this new neck architecture - It's just not working out. The
deltoid muscles are connected to the diopter structure and the two just keep
interfering with each other. At random times my entire neck just flops over,
and yesterday Guzzie had to kickstart me...
Stretch: Well, what are you going to do?
Bob: What any self-respecting Giraffe with a degree in Computer Science
would do..Throw myself back into the primordial slime and start over again
with a  fundamentally better architecture....

We leave Bob and Stretch there, although it must be said that Bob came to
regret his decision when he later evolved into a python.

My point is that somehow complex organisms never had to abandon their
previous building blocks, and managed to evolve layer after layer of
complexity. How did they do this? Evolution is the ultimate component reuse.
What makes biological things so different from e-things? Can we mimic what
evolution does in some sense?

I don't have any simple answers, but let me throw up some scenarios. The
garbage collector, and a disk defragmenter. These are good examples of
central control. Evolution would shun these two designs and throw them into
the vat of useless mutations. What would evolution do here? Well, a slightly
unstable programmer might say, why not take OO to its logical extreme and
make every memory cell (or disk fragment) responsible for it's own
behaviour. Each disk fragment constantly looks at the fragments around it
(and only those fragments) and has only one (utterly selfish) behaviour. It
moves towards fragments that resemble it. In the case of the memory cell,
it's behaviour is to move to cells that point to it. Memory cells with no
friends simply die. The funny thing is, these utterly simple, stupid and
selfish behaviours will bring about exactly those properties we desire.

<Scene II>A computer scientist in the tropical Amazon Basin region.

Flabber: My God, check out this amazing termites nest! Layered tunnels,
different compartment structures, it's even angled right to reflect the
sun's heat perfectly. And the discipline of all the different casts and the
way they cooperate....

Flabber spends the next 10 years of his life fruitlessly attempting to
locate the 'architect ant' that must surely coordinate the nest building. At
least he gets funding from the NIH.

Slime moulds, schooling fish, mandelbrot sets and bird's nests are all great
examples of trickery. They are not complex at all. Even the ultimate jewel,
the brain, may very consitute only a facade of complexity.

To be continued....

Peter





More information about the Squeak-dev mailing list