Pagina's

Showing posts with label evolution. Show all posts
Showing posts with label evolution. Show all posts

Tuesday, 14 February 2012

Fractals at the office


I have been struggling with the idea for this post since LKBE11 in October of last year. For most of that period, suffering as I was from a bulging disc in my lower back, I was on large doses of morphine and I attributed my lack of progress to my induced state of mind. The one post I did complete in the same period was meandering and maudlin, and I took that as proof that the problem was the author, not his subject matter.

Now, clear-headed for almost a fortnight, I have only succeeded, despite concerted effort and a sense of urgency (I wanted to post prior to CALM Alpha), in bloating my notes. I've had to accept that the basic problem is that I do not in fact know what it is that I want to say. That is, as long as I do not try to examine my thoughts directly, I 'know' intuitively what it is that I want to express but, as soon as I try to look my subject in the eye, examine it in detail so to speak, it seems to shimmer & fade and dissolve into a million tiny pieces. Each fragment may be open to investigation but it seems that I can only grasp the whole obliquely.

I have played with a number of titles such as “The magic of feedback; the roux to your secret sauce”, “The key to Emergence (Feedback)”, “On Fractals, Feedback and Emergence (Why IT is where it's at)”, “Connectedness; Complexity simplified” and so on. To no avail.

So I have decided to proceed as follows: I will revisit LKBE11 and the topics touched there that are close to my heart, propose some auxiliary reading - inspired by the reading list for Calm Alpha - and wrap up with a brief deliberation (and an outlandish extrapolation) on an emergent order that some feel is on its way, if it isn't in fact already nascent. In doing so I hope to give you, dear reader, some idea of why I think IT is such an exciting field to work in at the moment.

Probability

At LKBE11 Don Reinersten & Alan Shalloway separately made a case against Deming's 95% (as related in an earlier post) while John Seddon wound the conference up with a stinging attack on the idea that individuals could win against the system. In fact this is a (useful) false dichotomy.

Stating that the probability of a person failing to change a system approaches 1, when he or she is a constituent of that system, would seem to preclude any individual successfully effecting change in any system. But we now know that small changes in initial conditions (of any system incorporating recursive feedback) can lead to large scale differences in output over time; the (by now slightly infamous because so widely misunderstood/frequently overstated) butterfly effect.

We humans are not good at probability. The Buddha (karma) and Jesus (Do unto others..., Live by the sword, die by the sword...) knew that the system (society in their case) was a function of the individuals composing it and their interactions. I'm pretty sure that they themselves also understood that their preaching was fundamentally flawed. Doing good acts may well increase the probability of meeting good acts but it's not a direct relationship (certainly not in the asymmetrical power distributions of old). Living by the sword most definitely increases the chances of dying violently, and yet there's many a warrior has passed away peacefully in their sleep.

Both Christianity and Buddhism dealt with this problem by introducing a non-falsifiable reckoning. If a Christian lived a good life they would see paradise in the afterlife, if a Buddhist lived a less than exemplary life he or she would be punished by dint of reincarnation (as a lower form). Don't blame the ancients though, probability continues to trouble us - see for instance the Copenhagen interpretation of Quantum Mechanics (as parodied by Schrodinger's famous thought experiment).

I have found Popper's “Quantum Theory and the Schism in Physics” and, more recently, Nassim Nicholas Taleb's “Fooled by Randomness” to be very helpful in trying to avoid probability pitfalls in my thinking.

And back to LKBE11. Despite the rhetorical enmity, the three speakers mentioned proposed similar methods for improving systems – the way to create an effective and humane system is to give those governed by it the power to adjust same according to their (quantified) experiences working in it. What they might have agreed on was that it was in fact all about the feedback...

Feedback

I was first introduced to the power of feedback, self-similarity (fractals) and all that wonderful stuff by James Gleik's seminal “Chaos”. In the days and weeks after LKBE11 I realised that the principles of the various agile methodologies and lean, and the basic practices they imply, represent in fact a fractal! Delivering value from the start; expand incrementally, refine iteratively, create a trusting/trusted environment, seek out and incorporate feedback early and often – these edicts apply equally well at all levels whether you are writing software, coaching or setting up a new business venture. They are loosely worded, ambiguous even, such that they must be adapted to any given concrete context or scale; no two “instances” of a fractal pattern are the same

