Programming Darwinism

 
Author:  Follow: TwitterFacebook
Job Title:Sarcastic Architect
Hobbies:Thinking Aloud, Arguing with Managers, Annoying HRs,
Calling a Spade a Spade, Keeping Tongue in Cheek
 
 
Developer evolution

I think anthropomorphism is worst of all.
I have now seen programs ‘trying to do things’, ‘wanting to do things’,
‘believing things to be true’, ‘knowing things’ etc.

It is common to refer to programs in terms which are usually reserved for living beings. And yet there are relatively few things we’d refer to as having a ‘life cycle’; we have the ‘biological life cycle’, ‘enterprise life cycle’, ‘product life cycle’, ‘project life cycle’, and ‘software development life cycle’, and that’s about it. There is no such thing as, for example, a ‘theorem life cycle’ or ‘rain life cycle’. And (even understanding that what I’m about to say will contradict Dijkstra [EWD854]) I don’t think it is a bad thing. In my opinion, saying that it’s a bad thing that people refer to programs in an anthropomorphic way is akin to saying that rain is a bad thing. As I see it, the fact that programs (especially complex programs, and remember that programs have become vastly more complex since 1983 when Dijkstra wrote EWD854, and even more so since his major works back in 70s) do behave similarly to living beings is something which we should accept whether we like it or not.

Hare pointing out:Academic researchers have recently more or less agreed to acknowledge that complexity of systems and life are closely interrelatedIn fact, academic researchers have recently more or less agreed to acknowledge that complexity of systems and life are closely interrelated ([Chaitin1979], [Gregersen2002], [Kauffman2002]). What scientists (as usual) are disagreeing on, is the question of whether this complexity has arisen spontaneously, or is a result of creative design. Fortunately we don’t need to answer this unsolvable question for the purposes of this article; what matters is that the behaviour of complex systems does indeed resemble living beings.

Survival of the fittest?

Programming is like sex:
one mistake and you’re providing support for a lifetime.

— Michael Sinz —

Going a bit further with the parallels between programs and living beings, shouldn’t we think about applying evolutionary theory?

But how? It might work as follows: program features (this should be understood broadly and include other properties such as reliability, speed, convenience, price, brand, marketing, etc.) are equivalent to biological traits. If users don’t buy a program it tends to die, so if a program is desirable it improves the chances of the program surviving. This means that decision of user to buy/not buy program, is equivalent to a process of natural selection, favouring programs with certain desirable traits.

One obvious question, which many of us would like to get an answer to, is ‘Is it really the best (most desirable) program that survives?’ As much as I would like to see the world where it is true, I should admit that it is not the case. Poor programs abound.
There are at least two major reasons why it happens. First of all, evolutionary theory does not provide any guarantee on the absence of poorly adapted organisms; it just says that sometimes, maybe, if better fit organisms appear they will have a better chance of surviving.

Another, probably even more important reason for poor programs out there, is that even if ‘everybody’ (which is often used as a synonym to ‘community of software developers’) agrees that product A is ‘better’ than product B, it doesn’t necessarily mean that product A has the better chance of survival. It is important to remember that it is only end-users (the ones who’re paying the money, directly or indirectly, for example, via watching ads in adware) who are directly involved in the process of natural selection. For example, when the software developer community largely agreed that OS/2 was so much better than Windows 3.1, it didn’t matter for survivability, as the target market of the operating systems was much wider. What really did matter was the opinion of the end-users, and it was clearly in favour of Windows, which indeed was the one that survived.

Survival of the most agile!

Femida hare:It is not the strongest of the species that survives, nor the most intelligent that survives. It is the one that is the most adaptable to change.— (mis)attributed to Darwin —There is a famous [mis]quote attributed to Darwin: ‘It is not the strongest of the species that survives, nor the most intelligent that survives. It is the one that is the most adaptable to change.’ While most likely Darwin didn’t say it, the principle behind it still stands. Nowadays this property is known as ‘evolvability’. For example the article in [TheScientist2011] (based on [Woods2011]) says: ‘The most successful E. coli strains in a long-term evolution experiment were those that showed the greatest potential for adaptation’; or, as Lone Gunman put it, ‘Adaptability trumped fitness’ [LoneGunman2011].

Now let’s apply this theory to a history of program evolution. In the Paleozoic era of programming, programs were intended to be designed once and then to avoid any changes. These programs are now known as waterfalloptera. Then, in the programming Mesozoic, it became obvious that avoiding any changes is not a viable option (see for example [BBC2012]), and much more lightweight and agile scrumoculates and extremeprogrammerodonts (as well as many others) appeared, with ‘responding to a change’ being one of their distinguishing features. In [Boehm2004] the authors note that these agile species tend to thrive in environments where frequent changes are the norm. Essentially what we have is that agile species are more adaptable, because they’re fast to react to change. This means two things: first, that if evolution theory can indeed be applied to programs, then agile programming species are more likely to survive, and second, that if it is the case we can rephrase the classical ‘survival of the fittest’ into ‘survival of the most agile’, at least when applying it to programs.

What about survival of the fattest?

In the programming world, a nasty disease known as ‘vendor lock-in’ often grows to epidemic proportions. It often comes from a classic positive feedback loop, for example where the more people use MS Office, the more other people need to install it to be able to read the documents, and so even more people install it to read their documents, and so on until everyone is locked into owning MS Office. This is all well known, but with our current analysis there is one big question: how does it correlate with our theory of evolutionary programming? Such species, known as locked-in-asaurus, tend to become irresponsive to change but still may successfully live for ages. So if evolutionary theory holds, how it could possibly happen? There is no definite answer to this question but we will be bold enough to propose the following hypothesis: In biological evolution, there were many cases when less-adaptable species were dominant for a long while until a big ‘extinction event’ caused drastic changes to the environment. For example, dinosaurs were the dominant terrestrial fauna in the Cretaceous period, and there were no problems on the horizon until the Cretaceous–Paleogene extinction event 65 million years ago (also known as the K-T extinction event, currently attributed to an asteroid impact) demonstrated their inability to cope with the rapidly changed environment and lead to the extinction of dinosaurs and the rise of mammals.

Applying this approach to programs, we may propose the hypothesis that locked-in-asauri are just waiting for an ‘extinction event’ which would eliminate them, and pave the way for more agile programming species. Unfortunately, it is not possible to test this hypothesis, just as it was not possible to test the hypothesis about the better adaptability of mammals before the K-T extinction event. It is even less possible to predict what could serve as such an extinction event for locked-in-asaurus: it might be the current Eurozone crisis, the rise of smartphones/tablets, or it might be something years from now. In general, evolutionary theory doesn’t provide time estimates – it may provide some explanations and predictions, but how fast things go is usually beyond its limits.

Race for Survival: Waterfall vs Agile
Don't like this post? Comment↯ below. You do?! Please share: ...on LinkedIn...on Reddit...on Twitter...on Facebook

[+]References

[+]Disclaimer

Acknowledgements

This article has been originally published in Overload Journal #109 in June 2012 and is also available separately on ACCU web site. Re-posted here with a kind permission of Overload. The article has been re-formatted to fit your screen.

Cartoons by Sergey GordeevIRL from Gordeev Animation Graphics, Prague.

Join our mailing list:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.