Code Review for the Mind

Marissa Anderson - DonutJS October 2017


Welcome to code review for the mind! We're gonna talk about how anxiety can cause glitches in our ancient brain's software. And think about how we can possibly refactor what's going on in our brains to optimize our mental functioning for better happiness! All right. Advance. So hi! I am an Android engineer. I've been doing Android for about 7 years. JavaScript is also a favorite technology of mine. I'm currently at Future State Consulting on assignment at Nike. Disclaimer: I'm a computer scientist, not a brain scientist. So I'm speaking anecdotally from my own experience in therapy and as a student of my own mind. I'm gonna be focusing a bit more on anxiety, since that is the spectrum that I tend to experience. So I want to tell you: Licensed therapists are awesome. Therapy is available. It is highly recommended. There are therapists who work on a sliding scale, who work extended hours. You can even contact a therapist through an app and get a video chat session. It's very available.

Also #metoo. Hopefully... Someday that won't be the case. All right. So software architecture. This is an example of system D. This particular system D is a Taizen system. So you have, you know... You've got your kernel. You've got low level libraries that run on top of that. You've got middleware, and you've got your frontend and higher level utilities as well. What if you look at brain architecture in a similar way? This graphic is from a really complicated neuroscience article. So we're not gonna get into, like, the hyperactivation of the fear network. But I wanted to point out three key areas that have to do with an anxiety response. Something that happens to us in everyday situations and in the case of clinical anxiety. So the brain stem on the bottom is a little bit like our kernel. And the yellow area over here, the amygdala, is located basically... If you were to draw a line from your eye and your ear and where those lines intersect in the brain is where the amygdala is. Oh, thanks. And the teal area is the prefrontal cortex, which is connected to the amygdala. These systems come into play in our anxiety response.

So what if we think of the amygdala as a low level system service? It is very effective at learning when the organism is in threat. Involved in responding to danger. And the amygdala gets sensory input before the prefrontal cortex does. So when we learn a response, we learn, like, this situation is danger. We are able to respond to that with the fight or flight response. Before our higher level thoughts can come into play. And this is why. Anxiety disorders are a normal response of the amygdala perceiving a threat and taking action, so that we can escape and survive. Hm. Sounds a little bit like a system resource exhaustion problem to me. Like... When I'm trying to debug a program and it's hanging, I'm gonna take a look at my loops. I'm gonna take a look at my memory. I'm gonna take a look at my CPU usage. What if we applied that kind of thinking to our own brain software? Can we debug it? Can we analyze it? Can we figure out ways to improve? I would argue: Yes.

So here are three recommended processes to help us quickly and easily optimize out of anxiety responses. First one: Diaphragmatic breathing. Also known as eupnea. This is the natural breathing state of mammals when we are not fleeing from a threat. If you have a furry companion in your life, and they're in a relaxed state, you'll notice that they're lying down. Their belly is expanding and contracting. And they're not running away or stressed out. The way that we can engage this mechanism directly is... If you put your hands behind your head, this will force your body to breathe through the diaphragm. Like, even if you're completely panicking, you can do this. And if you do it in an important meeting or job interview, you also look really smart. Like... I'm reaching into my mind to pull out really smart thoughts.

And the other advantage of that, besides that we need to breathe anyway, you will also increase blood flow to the brain, giving you as much possible opportunity to engage all of your cognitive functions. Another process you can use, in addition to breathing, is a body scan. This is kind of a meditation. I learned this in yoga class. But it's very useful, especially in getting to sleep or any time that you find thoughts are racing, and it's just like... Stuck in a loop. So if I just start, either at the top of my head or the soles of my feet, and start meandering through the body, just... My forehead. My left eyebrow. My right eyebrow. Just noticing each body part, as I move through it, bringing awareness there, bringing compassion there, not judging my body or judging my mind for what it's doing, but just kind of bringing a gentle awareness to that. This is also really good to get to sleep.

Almost like counting sheep. And it doesn't even matter if you get lost. You can start over, or you can decide that you're done. The third process, which you can also use in combination with diaphragmatic breathing or during or after you've done a body scan, is visualizing an inner resource. Could be a most-loved person, a pet, a memory of a really great time you had, maybe at a previous Donut.js, or a vision you have for the future. You know, the thought of a donut. Anything that makes you remember and know that you are safe. That tends to be very effective at breaking out of the anxiety loop. For further information, a lot of these techniques come from the cognitive behavioral therapy tradition. Very good. Many therapists practice that. And CBT is kind of a more scientific repackaging of the ancient process of mindfulness. A good book I'm part of the way through is Mindfulness In Plain English, which you can find online and read for free. It's very ideologically neutral. It's more about developing a theory of cognition.

And you can also practice this online. One place is It's an Australian organization that has a full spectrum of cognitive behavioral online exercises that you can work on and learn more about the mind. And that is Code Review for the Mind!

Live captioning by Mirabai Knight

← October 2017