Adding to the growing list of high-profile suicides in the tech world, last week Aaron Swartz, co-founder of Reddit and fierce open access activist, took his life at age 26. If Aaron was like the 100 people who kill themselves in this country every day, the biggest factor contributing to his death was likely under-treated depression.

We can readily come up with hypotheses as to why depression is a problem in the tech world. A culture defined by ruthless pressure, high stakes, and risky gambles. Often hiding behind pseudo-anonymity, lightning fast criticisms are released online with bullet speed. Then there’s the “thrashing duck” syndrome: to survive in the startup ecosystem you have to puff up your chest and show only how smoothly you’re gliding through the water; you don’t show how furiously your legs are kicking and struggling underneath. There’s also the hero archetype of the lone hacker: he’s coding through the night, living on red bulls, squatting at AOL to save money, not thinking about short-term wealth, and surely not thinking about health, be it physical or mental.

As a clinical psychologist married to a hacker, this is not OK. On an individual level, we have widespread pain and suffering often lying silent and unaddressed. On a societal level, we are losing brilliant young minds, role models and activists with so much left to contribute to the world.

CBT and hackers are long lost kindred spirits

It breaks my heart. I am not saying depression and suicide are necessarily higher in this community compared to other populations; there isn’t enough data to say that. The tragedy to me is this: one of the most effective and scientifically-backed treatments for depression appears to be a stunning fit for hackers, and yet few people know about it. It’s called Cognitive Behavioral Therapy (CBT), and it has some of its origins in computer science.

Born out of the cognitive revolution of the 1950s, a key idea within cognitive psychology is that by studying successful functions in computer science, it becomes possible to make testable inferences about human psychological processes. Cognitive behavioral therapists mirror hackers in how they see the world and approach problems. They share the same core values: an emphasis on problem solving as efficiently and effectively as possible, using logic to debug a system, gathering data to test out what works and what doesn’t, and implementing transparent methods that others can understand and replicate as opposed to simply putting your faith in a “magic black box”. CBT and hackers are long lost kindred spirits, yearning to be reunited.

Therapy has an image problem

Given the striking overlap, why haven’t hackers found their way back to CBT? For starters, therapy has an image problem. There’s an assumption out there that therapy is some foofy practice of “self discovery” in which you talk about your mother for years on end and somehow magically end up better. Newsflash: therapy has made some remarkable advancements since the time of Freud.

To be sure, we therapists have some significant hurdles when it comes to marketing ourselves. No one wants to Yelp their shrink. Due to the stigma that still shrouds mental illness, there’s no public and transparent method of rating therapists and personally sharing about what’s worked and not worked for people. But to buy into therapy, programmers need the hard data.

Here’s what’s interesting: there is in fact a large body of research showing that CBT is as effective or more effective than drug therapy and other approaches to psychotherapy when it comes to treating things like depression, anxiety, stress, and insomnia.

Unfortunately, we have a massive problem in disseminating this knowledge. As research and clinical psychologists, we have an ethical responsibility (as well as financial constraints) precluding us from pouring the billions of dollars into glib advertisements that we see pharmaceutical companies doing with such gusto. That aside, however, we need to be doing a much better job at explaining our methods so that there is greater public awareness about this tool that can quite literally save lives.

The CBT program

So what are our methods? CBT is a goal-oriented, structured program that is briefer than most psychotherapies. The average number of sessions, across all problems and approaches to CBT, is 16. According to research, it’s considered a superior approach to meds for some problems (e.g., insomnia, panic, relapse prevention for depression), roughly equivalent to meds for other problems (e.g., mild to severe depression), inferior to meds for some problems (e.g., bipolar), and seen as best when used in combination with meds for certain problems (e.g., severe depression, bipolar).

In programmer-speak, the “CBT API” comprises four main methods:

  1. Cognitive Restructuring
  2. Behavioral Activation
  3. Exposure
  4. Skills Building

I discuss each component in terms of operating principles and the subsequent method that follows given such principles.

1

Cognitive Restructuring

