Friday, September 28, 2007

Software as a Virtual Substance

Before diving into thermodynamics, let’s map out the road ahead. Remember that the underlying concept of softwarephysics is that the global IT community has unintentionally created a pretty decent computer simulation of the physical Universe that softwarephysics depicts as the Software Universe. We then use this simulation in reverse. Understanding how the physical Universe operates, allows us to better model how software behaves in the Software Universe. We do this by visualizing software as a virtual substance. Now how do you model a virtual substance? It might help to think of another virtual substance that we are all more familiar with – money. Many people devote their entire educations and careers to learning how to manipulate and model the virtual substance we call money. Nobody gets squeamish about the Federal Reserve Board expanding or contracting the money supply, manipulating interest rates, or trying to raise or lower our exchange rate with other currencies. In fact, you can win a Nobel Prize for such efforts. But for the most part, money is simply a collection of bits stored in a network of computers. Is software any less real than money? Now imagine trying to run the modern world economy without the benefit of macro and microeconomic theories to model the ebb and flow of money throughout the world economies. The aim of softwarephysics is to achieve a similar ability to model the behavior of software at differing levels of software architecture by using the physical Universe as a guide.

The Value of Effective Theories
Our current understanding of the physical universe is based upon a collection of effective theories in physics. Recall that an effective theory is an approximation of reality that only holds true over a certain restricted range of conditions and only provides a certain depth of understanding of the problem at hand. Although all effective theories are fundamentally “wrong”, they are still exceedingly useful. All of the technology surrounding you - your PCs, your cell phones, your GPS units, and your air conditioners, vacuum cleaners, cars, and TV sets were all built using the current approximate effective theories of physics. It’s amazing that you can build all these useful gadgets using theories that are all fundamentally “wrong”, but that just highlights the value of effective theories. The crown jewel of physics is the effective theory called QED - Quantum Electrodynamics. QED has predicted the gyromagnetic ratio of the electron, a measure of its intrinsic magnetic field, to 11 decimal places. This prediction has been validated by rigorous experimental data. As Richard Feynman has pointed out, this is like predicting the exact distance between New York and Los Angeles to within the width of a human hair! Yet most physicists believe that someday an even better effective theory will come along to replace QED. I try to carry over this idea of approximate effective theories into my personal and professional lives too, by trying to keep in mind that my own deeply held personal opinions are also just approximations of reality too. This makes it easier to live with, and work with, people of differing viewpoints.

It might seem disheartening that we don’t really understand what is going on in our own Universe and that all we have is a set of very useful approximations of reality. But as Ayn Rand cautioned us, be sure to “check your premises”. What exactly do you mean by reality? Physicists and philosophers have been debating the nature of reality for thousands of years. My personal favorite definition is:

Physical Reality – Something that does not go away even when you stop believing in it.

I find this definition to be flexible enough to keep most people happy, including physicists, theologians, and even most philosophers. When we discuss the implications of quantum mechanics for software, you may be surprised to learn that about 60% of physicists still ascribe to the old Copenhagen interpretation of quantum mechanics (1927) in which absolute reality does not even exist. In the Copenhagen interpretation, there are an infinite number of potential realities. About 30% adhere to a variation of the “Many-Worlds” interpretation of Hugh Everett (1957) which admits an absolute reality, but claims that there are an infinite number of absolute realities spread across an infinite number of parallel universes. And the remaining 10% bank on the really strange interpretations! They all agree on the underlying mathematics of quantum mechanics; they just don’t agree on what the mathematics is trying to say. It’s like trying to figure out what the mathematical formula:

Glass = 0.5

is trying to tell you. Is the glass half empty or half full? So many physicists skirt the whole issue by adopting a positivist approach to the subject. Logical positivism is an enhanced form of empiricism, in which we do not care about how things “really” are. We are only interested in how things are observed to behave, and effective theories are a perfect fit in that regard. In softwarephysics, I am also taking a positivist approach to software. I don’t care what software “really” is, I only care about how software is observed to behave.

Softwarephysics is a Simulated Science
Just as physics is a collection of useful effective theories, softwarephysics is also a matching collection of effective theories. Because softwarephysics is a simulated science, the challenge for softwarephysics is to find the corresponding matching effective theory of physics to apply to software at each level of complexity. At the highest level, we will be using chaos theory which is a theory for nonlinear dynamical systems developed in the 1970s and 1980s. In the physical Universe, one might apply chaos theory to the traffic patterns on the network of expressways found in a large metropolitan area such as Chicago. In a similar fashion, we could apply chaos theory to the complex traffic patterns for a large corporate website residing on 100 production servers - load balancers, firewalls, proxy servers, webservers, WebSphere Application Servers, CICS Gateway servers to mainframes, mailservers, etc. Any IT professional who has ever worked on a large corporate website might indeed guess that chaos theory would provide a fitting description of their daily life, without ever even having heard of softwarephysics! In fact, chaos theory has already been applied to computer networks by many others.

Thermodynamics
If we pull one of the cars out of a traffic jam on one of the expressways and take a look under the hood, we come to the next level in the hierarchy of effective theories - thermodynamics which was developed during the last half of the 19th century. Thermodynamics allows us to understand the macroscopic behaviors of matter. For example, thermodynamics allows us to understand what is going on in the cylinders of a car by relating the pressures, temperatures, volumes, and energy flows of the gases in the cylinders while the engine is running. We can apply these same basic ideas to the macroscopic behavior of software at the program level. The macroscopic behavior of a program can be viewed as the functions the program performs, the speed with which those functions are performed, and the stability and reliability of its performance.

Statistical Mechanics
The next lower level theory in the hierarchy of effective theories is called statistical mechanics. Statistical mechanics was also developed during the last half of the 19th century and allows us to derive the thermodynamic properties of the gases in the cylinders of a car by viewing the gases as a large collection of molecules bouncing around in the cylinders. It also provides us with a definition of information and some very powerful insights into how information operates in the physical Universe. We will see that we can apply these ideas to software at the line of code level by examining the interplay of information and entropy (disorder) at the coding level.

QED and Chemistry
Going still deeper we come to QED (Quantum Electrodynamics) which is the basis for chemistry at the molecular level. QED is an effective theory that reached maturity in 1948 and which is an amalgam of two other effective theories; quantum mechanics (1925) and Einstein’s special theory of relativity (1905). We will use ideas from QED at the line of code level by depicting lines of code as interacting organic molecules, similar to the chemical reactions back at the refinery that made the gasoline for the car in question.

Quantum Mechanics
Deeper still we finally come to quantum mechanics (1925). Quantum mechanics describes the structure and behavior of individual atoms and we will use concepts from quantum mechanics to describe software at the level of individual characters in source code like the carbon and hydrogen atoms found in gasoline molecules.

In summary:

Software ElementPhysical CounterpartEffective Theory
Computer Networks Expressway Traffic Chaos Theory
ProgramsGas in a Cylinder Thermodynamics and Statistical Mechanics
Lines of CodeOrganic MoleculesQED and Chemistry
Source Code CharactersAtomsQuantum Mechanics


When we are finished with all of this, we will have a collection of effective theories for softwarephysics that will allow us to define a self-consistent model for software behavior that can be used for making day-to-day decisions in IT and provide a direction for thought. It will also lead us to the fundamental problem of software and the suggestion that a biological solution is in order.

Next time we will continue on with the saga of steam engine designers and how their struggle led to the development of the first and second laws of thermodynamics, the concept of entropy (disorder) and the discovery of information itself.

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

No comments: