Tuesday, December 06, 2011

How Software Evolves

I just finished Evolutionary Analysis (2004) by Scott Freeman and Jon Herron, which is a college textbook on evolutionary biology. As I mentioned in How to Think Like a Softwarephysicist, I like to periodically read college textbooks cover-to-cover and skip all of the problem sets, quizzes, papers, and tests that college students are subject to, and instead, just concentrate on the essence of the material. Since my intention is to really understand the material, and not simply to pass tests, I think that I get much more long-term benefit out of these textbooks now than I did in my long-gone student days. I am now 60 years old, and when I read these very thick college textbooks, I now marvel at the huge amounts of time that the authors must have invested in creating them, something I certainly took for granted in my unappreciative college years. Anyway, after reading Evolutionary Analysis, I realized that in all of my previous posts on softwarephysics, which dealt with the evolution of software over the past 2.2 billion seconds, ever since Konrad Zuse cranked up his Z3 computer in May of 1941, I had described the evolutionary history of software, but I had not really explained the how and why of software evolution. So the subject of this posting will be a discussion of the evolutionary mechanisms involved that caused software to evolve.

In the SoftwarePaleontology section of SoftwareBiology, I provided a brief evolutionary history of the evolution of software on Earth. In that posting, I also explained that because both living things and software had to struggle with the second law of thermodynamics in a nonlinear Universe, that both had converged upon very similar design solutions over time. So much can be learned about the evolution of software by examining the evolution of life on Earth over the past 4.0 billion years, and in order to do that, let us briefly explore some of the concepts of modern evolutionary theory. Modern evolutionary theory is based upon the Modern Synthesis of the 1930s and 1940s, which brought together concepts from Mendelian genetics, Darwinian natural selection, population genetics, ecology and paleontology into a single theory that explained both microevolutionary and macroevolutionary observations. The Modern Synthesis is based upon four component processes – genetic mutation, genetic migration, genetic drift and natural selection, and how the interactions of these component processes change the frequencies of genes within a population. The first two processes, genetic mutation and genetic migration, introduce new genes into a population, while the second two processes, genetic drift and natural selection, tend to reduce the number of genes within a population. The net effect of these processes is to change the statistical frequencies of genes within a population, and that is really what evolution is all about because the genes within the population of a species determine what kinds of proteins a species can generate, and the kinds of proteins that are generated determine how the members of a species look and behave.

Genetic Mutation - A genetic mutation results when genetic DNA is copied and errors occur in the copying process, or a gene gets zapped by something like a cosmic ray and gets repaired incorrectly. Recall that genes are segments of DNA that are many thousands of nucleotides long, containing the A, C, G, and T nucleotides that encode the sequence of amino acids necessary to create a protein molecule. Protein molecules form the structural components within a living cell, or more frequently, protein molecules act as catalytic agents to speed up biochemical reactions in a biochemical pathway. For example, we Homo sapiens have about 25,000 genes that encode for the proteins necessary to build and operate a body, but only a few percent of the 3 billion DNA nucleotides found in our chromosomes are actually used to encode proteins. The vast majority of our DNA nucleotides are just along for the ride and get replicated along with the necessary protein-encoding segments of DNA. This supports Richard Dawkins’ contention that living things are really DNA survival machines, which evolved to protect and replicate DNA using temporary and disposable bodies that persist for a very brief time, as they store and then pass on copies of DNA that are hundreds of millions or even billions of years old. Now thanks to the second law of thermodynamics, most mutations are deleterious because they usually produce a protein that is no longer functional (see The Demon of Software for details on the second law). It’s like having a poker hand with a full house of K-K-K-9-9 and trying to draw another K by discarding the two 9s. The odds are that you will destroy your beautiful full house instead of coming up with a four of a kind like K-K-K-K-2. However, very infrequently, a mutation can lead to a protein that does an even better job than the original protein, or it can even lead to a protein that does something completely different that just happens to be quite useful. In keeping with our poker analogy, a beneficial mutation would be like drawing a K-K-K-K-2 by discarding your 9s in a full house of K-K-K-9-9.

Genetic Migration - Genetic migration occurs when a new version of a gene moves into a population from an outside location. For example, the population of a species on an island is relatively isolated from the population of the same species back on the mainland. But every so often, members of the mainland population might raft themselves to the island on board uprooted trees that were blown down in a hurricane. If these foreign, mainland members of the species also happen to be bearing mutated versions of genes, these mainland mutations can then migrate to the island population.

Genetic Drift - The more complex forms of life have at least two copies of each gene. For example, one copy of each of your genes came from the chromosome that you inherited from your father, while the other copy came from the chromosome that you inherited from your mother. If you have at least one functional version of a gene, you generally are okay, but if you happen to have drawn two non-functional versions of a gene, then you generally are in a great deal of trouble because you cannot make one of the proteins that are necessary for good health, or perhaps, even necessary for life itself. In fact, most genetic diseases result from having two malformed versions of a gene. However, because the odds of having two bad copies of a given gene are quite small, since there are not that many bad copies floating around in a population, we all generally can make the proteins that are necessary for life because we have at least one good copy. However, in large populations, there will always be a small number of fathers and mothers running around with one bad copy of a gene. The odds of a male with one bad copy hooking up with a female who also has one bad copy of the same gene will be quite small, and even if they do manage to have offspring, only about ¼ of their offspring will have the bad luck of ending up with two bad copies of the gene and suffer ill effects. So bad copies of a gene can persist in a large population because the bad copy of the gene can easily hide in bodies that also have a good copy of the gene. So in large populations, deleterious genes tend to persist. However, in small populations mutant genes tend to be weeded out by sheer chance. Because there are just a few of the mutant genes floating about in a small population, there is a good chance that none of them will survive to the next generation because of sheer bad luck. On the other hand, if a mutant gene happens to produce a protein that works nearly as well as the original version of the gene, or perhaps even slightly better, there is also the chance that the original version of the gene might go extinct by sheer bad luck as well. Thus, in small isolated populations, the frequency of various versions of genes can slowly drift away from the original frequency that the population had, as certain versions of the genes go extinct, and this is called genetic drift. Genetic drift is very important for the evolution of new species. If a small population gets isolated on an island, the frequencies of its genes can slowly drift away from the frequencies found back on the mainland, allowing a new species to arise on the island that can no longer mate with the original species back on the mainland and produce fertile offspring with it.

Natural Selection - Natural selection is the famous “survival of the fittest”. When a favorable genetic mutation occurs, or when a favorable genetic mutation migrates into a population, the statistical frequency of the favorable mutation tends to increase within the population because members of the population that have the favorable mutation tend to have a better chance of surviving and passing the favorable mutation on to their offspring. Natural selection is also very important for the evolution of new species, especially in small isolated populations under environmental stress, because natural selection can then strongly select for beneficial mutations, and these beneficial mutations do not get diluted by a large population.

The Evolutionary Processes at Work in IT
We see these same processes at work in IT when software is developed and maintained, and that is why software evolves over time. Since modern evolutionary biology is based upon the changing statistics of genes within a given population, we first need to determine what is the software equivalent of genetic material. For living things, of course, it is the genes composed of stretches of DNA, but for software, it is source code. In order to do something useful, the information in a gene, or stretch of DNA, has to be first transcribed into a protein. This transcription process is accomplished by a number of enzymes, proteins that have a catalytic ability to speed up biochemical reactions. The sequence of operations aided by enzymes goes like this:

DNA → mRNA → tRNA → Amino Acid chain → Protein

