Reactive software and the outer world

At Scala Matsuri a few weeks ago (incidentally, an excellent conference), I was fortunate to be able to attend Jonas Bonér’s impassioned talk about resilience and reactive software. His theme: “without resilience, nothing else matters”.

At the core of it is a certain way of thinking about the ways that complex systems fail. Importantly, complex systems are not the same as complicated systems, although in everyday speech we tend to confuse the two. Perhaps a related or even identical question is: how do composite systems fail?

Using a terminology that originates with the Erlang language, Bonér talked about the “error kernel”, which is the part of a software system that must never fail, no matter what. As long as this innermost part stays alive, other parts are allowed to fail. There are mechanisms to replace, restart or route around failures in the outer parts.

This style of design leads to a well-structured failure and supervision hierarchy. Maybe this style of thinking itself is the most important contribution. In most software systems being designed today, the possibility of errors or failures is often a second class citizen, swept under the carpet, and certainly not part of a carefully considered structure of possibilities of failure. What if this structure becomes a primary concern?

Once errors are well structured and organised in a hierarchy, it also becomes easy to decide what to do when errors occur. The hierarchy structure clearly indicates which parts of a system have become defunct and need to be replaced or bypassed. Recoverability – being able to crash safely – at every level takes the software system a little bit closer, it seems, to biological systems.

Biological systems, Bonér pointed out, usually operate with some degree of inherent failure, be it disease, weakness, mutations or environmental stress. Perfect functioning is not typical, and it seems to me that for most organisms such a state may not even exist.

Recoverability at every level, resilience, and error hierarchies – “let it fail” – is truly a significant and very humble way of thinking about software. It means that as the developer, I acknowledge that the software I am writing does not control the universe (although as a developer I often fall prey to that illusion). The active principle, the “prime mover”, is somewhere outside the scope that I control. When it produces some unforeseen circumstance, we must respond properly. Reactive software to me seems to quietly acknowledge this order of things.

I have only had a very brief opportunity to try out Akka, Typesafe’s actor framework, in my projects so far, but I felt inspired by Boner’s talk and hope to use it more extensively in the future.

The inexhaustible wealth of appearance, information and specificity

IMG_0001

When perceiving an object, for example a chair, the statement “this is X” (this is a chair) is almost entirely uninteresting. The concept by which we identify the object is a mere word, and in a sense entirely devoid of meaning.

That concept does help us align this object with other entities in space and time. It sets expectations about what has been done and what can be done to and with it, and it links the object to social practices. But none of these things are very interesting. After all, we understand quite well what society expects from chairs.

What is more interesting is all the other statements we could make about a particular chair, that is, all the qualities, information, phenomena and experiences that do not fit the general concept of a chair. Call this the chair’s particularity. It may be unusually sturdy or rickety. It may evoke a sense of sorrow or longing for a person who used to sit on it. It may make us think about economics. Its shape may even have something spiritual about it. It may, if it is a chair in an abandoned house, be decomposing. And even this is just scratching the surface.

In all likelihood, we are able to produce an unbounded number of interesting statements about this locus that is the chair. (Recall the famous school assignment about writing a story several hundred words long about the face of a coin.) And this would hold true both when we speak freely, metaphorically and poetically, and when we restrict ourselves to testable, scientific (in the modern sense) statements. New metaphors can always be invented, new scientific equipment may always be constructed. These additional modes of relatedness to the locus provide, perhaps, the basis for new statements.

How are we to understand this fundamental overflowing, this exuberant blossoming, the profound potential wealth that we draw upon and realise when we articulate statements about an entity such as this chair? It is not part of the concept “chair”. This concept is overlaid as an afterthought in order to make the surplus of impressions manageable and graspable. We are used to economising the use of our consciousness, dispensing it only sparingly, through the shielding, buffering and deflection that concepts afford us.

