Testing Depression

A software tester's approach to dealing with depression.

I have struggled with depression for the past 14 years or so. During that time I have on occasion been suicidal, isolated myself, screwed up all manner of things and even sometimes, for a fleeting moment, been happy. Depression is a complicated thing. Recently I was put on sick leave by my doctor. This has given me time to reflect on my depression and how I have managed it in the past and how I can manage it in the future. So in lieu of discussing automated tests or programming I intend to approach my condition from the perspective of a tester. I'll break my brain and debug the issues I find.

Test plan

Since I'm not particularly excited about attempting to deepen my depression or causing myself harm a less direct approach is needed. A sort of post mortem or code review for the mind. Perhaps some direct tests might also be in order, particularly of the assumptions I'll make. My depression has a depressingly consistent pattern. Come autumn, or some other nice and traumatic event, my mood worsens in a self re-enforcing spiral until I am incapable of even leaving bed. In a way this is good since it allows me to use a simple model of the depression:

  1. Triggers cause me to feel worse.
  2. How I feel controls the effects of triggers and what I can do.
  3. There is something I can do to feel better.

This gives us basically two "features" to explore, triggers and actions. So our rough test plan could be to identify those triggers and actions and figure out the input and output of each.

Triggers in a faulty brain.

  • Action/Inaction regret (Output dysfunction)

    When I regret doing or not doing something the feeling of "I done goofed" can be overpowering.

    Examples could include anything from being late for work after oversleeping to failing an exam after not studying.

    This regret often fuels a big downturn in my mood. The problem is when the mind blows the consequences of the action/inaction way out of proportions. Our actions often have have negative consequences but a depressed mind can easily overestimate their impact by orders of magnitude. Usually feelings of worthlessness follow, deepening the depression.

    There are a few tools one can use to combat this.

    1. "Really?" Forcing oneself to examine the consequences through a strictly logical lens can sometimes help with the blatant overestimation. f. ex. Will my friend really cut off all communication with me because I didn't answer his text?
    2. "So What?" Reconsidering the impact of the consequences can help. f.ex. Does it really matter all that much if that guy I don't like thinks I'm lazy?
    3. "Science, Bitch!" Sometimes designing an experiment to check the actual consequences can work wonders, especially for frequent or common lapses. The key thing is to note the consequences one fears and then to test them. f.ex. straight out asking that coworker if he thinks you're lazy. Calling your friend up after ignoring a text and ask him if he now hates you.
  • Hurtful words (Input dysfunction)

    When someone communicates something I perceive as negative to me about myself it bloody well hurts, no matter if it is a sly comment or an unfortunately timed wink.

    Examples can include someone criticizing your work or not replying to a text message.

    This is generally an interpretation failure. One assigns meaning to things that don't have it, assigns the wrong meaning to things, inflates or mis-assigns the negativity being communicated.

    The same tools as described for Output dysfunction can work wonders here as well. A few additional rules of thumb can also help.

    1. "Exactly!" Forcing/Training yourself to take people at their word can help a lot when the problem is assigning meaning where there is none. A statement about your work thus only reflects your work and only in the manner described. This sometimes causes a problem with sarcasm but that is only a slight benefit.

    2. "What else?" When the problem is mis-assigning meaning sometimes it's useful to think of other explanations. My friend is not ignoring me, he's simply taking a dump and can't reply.

    I've found the "What else?" approach very valuable as language is an extremely fuzzy communications medium and correcting miscommunication is frequently useful.

  • Dangerous environment (Processing dysfunction)

    When something changes in my environment I frequently interpret it as a negative, scary thing.

    An example could be new coworkers, moving or even attending a party.

    The problem is when one assigns danger to perfectly harmless, albeit stressful or difficult, things. Often time things which follow other, desired changes.

    Again the tools for output dysfunction are of great help. There is one more tactic that can also help.

    • "Take control" The danger we perceive is often tied to the feeling of not being in control. I believe this explains why more people are afraid of flying than are afraid of driving even if flying is demonstrably much safer. By taking control over at least part of the situation the feeling of helplessness and fear can subside. f.ex. feeling out of sorts at a party can be cured by a) leaving or b) talking to someone.