Like DNA, the source code for a program has to be first compiled into an executable file, containing the primitive machine instructions for a computer to execute, before it can be run by a computer to do useful things. When you double-click on an icon on your desktop, like Microsoft Word, you are loading the Microsoft Word WINWORD.exe executable file into the memory of your computer where it begins to execute under a PID (process ID). After you double-click the Microsoft Word icon on your desktop, you can use CTRL-ALT-DEL to launch the Windows Task Manager, and then click on the Processes tab to find the WINWORD.exe running. This compilation process is very similar to the transcription process used to form proteins by stringing together amino acids in the proper sequence that is shown above. The output of the DNA transcription process is an executable protein that can begin processing organic molecules the moment it folds up into its usable form and is similar to the executable file that results from compiling the source code of a program. Program source code is indeed much like DNA, but there is one subtle difference. Transcribed proteins do not have any built-in logic of their own, while executable files do. When a living cell produces a large number of protein molecules within its confines and combines them with a large number of smaller molecules called monomers that are the building blocks of living things, wondrous things begin to happen. Biological pathways form, all on their own, from the interactions between the monomers and the enzyme proteins to form step-by-step programs to build up and process the very large molecules required by living things, and which are the basis for the large-scale biological structures found within a living cell. It’s like mixing a bunch of LEGO blocks together with many inquisitive toddlers and allowing the toddlers to form complex LEGO structures all on their own. On the other hand, some biological pathways do just the opposite. They take complex organic molecules, like houses formed from large numbers of LEGO blocks, and break them down into their constituent LEGO block parts or monomers. So the logic in protein enzymes is an emergent quality that arises when enzymes and other organic molecules are mixed together in a cell. This emergent logic is not self-evident when just looking at the enzyme proteins on their own, but when you look at their resulting interactions with other organic molecules, one finds that the logic is indeed there, hiding in the structures of the individual enzyme proteins. The same is not true of software source code. The source code of a program has its logic built-in and in plain sight, and we can easily see the logic at work. I like to consider each variable and symbol in a line of source code to effectively be an enzyme protein or monomer molecule in a softwarechemical pathway reaction. In Quantum Software and SoftwareChemistry, I explained that just as protein molecules are composed of many kinds of atoms, in differing quantum states, all bound together into molecules, we can think of lines of source code in a similar manner.

For example consider the line of code:

discountedTotalCost = (totalHours * ratePerHour) - costOfNormalOffset;

We can consider each character in the line of code to be in one of 256 quantum ASCII states defined by 8 quantized bits, with each bit in one of two quantum states “1” or “0”, which can also be characterized as ↑ or ↓ and can be thought of as 8 electrons in 8 electron shells of an atom, with each electron in a spin-up ↑ or spin-down ↓ state:

C = 01000011 = ↓ ↑ ↓ ↓ ↓ ↓ ↑ ↑
H = 01001000 = ↓ ↑ ↓ ↓ ↑ ↓ ↓ ↓
N = 01001110 = ↓ ↑ ↓ ↓ ↑ ↑ ↑ ↓
O = 01001111 = ↓ ↑ ↓ ↓ ↑ ↑ ↑ ↑

Figure 1 – The electron configuration of a carbon atom is similar to the ASCII code for the letter C in the source code of a program (click to enlarge)

Thus each variable in a line of code can be considered to be a complex molecule interacting with other complex molecules.

Now let’s look at some source code. Below are three examples of the source code to compute the average of some numbers that you enter from your keyboard when prompted. The programs are written in the C, C++, and Java programming languages. Please note that modern applications now consist of many thousands to many millions of lines of code. The simple examples below are just for the benefit of our non-IT readers to give them a sense of what is being discussed when I describe the software development life cycle below from the perspective of the Modern Synthesis.


Figure 2– Source code for a C program that calculates an average of several numbers entered at the keyboard.


Figure 3 – Source code for a C++ program that calculates an average of several numbers entered at the keyboard.


Figure 4 – Source code for a Java program that calculates an average of several numbers entered at the keyboard.

In the SoftwarePaleontology section of SoftwareBiology, we saw that software has indeed evolved over time mainly in response to the environmental changes in the hardware environment in which it exists, in a similar fashion to the way that living things evolved on Earth in response to the environmental changes of a changing planet. Over the past 70 years, there has been an explosive positive feedback loop going on between the evolution of hardware and software. As more complex software evolved and demanded more memory and faster processing speeds, hardware had to keep up by providing ever-increasing amounts of memory and processing speed, which allowed software to demand even more. The result has been that, over the past 70 years, the amount of memory and processing speed available has exploded. It is now possible to buy a $500 PC that has a billion times the memory and runs a billion times faster than Konrad Zuse’s original Z3 computer, and today’s fastest supercomputers run about 1016 times faster than a Z3, or 10 million billion times faster. In Is Self-Replicating Information Inherently Self-Destructive?, we also saw that there have been some positive feedback loops going on between living things and the surface of the Earth as well over the past 4.0 billion years. The arrival of oxygen-producing cyanobacteria about 2.8 billion years ago allowed large amounts of oxygen to eventually appear in the Earth’s atmosphere, which later proved necessary to sustain the complex life forms that arose during the Cambrian Explosion 541 million years ago. Similarly, over the past 500 million years, these complex life forms were able to remove large amounts of the greenhouse gas carbon dioxide from the Earth’s atmosphere. The complex life forms found after the Cambrian did so by producing carbonate deposits formed from shells and reefs, that were later subducted into the Earth by plate tectonics, as the Sun increased in brightness by about 5%. The removal of this vast quantity of the carbon dioxide greenhouse gas prevented the Earth’s temperature from rising to a level that could no longer support complex life forms. Note that in both cases, these feedback loops allowing for more complex software and more complex life forms were not planned. They both just happened on their own in a fortuitous manner, as software and hardware and living things and the Earth interacted with each other.

Now that we know that program source code is the equivalent of genes in an IT setting, we need to see how program source code changes over time in response to the evolutionary processes of genetic mutation, genetic migration, genetic drift and natural selection, and how these processes allow software to adapt to its changing hardware environment. In order to understand this, we need to explore how software is currently developed and maintained in an IT department. Programmers are now called developers so I will use that terminology going forward. Developers are broken up in IT departments into tribes of 5 – 30 developers working under a single chief, or IT application development manager. Each application development tribe of 5 – 30 developers is a semi-isolated population of developers, dedicated to supporting a number of applications, or possibly, a small segment of a very large application like Microsoft Word. In softwarephysics we consider developers to essentially be the equivalent of software enzymes, like the enzymes that copy DNA and fix DNA errors.

Mutation of Source Code
Just as changing the DNA sequence in a gene will likely produce a mutant version of a protein that is non-functional, changing just one character in the source code of a program will likely produce a mutant version of the program that will probably make the program non-functional. Most likely, the mutant source code for the program will not even successfully compile, but if it should compile, the resulting executable file will have a bug in it that will make the program do strange and undesirable things. In both cases, this is the result of the second law of thermodynamics at work in a nonlinear Universe. The second law of thermodynamics simply states that the number of ways of coding up a buggy program or gene is much larger than the number of ways of coding up a useful program or gene, so whenever you change a program or gene, the odds are that you are going to make it buggy or non-functional. See Entropy - the Bane of Programmers and The Demon of Software for more on the second law of thermodynamics. Nonlinear systems are systems that are very sensitive to small changes. A very small change to a nonlinear system, like changing just one character in a gene or the source code for a program, can lead to very dramatic effects. See Software Chaos for more on nonlinear systems. This makes it very difficult to write source code that works, or to produce genes that yield useful proteins. The trick when writing source code is to only make small changes to the source code that make the resulting executable file to more closely do what the program is intended to do, without introducing bugs at the same time that make the executable file do strange and undesirable things that are not intended.

Genetic Migration of Source Code
Over time, every developer acquires his or her own coding style and coding techniques. These accumulate over time, as the developer learns through trial and error, what works well and what does not. However, every so often a developer will get stumped by a particular problem and will frequently turn to other members within the development tribe of 5 – 30 developers for advice. Frequently, another member within the tribe will have some source code that can be modified slightly to solve the problem at hand, so the developer will paste this borrowed code into the source code for the program under development. Consequently, lots of old source code gets exchanged within a development tribe, just as lots of DNA tends to get exchanged within a tribe of people living on a tropical island. And like on a tropical island, every so often a new member to the development tribe will wash up onshore, bearing a new coding style and coding techniques, and lots of new source code that can also be borrowed. So just as genes tend to migrate between populations of living things, the source code for programs can migrate between development tribes. The advent of the Internet has greatly increased this migration of program source code. Thanks to Google, it is now possible to find lots of program source code on the Internet that can be modified to solve any given problem.

Genetic Drift of Source Code
As we saw with genes, many mutations to source code have no effect upon how the resulting executable files behave when they run in a computer. Indeed, it is possible to code up any given program in nearly an infinite number of ways, even using many different programming languages. For example, the three programs above, written in C, C++, and Java, all behave exactly the same when run. So over time, source code coding styles and coding techniques, and even the choice of programming languages tends to drift for a developer and a development tribe. For example, the unstructured code of the 1950s and 1960s was replaced by the structured code of the 1970s and 1980s, which was later replaced by the object-oriented code of the 1990s. However, all of these coding techniques and their associated programming languages could still be used today to produce an executable file that performs the desired functions of a program. See the SoftwarePaleontology section of SoftwareBiology for details on the evolution of coding techniques.