For Heidegger, being is the basis of intelligibility, a carrier of meaning. Language and intelligibility exists only on the basis of primordial being. He makes it his task to inquire as to what this being is.

For Georges Bataille, all activity that involves redistribution of energy, human and otherwise, accumulates a surplus that necessarily must be released in some way.

Myths and archetypes repeat themselves throughout history and society, in constantly renewed forms which are both always the same and always made from different specific constitutent parts. They can always be repeated in a different way. The hero myth exists in every culture (see for example Jung or Campbell). Conversely, this myth in all its specific detail is always different each time it appears.

In difference and repetition, Deleuze argues that conceptual machinery is constantly at work, extracting difference from whatever the underlying basis is.

Genetic material successfully reproduces and preserves itself, and perhaps prospers, only through the continual introduction of difference and variation at an appropriate rate.

The digital world, on the other hand, denies the possibility of generating an unbounded number of statements from some entity (such as a record in a database). In fact, its essence is the possibility of perfect copying, which happens only when the information being carried is strictly circumscribed and limited.

All these concepts, it seems, have something in common – the interaction between a specific form and the possibility of an infinite number of variations of and departures from that form.

Mysteries of the scientific method

mitScientific method can be understood as the following steps: formulating a hypothesis, designing an experiment, carrying out experiments, and drawing conclusions. Conclusions can feed into hypothesis formulation again, in order for a different (related or unrelated) hypothesis to be tested, and we have a cycle. This feedback can also take place via a general theory that conclusions contribute to and hypotheses draw from. The theory gets to represent everything we have learned about the domain so far. Some of the steps may be expanded into sub-steps, but in principle this cycle is how we generally think of science.

This looks quite simple, but is it really? Let’s think about hypothesis formulation and drawing conclusions. In both of these steps, the results are bounded by our imagination and intuition. Thus, something that doesn’t ever enter anybody’s imagination will not be established as scientific fact. In view of this, we should hope that scientists do have vivid imaginations. It is easy to imagine that there might be very powerful findings out there, on the other side of our current scientific horizon, that nobody has yet been creative enough to speculate about. It is not at all obvious that we can see the low hanging fruit or even survey this mountainous landscape well – particularly in an age of hyper-specialisation.

But scientists’ imaginations are probably quite vivid in many cases – thankfully. Ideas come to scientists from somewhere, and some ideas persist more strongly than others. Some ideas seduce scientists to years of hard labour, even when the results are meagre at first. Clearly this intuition and sense that something is worth investigating is absolutely crucial to high quality results.

A hypothesis might be: there is a force that make bodies with mass attract to each other, in a way that is inversely proportional to the squared distance between them. To formulate this hypothesis we need concepts such as force, bodies, mass, distance, attraction. Even though the hypothesis might be formulated in mere words, these words all depend on experience and practices – and thus equipment (even if the equipment used in some cases is simply our own bodies). If this hypothesis is successfully proven, then a new concept becomes available: the law of gravity. This concept in turn may be incorporated into new hypotheses and experiments, paving the way for ever higher and more complex levels of science and scientific phenomena.

Our ability to form hypotheses, to construct equipment and to draw conclusions, seem to be human capacities that are not easy to automate.

Entities such as matter, energy, atoms and electrons become accessible – I submit – primarily through the concepts and equipment that give access to them. In a world with an alternate history different from ours, it is conceivable that entirely different concepts and ideas would explain the same phenomena that are explained by our physics. For science to advance, new equipment and new concepts need to be constructed continually. This process is almost itself an organic growth.

Can we have automated science? Do we no longer need scientific theory? (!?) Can computers one day carry out our science for us? Only if either: a) science is not an essentially human activity, or b) computers become able to take on this human essence, including the responsibility for growing the conceptual-equipmental boundary. Data mining in the age of “big data” is not enough, since this (as far as I know) operates with a fixed equipmental boundary. As such, it would only be a scientific aid and not a substitute for the whole process. Can findings that do not result in concepts and theories ever be called scientific?