A noteworthy theme throughout the examples is how mundane and non-catastrophic the triggers are. This cuts to the heart of what it is to be depressed, at least as I understand it. Being depressed is a bit like having a veil of negativity covering the world. The brain chooses the worst, unhappiest explanation for everything that happens around you. Simple things that a happy, healthy brain has no problems with present as unsurmountable obstacles to a depressed individual. Even getting out of bed can feel impossible.

Patching your way out of depression.

Our list of actions now has six items:

  1. "Really?" - Use logic to reason about the situation.
  2. "So what?" - Examine if we really care about the results.
  3. "Science, Bitch!" - Experiment and actually confirm or deny what we think about the situation.
  4. "Exactly!" - Take people at their word to avoid attaching unintended meaning to their actions.
  5. "What else?" - Find alternative explanations for peoples' actions and words.
  6. "Take control" - Change a difficult situation by taking control.

It is important to note that you can't really take control of your emotions directly. Taking control means taking action to change your environment or thoughts. Those will then affect your mood and emotions for the better.

There are two more actions I have not listed as they are more general and don't concern any specific triggers. They are both at least as important as the first six.

  1. "Seek help." - Talking to a qualified psychologist or a psychiatrist (better as it facilitates nr. 8) is the most important step towards recovery. The help these people provide is invaluable.
  2. "Better living through chemistry." - What makes depression depression and not just a case of the blues is the fact that the brain simply is not working as intended. The drugs simply patch issues with the biochemical machinery in the brain allowing one to function better during the recovery process and in some cases after. Having a broken brain that needs chemical patching should not raise concerns about moral character of the individual.

For all of those actions experimentation and variation to confirm effectiveness is very important. For me the most important things has been to be mindful of the recourse available to me and to take the correct action when needed. Of course, like other people, depressed individuals can get sad for legitimate reasons. Sometimes just accepting sadness and allowing it to run its course is perfectly acceptable.

Each action also works in its own way, our goal is to correct the errors in our minds, fix the faults in our thinking and our actions and prevent the mental failures that cause us to spiral deeper into depression. The correct medicine in appropriate doses helps us correct some of those errors. Therapy, or getting help, helps us with others and along with reflection allows us to find the faults and fix them, or at least find a workaround. Finally, the first six actions above help us mitigate the failures that are the result of the faults in our minds, some even help us directly address the faults and underlying errors.

Last words

Depression and mental illness in general are thankfully becoming a less taboo subject in our industry, and society in general for that matter. There are still a lot of people afraid to admit to their problems and there are still many who do not understand the affliction. You can't switch off your depression, you can't "cheer up" and functioning like a normal person is often not possible. What you don't have to do is suffer alone, in silence.

Belonging to the workforce is difficult when depressed. Getting support and understanding from your employer makes it so much easier. Having a job to go to and coworkers to socialize with can make all the difference. I feel blessed by the support and help my employer has given me.

Being a productive employee when depressed is not easy. Sick days are more frequent and communication with your coworkers more challenging. Using work as a source of strength helps. An anchor to help you stay grounded and give you a routine to help with your recovery. Apparently new research has shown that the brain performs better at analytical tasks when sad, so there's that too.

Maybe the most frustrating thing about depression is how little others can do to proactively help you. This is a condition which only one person can cure, no doctor is going to whisk it away. Only the one suffering from depression can conquer it and the most important way others can really help is to listen, be available and finally show genuine appreciation when possible. Few things lift the mood as much as a sincere word of praise, either for the person or the fruit of their labor. It must be genuine and deserved or it will miss the mark.

Ultimately depression is a manageable condition. Seek help, speak out and don't be afraid. At the very least you can always file a bug report, it probably won't get fixed but at least it'll be cathartic.