Natural Selection of Source Code
Thanks to the second law of thermodynamics, most random changes to the sequence of nucleotides in a DNA gene will not generate a functional protein. In a similar fashion, most changes to the source code file for a currently functional program will not generate an executable file that still performs the desired functions, and because the Universe is nonlinear, such small coding errors in either DNA or source code files will likely produce disastrous results. For both living things and software, there seems to be only one way around these two major obstacles of the second law of thermodynamics and nonlinearity. This mechanism was first brought to light by Charles Darwin and Alfred Russel Wallace in 1859. In the Modern Synthesis, it goes like this. Within any given population of a species, there will always be genetic variation amongst its members caused by genetic mutations, genetic migration and genetic drift of its genes. Thanks to Mendelian genetics, the genes responsible for these genetic variations are also inheritable and can be passed down to subsequent generations. Most of these variations are neutral or detrimental in nature when it comes to the survival of the individuals possessing them, but once in a great while, a genetic variation will be found to be beneficial, and give individuals carrying such genes a better chance at surviving and passing these new beneficial genes on to their offspring. Darwin called this process natural selection because it reminded him of the artificial selection process used by breeders of domesticated animals. Darwin noted that by allowing domesticated animals with certain desirable traits to only breed with other domesticated animals with similar desirable traits, breeders were able to produce domesticated animals with far superior traits compared to their wild ancestors. For example, by only allowing turkeys and pigs with desirable traits to breed with other turkeys and pigs with desirable traits, breeders over the centuries managed to produce the modern turkeys and pigs of today, which are capable of producing far more meat than their distant ancestors. In a similar manner, Nature automatically selects for members of a species that are better at surviving and allows them to pass on their desirable genetic traits to their offspring. As these small changes to traits accumulate within a population, eventually a new species will arise, especially in small isolated populations. This is the famous “survival of the fittest” concept of Darwin’s natural selection, first coined by the British philosopher Herbert Spencer.

The Software Development Life Cycle From the Perspective of the Modern Synthesis
With all of this background information at hand, let us now see how a developer goes about producing a new piece of software, in a manner similar to how Nature goes about producing a new species. Developers never code up the source code for new software from scratch. Instead, developers take old existing code from previous applications, or from the applications of others in their development tribe, or perhaps even from the Internet itself as a starting point and then use the Darwinian processes of inheritance, innovation and natural selection to evolve the software into the final product. So most new applications inherit lots of old code from ancestral applications that were successful and survived the development process to ultimately end up in production. The source code for applications that died before reaching production usually ends up getting deleted, so the source code for new applications generally comes from the surviving “winners” of a population. The developer then begins a tedious life cycle process consisting of evolving the new software over many thousands of generations:

borrow some old code → modify code → test → fix code → test → borrow some more old code → modify code → test → fix code → test ....

During this very long evolutionary development process, frequently more old code from other existing applications is also introduced, as the new software slowly progresses towards completion. In this development process, we see all of the elements of the Modern Synthesis. The source code for new software inherits source code from the successful software of the past, which might come from the native stock found within a development tribe, or from source code that has recently migrated into the development tribe from outside. As the source code is developed by mutating the code in small incremental steps, natural selection determines which version of the source code ultimately passes on to the next step or generation in the development process at each point that the new source code is tested. Source code is even subject to genetic drift within a development tribe, as coding styles arbitrarily change with time and new computer languages are adopted by the development group. Once an application is in production, the development life cycle continues on as the application enters into a maintenance mode. Bugs constantly need to be corrected and additional features need to be added, and this is accomplished using the same process outlined above of introducing and modifying existing code from other applications, mutating the original source code of the application with small changes, and constantly using natural selection to test how closely the application has come to correcting a bug or adding a new feature every time the code is changed. Thus, the software continues to evolve through small incremental changes over many thousands of testing generations, until the desired result is achieved. Because all of the software throughout the world is currently being worked upon by millions of developers, all at the same time, and the time interval between generational tests during the development and maintenance cycles might be only a matter of a few minutes or seconds, software has tended to evolve over the past 70 years about 100 million times faster than life on Earth.

In addition to application code, the code for the software infrastructure has also evolved over time in a similar manner. Infrastructure developers work on the source code for things like operating systems like Windows and Unix, compilers for new computer languages like the compilers for C, C++, Java and other languages, J2EE appservers like Websphere, webservers like Apache, database management systems like Oracle and DB2, transaction monitors like CICS, and security software like LDAP. And these software infrastructure elements also evolve over time because of the same evolutionary processes outlined above. Notice that all three programs in the figures above that compute the average of a series of numbers entered via a keyboard are very similar. That is because the Java programming language (1995) evolved from the C++ programming language (1983), which evolved from the C programming language (1973).

Thus, because all of the same evolutionary processes are at work for both living things and software, there should be no surprise that both have evolved in a similar manner and that both have converged upon very similar solutions to overcome both the second law of thermodynamics and nonlinearity.

Comments are welcome at scj333@sbcglobal.net

To see all posts on softwarephysics in reverse order go to:
https://softwarephysics.blogspot.com/

Regards,
Steve Johnston

Tuesday, November 22, 2011

An IT Perspective of the Cambrian Explosion

I just finished reading In the Blink of an Eye (2003) by Andrew Parker in which he presents his Light Switch theory for the Cambrian Explosion. The Cambrian Explosion is an enigma that has been plaguing both geologists and evolutionary biologists for more than 150 years, going all the way back to the days of Darwin himself. The Cambrian Explosion is usually characterized by the sudden rapid appearance of complex multicellular organisms in the fossil record. In the strata below the Cambrian, one does not find such fossils, and then in a flash of geological time, large numbers of fossils, of many varieties, are to be found in the Cambrian strata. In the classical description of the Cambrian Explosion, it is proposed that in the Precambrian there were only simple worm-like forms of multicellular life, and they did not leave behind good fossils because they had no hard parts, like shells or hard exoskeletons made of chitin. Then suddenly in the Cambrian, we see the rapid diversification of multicellular life into about 35 different phyla, or basic body plans, that left behind good fossils because they did contain hard parts that could easily fossilize. We have all upon occasion come across silverfish scurrying about in our homes. However, unlike spiders or cockroaches, when you dispatch them with a piece of tissue paper, all you are left with is a smear of protein, rather than a squashed piece of chitin, and that is why we do not find good fossils of life forms in the Precambrian. The exact onset of the Cambrian Explosion keeps bouncing around in geological time, as researchers continue to do their fieldwork, but it is now thought to have begun about 541 million years ago. But the really important point is that the Cambrian Explosion occurred during a very brief period of about 5 million years of geological time, some 500 – 600 million years ago. The two key points of this finding in the fossil record are that the Cambrian Explosion occurred in a very brief amount of geological time and that it occurred very recently – a mere 500 - 600 million years ago. Since life originated on Earth about 4,000 million years ago, the two big questions that the Cambrian Explosion presents are:

1. Why did it happen so quickly, once it got started?
2. Why did it take so long to finally happen?

Of the two questions, the second is the most perplexing, and is also the most profound, for if it took 3,500 million years for complex multicellular life to evolve on Earth, perhaps there was a good chance that it might not have ever even evolved at all, and that would certainly not bode well for us finding complex multicellular life elsewhere in the Universe, or for finding complex multicellular life that has further evolved to a level of intelligent consciousness that we could commune with, even if the Kepler space telescope should find a large number of Earth-like planets out there over the next few years.

