I said that my last post was likely to be the last for a while, and it was until I found myself watching a TV show last week about a hacker when he started to wax philosophical on debugging. It reminded me about my days working in the IT industry as a programmer and how those skills have been carried over to my work in Chinese medicine and I thought about sharing it with the world. The quote goes:

“Most coders think debugging software is about fixing the mistake, but that’s bulls**t. Debugging is actually all about finding the bug, about understanding why the bug was there to begin with, about knowing that its existence was no accident. It came to you to deliver a message…. A bug is never just a mistake. It represents something bigger. An error of thinking that makes you who you are.” (Mr. Robot, S01E03, 2015)

This made me think of the symbolism of the body in Taoism and the way its approach to illness was incorporated into the classics of Chinese medicine. Illness is not something that happens at random but a message that the delicate balances which maintain life have been disrupted and needs to be put right. The manifestation of symptoms are a sign that something needs to change.

While all cultures have seen illness as an omen of some sort, even modern medicine sees a symptom as a signal that certain investigations should be started, the Chinese system involves a kind of thinking that is very similar to that of the coder debugging their software. It avoids looking at the microscopic world of biology that modern medicine does and instead focuses on the interaction between systems that can be observed using our plain senses, just as we do not program a computer at the level of 1s and 0s in the binary code but compile these into human-like languages, logic structures and algorithms that represent these in ways we can comprehend. In both cases the patterns developed can be quite elaborate and self-referencing so that any sudden change can produce quite unpredictable results. Anyone who has tried to modify a piece of code, to find a “bug” and fix it, only to see a series of unexpected errors arising when every routine that accesses that line is affected too, will know what I mean. The ideal situation is to carefully plan it so well that bugs do not arise, something which Chinese medicine has also always valued highly in its emphasis on preventative measures for health, but when something does happen it is important to realise that the problem may in fact be integral to the entire system running smoothly and changes must be made carefully and tested for their potential impact on the rest of the program. Most of the battle is in finding out what causes the error, understanding why it has arisen, what is contributing to its continued existence and which of these can be modified without disastrous effects elsewhere. Once you know this, a few careful changes can be tried and the result tested to see if the problem resolves. If the problem is so essential to the continued performance of the program as a whole then the best thing may be to find a workaround, build a “hack” into another part of the system so its effect is lessened, or design the rest of the program around the bug. I am reminded here of the coders response when faced with a problem they cannot solve: “Its not a bug, its a feature!”

It seems like no coincidence that one of the founders of applying cybernetic theory to human social systems, Gregory Bateson, titled his collected essays “Steps to an Ecology of Mind” when Chinese medicine has always compared itself to maintaining a garden. This has been explored more thoroughly by Kaptchuk (2000) in his introductory text on Chinese medicine, “The Web that Has No Weaver”, and my own Meridians and Metaphors, so I will not repeat myself here, except to summarise that the use of metaphorical language to describe meridians, points and anatomical features as a collection of mountains and valleys, rivers and forests, is widespread throughout the Taoist and Chinese medical literature. It is often cited as one of the key differences between Western and Eastern medicine: that Western models are mechanical, looking for a specific faulty part to fix or replace, while Eastern medicine takes the approach of a gardener that must maintain and cultivate the landscape over time. This may suggest to some that Chinese medicine is more primitive or less technically advanced than a mechanical model so the comparison of ecology with programming becomes striking as it suggests a step forward in advancement, moving from the mechanical to the computerised. It is thought that early Chinese medicine developed from an “external” variety, attempting to heal diseases in a mechanistic way, to an “internal” variety, which utilised this complex ecological thinking to prevent or limit the progression of disease that could not be healed. I wonder if the introduction of cybernetic theory into modern medicine may see a similar revolution as we struggle with chronic issues that an acute, mechanical model is poorly suited for.