Operating Principles:

  1. In response to an activating event (e.g., making a mistake at work), we typically react with certain thoughts, emotions, and behaviors.
  2. These three elements mutually affect each other and operate as a system. Our thoughts have a direct effect on how we feel and act, and vice versa. When we’re feeling stuck, often a vicious cycle is at play.cognitive_restructuring
  3. Commanding ourselves to feel a different way is largely ineffective. Telling ourselves “Don’t feel bad” or “You shouldn’t feel this way” doesn’t work. Instead, to change how we feel, we need to change our thoughts or behaviors.
  4. When we are feeling high distress (think over 70 on a scale of 0-100), our amygdala (the emotional/fear part of our brain) goes into high alert and overrides our prefrontal cortex (the part of our brain that uses logic and reasoning to solve problems). In the midst of this emotional “hijack”, we are prone to a number of thinking errors that magnify our distress. All humans are subject to this distortion, even the most “rational” of us all. These are essentially bugs in our rational thought process.

Method of Treatment: Thought Log

Therefore, to debug our thinking we use thought logs to record and examine the following:

  1. Identify a recent situation that activated distress (e.g., made a mistake at work)
  2. Log the thought(s) you had (e.g., “I’m a complete imposter in this world of genius and talent”)
  3. Record the emotions you felt and rate their intensity (e.g., shame 90%, anxious 70%, sadness 50%)
  4. Find the “bugs” in your thinking (e.g., all-or-nothing thinking, or seeing things as completely good or bad; labeling, e.g., because I made a mistake, I must be a loser; not giving oneself credit, or thinking positive things in your life are just luck or someone else’s doing)
  5. Generate a more accurate thought (e.g., “Everyone fucks up every now and then. I’ve seen the smartest people on my team make worse mistakes.”)
  6. Re-record and re-rate your emotions to assess any change from your debugging (e.g., shame 40%, anxiety 30%, sadness 50%)

2

Behavioral Activation

Operating Principles:

  1. Normally, a task is initiated by some little spark of motivation: we get up and go to work because we want the paycheck or find it meaningful; we have dinner with a friend because we want the enjoyment it brings.
  2. A core symptom of depression is losing interest and meaning in things we used to find enjoyable and meaningful. A lack of spark.

behavioral_activation

Method of Treatment: Forced Activity

Given these principles, to get out of feeling stuck, you can’t just wait around for the spark to come back. You have to force yourself to engage in activities you used to enjoy. And you need to start small, like calling up a friend you’ve been avoiding, or going outside for a 20-minute walk 3 times this week. You won’t think you’ll enjoy it, and at first you won’t, because that’s the nature of depression. But it’s the only way to get out of the trap.

Forced activity. It’s not as cute and easy as the antidepressant commercials with the singing blue birds and cartoon characters getting happy again, but it works and it’s side-effect free.

3

Exposure

Operating Principles:

  1. The natural response to feeling psychological distress or anxiety is avoidance (e.g., avoiding our thoughts/emotions with alcohol, TV, or other distractions; avoiding a task through procrastination; avoiding certain people or situations)
  2. Avoidance keeps us stuck: by avoiding our distress, we (a) train our brains that this avoided thing is too threatening to approach, thus increasing our anxiety about it; and (b) deprive ourselves of the only experience that can help us overcome our distress and disconfirm our fears.

Method of Treatment: Exposure

Therefore, to tackle psychological pain we need to lean into it. The goal isn’t to run away from it (which only gives it power), but to learn how to optimize it (which gives you the power). In this way, anxiety and related discomfort are our friends, not enemies, because they signal an opportunity to try out something new or do something differently. Instead of shrinking your life by avoiding things that are anxiety-provoking, you have an opportunity to lean into the discomfort, reduce its power, and grow.

We do this through an approach called exposure, which involves developing a “fear ladder” and climbing up these fears in a methodical and realistic manner. For example, if your fear is public speaking, we start with a first step (e.g., watching a videotape of you speaking), and then move together step by step until you’ve mastered the fear.

4

Skills Building

Operating Principles:

  1. Skills are not innate. They are like a muscle: they strengthen with exercise.
  2. Certain skills can improve psychological health (e.g., mindfulness, assertiveness, emotion regulation)

