Wednesday 23 April 2014

Natural selection

Been thinking on the points of contact between the evolution of an animal (or any other life form for that matter) and that of a large computer program.

The program has to sell and to earn money if it is going to survive: I don't suppose the likes of Microsoft get terribly sentimental about programs which do not generate revenue, perhaps because some better game has arrived on the block. So not selling is the program's form of natural selection.

Maybe the many copies of a program relate to the many individuals which make up a species. But the dynamics are rather different: individual copies of the program might be adapted to their environment, to their use, a bit, but for a new copy you have, or at least you are supposed to go back to the mother ship, back to Microsoft or whoever and take whatever their master copy of the program has become since you last bought a copy - hopefully not incompatible, but certainly minus all the local, environmental changes that might have been made. Evolution is confined to base camp with none of that kind of messing about out on the mountain, or out on the moor, as the case may be.

One upon a time, the program was designed to do some particular task, to meet some particular market need, possibly even some user need. At this stage one might have a reasonably clean design, with a nice hierarchical structure and with a nice carving up of the large number of jobs to be done into a rather smaller number of functions (is VB speak packages?), rather in the way that a mammal might assign all kinds of jobs to the liver. But then the program, few programs being built for one-time user, will evolve over time. There will be maintenance work and construction work. There will be major releases and minor releases.

So there will be programmers beavering away down at the coal face, inventing features for the program which are interesting or elegant from their point of view. All this beavering is quite hard for the marketing chaps to control and it probably best if they do not squeeze all the free-lancing out of the system; you need a bit of random activity down below to make up for the mistakes and oversights up above. Of course, in the case of the animal, the random activity down below is all you have to go on, unless you admit the deity up above. And even if you do, he has good days and bad days too, with some of his design work being pretty sloppy.

Sometimes these features make it to the published product but do not really catch on. But perhaps they linger and perhaps one day that rather dormant feature suddenly acquires a new lease of life as part of something else which really does catch on.

Sometimes they linger more or less dormant but get inadvertently trashed by some other unrelated change, so when you do come to use it is no longer in working order.

At other times again their vestiges linger on, with no-one empowered or bothered enough to excise them like an appendix, in our case another vestige of times past. Other traces of the past can be found in the names of variables in the program, the schemes for which tend to evolve over time. I don't think that serious companies allow their programmers to do things like name their variables after roses or the tunes of the Rolling Stones any more, but whatever naming scheme the guys at the center try to impose, there will always be wriggle room. You will usually be able to tell who did the work by the way that the variables are named.

All this change can also result in rather a tangle. That this or that feature in the program, say feature A, is used, perhaps in rather different ways, by various other features of the program, say the features B. This can result in feature A getting rather messy, with all kinds of bits and bobs getting added in to it to meet the various needs of all the B features. You end up with a feature A which you would never have designed, had you designed the thing from scratch to meet the requirement you are now meeting. But the cost of getting out of A might be prohibitive. Very much a local rather than a global maximum.

At so it can go on. But I think I have burned enough time on this one now to feed quite a few serious, saloon bar discussions.

PS: you might think that all those right thinking marketing chaps in the US, who used to hate the Soviet Union, would know all about the difficulties & weaknesses inherent in the central planning of large & complex operations - or computer programs. But that does not always seem to inhibit their own version of central planning.

No comments:

Post a Comment