And it gets more exciting, for instance, TDD is in many ways a fractal instance of the agile principles; hypothesise, test, reflect, repeat (or OODA, PDCA, do+ inspect&adapt, whatever your flavour or context). Further, Kent Beck's 4 simple design rules are:

  1. Run all the tests (create a trusting/trusted environment)
  2. Contain no duplicate code (expand incrementally)
  3. Express all the ideas the author wants to express (seek out and incorporate feedback early and often)
  4. Minimize classes and methods (refine iteratively)

So, if, for instance, a team is working scrum + lean, with XP inside, guided by A-TDD, self-similar patterns can be observed throughout the system. Multiple levels of fast feedback are then built in, allowing magic to happen, through the emergence of strange loops. Strange Loops? I only began to truly understood the implications of chaos theory, fractals etc. through reading Douglas Hofstadter's “Godel, Escher, Bach; An eternal golden braid”. To do a whopping intellectual feat absolutely no justice I will summarize it by saying that Hofstadter makes the case in this book for emergence as a function of feedback.

Emergence, Evolutionary Change

At LKBE11 I was introduced to the Marshall Model. In his original paper, Marshall states that “The basic premise of Rightshifting is that organisations can improve their effectiveness incrementally (and with little turbulence / disruption), until such time as they approach a transition zone.” but also “At these transition zones, major upheaval – in the form of a shift of mindset – is required to proceed further to the right i.e. to continue to improve the effectiveness of the organisation.



Personally, I suspect that this major upheaval is a symptom of the phase transition as much as an agent thereof. Things proceed incrementally or they do not. Think of heating water through its various physical states, from liquid to solid to gas. The change applied is the addition of heat. Heat may be applied constantly but the behaviour of the system varies. It displays punctuated equilibrium, ice remains ice even as its temperature creeps upwards, as it approaches 0 C strange things start to happen, some liquid water is produced but the rise in temperature seems to stall even as the heat applied remains constant. This is called latency (heat supplied goes into loosening bonds, in this example freeing molecules from their crystal straitjacket instead of raising temperature) and it occurs at all phase transitions. Now, there is increased turbulence too, the newly freed water molecules in our example are sliding around banging into bonds, imparting energy and amplifying the instability of the remaining crystal. So, even though the system displays major disruption and or 'sudden' state changes (large shifts), and allowing for significant qualitative difference on either side of a transition zone (liquid/gas, synergistic/chaordic mindset), it remains so that the change process (heat supply, conscious adaptation of practice) evolves step by step.

For a truly enlightening discussion on (biological) evolution by increment, and much more, see Daniel Dennett's “Darwin's Dangerous Idea” and his “skyhooks & cranes” analogy. Further understanding may be gleaned form John D. Barrow's “Impossibility” which is a delightfully accessible book on limits, tipping points and so on.

Another concept that I was introduced to at LKBE11 which struck me as oddly familiar was Real Options. I was sure I had come across it before. And I had. The central argument of Dennett's (loftily titled) “Consciousness Explained”, is that mind is an emergent property of the brain. A model for consciousness is proposed which boils down to the self as “narrative centre of gravity”; consciousness as an assemblage of mechanistic tricks including a “multiple drafts” model for action. This has largely been borne out by neuroscience since with one important caveat – we do not apply “best fit” when choosing from multiple drafts but “first fit”. For a less speculative discussion on the mechanics of mind, see the excellent and more recent “We are our Brains” by Dick Swaab.

Complexity theory

Dave Snowden also spoke at LKBE11. Cynefin and the sense-making model were an exotic beast to me, angry socialist Celts with a sense of humour less so as it happens. I did not understand everything, and am still quite vague on practical detail even having done pretty much all my reading homework for CALM Alpha, but I was immediately sold on the general framework. I undertook to re-read “Frontiers of Complexity” by Peter Coveney & Roger Highfield but haven't gotten round to it yet. What stuck with me from that book was the idea that complexity at one scale often yields to simplicity at another and vice versa. It is possible to know something about attractors, to recognise patterns, but not necessarily when or where they will arise. On the other hand, setting simple boundaries on a system with a sufficiently high number of agents can gave rise to complex patterns, emergent properties. Snowden cites the example of a flock of birds (simple rules: fly to the centre of the flock, match speed, avoid collision) in this instance saying that you can be sure they will avoid an oncoming mountain peak, just not whether they will go past it on the left or the right. For a spectacular example of flocking in action see the following video of a starling murmuration.