Design Patterns – the Phyla of IT
Before proceeding further, we need to bring our IT readers up to speed on what exactly a phylum is in biology. A phylum is a basic body plan for earning a living in the biosphere and has some distinguishing characteristics. For example, Homo sapiens is in the phylum Chordata because we all have a spinal chord, while insects are in the phylum Arthropoda because they all have a jointed chitin exoskeleton. In IT a phylum is called a design pattern. Design patterns originated as an architectural concept developed by Christopher Alexander in the 1960s. In Notes on the Synthesis of Form (1964), Alexander noted that all architectural forms are really just implementations of a small set of classic design patterns that have withstood the test of time in the real world of human affairs, and that have been blessed by the architectural community throughout history for both beauty and practicality. Basically, given the physical laws of the Universe and the morphology of the human body, there are really only a certain number of ways of doing things from an architectural point of view that work in practice, so by trial and error architects learned to follow a set of well established architectural patterns. In 1987, Kent Beck and Ward Cunningham began experimenting with the idea of applying the concept of design patterns to programming and presented their results at the object-oriented OOPSLA conference that year. So in IT, a design pattern describes a certain design motif or way of doing things, just like a phylum describes a basic body plan. A design pattern is a prototypical design architecture that developers can copy and adapt for their particular application to solve the general problem described by the design pattern. This is in recognition of the fact that at any given time there are only a limited number of IT problems that need to be solved at the application level, and it makes sense to apply a general design pattern rather than to reinvent the wheel each time. Developers can use a design pattern by simply adopting the common structure and organization of the design pattern for their particular application, just as living things adopt an overall body plan, or phylum, to solve the basic problems of existence. Just as the Cambrian Explosion was typified by the rapid onset of 35 phyla in the fossil record, the rise of design patterns in IT was closely associated with the rapid onset of object-oriented programming and the Internet Explosion in the early 1990s. In a similar manner, there are only so many ways to earn a living on Earth, and the biosphere seems to have come up with 35 basic body plans, or phyla, to accomplish that. It is interesting to note that no additional phyla ever evolved after the Cambrian Explosion, so it is rather baffling as to why all 35 phyla should have all appeared at the same time in a brief period of 5 million years at the base of the Cambrian.

The Light Switch Theory of the Cambrian Explosion
In In the Blink of an Eye, Andrew Parker proposes that the acquisition of vision by trilobites was the root cause of the Cambrian Explosion. Parker’s explanation for the Cambrian Explosion goes like this. During the last few hundred million years of the Precambrian, all 35 current phyla slowly appeared upon the Earth, but all had adopted very similar soft, worm-like, bodies, with no distinguishing characteristics, and these soft worm-like bodies did not leave behind very good fossils. Apparently, the worm-like body plan was the optimum body design for the day, and there were no compelling reasons for improvement, as will be explained later. Then over a very brief period of a million years or so, trilobites developed eyes that could produce good images of their surroundings. Suddenly, trilobites could now see all of these tiny bits of protein crawling around in worm-like bodies, providing the possibility for hearty meals. Andrew Parker explains that until the invention of an image-forming eye, the Precambrian predators of the Earth practiced passive predation, meaning that they just sat around waiting for prey to fall into their traps, like jellyfish loosely dangling their deadly tentacles, waiting for an unwitting passerby to be stung to death, and then consumed. Without vision, it was very difficult for predators to locate their prey and actively pursue them. But once the trilobites developed sophisticated eyes, a dramatic arms race developed. Suddenly, just remaining still when a predator approached no longer worked, because sunlight streams down upon everything and makes everything visible. Under extreme selective pressures, Precambrian prey began to develop defensive armor in the form of hard exoskeletons with nasty spikes and spines to ward off potential attacks by the pesky trilobites. Thus, the soft, worm-like, bodies of the Precambrian were no longer the optimal design. The trilobites also developed hard parts to make it easier to capture and devour prey, and to avoid becoming the prey of other trilobites too. Other phyla also developed eyes as well, as a defensive measure to avoid the marauding trilobites and to help find their own prey too.

Figure 1 – Fossil of a trilobite with eyes (click to enlarge)

So the basic idea behind the Light Switch theory for the Cambrian Explosion is that the Cambrian Explosion was not the sudden appearance of 35 phyla with fossil-forming hard parts, rather the Cambrian Explosion was the appearance of the first practical eye that allowed for active predation. The 35 phyla were already in place but were all hiding in similar soft, worm-like, bodies. Thus, it really was the arrival of active predation that changed everything. With active predation, the 35 already existing phyla were under extreme selective pressures to adopt expensive defensive measures in the form of hard parts, and these expensive hard parts were not needed during the billions of years of passive predation in the Precambrian, so there were no selective pressures to form them.

Parker’s Light Switch theory for the Cambrian Explosion goes a long way in explaining question number one outlined above:

1. Why did it happen so quickly, once it got started?

but it does not explain question number two very well:

2. Why did it take so long to finally happen?

Because question number two now really becomes:

2. Why did it take so long for a practical eye to evolve?

Why Did It Take So Long For the Eye to Evolve?
The trilobites did not have camera-like eyes such as ours, but compound insect-like eyes instead, made up of many individually lensed units with hard crystalline lenses composed of the transparent mineral calcite. However, our natural anthropocentric tendencies have always centered the evolutionary controversy over the origin of the eye upon the origin of the complex camera-like human eye. Even Darwin himself had problems with trying to explain how something as complicated as the human eye could have evolved through small incremental changes from some structure that could not see at all. After all, what good is 1% of an eye? As I have often stated in the past, this is not a difficult thing for IT professionals to grasp because we are constantly evolving software on a daily basis through small incremental changes to our applications. However, when we do look back over the years to what our small incremental changes have wrought, it is quite surprising to see just how far our applications have come from their much simpler ancestors and to realize that it would be very difficult for an outsider to even recognize their ancestral forms. However, with the aid of computers, many researchers in evolutionary biology have shown just how easily a camera-like eye can evolve. Visible photons have an energy of about 1 – 3 eV, which is about the energy of most chemical reactions. Consequently, visible photons are great for stimulating chemical reactions, like the reactions in chlorophyll that turn the energy of visible photons into the chemical energy of carbohydrates or stimulating the chemical reactions of other light-sensitive molecules that form the basis of sight. In a computer simulation, the eye can simply begin as a flat eyespot of photosensitive cells that look like a patch like this: |. In the next step, the eyespot forms a slight depression, like the beginnings of the letter C, which allows the simulation to have some sense of image directionality because the light from a distant source will hit different sections of the photosensitive cells on the back part of the C. As the depression deepens and the hole in the C gets smaller, the incipient eye begins to behave like a pin hole camera that forms a clearer, but dimmer, image on the back part of the C. Next a transparent covering covers over the hole in the pin hole camera to provide some protection for the sensitive cells at the back of the eye, and a transparent humor fills the eye to keep its shape: C). Eventually, the transparent covering thickens into a flexible lens under the protective covering that can be used to focus light, and to allow for a wider entry hole that provides a brighter image, essentially decreasing the f-stop of the eye like in a camera: C0).

So it is easy to see how a 1% eye could easily evolve into a modern complex eye through small incremental changes that always improve the visual acuity of the eye. Such computer simulations predict that a camera-like eye could easily evolve in as little as 500,000 years.

Figure 2 – Computer simulations of the evolution of a camera-like eye(click to enlarge)

Now the concept of the eye has independently evolved at least 40 different times in the past 600 million years, so there are many examples of “living fossils” showing the evolutionary path. In Figure 3 below, we see that all of the steps in the computer simulation of Figure 2 can be found today in various mollusks. Notice that the human-like eye on the far right is really that of an octopus, not a human, again demonstrating the power of natural selection to converge upon identical solutions by organisms with separate lines of descent.

Figure 3 – There are many living fossils that have left behind signposts along the trail to the modern camera-like eye. Notice that the human-like eye on the far right is really that of an octopus (click to enlarge).

So if the root cause of the Cambrian Explosion hinges upon the arrival of the eye upon the evolutionary scene, and as we have seen above, it is apparently very easy to evolve eyes, why did it take so long? In the very last chapter of In the Blink of an Eye, Andrew Parker tries to address this problem. Parker seems to come to the conclusion that there might have been a dramatic increase in sunlight at the Earth’s surface at the time of the Cambrian Explosion that made eyes physically realizable for the first time. I won’t go into all the details of the explanations offered for why sunlight could have dramatically increased a mere 600 million years ago because I don’t think that such a dramatic increase in sunlight was really possible. Granted, our Sun is a main sequence star that is gradually getting brighter at the rate of about 1% every 100 million years, so 600 million years ago, the Sun was probably about 6% dimmer than today, and 1,000 million years ago it was perhaps 10% dimmer than today, but that is still much brighter than a cloudy day today, so there surely were plenty of photons bouncing around in the very deep past to see with.