If computer systems ever start designing and building new I/O-devices for themselves, maybe something in the way of “artificial science” could be achieved. But it is not clear that the intuition guiding such a system could be equivalent to the human intuition that guides science. It might proceed on a different path altogether.

Collecting books

IMG_4584

Until about five years ago, I would hesitate to buy books if I had other, unfinished books that I was currently reading. It seemed irresponsible to “start on something new” without finishing things that were in progress. This is the kind of attitude that leads you to visit every single room and see every single exhibit in a museum, exhausting yourself (thus precluding visits to other museums for a while). In retrospect, this was an unwise approach.

Umberto Eco (I learn via Nassim Taleb), and others before him, advocates the notion of an antilibrary. Books that one has not read are clearly more valuable than books that one has read. So simple, and so obvious. One should fill one’s shelves with unread books.

Of course this does not mean indiscriminate acquisition, though. We should curate, buy books on the basis of potential value – at present or at some time in the future. Look for links between books, associations, counterpoints, juxtapositions. Thus we build a space – both literary and physical – that is instantly accessible, offering up its riches. We can immediately jump from book to book, trace connections and make new ones, a quadratically increasing number of potential contrasts…

Talking to a new acquaintance for ten hours does not hold ten times as much “utility” or interest as talking to him or her for one hour. Trying to exhaust or deplete one person before moving on to make another acquaintance would be rude, clumsy, pointless and tiring. Although we may sometimes wish to converse with someone for days or weeks immediately upon meeting them, sometimes a few minutes is enough to have a crucial insight.

A metaphor, and an obvious insight now, but one that bears repetition. Finally: it is important that the collection is physical, concrete shelves with physical volume and mass. No digital interfaces, however convenient, can make up for the lack of physicality. They are complementary at best.

Historical noise? Simulation and essential/accidental history

Scientists and engineers around the world are, with varying degrees of success, racing to replicate biology and intelligence in computers. Computational biology is already simulating the nervous systems of entire organisms. Artificial intelligence seems to be able to replicate more tasks formerly thought to be the sole preserve of man each year. Many of the results are stunning. All of this is done on digital circuits and/or Turing-Church computers (two terms that for my purposes here are interchangeable — we could also call it symbol manipulation). Expectations are clearly quite high.

What should we realistically hope for? How far can these advances actually go? If they do not culminate in “actual” artificial biology (AB) and artificial intelligence (AI), then what will they end in – what logical conclusion will they reach, what kind of wall would they run up against? What expectations do we have of “actual” AB and AI?

These are extremely challenging questions. When thinking about them, we ought to always keep in mind that minds and biology are both, as far as science knows, open-ended systems, open worlds. This in the sense that we do not know all existing facts about them (unlike classical mechanics or integer arithmetic, which we can reduce to sets of rules). For all intents, given good enough equipment, we could make an indefinite amount of observations and data recordings from any cell or mind. Conversely, we cannot, starting from scratch, construct a cell or a mind starting from pure chemical compounds. Even given godlike powers in a perfectly controlled space, we wouldn’t know what to do. We cannot record in full detail the state of a (single!) cell or a mind, we cannot make perfect copies, and we cannot configure the state of a cell or mind with full precision. This is in stark contrast to digital computation, where we can always make an indefinite number of perfect copies, and where we know the lower bound of all relevant state - we know the smallest detail that matters. We know that there’s no perceivable high-level difference between having a potential difference of 5.03 volts or 5.04 volts in our transistors on the lowest level.

(Quantum theory holds that ultimately, energy can only exist in discrete states. It seems that one consequence would be that a given volume of matter can only represent a finite amount of information. For practical purposes this does not affect our argument here, since measurement and manipulation instruments in science are very far from being accurate and effective at a quantum level. It may certainly affect our argument in theory, but who says that we will not some day discover a deeper level that can hold more information?)