The actual skill set of software debugging and ecological management are essentially the same: drastic changes to any part of the system can have unpredictable effects on the whole. It is therefore best to make small changes and observe the outcome, then modify the changes until a suitable balance has been reached. A famous example of this in ecological management is the Kaibab plateau in Arizona where an attempt to protect the deer by hunting their natural predators was so successful that the deer population exploded, exceeded their environment’s carrying capacity and once their food supply was exhausted, ended up starving to death. Hunters then had to go and hunt the deer while reintroducing predators in order to maintain the balance. I can see comparisons to the “cascade of intervention” when people who have medical treatment find out that their operation is not without side effects which require further treatment, and then treatment for the effects of the treatment’s treatment. In both cases the problem is applying a simplistic mechanical model to a complex system when what is really needed is to realise that each component is a piece of something bigger, an essential expression of the design of the system interacting with the way the user is interfacing with it. Changes must be planned and cautiously implemented in order to make as few waves as possible on the interconnected web of causality. That is not to say I advocate avoiding drastic intervention when it is necessary but that the minimum amount should be used, or used with careful planning when it is. After all, I am redesigning my site at the moment, cutting out almost a quarter of my css file to change the menus, but before I do I am making soft changes on a proxy to check the impact, setting up redundancies and will continue to check for tweaks needed after it goes live. I think much of modern medicine is recognising this, trying to make its operations less invasive and utilising more scanning technology and simulations in order to plan the least invasive procedure and providing physical, psychological and occupational support after and occasionally before. Hopefully this preparatory and preventative intervention will continue to grow. There is also a more widespread acceptance of complementary therapy amongst doctors, even if they often assume that we have deluded beliefs about how our treatments work. It is not always an unfair assumption.

It occurs to me that these comparisons make Chinese medicine uniquely positioned to transition from “Classical Chinese Medicine” to “Contemporary Cybernetic Medicine”. To fully realise this would require changes in the way Chinese medicine is conceptualised and taught, moving away from outdated notions of vitalism and energetics to a reinterpretation of what the classics really meant by basic concepts such as Qi and meridians. Some progress in this direction has already been made (eg. Kim, 2015), although the trend seems to be mainly for western complementary professions to borrow concepts from oriental philosophy than for practitioners of Chinese medicine to use modern cybernetics to understand its own mechanisms. The exception to this, ironically, is in China, where they are keen to use systems biology to promote a new understanding of traditional practices. I guess everyone loves the exotic.

If this trend would gain more acceptance over here it could be a valuable addition to continuing educational development in Chinese medicine. More ideas from systemic therapy, cybernetic theory and epidemiological studies of chronic illness would give us a better integrated picture of how our traditional frameworks can be understood and improved. It might also present a more modern and western description of what we do to give to our modern, western clients and critics. Using cybernetic models is probably a better way to understand the mechanisms of acupuncture than the clearly inappropriate use of a drug model as is presently the case. Double blind RCTs are not even used to test most western procedures due to the impossibility of blinding the practitioner, so exactly why acupuncture is held to such strict and wholly inappropriate standards is unfathomable. Research into the biological mechanisms of acupuncture has made some interesting revelations, such as the discovery of endorphins and more recently, purinergic signalling (Berman et al, 2010) but I think the most important mechanisms are still being missed by looking at the effects through a microscopic lens and not in the same way its originators devised it. Consultation and advice are an essential part of the treatment (McPherson & Thomas, 2008) highlighting the relationships to be worked upon. From the perspective of medical history and anthropology it provides a potential explanation for how seemingly ineffective treatments performed without specialist equipment may work. Even spells, charms and talismans can be seen to have a possible mechanism if they serve as reminders to break the habits that are causing disharmony. From the point of view of modern healthcare it suggests a way we may harness the benefits of alternative practices without subscribing to their doctrines. By explaining ancient practices in terms of computer science, cybernetic theories can help us integrate eastern and western medicine and understand how ecosystems can be managed, including our own.