Our Sun is indeed getting brighter because, under the high temperatures and pressures in its core, it is turning hydrogen, actually protons, into helium nuclei consisting of two protons and two neutrons. Since helium nuclei have about the mass of four protons, but only the charge of two protons, they take up about as much room as two protons when bouncing around in the Sun’s core. However, because helium nuclei have four times the density of a single proton, the Sun’s core is constantly getting denser with time as protons are constantly being turned into helium nuclei. A core that is constantly getting denser means that gravity is also constantly getting stronger within the Sun’s core, and consequently, the pressure within the Sun’s core that resists the increasing pull of gravity must also rise to stave off the collapse of the core. The pressure within the Sun’s core can only increase by increasing its temperature, but that is easily achieved because a hotter, denser, core also fuses protons into helium nuclei faster than a cooler, less dense, core. The protons in a hotter, denser, core are bouncing around faster and are in closer quarters too, so they are more likely to come close enough together for the attractive strong nuclear force to overcome the repulsive electromagnetic force between them, that tends to keep them apart, and allow the protons to come close enough together for the weak nuclear force to turn protons into neutrons, forming helium nuclei. Thus a hotter, denser, core produces more energy than a cooler, less dense, core, and the generated energy has to go someplace. The only place for it to go is away from the Sun, and the Earth just happens to lie in its path. Now a 1% increase per 100 million years might not sound like much, but even a 1% change to the Sun’s current brightness would dramatically change the Earth’s climate. In fact, the only reason that the Earth has not already burned up is that, over the past 600 million years, vast amounts of carbon dioxide have been slowly removed from the Earth’s atmosphere by the biosphere, and have been deposited upon the ocean floor as carbonate deposits that were later subducted into the Earth’s asthenosphere at the Earth’s many subduction zones. So it is the plate tectonics of the Earth that has kept the Earth at a reasonable temperature over the past 600 million years. Now we can see that there really must have been nearly as many photons bouncing around on the Earth’s surface in the deep past as there are today, or the Earth would have been completely frozen over for the whole Precambrian. Now the Earth actually did completely freeze over during a couple of intermittent Snowball Earth episodes during the Precambrian that lasted about 100 million years each, with the last one occurring about 600 – 700 million years ago, but by and large, the Earth was mainly ice-free during the Precambrian, thanks to the very high levels of atmospheric carbon dioxide and methane at the time.

So if there really were lots of photons bouncing around for billions of years during the Precambrian, why were there no eyes to see them with? Let us now turn to the evolutionary history of software for some possible clues.

Using the Evolutionary History of Software as a Model for the Cambrian Explosion
It is possible to glean some insights into why it took so long for the eye to evolve by examining the evolutionary history of software on Earth over the past 2.2 billion seconds, ever since Konrad Zuse cranked up his Z3 computer in May of 1941. Since living things and software are both forms of self-replicating information that have evolved through the Darwinian mechanisms of innovation and natural selection (see Self-Replicating Information for details), and both have converged upon very similar paths through Daniel Dennett’s Design Space, as each had to deal with the second law of thermodynamics in a nonlinear Universe, perhaps we could look to some of the dramatic events in the past evolution of software, when software seemed to have taken similar dramatic leaps, in order to help us understand the Cambrian Explosion. Now although many experts in computer science might vehemently disagree with me as to what caused these dramatic leaps in the evolution of software and exactly when they might have happened, at least we were around to witness them actually happening in real time! And because software is evolving about 100 million times faster than life on Earth, we also have the advantage of reviewing a highly compressed evolutionary history, which has also left behind a very good documented fossil record. Before proceeding, it might be a good idea to review the SoftwarePaleontology section of SoftwareBiology to get a thumbnail sketch of the evolutionary history of software over the past 2.2 billion seconds. When reviewing the evolutionary history of software, it is a good idea to keep in mind that 1 software second ~ 1 year of geological time, and that a billion seconds is about 32 years.

Softwarepaleontology does indeed reveal many dramatic changes to software architecture in deep time that seemed to have occurred overnight, but in most cases, closer examination reveals that the incipient ideas arose much earlier, and then slowly smoldered for many hundreds of millions of seconds before becoming ubiquitous. Here are just a few examples:

1. Mainframe software - The Z3 became operational in May of 1941 and was the world’s first full-fledged computer, but it was not until the introduction of the IBM OS/360 in 1965, that computers took the corporate world by storm. So it took about 24 years, or 757 million seconds, for mainframe software to really catch on.

2. Structured programming - Up until 1972, software was written in an unstructured manner, like the simple unstructured prokaryotic bacteria that dominated the early Earth for the first few billion years after its formation. So it took about 31 years, or 978 million seconds, for structured programming techniques to catch on.

3. PC software The Apple IIe came out in 1977, and the IBM PC followed in 1981, both with command-based operating systems, like Microsoft MS-DOS. But these command-based operating systems required end-users to learn and use many complex commands to operate their PCs, like the complex commands that PC programmers used on the command-based Unix operating systems that they learned to program on. The MS-DOS applications also did not have a common user interface, so end-users also had to learn how to use each MS-DOS application on its own. To address these problems, the Macintosh came out in 1984, with the first operating system with a graphical user interface, known as a GUI, which allowed end-users to drag-and-drop their way around a computer, and the Macintosh applications also shared a common user interface, or look and feel, that made it easier to learn the use of new applications. However, the Macintosh GUI only ran on expensive Macintosh machines, so MS- DOS still reigned supreme on the cheaper IBM PC clones. Microsoft came out with a very primitive GUI operating environment, called Windows 1.0, in 1985 that ran on top of MS-DOS, but it was very rudimentary and not very popular. IBM came out with their OS/2 1.1 GUI in 1988, but it required much more memory to run than MS-DOS, so again, price was a limiting factor. Finally, Microsoft came out with Windows 3.0 in 1990. Windows 3.0 was really only a GUI operating environment that ran on top of MS-DOS, but it could run on cheap low-memory IBM PC clones, and it looked just as good as the expensive Macintosh or OS/2 machines, so it was a huge success. Thus, it took about 13 years, or 410 million seconds, for PC software to finally catch on.

4. Object-oriented programming - Object-oriented programs are the implementation in software of multicellular organization. The first multicellular organisms first appeared on the Earth about 900 million years ago. Simula, the first object-oriented programming language, was developed by Dahl and Nygaard over a three year period from 1962 – 1965, and in the period 1983 - 1985 Stroustrup developed C++, which did introduce the corporate IT world to object-oriented programming. But object-oriented programming really did not take off until 1995, with the introduction of the Java programming language. So it took about 30 years, or 947 million seconds, for object-oriented programming to really catch on.

5. Internet Explosion The Internet was first conceived by the Defense Department’s Advanced Research Projects Agency or ARPA in 1968. The first four nodes on the ARPANET were installed at UCLA, Stanford, the University of Utah, and the University of California in Santa Barbara in 1969. However, it was not until 1995 that the Internet changed from being mainly a scientific and governmental research network into becoming the ubiquitous commercial and consumer network that it is today. So again, it took about 26 years, or 821 million seconds, for Internet software to finally catch on.

6. SOA – Service Oriented Architecture - With SOA, client objects can call upon the services of component objects that perform a well-defined set of functions, like looking up a customer’s account information. Thus, SOA architecture is much like the architecture of modern multicellular organisms, with general body cells making service calls upon the cells of the body’s organs or even the services of cells within the organs of other bodies. Thus, the SOA revolution is somewhat similar to the Cambrian Explosion. SOA first began with CORBA in 1991, but it really did not catch on until 2004, when IBM began to extensively market the concept. So again, it took about 13 years, or 410 million seconds, for SOA to catch on.

Was the Cambrian Explosion a Real Explosion?
So now we see that the evolution of software over the past 2.2 billion seconds has also proceeded along in fits and starts, with long periods of stasis interrupted by apparently abrupt technological advances. As I pointed out in When Toasters Fly, this is simply evidence of the punctuated equilibrium model of Stephen Jay Gould and Niles Eldredge. For some reason, the spark of a new software architectural element spontaneously arises out of nothing, but its significance is not recognized at the time, and then it just languishes for many hundreds of millions of seconds, hiding in the daily background noise of IT. And then just as suddenly, after perhaps 400 – 900 million seconds, the idea finally catches fire and springs into life. Now, why does the evolution of living things and of software both behave in this strange way? My suggestion is to simply take a good look at the phrase “Cambrian Explosion” – what do you see? Well, it appears that some kind of explosion occurred during the Cambrian, and that is the key to the whole business – it really was an explosion! In Is Self-Replicating Information Inherently Self-Destructive?, I discussed how negative feedback loops are stabilizing mechanisms, while positive feedback loops are destabilizing mechanisms that can lead to uncontrolled explosive processes. I also explained how in 1867, Alfred Nobel was able to stabilize the highly unstable liquid known as nitroglycerin, by adding some diatomaceous earth and sodium carbonate to it, to form the stable solid explosive we now call dynamite. The problem with nitroglycerin was that the slightest shock could easily cause it to detonate, but dynamite requires the substantial activation energy of a blasting cap to set it off. In Figure 4 below we see the potential energy function of dynamite, depicted as a marble resting in the depression of a small negative feedback loop, superimposed upon a much larger explosive positive feedback loop. So long as the dynamite is only subjected to mild perturbations or shocks, it will remain calmly in a stable equilibrium. However, if the marble is given a sufficient shock to get it over the hump in its potential energy function, like a stick of dynamite subjected to the detonation of a blasting cap, the marble will rapidly convert all of its potential energy into mechanical energy, as it quickly rolls down its potential energy hill, like the molecules in nitroglycerin releasing their chemical potential energy into the heat and pressure energy of a terrific blast. This is the essence of the punctuated equilibrium model. For most times, predators and prey are in a stable equilibrium, but then something happens to disturb this stable equilibrium to the point where it reaches a tipping point, and crosses over from the stability of negative feedback loops to the explosive instability of positive feedback loops. Predators and prey then enter into an unstable arms race driven by positive feedback loops, and that is when evolution kicks into high gear and gets something done for a change, like creating a new species or technology.