In other words, we know the necessary and sufficient substrate (theoretical and hardware basis) for digital computation, but we know of no such substrate for minds or cells. Furthermore, there are reasons to think that any such substrate would lie much deeper, and at a much smaller scale, than we tend to believe. We repeatedly discover new and unexpected functions of proteins and DNA. Junk DNA, a name that has more than a hint of hubris to it, was later found to have certain crucial functions – not exactly junk, in other words.

Attempts at creating artificial minds and/or artificial biology are attempts at creating detached versions of the original phenomena. They would exist inside containers, independently of time and entropy, as long as the sufficient electrical charge or storage integrity is maintained. Their ability to affect the rest of the universe, and to be affected by it, would be very strictly limited (though not nonexistent – for example, memory errors may occur in a computer as a result of electromagnetic interference from the outside). We may call such simulations unrooted or perhaps hovering. This is the quality that allows digital circuits to preserve information reliably. Interference and noise is screened out, removed.

In attempting to answer the questions posed above, we should think about two alternative scenarios, then.

Scenario 1. It is possible to find a sufficient substrate for biology and/or minds. Beneath a certain level, no further microscopic detail is necessary in the model to replicate the full range of phenomena. Biology and minds are then reduced to a kind of software; a finite amount of information, an arrangement of matter. No doubt such a case would be comforting to many of the logical positivists at large today. But it would also have many strange consequences.

Each of us as a living organism, society around us, and every entity has a history that stretches back indefinitely far. The history of cells needs a long pre-history and evolution of large molecules to begin. A substrate, in the above sense, exists and can be practically used if and only if large parts of history are dispensable. If we could create a perfect artificial cell on some substrate (in software, say) in a relatively short time span, say an hour, or, why not, less than a year, then it means that nature took an unnecessarily long way to get to its goal. (Luckily, efficient, rational, enlightened humans have now come along and found a way to cut out all that waste!) Our shorter way to the goal would then be something that cuts out all the accidental features of history, leaving only the essential parts in place. So the practically usable substrate, which allows for shortcuts in time, then seems to imply a division between essential and accidental history of the thing we wish to simulate! (I say “practically” usable, since an impractical alternative is a working substrate that requires as much time as natural history in the “real” world. In this scenario, getting to the first cell on the substrate takes as long as it did in reality starting from, say, the beginning of the universe. Not a practical scenario, but an interesting thought experiment.) Note that if we are able to somehow run time faster in the simulation than in reality, then it would also mean that parts of history (outside the simulation) are dispensable: some time would have been wasted on unecessary processes.

Scenario 2. Such a substrate does not exist. If no history is accidental, if the roundabout historical process taken by the universe to reach the goal of, say, the first cell or first mind, is actually the only way that such things can be attained, then this scenario would be implied. This scenario is just as astounding as the first, since it implies that each of us depends fully on all of the history and circumstances that led up to this moment.

In deciding which of the two scenarios is more plausible, we should note that both biology and minds seem to be mechanisms for recording history in tremendous detail. Recording ability gives them advantages. This, I think, speaks in favour of the second scenario. The “junk DNA” problem becomes transposed to history itself (of matter, of nature, of societies, of the universe). Is there such a thing as junk history, events that are mere noise?

In writing the above, my aim has not been to discourage any existing work or research. But the two possibilities above must be considered and could point the way to the most worthwhile research goals for AI and AB. If the substrates can be found, then all is “well”, and we would need to truly grapple with the fact that we ourselves are mere patterns/arrangements of building blocks, mere software, body and mind. If the substrates can not be found, as I am inclined to think, then perhaps we should begin to think about completely new kinds of computation, which could somehow incorporate the parts that are missing from mere symbol manipulation. We should also consider much more seriously how closed-world systems, such as the world of digital information, can coexist harmoniously with what would be open-world systems, such as biology and minds. It seems that these problems are scarcely given any thought today.