Elsewhere Snowden talks informatively and entertainingly about order & chaos since antiquity, which got me thinking.

This idea of patterns which arise again and again also surfaces over and over throughout the history of human thought. From the Buddha (reincarnation) to French folklore (plus ça change, plus c’est la même chose) and beyond to Nietzsche’s “eternal recurrence” and Camus' search for meaning in the Myth of Sisyphus, humanity has seen this tendency to (almost)repetition as something negative, fateful, at the very least something to be faced down, overcome. Should we despair? According to Snowden there's no need; with the right tool set, the beast can be tamed! I look forward to learning more.

To conclude, at the risk of indulging my apophenia: if mind is an emergent property of the brain with its fifty to a hundred billion neurons and their trillion connections, constrained locally by a relatively small number of variables (potential barriers, neurotransmitters), has humanity not been building its superbrain(s) since the advent of language? Or at least since agriculture was first practised? Every advance in communications since, from domesticating the horse to the printing press to the telegraph, and on to the internet, has increased our interconnectedness. Our ability to share and exchange narrative. The internet may as yet have a relatively small number of physical nodes and display only loose connectedness but phenomena like Facebook and Twitter are adding another dimension.

If you were to view users as equivalent to neurons and the internet 'merely' as infrastructure, then that one facet of the human super brain alone already has 2 billion neurons... Supra-identities like nation, tribe or corporation (that may pre-date internet) could get stronger and display more cohesion with ever more internet capacity and connectedness. I wouldn't go as far as those who talk of Gaia, or The Technium, or The Singularity. I'm not suggesting a global consciousness. For one individual human mind the self is already a much trickier idea than might appear at first glance. I'm thinking more in terms of a fragmented and multidimensional space where initially rough-hewn, badly bound and shifting personalities (consciousness as an extremely loose narrative centre of gravity) interact. But even at that scale (decidely smaller than global) some problems already seem a lot less of an issue. Inter galactic travel for example; if a consciousness can expect to exist coherently for centuries what's a few light years' travel between friends?

Wednesday, 18 May 2011

A common objection to evolution theory (Can emergent design work?)

One of the deep problems that both supporters and detractors of the theory of evolution wrestle with is, effectively, the problem with emergent design. How did things get to be the way they are? More accurately, given the enormously complex and intricately interdependent interplay of fully formed, specialist agents in today's world – how did life get from there to here? If life started as unicellular organisms (or even further back as amino acids), how can something as complex and apparently well-designed as a human being, with all its well-designed component bits and pieces, emerge? To cite a commonly used example, how could something like the eye emerge?

Whatever mechanisms are at play, we can be sure that there was never a time in the long history of life on earth when eyes, or hearts and lungs and livers for that matter, were self sustaining organisms, able to look after their own survival and evolving in their own right up to the point where they were useful to some other organism and were co-opted. That means that somehow, on the long road from eukaryotes (prokaryotes in fact) to human being - hearts, lungs and livers, etc. evolved along with the organism; that is to say, we started as a minimum viable product (self-metabolising unicellular organism) and iterated from there to here.

Easily posited, but, in the case of the cardiovascular system for instance, errors will be selected on mercilessly, intermediate forms of the lungs, or heart, are even harder to imagine than intermediate forms of the eye. If we examine our most recent ancestors in the tree of life or glance sideways at our cousins (chimps, bonobos etc.) and other close relatives we can see this confirmed – there are no substantive differences between cardiovascular systems current in mammals, including seafaring mammals like dolphins and whales.