[Update, 23-8-15: This week’s Mr. Robot focused on the “daemon” processes, programs that run in the background without the direct control or even knowledge of the user. This raises further ideas for a cybernetic model of Chinese medicine, relating to the Taoist practice of deconstructing the processes that make up the “self”, raising them to conscious awareness so we can direct the way we construct ourselves, explored in my last essay on the Strange Loops of Douglas Hofstadter and perceptions of time in Classical Chinese medicine.]

[Update 2, 30-8-15: Today I was considering the way that the body and brain adapts to forget things that we do not practice regularly, yet if we take them up again we can usually restore them quicker than if we had to learn from scratch. It made me think of a hyper-vigilant programmer, always trying to streamline his code to be as short and clean as possible, removing redundancies and optimizing efficiency, but always archiving the previous versions so that, should an old piece of code be required again, the versions that held it can be searched for and restored. I seem to remember a similar theme being explored by the philosopher Daniel C. Dennett in his ambitiously titled Consciousness Explained (1993).]

[Update 3, 25-8-16: Recently I used this cybernetic metaphor as a way of explaining what acupuncture, tuina and herbs can treat and what they cannot.  Imagine the body is like a computer that has hardware and software.  When it is new it works perfectly because the hardware is new and the software minimal.  With age it starts to develop a few quirks, most of which seem to be strangely individual to each computer and almost impossible to diagnose a precise cause.  The solution is often the tried-and-tested method of IT support workers everywhere, to “switch it off and back on again”.  The problem is not exactly fixed but it will run smoothly until it needs to be done again, providing the fault is not in the hardware.  A broken hard drive or a cracked screen will still be broken upon rebooting.  Acupuncture is like the reboot.  If it relieves the symptoms then we can predict it is a problem in our ‘software’, i.e. our functioning.  If it makes little or no difference then there may be a structural problem that needs addressing with a surgical intervention.  If it helps for a time then observing what happens after the reboot, when the problem starts to happen again, can give us insight into where the problem can be and which system or lifestyle pattern needs to be analysed in more detail.  Herbal medicines may be able to go into the structure to a limited degree, equivalent to cleaning out dust, unblocking the fan, or in our bodies opening routes of elimination, having antibacterial, anti-inflammatory or other internal effects but if a part is truly broken it may need a complete replacement, either with transplant or the organ’s functions replaced with artificial medicines.  As for Tuina, I often consider that on a continuum with acupuncture, but describe it to be like tightening the screws and oiling the hinges, again fixing a problem that is not too deep, but if the threading of the screws is wearing out, or the hinges broken then it will at best sort it out for a time until they come loose again.  The best tactic is always to maintain your machine well, avoid installing harmful or malicious software, and it should last well beyond the warranty.]


Berman BM, Langevin, HM, Witt, CM, Dubner, R (29 July 2010). “Acupuncture for Chronic Low Back Pain”. New England Journal of Medicine 363 (5): 454–461. doi:10.1056/NEJMct0806114. PMID 20818865.

Bateson G (2000): Steps to an Ecology of Mind. University of Chicago Press.

Kaptchuk T (2000): The Web That Has No Weaver. Contemporary Books Inc.

Kim Y-J (2015): Zhang Zai’s Philosophy of Qi: A Practical Understanding. Lexington Books.

MacPherson H , Thomas K. (2008). “Self-help advice as a process integral to traditional acupuncture care: implications for trial design”. Complementary Therapies in Medicine 16(2):101-6. doi:10.1016/j.ctim.2008.02.010. PMID 18514912.

Mr. Robot, Season 1 Episode 3, “eps1.2_d3bug.mkv”, Aired 8th July 2015, television series, Universal Cable Productions & Anonymous Content, New York City. Distributed by USA Network, and created by Sam Esmail.

Mr. Robot, Season 1 Episode 4, “eps1.3_da3m0ns.mp4”, Aired 15th July 2015, television series, Universal Cable Productions & Anonymous Content, New York City. Distributed by USA Network, and created by Sam Esmail.