Figure 4 – Like dynamite, new technologies like the eye are trapped in a stable equilibrium by negative feedback loops, until sufficient activation energy comes along to nudge them into a positive feedback loop regime, where they can explode and become ubiquitous (click to enlarge)

So my suggestion is that the Cambrian Explosion was indeed a real explosion, in the form of an uncontrolled arms race between advancing eyeballs and defensive hard parts. I think that Andrew Parker may have, at long last, really gotten the root cause for the Cambrian Explosion right. The root cause of this arms race was a new form of predation; active predation aided by a new visual sense made possible by eyes, and this new form of predation was the blasting cap that set it all off. But what set off the blasting cap? My suggestion would be – nothing in particular. When you insert a blasting cap into a stick of dynamite, the blasting cap has a pair of copper wire leads running away from the blasting cap that are connected together at their far end with a grounding clip, so that stray electrical voltages do not accidentally set off the blasting cap. To detonate the blasting cap, you remove the grounding clip and then connect the lead wires to a battery-operated detonator. As a young geophysicist, exploring for oil on a seismic crew in the swamps of Louisiana, I vividly recall a fistfight that broke out one day between two crew members. Our explosives technician, known as the Loader, was working on a long string of explosive Nitramon cartridges to be later lowered down into a shot hole to generate seismic waves in the Earth. We were behind schedule, so at the same time, the crew foreman, known as the Observer, was busily using a pocket knife to scrape away the plastic insulation from the lead wires running from the recording field truck to the blasting cap leads. The trouble was that the blasting cap had already been inserted into the first Nitramon cartridge in the string of cartridges, and the grounding clip had also been removed. So when the Loader saw what the Observer was doing back at the recording truck, he ran back to the field truck and tore into him with a vengeance screaming, “Don’t you go messin’ with my life!”. Our Loader was rightly concerned that the contact of the steel pocket knife blade with the copper lead wires could have triggered a voltage spike that could have detonated the blasting cap and the Nitramon string that he was holding!

So here is my take on the root cause of the Cambrian Explosion. What seems to happen with most new technologies, like eyeballs or new forms of software architecture, is that the very early precursors do not provide that much bang for the buck. If you look at the slightly depressed eyespot of step 2 in Figure 2 above, you can imagine that it probably did not provide very much of a selective advantage in the Precambrian, with all those blind and passive predators stumbling around in the dark, and it probably was not that great at locating prey either. So innovative new technologies, like eyeballs or the Internet, seem to languish for hundreds of millions of years (or seconds), waiting for a blasting cap to go off to really get things started because, initially, these new technologies are just not that great at doing what they ultimately can do. However, once these new technologies do catch fire, they then seem to rapidly explode out into dominance, like the white-hot ball of gas at 5,000 0K from the blast of nitroglycerine in a stick of dynamite. I like to think of this supplement to the Light Switch theory of the Cambrian Explosion as the Dynamite Model of the Cambrian Explosion. Just think of a stick of dynamite with an ungrounded blasting cap, patiently waiting for a stray voltage to come along and set it off. I think the Dynamite Model can help to explain the long gap between the onset of multicellular organisms about 900 million years ago, and the Cambrian Explosion that followed about 400 million years later.

So perhaps the Cambrian Explosion really got started by some soft-bodied trilobites that became stranded in a region with very few prey, and that whatever those trilobites were using to find prey at the time, was no longer sufficient to keep them alive for very long. Now along comes a single trilobite with a mutation that provided for a slightly better-than-usual visual field from its very primitive precursor of a compound eye, and that single, lone, hungry trilobite managed to spot a small wiggling worm on the seafloor within striking range. As with the evolutionary history of software, such a minor event would quickly get lost in the daily noise of everyday life, and that is why it is so difficult to put your finger on the exact cause of a technological explosion like the Cambrian Explosion, but I bet that something like that is all that it took.

Comments are welcome at scj333@sbcglobal.net

To see all posts on softwarephysics in reverse order go to:
https://softwarephysics.blogspot.com/

Regards,
Steve Johnston

Saturday, October 29, 2011

Is Self-Replicating Information Inherently Self-Destructive?

I just finished reading The Medea Hypothesis (2009) by my most favorite paleontologist, Peter Ward. I have read all of Ward’s books because they provide a deep insight into the evolutionary history of life on Earth over the past 4.0 billion years, and since living things and software are both forms of self-replicating information, his books can also provide some insights into the evolutionary history of software over the past 2.2 billion seconds, ever since Konrad Zuse cranked up his Z3 computer in May of 1941. Indeed, because living things and software are both forms of self-replicating information that have evolved through the Darwinian mechanisms of innovation and natural selection, and both have converged upon similar paths through Daniel Dennett’s Design Space, as each had to deal with the second law of thermodynamics in a nonlinear Universe, there is much to be learned about the origin and evolution of life in the Universe by examining the origin and evolution of software on Earth (see Self-Replicating Information and SoftwareBiology for details). And this is a two-way street – much can also be learned about the nature of software evolution by examining the evolution of life on Earth.

In The Medea Hypothesis, Peter Ward proposes the antithesis of the Gaia hypothesis. Gaia was the primordial Earth-goddess of the ancient Greeks, essentially the embodiment of a benevolent Mother Nature, and in the 1970s, James Lovelock and Lynn Margulis proposed that as a whole, the entire biosphere behaved in a coordinated manner that was beneficial to the ongoing existence of life itself. The Gaia hypothesis proposes that the biosphere as a whole manages to self-regulate the geophysical and geochemical processes of the Earth, by using negative feedback loops, in order to maintain the habitability of the Earth over billions of years. An example of a negative feedback loop is your home furnace and thermostat. When your house cools down below the lower set point of the thermostat, the thermostat sends a signal to your furnace to turn it on. As your house warms up, it eventually exceeds the upper set point of the thermostat, and then the thermostat sends a signal to your furnace to shut it down. In this way, your thermostat performs an automated regulation of the temperature within your house that keeps your house within a comfortable range of about 10F. Notice that your thermostat manages to accomplish this seemingly sophisticated control process with no built-in intelligence or software whatsoever. Negative feedback loops automatically keep systems in a stable equilibrium by simply pulling them back into a narrow range of operational conditions. That is the beauty of using negative feedback loops to control complex systems – they lead to inherently stable and self-regulated systems, without the need of an overly complex control mechanism. Here is another example of a negative feedback loop in action. Extend both of your index fingers out in front and carefully place each end of a ruler on top of your two outstretched fingers. Now slowly bring your fingers together, letting the ruler slide freely on top of each finger, as you bring your fingers closer together. As you do so, you will find that the ruler always remains balanced upon your fingers, and you will end up with both fingers together precisely at the midpoint of the ruler. Try as you may, you will not be able to obtain any other result. You will always end up with the ruler carefully balanced at its midpoint on your two fingers when your two fingers have finally met in the center.

Positive feedback loops do just the opposite. Positive feedback loops cause systems to explode out of control, by using the amplified output of the feedback loop as the input to the feedback loop and thus causing the output to quickly expand out of control. Explosives, like nitroglycerine, are therefore prime examples of positive feedback loops in action. When nitroglycerine detonates, the liquid nitroglycerine rapidly decomposes via the chemical reaction:

4 C3H5(NO3)3 → 12 CO2 + 10 H2O + 6 N2 + O2