Method of Treatment: Deliberate Practice

Therefore, in CBT, you practice the skills that are most relevant to enhancing your psychological health. Here you work with your therapist to define a set of desired skills and a routine for how to practice them. We capitalize on research on effective goal setting and skills building. By setting goals that are S.M.A.R.T., or Specific, Measurable, Action-oriented, Realistic, and Time-stamped, you’ll be more likely to achieve them. By using deliberate practice (chunking, immediate and informed feedback, repetition, practicing at the edge of your ability), you’ll build mastery more effectively.

Using the CBT API for treatment

A CBT treatment program will vary from person to person. Someone with a phobia might focus on exposure, while someone with depression might focus more on behavioral activation and cognitive restructuring, and yet another with social anxiety might focus on cognitive restructuring and skills building.

Take a moment to realize this isn’t lying on a couch talking about your mother. These are practical techniques with scientific basis. To illustrate the difference between CBT and what many people have in their head as the stereotypical talk therapy approach, we can use a little coding exercise to get the point across.

The stereotype of talk therapy looks something like this:

You have to have faith that talking about your past is going to break you out of the depressive loop. And for many programmers, clearly understanding why talking about those things will break you out of the loop is difficult.

Whereas CBT looks more like this:

You don’t have to believe in some big unknown black box of talk therapy. You simply need to believe that each of these methods is effective for its own specific goal. This is model-driven, data-driven, logical stuff.

Book versus Person

How do you choose between going the self-help versus in-person route? Like with all choices, there are pros and cons to each.

The self-help, or read-a-book method, has some obvious pros. It’s cheap, you can do it whenever and wherever you want, and it’s in the do-it-yourself spirit of many hackers. In a word, it’s easy to fit into your life (and keep private if there are issues related to stigma or shame).

How about the pros of in-person therapy? Arguably, you get much of the knowledge and expertise from a book, so what does in-person CBT offer beyond that? For one, you get tailored treatment plans based on the therapist’s expertise in conceptualizing different types of psychological distress and given your unique needs and situation. Often a book reads in a static manner, ordered in terms of a somewhat arbitrary sequence of chapters rather than in terms of the presenting problems you want to solve. Contrary to some opinion, CBT isn’t a cookbook approach; it requires nuance and clinical judgment.

Second, and most importantly, there is something uniquely powerful about completing this process within the context of a relationship. It’s an exposure exercise in and of itself. If you are able to talk about your demons with a real live human being, and this fellow human being does not recoil or run but rather listens and engages, it creates a shift. A shift toward relating to yourself with curiosity and compassion, as opposed to indifference, or for some, even revulsion. I truly believe this is something that can’t be read, only experienced with another human being.

Next steps

Perhaps in reading this the thought has come up, “There might be something in this CBT thing for me.” If you want more, you can start with bibliotherapy, or good ol’ self-help books. A couple of classics are Feeling Good (for depression) and When Panic Attacks (for anxiety) by David Burns, MD. Feeling Good was written in 1980 and its dated cover shows it, but it’s still one of the best CBT books out there. Mind over Mood by Dennis Greenberger, PhD and Christine Padesky, PhD, is another great one.

If you want even more, and you’re interested in trying CBT out for yourself, you can go to various find a therapist websites, such as the ones provided below. Be an informed consumer. Ask them:

  1. What kind of experience do you have dealing with the problems I want to address?
  2. What is your approach to therapy? (e.g., CBT versus psychodynamic, structured versus freeform, present/future-focused versus past-focused, etc.)
  3. What are my treatment options? (You have the right to know other options by which your issues could be addressed, be it medication, lifestyle changes, dietary changes, etc.)
  4. What’s my responsibility and role in therapy? (e.g., CBT typically has weekly assignments)
  5. How will my confidentiality be assured?
  6. What are your credentials (degree and training)? Can you tell me the difference between a psychologist, psychiatrist, licensed clinical social worker, etc?

The following directories can help you find a therapist if that’s the path you’re curious about pursuing: