Search This Blog

Poem

Nothing is Enough // Or everything is not enough. // I have a hunger... //// The hunger is me. // If I feed it, it wants more. // Mostly, it wants something else. //// A wise person, said STOP. //

Friday, December 17, 2021

Fault Tolerance and Testing in Buddhism

In good software design, they say that testing is very important. Suppose you are writing software for a message board. You write tests to define how the system is expected to respond to actions like "new messages", "erase messages", "like messages". This is because, as you add more features, it's easy to make an unintended mistake to the code. So the tests protect you, who in this case is the programmer. It protects you from future change, some coming from the outside, some coming from oneself.

In good software design, it's possible that about half the work is actually testing.

One of the reasons I appreciate Buddhism is it's emphasis on testing. The Buddha didn't just proclaim, "I am the Buddha, all powerful, you must listen to me." In the Kalama Sutta and the sutta teaching his son, Rahula, he gives tests to judge whether something is useful or wise. He specifically says not to base your evaluation on your preferences or logic alone. First, he asks you to look at the results. Was it harmful or helpful? Is it praised by wise people, who may be able to see your blind spots? These are tests. Unlike tests at school that are meant to be stressful, these are tests that protect you.

When one gets on the latter part of the Eightfold Path, one is aiming toward the end of stress, not just on kindness and acceptance. The end of stress involves developing a knowledge and release that means we aren't hijacked by the ups and downs of the world, our social network, or even our own health. I've seen others (and, embarrassingly, myself, too) proclaim that they are wise, suggesting that they are no longer hijacked. But, looking closely at their behavior, one can see quite a lot of hijacking. They (and I) may indeed have been free from hijacking for a few moments, a long sit, or even a week. But we aren't free in a durable way. Namely, our freedom hasn't been tested.

When a recovering addict is tested, this means that they are exposed to the opportunity to feed their addiction and they find a way to stop themselves. The phrase "stop themselves" is important. It's not just that they don't do it. It's that they are tempted and they have to actively thwart the hijacking event. Then it's tested. A military isn't strong until it's been tested in a real battle. And a website's security systems haven't aren't strong until they've been tested. It's funny when people say, "I'm safe because I never get hurt." That's different from being prepared for lots of situations where other people normally get hurt. Thinking one is safe, but not prepared, is a recipe for real big pain and disappointment.

The Buddha had the ultimate test on the day of his awakening. Mara tempted him with pleasure/glory, then prodded him with pain, and then tried to cast doubt into the Buddha's mind. And, under the Bodhi tree, the Buddha realized enlightenment and the end of suffering when he passed the test. As a metaphor, this is like a military fort surviving a seige by the strongest army on earth. Once tested, one knows the actual strength.


Also in programming, but also in systems engineering and other domains, is the idea of fault tolerance. The general notion is whether the system stops functioning correctly when certain pieces break. Your car has independent front and rear braking systems. This way, if the front brakes fail, the rear brakes still work. This is a fault tolerant design, resistant to one set of brakes failing.

Buddhism has an extreme form of fault tolerance, especially further down on the path. At the beginning, the focus is often on generosity (dana) and virtue (sila), and these don't have to do with fault tolerance. But when we get toward calming the mind or the brahmaviharas, this is very much about fault tolerance. It's one thing to have a calm mind when we are getting what we want and the world is going our way. It's another thing to be able to keep a calm mind if we miss our plane flight. Similarly, lovingkindness isn't easy on the mat, but it's easier to give difficult people metta when they are just in our head. Easier in the sense that the big test of lovingkindness is if we can have it if we meet them in the supermarket, or have to partner with them on a project at school or work. For metta, I like to emphasize that it is perfected when it is unconditional. Unconditional goodwill. Not dependent on other people treating us well. That's fault tolerance. As tested with the simile of the saw.

Buddhism sees the outside world as inherently unstable and full of suffering. Not something to be clung to. And, one's notion of oneself is also a source of suffering (grasping, clinging, gripping). Not something to be clung to forever. We should cling when it's useful, like when we are trying to stop lying. But, an example of clinging too long is if we start being conceited that we are better than others because we don't lie. It may be true, in a sense. But the identification with it is the trap; the identification is the thing I often fall for without noticing I fell for it. (I call this the grandiosity trap in my own life.)


Enlightenment in Buddhism has a lot to do with freedom and independence or, maybe better put, "non-dependence". Our body's survival and caloric intake depends on the food system. But our mind or citta is not dependent on the body. This is something to be explored, seen, and realized for oneself. In that way, the calmness/clarity of our mind is well tested and highly fault tolerant. Not even death can take it away. This is one way that it is called the deathless.


---


One of the more pragmatic things I've taken from programming is the solution to the Byzantine General's Problem. In a situation where you have honest people and liars/unreliable, when can we get to a safe conclusion? The answer is when at least 2/3 of the people are honest and you have less than 1/3 liars/unreliable. And, this is under good conditions, where people are paying attention and talking to each other. In other words, if people are obstinate and frustrated, or just tuned out, it's possible that 10% liars can corrupt a whole system.

An important implication is that you don't need 50% liars to erode a system:

  • 34% of liars is enough to corrupt a system, even with optimal play by the honest people. 
  • Without optimal play, 10% of liars (or even less) can corrupt the system.
Thanissaro Bhikkhu writes about this with regards to the integrity of the Dhamma. He made an interesting claim: even a little bit of counterfeit money can stifle the monetary system of a country. I didn't understand this at first. Then, I doubted it. He seemed to be saying that only 0.01% of $100 bills being fake can cause huge problems. That seemed unlikely.  But as I thought about it more, it made more sense. When thinking about mass hysteria, all we need is a little distrust that people are hidden terrorists to make everyone very paranoid. Applied to the Dhamma, if some people were to tweak the Dhamma  (e.g. Stephen Batchelor, but even respected people like Bhikkhu Bodhi or even Thanissaro Bhikkhu himself), suppose that 1% of Dhamma talks was misleading. If that were true, it might cause a lot of doubt and everyday people would have to spend a lot of time figuring out: what teachings can I trust? And, for a difficult path like Buddhism, when we stumble on a hard teaching (like around metta as unconditional), if we have version M1, M2, M3, ... M100, we might use as our guideline the version that fits with our worldview, that appeals to our (bad) habits. When, it might be that the ones that don't appeal to our (bad) habits are the most useful ones. And the ones that we might need to develop via practice and endurance.

Having described the danger of some counterfeit "dhamma" or views, I want to applying it not to the dhamma teachings circulating in America (which is Thanissaro Bhikkhu's aim), but applying it to the internal committee of the mind (link1, link2). Put very numerically and starkly, we start out is 90% liars in our brain. And they run the show. They say the path is about cleaning up the mind. So that might mean getting the liars to have less control, and to not let them run the show. The liars aren't evil to the core. Some are even well-meaning. But things like pride, fear, social acceptance, habits, anger, greed, etc cloud the vision. This is like someone who thinks they are a strong environmentalist because they recycle, but loves their SUV. The vision's a bit clouded.

  • We start with 90% liars.
  • The first thing to do is look at the liars "with two eyes". See the benefits and the drawbacks.
  • The liars are useful. They give you short term hits of "good feeling" or "feeling safe" or "I'm right, you're wrong". But what are the unintended consequences.
  • We don't have to change actions, but at first we just look and develop the watcher (more links).
  • By noticing more, we change. Maybe we get down to 70% liars in the committee of the mind.
  • Some people celebrate here and stop. They are satisfied with what they got. But, it's not fault tolerant.
  • To get to fault tolerant, we learn to watch more and more. We never stop refining our watching.
  • Almost on its own, we start to give up our feeding on some things. We loosen the grip on "I'm right, you're wrong". We replace it with good insteads, like "Is this helpful?" And, instead of "I need this", we can have, "I'll be okay if I get it, and okay if I don't."
  • We get stuck. All the easy stuff gets cleared up. What's left is the hard stuff. We see the liars taking control of the mind, but we can't really stop them. We know it's not helpful, but we do it anyway.
  • If we clamp down too hard, this is actually strengthening the "I'm right, you're wrong" liar in our brain that hates not being in control. We exert some effort, then back off and let things happen on it's on. This is a little like Bernie Clark's yin yoga. Push only to the level of resistance, then hold and wait. In Buddhist, we hold and watch. We redouble our watching.
  • We find skillful alternatives. So, when I want to binge on 5 hours of Netflix, I try out an audiobook for 45 minutes. Or taking a shower. This loosens the grip without using clamping down.
  • Maybe here we get down to 50% liars. It's better, but now that our watcher is developed, we see all sorts of unhelpful mental patterns. Back when I went from 90% liars to 70% liars, I was jazzed because it came so fast. My perspective shift was enlivening. Now, that I have a wide perspective, I see more of what's behind the curtain. There is a lot of mess hiding behind the fridge and in the air ducts.
  • But, the practice works. We use testing. We look at fault tolerance. And we iterate, iterate, iterate. We see where we get stuck. We see how we get stuck. We see the strong emotions. We see the automatic emotions we never realized were sneaking around behind the curtain. We are tested. We fail. We adapt. Skill develops. Our skill of evaluation strengthens, and our skill of creativity (in finding skillful alternatives) starts really developing in these tricky situations.
  • Over time, we get quite good. The liars are now 30%.
  • This is a place where we switch our focus. Importantly, the goal is not to get to 0% liars. That may or may not happen. In AA, they say that a person is an alcoholic for life, that alcoholism is never cured. But that one learns not to be driven by it. And not to be hijacked by it. It's the same here. We will still have an impulse to recoil from pain and to seek out pleasure. But those impulses don't hijack us.
  • At this point, they will still hijack us, but we start developing anti-hijacking routines. This is Fault Tolerance applied to keeping our calm mind intact.
  • When we get really close to the end of the path, we might still have exactly 30% liars (like in the Byzantine Generals Problem), but we are never misled. Thats because we developed the algorithms to be able to detect and weed out the liars. To not let them hijack and run the show. In stark terms: 30% liars, but 0% hijacking. It's possible.

May your metta, mindfulness, and calm mind be fault tolerant. May it stand the tests of time and change.


UUDR.


No comments:

Post a Comment

Featured Post

The Castle, The Watcher, and The Guardian

The slogan "Nothing is Enough" may give the impression that this is "anything goes". It is not. Some have said that you ...

Popular Posts