But there are land animals whose respiratory & circulatory systems differ substantively from ours; insects have a so-called open circulatory system, they have no lungs and do not breathe as we do, and their hearts are very different to ours too. Insects have small holes in the sides of their exoskeletons (spiracles) that allow air to enter a system of tubes known as trachea. The trachea extend to all parts of the body, terminating as the thinnest of capillaries in the tissues where the oxygen will be delivered. The tissues are flooded with the rest of the fuel mix ('blood'; food, water and other essentials) as the heart only 'pumps' (by peristalsis) so far. This all means that the biochemical magic of metabolism in insects resembles so many tiny generators firing away on-site.

Mammals and insects are indeed extremely distant relatives, having diverged on the tree of life when vertebrates and invertebrates diverged, but I ask you to bear with me because an open circulatory system as such can act as a credible model for an intermediate form on the long journey from there (unicellular organisms) to here (human beings with closed circulatory systems). Nature, self-organising between limits and tipping points, acting recursively though selection, effects any transition through inexorable cumulative change over many many generations. We of course can be a little more direct, even if our method takes its cue from evolution. Thinking in terms of building software:

Expanding the generator(s) metaphor, we could define our architectural metaphor as replacing all those on-site generators with a single big generator working with a couple of heavy-duty pumps, whereby the fuel pipes have been exapted as power lines to deliver directly consumable energy to the cells.

Then we would start small: by de-coupling a single cell from its own power source for instance. To achieve that for that one cell, we would already need to have modified a small section of fuel pipe so that it could act as a power line, and have moved 'power generation' to outside the cell. We would also have had to protect the rest of the system from possible problems (given that they would probably be fatal!) by surrounding our experiment with tests, in short, our first delivery would have to represent a walking skeleton of our solution, a minimum viable feature.

Thereafter, iteration by iteration, through continuous inspect and adapt and constant re-factoring, our design is refined simultaneously both piecemeal and as a whole, emerging along the way in perfect tandem with the (details of the) goal that we are discovering.

Wednesday, 4 May 2011

Mother Nature as exemplary engineer (Why does Scrum work?)

Evolution in a (super simplified) nutshell is: descent with modification, acted upon by natural selection.

That is to say, organisms pass properties from one generation to the next via some process or other. This process is never perfect and therefore each new generation of a given organism will differ slightly from its parent generation. These differences will be selected upon by the environment; changes that offer some advantage to an organism in a given environment will eventually spread throughout a population (survival of the fittest).

However, most (significant) modification will be disadvantageous, certainly if change is only achieved by (random) errors in the copying process. This should mean that almost every trial will end in (fatal) error. In that case, even the 3 billion or so years that have passed since the first unicellular organisms appeared on earth would not represent near enough time to produce life as we know it today in all its complex diversity.

A 'recent' discovery in physics helps address this problem; complex adaptive systems self-organise.

What?!?

A discussion of this phenomenon of self-organisation, and/or complex adaptive systems, is way beyond the scope of this piece - not to mention how monumentally challenging it is to your author's intellectual capacities - so I will just give a (hopefully compelling) example to illustrate the phenomenon.

Consider the termite colony. Termite mounds are built without a site director or a project manager or in fact any kind of management structure. How do all those termites, scurrying around in their own little restricted worlds, so obviously manage to work together as successfully as they do? They, that is to say, the complex adaptive system that is a termite colony, self-organise(s).

This tendency to self-organise introduces another possible source of variance in evolution. The environment selects on these experiments in self-organisation in precisely the same way as it does on the changes in the genetic code of the individual organisms, blindly but steadily (Mother Nature literally takes aeons to realise her handiwork), weeding out that which does not work well in favour of that which does.

All well and good, but what good could all this possibly be to us in software development?

Well, if a few extremely smart software engineers were to get together to see how they could best build good software, they might consider how Mother Nature goes about her work. If it was possible to speed up the process of selection acting upon modifications they might even have been on to something...

Well, a bunch of software engineers did go through an approximation of this thought process, and they came up with... Scrum!

Scrum ( in a super simplified) nutshell is; self-organising units engaged in constant experimentation, the results of which are acted upon by (short) formal feedback cycles at multiple levels

In short, Scrum works because it is a modified copy of how that greatest of all engineers, Mother Nature, goes about her job.