Sometimes you encounter clear examples of how the timing of feedback can lead to problems. Yesterday I encountered an interesting bug in our software platform, due to a strangely implemented PHP function. Due to an incorrect choice by a core PHP developer, a bug on our side was hidden for a few years, becoming apparent on January 1st, 2011.
Some background:
The "mktime" function within PHP (which is a modified copy of the C-code mktime function) can be used to do various smart calculations on dates and time. One of its parameters is the year. This parameters has two ranges of valid values: 00 to 99 and the four character full year (e.g. 2011). The C-code version has a different definition: it takes the amount of years since 1900. Effectively this means that up until the year 2000 these two variant had overlapping valid input. To make things worse, a standard usage off this function in C would be to feed the result of the "localtime()" function into mktime. Localtime() uses the same years since 1900 as mktime in C. In PHP localtime() is also available. (Identical to C, years since 1900) The standard way of using this in C therefore worked correctly in PHP up until the year 2000. In many ways a standard millenium problem: code that worked correctly would brake on January 1st 2000.
Most PHP code in the world will have fixed in that period. (for example by adding 1900 to the result of localtime() before feeding it into mktime)
But then, in 2005, for reasons I can't really imagine, a core PHP developer decided to change the implementation of mktime by allowing 3 number dates (years since 1900). So far, so good, this would not be a big problem, but he did this only by allowing values up until 110 instead of the more logical 999! Effectively he reintroduced the same millenium bug for the year 2011.
Back to the concept of feedback:
What this change did was to hide (for a few years) incorrect implementations. Instead of calling out, spectacularly crashing, or some other obvious feedback, it didn't provide information for the developers that they did something wrong. No, at some inconvenient moment (by definition in the middle of the night) it just stopped producing valid output, creating a potential dangerous situation. (Murphy's law 2.0: All software ever developed will be used in some life critical situation)
Through the lack of correctly timed feedback this created an unstable situation. Especially the timing of the moment at which the problem would become known has been moved from during development and testing, to during production.
Saturday, January 8, 2011
Sunday, January 2, 2011
Feedback to create order
Interference by itself is not a very complete model of reality and complexity. It doesn't account for the difference between "random" structures and the stable, highly complex entities that have emerged. The interference between two sound waves can easily lead to some random noise, without any musically appealing structure. The main difference between random emergence and complex, emergent entities, lies in the concept of feedback. Without some form of feedback the emergent patterns are semi-static: They might be random or might be highly repetitive.
Feedback is a term commonly found in the field of control systems engineering. It stands for the effect of using the current result of a system to control the future results of the system. In general this is as 'simple' as putting a sensor in the system, which measures the result and compares this result with the requested demand. If the result is not equal to the request, this difference (the error signal) can be used to steer the system to the required output. There are some well known examples of such systems, like the thermostat at home, car cruise control, but also our own sense of balance, allowing us to stand.
If an emergent entity would 'want' to have a longer existence (longer than just the random appearance due to interference) it needs to provide feedback to the separate entities that form it. In most complex structures in the world around us, this form of feedback is easily discernible:
Feedback is a term commonly found in the field of control systems engineering. It stands for the effect of using the current result of a system to control the future results of the system. In general this is as 'simple' as putting a sensor in the system, which measures the result and compares this result with the requested demand. If the result is not equal to the request, this difference (the error signal) can be used to steer the system to the required output. There are some well known examples of such systems, like the thermostat at home, car cruise control, but also our own sense of balance, allowing us to stand.
If an emergent entity would 'want' to have a longer existence (longer than just the random appearance due to interference) it needs to provide feedback to the separate entities that form it. In most complex structures in the world around us, this form of feedback is easily discernible:
- In evolutionary systems this feedback would be called the reward function.
- In astronomy this feedback is provided in the form of gravity, in which the emergent system (stars, planets, rocks, etc) are formed by separate atoms, which through their own mass keep the emergent system stable.
- In social environments, this feedback is formed by social control, laws, norms, etc.
Thursday, December 16, 2010
Analogies and Interference
When I try to explain something to others, (and to myself as well) I make extensive use of images and analogies. There are a few reasons for taking this approach, with my lack of real mathematical expertice as a front-runner. But using analogies has some serious drawbacks: the listener might be tempted to understand the analogy, but miss the underlying abstract concept being described. Similarly I do run into issues where my mental model looks like it fully captures a concept, but put to stress it turns out to be just an analogy.
One important analogy I've been working with lately is the concept of interference, specifically the interaction between (sound) waves which leads to new, different patterns. These patterns can't be fully described from the originating waves themselves individually. For a simple pattern of two constant waves, the mathematics describing the higher level patterns is easy enough. But as soon there are many more changing waves, the mathematical description of the patterns quickly becomes too complex. The resulting patterns quickly become chaos.
But precisely these interferences lead to music. Although it's theoretically possible to describe a piece of music in a complete mathematical fashion, only using the underlying soundwaves as the input, there is no musician who uses such tools. (Computers did slightly alter this statement, I know) No, for musicians a language on a more abstract level has been defined to describe music, based on specific notes, octaves, etc.
In some, hard to understand manner, the interferences between separate entities (waves) has lead to higher level structure (music). I've been using this analogy to describe the concept of emergence of complex structures from separate entities (or agents). To me it works to explain how complexity can exist. This leads me to using statements like: "The cell is the result of interference between molecules, which are nothing more then an interference between atoms".
I'm not sure yet if this analogy usage is actually helping in explaining (and qualitative proving) certain ideas about the world outside. As I'm not equiped to mathematically proof these statements and ideas, this is probably the best approach available to me. If any of you has found a better way, please tell me:)
One important analogy I've been working with lately is the concept of interference, specifically the interaction between (sound) waves which leads to new, different patterns. These patterns can't be fully described from the originating waves themselves individually. For a simple pattern of two constant waves, the mathematics describing the higher level patterns is easy enough. But as soon there are many more changing waves, the mathematical description of the patterns quickly becomes too complex. The resulting patterns quickly become chaos.
But precisely these interferences lead to music. Although it's theoretically possible to describe a piece of music in a complete mathematical fashion, only using the underlying soundwaves as the input, there is no musician who uses such tools. (Computers did slightly alter this statement, I know) No, for musicians a language on a more abstract level has been defined to describe music, based on specific notes, octaves, etc.
In some, hard to understand manner, the interferences between separate entities (waves) has lead to higher level structure (music). I've been using this analogy to describe the concept of emergence of complex structures from separate entities (or agents). To me it works to explain how complexity can exist. This leads me to using statements like: "The cell is the result of interference between molecules, which are nothing more then an interference between atoms".
I'm not sure yet if this analogy usage is actually helping in explaining (and qualitative proving) certain ideas about the world outside. As I'm not equiped to mathematically proof these statements and ideas, this is probably the best approach available to me. If any of you has found a better way, please tell me:)
Tuesday, December 14, 2010
(alien) life?
Two weeks ago, several (Nasa) scientists made an important discovery: life is more complex then we thought. Sounds like a no-brainer to me. Issue is that these scientists used a very narrow definition of the concept "life". In their experience life only exists in the form of specific biological processes and elements, which combined lead to all forms of life as we currently see around us. This approach to defining life has a severe drawback: it only captures biological life-forms, and as they discovered, only a subset of those as well.
It seems to me that a broader definition of the concept of life is required. But where to start?
(An interesting read and good overview of the many issues is given by Joseph Morales over at http://baharna.com/philos/life.htm )
To me "life" is the emergent behavior of complex natural interactions. If these interactions lead to recognizable entities, which evolve, learn and grow, then I would consider them alive. This is a statement with a lot of words that need further explination, definition and nuances. A large part of the posts in this blog will be dedicated to these concepts, focussing on these building blocks of life.
But one consequence of my approach to the concept of "life" is that I consider a much larger set of phenomena part of the "living" category. For example, as much as a ant-colony as a whole is alive, I would also consider a religion as a living organism. The traffic patterns around cities also "lead a life of their own". Many other examples can be found.
From this perspective the question of the existence of extraterrestrial life is also interesting: Isn't it interesting that we consider our sun alive, compared to old "dead-stars"? We are using the "life"-jargon for stars and galaxies, perhaps more correctly then we're giving ourselves credits for. Those are already existing, proven, extraterrestrial life-forms, we just need to acknowledge them as such.
It seems to me that a broader definition of the concept of life is required. But where to start?
(An interesting read and good overview of the many issues is given by Joseph Morales over at http://baharna.com/philos/life.htm )
To me "life" is the emergent behavior of complex natural interactions. If these interactions lead to recognizable entities, which evolve, learn and grow, then I would consider them alive. This is a statement with a lot of words that need further explination, definition and nuances. A large part of the posts in this blog will be dedicated to these concepts, focussing on these building blocks of life.
But one consequence of my approach to the concept of "life" is that I consider a much larger set of phenomena part of the "living" category. For example, as much as a ant-colony as a whole is alive, I would also consider a religion as a living organism. The traffic patterns around cities also "lead a life of their own". Many other examples can be found.
From this perspective the question of the existence of extraterrestrial life is also interesting: Isn't it interesting that we consider our sun alive, compared to old "dead-stars"? We are using the "life"-jargon for stars and galaxies, perhaps more correctly then we're giving ourselves credits for. Those are already existing, proven, extraterrestrial life-forms, we just need to acknowledge them as such.
Welcome
Through this blog I'll like to share some of my thoughts on the relation between feedback, complexity, emergence, robustness, learning, life, and philosophy. Infused around it are thoughts, discussions, and descriptions of the world of my books.
Being an engineer, I'll take an technical approach to describing, modeling and talking about these subjects. The usual disclaimers apply, both to the relation of this blog with my employment and to the usability, offensiveness and possible private nature of some of the posts.
"Never attribute to malice, what can be attributed to stupidity"
Please tell me when you don't like something I wrote, it's probably due to my naivity or ignorance. I've added some buttons for you to provide me quick feedback.
Being an engineer, I'll take an technical approach to describing, modeling and talking about these subjects. The usual disclaimers apply, both to the relation of this blog with my employment and to the usability, offensiveness and possible private nature of some of the posts.
"Never attribute to malice, what can be attributed to stupidity"
Please tell me when you don't like something I wrote, it's probably due to my naivity or ignorance. I've added some buttons for you to provide me quick feedback.
Subscribe to:
Posts (Atom)