Wednesday 24 May 2000

Tree

Pic of the day: Did you know that we share a heap of genes with trees? In fact, the green chlorophyll in their leaves is said to be suspiciously similar to the red haemoglobin in our own blood.

Re-usable code

One of the supposed nice thing about CSS, the layout "language" I am trying to learn, is the re-use. Instead of having to define the layout in each actual diary entry, I can just refer to the definition I've already made, and which is now in a separate style sheet. (It still does not work quite as expected in Navigator, btw. I don't get a white background, like I get in Opera and IE. This may be just as well, though, since the dark background looked pretty ugly in Netscape.)

Anyway, I'm not going to write a whole diary about writing my diary. Instead, I have thought. About re-usable code.

I'm looking these days at a report which among other things mentions the old debt collection system I made more than ten years ago, in Dataflex. The report dryly comments that Dataflex doesn't much support reusable code. This is largely true. In particular, it does not support local variables on a lower level than each program. Pretty far from the object oriented standards of today.

You would think that with the progress that must have happened in the field of programming during the last ten years, program code today must surely be smaller, faster, more efficient and above all less faulty. To quote a fellow geek: "Tee hee hee." I think that sums it up nicely. So much for progress... :) On the bright side, computer programs today tend to be very nice looking compared to their counterparts ten years ago.

***

Now we humans were not the first to invent reusable code. All life is coded in the same basic programming language, from bacteria to trees and humans. And not only that. We share a lot of our genetic code with most of these. In particular with most organisms with a cell nucleus. The bacteria are somewhat less similar, but there are some systems that are easily recognized. But such closely related species as flies and worms use strikingly similar pieces of DNA. For instance, the genes that lead the formation of various body parts in the embryo. These so called "homeobox" genes can easily be recognized from banana flies to humans. They help create different body parts, of course. We don't have antennae, and somewhat fewer legs for instance. But the genes are virtually the same. Reusable code.

A more sinister example is bacteria that are resistant to antibiotics. They can meet up with another bacteria that is resistant to another brand, and exchange genes. Then the two of them happily drift on their way, each resistant to both types. This is supposedly one reason why we should not stop taking the antibiotics when we start to feel better, unless we have developed an allergy of course. If we leave some of the bacteria stunted but alive, they will be harder to reach the next time around.

Some scientists believe that there have been times in the past when small parasites, perhaps a virus, have cut and pasted genes between species. Some genes seem to pop up in species so remote that there is no reason why their common ancestors should have these genes. Perhaps some of these genes have been in the public domain, so to speak: Attached to some kind of wandering parasite, which then left them inside the genome of some of its hosts.

It is strange, isn't it, how for instance the concept of wings have appeared again and again? Now in all honesty, the wings of insects seem to develop very differently from those of birds, bats and the flying reptiles of old. Even so ... it's strange to see how wave after wave of creatures have taken to the air. And now it's our turn, but our wings are made of metal. We are not reusing the biological code, but we are using the concept. Without flying animals, would we ever have thought about making flying machines?

***

Another type of reusable code that has been much on my mind is words. Words, or rather the concepts they represent, seem to form our thought. We build our world with words like one of those sets of toys. Small plastic bricks that can be put together to make various things: Houses, cars, whatever. The pieces you have at your disposal limits and shapes the stuff you choose to build. Is language doing the same to us? I think so.

There are concepts in English that I find hard to express precisely in Norwegian, my mother tongue, because I lack the words. Sometimes it is the other way around. And looking at a very different language, Finnish, has shown me how non-obvious language is. They often have totally different ways of forming thoughts, even though they live in virtually the same culture as us. Translating between such different languages is very hard. You cannot translate word for word ... it is simply not possible. Often it is hard enough to translate the meaning.

I guess this is a fine place to point out that holy scriptures, which some people now take literally, are translated from such languages that are very different from our own. I think it is always a good idea to read several different translations before taking things literally. It could save some embarassment later.

But don't discount wise words just because they happen to be a few thousand years old. Remember, reusable code is supposed to be a good thing. :) As some guy said a couple thousand years ago: "Test everything. Hold on to the good. Avoid every kind of evil." Now that's a code to re-use for any intelligent designer!


Yesterday <-- This month --> Tomorrow?
One year ago

Visit the Diary Farm for the older diaries I've put out to pasture.


I welcome e-mail: itlandm@netcom.no
Back to my home page.