Notice that the liquid nitroglycerine turns completely into gases at the temperature at which nitroglycerine detonates. This alone generates gases that would occupy more than 1,200 times the original volume of the liquid at normal room temperature and pressure. However, because the above chemical reaction is also very exothermic, meaning that it gives off large amounts of heat energy, the generated gases are raised to a temperature close to that of the surface of the Sun, about 5,000 0K, which causes the generated gases to further greatly expand, creating a tremendous blast. When nitroglycerine detonates, chemical potential energy is quickly released because the weak bonds of the atoms in the nitroglycerine molecules rearrange to form new molecules with stronger bonds, such as N2, H2O, and CO2, releasing large quantities of chemical potential energy in the process. Since higher temperatures make chemical reactions run even faster, when nitroglycerine detonates, the initial decomposition of a small number of molecules causes a pressure wave to form that detonates the nitroglycerine in the immediate surrounding area. The resulting self-sustained shock wave propagates through the nitroglycerine at 30 times the speed of sound, as a near-instantaneous pressure-induced chemical reaction that transforms the small volume of liquid nitroglycerine into a huge quantity of white-hot gas at a temperature of 5,000 0K. This is what makes nitroglycerine such a powerful explosive.

Nitroglycerin was first synthesized by the chemist Ascanio Sobrero in 1847, but the main problem with nitroglycerine was that the slightest shock could cause it to easily detonate. In 1867, Alfred Nobel came up with an improvement to nitroglycerin that vastly improved its stability, and therefore its utility. By simply mixing three parts of nitroglycerin, with one part of diatomaceous earth, and a small amount of sodium carbonate, Nobel created a very stable solid explosive, that we now call dynamite. Dynamite rapidly became very popular because it could be rolled up into convenient paper-wrapped sticks that were very easily loaded into the drill holes used for blasting rock during mining operations, and dynamite was also very resistant to accidental detonation from small shocks. In fact, in order to detonate dynamite, one must use a blasting cap or a high-temperature fuse to set it off.

Figure 1 – Negative feedback loops regulate systems, while positive feedback loops cause systems to explode (click to enlarge)


The differences between positive and negative feedback loops can be further illustrated with the use of a few diagrams. In the left side of Figure 1, we see a system composed of a marble and a bowl in a state of stable equilibrium under the influence of a negative feedback loop. Jiggling the system with a small perturbation always results in the marble safely returning to the center of the bowl. The shape of the bowl can also be thought of as a plot of the potential energy function of the system. The combined system of the marble and the bowl has a minimum potential energy when the marble is safely in the center of the bowl, and the negative feedback loop has a tendency to keep the marble there. On the right side of Figure 1, on the other hand, we see a similar system composed of a marble on top of an overturned bowl that is an example of a positive feedback loop in an unstable equilibrium. Like nitroglycerine, the slightest addition of energy to the system, by perturbing the system with a little jiggle, will cause the marble to roll off the overturned bowl with increasing velocity, as it quickly turns all of its potential energy into kinetic energy, like the atoms in a container of nitroglycerine rapidly turning their chemical potential energy into the kinetic energy of molecular motion, also known as heat energy.

What Alfred Nobel did was to superimpose a small negative feedback loop on top of the very large positive feedback loop of nitroglycerine, by mixing nitroglycerine with a small amount of stabilizing diatomaceous earth and sodium carbonate. In Figure 2, we see the resulting plot of the potential energy function for dynamite, consisting of the large positive feedback loop of nitroglycerine, with a small dimple of a negative feedback loop on top. Now in order for the marble to release its vast amount of potential energy, it needs a quantity of activation energy to get the marble over the hump at the top of the curve. This is why dynamite requires the detonation of a blasting cap or the heat from a high-temperature fuse in order to detonate.

Figure 2 – In 1867, Alfred Nobel discovered that by adding some diatomaceous earth to nitroglycerin, he could superimpose a small negative feedback loop on top of the much larger positive feedback loop of nitroglycerin (click to enlarge)

In a similar manner, the Gaia hypothesis proposes that life on Earth has taken control of the Earth’s geophysical and geochemical processes, leaving those with negative feedback loops alone, and at the same time, domesticating the positive feedback processes that would, if left to their own devices, end life on Earth, by superimposing small negative feedback loops upon them. According to the Gaia hypothesis, the biosphere has simply added a little diatomaceous earth to nitroglycerin as needed, in order to maintain the Earth in a stable equilibrium suitable to the needs of the biosphere.

In The Medea Hypothesis, Peter Ward proposes just the opposite. Medea was also a character in ancient Greek mythology, the wife of Jason of the Golden Fleece fame. When Jason abandoned Medea, she killed their two children as revenge, so Peter Ward rightfully thought that Medea represented just the opposite of the benevolent Mother Nature characterized by Gaia. In The Medea Hypothesis, Peter Ward proposes that because all forms of life in the Universe arise from the Darwinian processes of inheritance and innovation honed by natural selection, that necessarily, all living things in the Universe are selected for the ability to modify their home planets with positive feedback loops that enhance the survivability of the individual, not negative feedback loops that enhance the survivability of all. From Ward’s point of view, all living things resulting from Darwinian processes must necessarily select for living things that can self-replicate at all costs, with little consideration for their fellow beings sharing the resources of the planet, nor even for their own long-term survival. The urge to self-replicate at all costs necessarily leads to living things that outstrip their resource base through positive feedback loops.

In The Medea Hypothesis, Peter Ward lists about a dozen examples from the deep past where the biosphere has precipitated Medean events that greatly reduced the diversity of life on Earth and greatly reduced its carrying capacity. The first such event was the take over of life by DNA. In Self-Replicating Information, I described Freeman Dyson’s two-stage theory for the origin of life on Earth. In Dyson’s theory, metabolic protocells arise first and are later parasitized, first by RNA, and then by DNA. So essentially a very diverse biosphere of metabolic protocells went through the most significant mass extinction in Earth’s history, to be totally replaced by a single form of DNA-based life. Peter Ward considers the total extinction of all other forms of life by DNA about 4.0 billion years ago to be the most significant event supporting the Medea hypothesis. The next major Medean event came about 2.8 billion years ago with the arrival of cyanobacteria on the scene. The cyanobacteria could photosynthesize sunlight, water, and carbon dioxide into sugars, releasing the toxic gas oxygen as a byproduct. Oxygen is a highly reactive gas and was very toxic to the anaerobic bacteria of the day. For example, today anaerobic bacteria must hide from oxygen at the bottoms of stagnant seas and lakes. But initially these ancient anaerobic bacteria were spared from the Oxygen Catastrophe which took place 300 million years later (2.5 billion years ago) because first all the dissolved iron in the oceans had to be oxidized and deposited as red-banded iron formations before the oxygen level could rise in the Earth’s atmosphere. Chances are that your car was made from one of these iron deposits because they are the source of most of the world’s iron ore. So you can think of your car as a byproduct of early bacterial chemical warfare that nearly killed off all life on Earth. But by far, the most disastrous of the Medean positive feedback loops caused by living things on Earth is the wholesale removal of carbon from the Earth’s surface. Peter Ward explains that living things are constantly sucking carbon dioxide out of the Earth’s atmosphere and converting it to calcium carbonate shells that are later deposited upon the sea bottom. As these carbonate deposits are subducted at the Earth’s subduction zones into the asthenosphere, some of the carbon is released by volcanoes as carbon dioxide, but most is lost to the Earth’s upper mantle, never to return to the Earth’s surface. This is certainly a bad long-term thing for carbon-based life, and Ward shows that within the next 500 – 1,000 million years, the level of carbon dioxide in the Earth’s atmosphere will decline below the level that complex multicellular plants can use for photosynthesis, and that will be the end of complex multicellular life on Earth. So the end of complex life on Earth will come from life itself and not from an increasingly brighter Sun, as described in most popular books. The game-changing paradigm shift of the Medea hypothesis, as opposed to the Gaia hypothesis, is that life on Earth as a whole is not necessarily acting in its own self-interest, so the solution to environmental problems may not simply be to remove mankind from the equation and let the biosphere return to its natural state. Instead, Ward suggests that some geoengineering is in order to extend the habitability of the Earth.

Peter Ward goes on to describe many other Medean events in the Earth’s history, where the biosphere has seemingly tried to do itself in with positive feedback loops gone wild. One only has to look to our current suicidal habit of spewing 24 billion tons of carbon dioxide each year into the Earth’s atmosphere, and the impending disastrous consequences from global climate change with rising sea levels, to see a Medean event in progress in real time. We have already raised the carbon dioxide level of the Earth’s atmosphere to 390 ppm, up from a level of about 280 ppm prior to the Industrial Revolution, and it is currently rising at the rate of 2.39 ppm per year. As we saw in How to Use Your IT Skills to Save the World, in the coming years, it will be rising at a rate of 3 or 4 ppm per year, as the demand for energy explodes with the increasing demand from the emerging economies of the world, and if it should ever reach a level of 1,000 ppm, we might even trigger another greenhouse gas mass extinction, like the Permian-Triassic mass extinction that nearly killed off all complex multicellular life 251 million years ago. Indeed, we seem to be running in a very close race. Our genes, memes, and software are seemingly on the verge of morphing into a new form of conscious intelligence within the next 100 years or so that will probably be much less dependent upon the current pristine conditions on Earth that are very supportive of intelligent carbon-based life forms such as Homo sapiens. Perhaps this transition will occur before events get out of hand, or perhaps not.

This brings up the fundamental issue of this posting – is all self-replicating information similarly doomed to self-destruction? In Self-Replicating Information I defined self-replicating information as:

Self-Replicating Information – Information that persists through time by making copies of itself or by enlisting the support of other things to ensure that copies of itself are made.

with all forms of self-replicating information having the following characteristics in common:

The Characteristics of Self-Replicating Information
1. All self-replicating information evolves over time through the Darwinian processes of inheritance, innovation and natural selection, which endows self-replicating information with one telling characteristic – the ability to survive in a Universe dominated by the second law of thermodynamics and nonlinearity.

2. All self-replicating information begins spontaneously as a parasitic mutation that obtains energy, information and sometimes matter from a host.

3. With time, the parasitic self-replicating information takes on a symbiotic relationship with its host.

4. Eventually, the self-replicating information becomes one with its host through the symbiotic integration of the host and the self-replicating information.

5. Ultimately, the self-replicating information replaces its host as the dominant form of self-replicating information.

6. Most hosts are also forms of self-replicating information.

7. All self-replicating information has to be a little bit nasty in order to survive.

8. The defining characteristic of self-replicating information is the ability of self-replicating information to change the boundary conditions of its utility phase space in new and unpredictable ways by means of exapting current functions into new uses that change the size and shape of its particular utility phase space. See Enablement - the Definitive Characteristic of Living Things for more on this last characteristic.

Since all forms of self-replicating information are Darwinian in nature, the Medea hypothesis would indicate by extension that all forms of self-replicating information are indeed self-destructive because of their tendency to create positive feedback loops that outstrip their resource base. Software certainly seems to be guilty of this – it constantly outstrips the hardware base upon which it runs. That is why you need to buy a new PC every four or five years and why IT departments have to constantly upgrade their mainframes and server farms with more powerful hardware. I got my first PC at work twenty-five years ago in 1986. It was an IBM PC/AT with a 6 MHz Intel 80-286 processor and a 20 MB hard disk, with a total of 460 KB of memory. It cost about $1600 at the time - about $5,000 in 2011 dollars. Today, a $500 Dell PC comes with a 2.66 GHz dual-core Intel Core i5 processor, 8 GB of memory, and a 320 GB hard disk. So a $500 Dell comes with 16,384 times as much disk, 16,384 times as much memory, and runs about 1,000 times faster than my $5,000 IBM PC/AT did in 1986, but that $500 Dell PC will probably buckle under the software load running upon it five years from now.

So perhaps the solution to Fermi’s Paradox is that all forms of self-replicating information self-destruct before they can embark upon exploring a galaxy. Fermi’s Paradox, first proposed by Enrico Fermi over lunch one day in 1950, asks the question:

Fermi’s Paradox - If the universe is just chock full of intelligent beings, why do we not see any evidence of their existence?

That is certainly a sobering thought. But let us now turn to a more mundane application of the Medea hypothesis to the “real world” of human affairs, with which most Homo sapiens are completely obsessed.

Is the World Economy Also Medean in Nature?
As I pointed out in SoftwareBiology, world capitalism is a Darwinian system of economics and also a form of self-replicating information in the form of a complicated financial meme-complex. In MoneyPhysics and MoneyPhysics Revisited, I also showed how positive feedback loops, spinning out of control, led to the collapse of the world financial systems in 1929 and 2008.

Since capitalism is a Darwinian system of economics, capitalism must also be subject to the Medea hypothesis and, therefore, have an innate self-destructive nature because of its tendency to foster uncontrolled positive feedback loops that tend to do itself in. So in that regard, Karl Marx may have been right about the self-destructive tendencies of capitalism. However, Marx’s solution of creating a utopian "dictatorship of the proletariat" proved disastrous in the 20th century, as demonstrated by the failure of both socialism and communism. After all, we are all just DNA survival machines, programmed to replicate and operate in our own self-interest, so attempts to establish utopian communist states in the 20th century, simply ended with the establishment of brutal oligarchies more reminiscent of feudalism than of a classless worker’s state. Therefore, capitalism and free markets are the most natural way to run an economy through the miracle of Adam Smith’s “invisible hand” because they allow people to work in their own self-interest. The simple beauty of capitalism is that billions of people, all working in their own self-interest, will naturally create a complex and dynamic world economy, with no need for an external designer. But because of the Medea hypothesis, capitalism does have its limitations. Capitalism selects for behaviors that create positive feedback loops, resulting in financial booms and busts. Just as it is currently in everybody’s self-interest to pollute the Earth’s atmosphere with unchecked emissions of carbon dioxide, in recent years it was in the self-interest of all to pollute the worldwide financial system with toxic subprime mortgages. Everybody benefited, so long as American home values kept rising - low income homeowners, real estate brokers, real estate speculators, local banks, mortgage brokers, Fannie Mae, Freddie Mac, investment banks, bond rating agencies, insurance companies like AIG, and private investors all benefited from the leverage and complex derivatives hiding the impending catastrophe of subprime mortgages, until the bubble burst. Having everybody working in their own self-interest does amazing things, but because of the Medea hypothesis, it also can lead to the ruin of all if left unchecked.

Actually, we figured this all out in the 20th century. Since socialism and communism do not work, and feudalism has a very low economic output, with many undesirable social peculiarities to boot, we are left with capitalism and whatever shortcomings it might have. Because the Darwinian characteristics of laissez-faire capitalism lead to excesses brought on by unchecked positive feedback loops, it is necessary for a government to step in by imposing regulations upon the economy that squelch the bubbles that lead to booms and subsequent busts. Essentially, the government needs to superimpose small negative feedback loops on top of the very large, inherently positive, feedback loops of capitalism, like adding a little diatomaceous earth to nitroglycerin. So legislation like the Dodd–Frank Wall Street Reform and Consumer Protection Act of 2010 are necessary to bring stability to the world financial systems.

In today’s hostile political climate, one frequently hears politicians wax-poetic about returning to the apparent splendor of 19th-century laissez-faire capitalism, with its absence of income taxes, regulations, and a central banking system in the form of the current Federal Reserve system. However, this nostalgia for 19th-century laissez-faire capitalism ignores the Dickensian poverty and social injustice of the 19th century, with its rampant child labor, tainted foods, pollution, unsafe working conditions and frequent financial collapses. To get a flavor of unregulated laissez-faire capitalism at work, try this little experiment. Type in the string “panic of” into Google and let Google complete your query. You will find:

panic of 1819
panic of 1837
panic of 1857
panic of 1873
panic of 1893
panic of 1907
panic of 2008

Now read through the above list of hits on the Wikipedia and see how well unregulated laissez-faire capitalism works. For some reason, there is no “panic of 1929”, but you should read about that financial collapse as well.

Over the past 100 years we have modified the rules under which capitalism operates, in a manner to allow capitalism to work its miracles in a manner useful to mankind, by adopting child labor laws, pollution controls, financial regulations, regulations to ensure safe working conditions, and a graduated income tax to level out income disparities. We certainly do not want to return to the excesses of the 19th century, we already did that once before, and it was not very pleasant. And just as Peter Ward suggested that some geoengineering is in order to preserve the habitability of the Earth, we should allow governments to intervene in the natural boom and bust cycles of capitalism, by using the theories of Keynesian economics to stimulate spending and production, and the Monetarism of Milton Friedman to manipulate the money supply to smooth out the business cycles, because capitalism, like life on Earth, is a mindless form of self-replicating information that does not necessarily act in its own long-term self-interest.

Comments are welcome at scj333@sbcglobal.net

To see all posts on softwarephysics in reverse order go to:
https://softwarephysics.blogspot.com/

Regards,
Steve Johnston