The Programmer’s Great Clinical Depression

Written By Jason Lowenthal

I have a multi-year history of clinical depression, diagnosed by several different medical professionals. It doesn't come up often in day to day conversation, and generally speaking I don't actually experience any symptoms.

But my depression hangs around. When I don’t take the time to appropriately work towards good mental hygiene, it comes back. Sometimes it gets ugly. Thankfully, this hasn’t happened to me in a couple of years. But it can happen, so I have to remain vigilant.

You may have already thought to yourself “Why in the world would I read a post about clinical depression? This blog focuses on programming, not mental disorders.”

I can answer that question in simple terms: the lifestyle of a programmer dramatically increases likelihood of clinical depression.

Depression Can Suck It

Depression Programming

I make no qualms about this point, whatsoever. Depression is demon-spawn.

The disparaging awfulness that comes from depression makes the tangibility of evil seem exceptionally real.

Depression lies to you. It tells you you’re not worth it, that the world hates you, and that everyone would be better off if you weren’t around any more.

That's on the days when taking the covers off and getting out of bed happens. Sometimes, depression will even sap the will to move.

Depression makes you feel like ending your own life. Because you feel like you can’t escape it – everywhere you turn it’s standing there mocking you, telling you how shitty of a person you are.

Yet, oddly enough, in a large majority of cases (mine included), lifestyle choices can help it change from all-consuming into easy-to-ignore.

The Antidepressant Programmer’s Lifestyle

A critical resource recommended to me by my psychologist when first starting to combat my own clinical depression came in this book: The Depression Cure: The 6-Step Program to Beat Depression without Drugs by Dr. Stephen S. Ilardi.

The 6 components include:

  1. Get enough sunlight
  2. Get enough sleep
  3. Get enough exercise
  4. Concentrate on getting enough Omega-3 fatty acid in your diet
  5. Socialize (not just on Facebook!)
  6. Avoid Rumination

Get Enough Sunlight

It’s important to go outside and get sunlight directly.

Which is something programmers, locked inside and coding for hours on end, often struggle with. Even if you work in a building with lots of glass and get sunlight while you work, unfiltered sunlight really matters. Even the best windows filter out some of the natural spectrum.

Recommendations suggest spending at least 15 minutes a day, 3 times a week, in bright, direct sunlight.

A couple things happen when we spend a few minutes outside every day.

First of all, our body is better equipped to regulate the amount of melatonin getting into our bloodstream naturally. This makes us sleepy at bedtime. Which is a good thing.

Second of all, it helps our body generate, regulate, and absorb serotonin. Chemically speaking, the way our brains handle serotonin directly impacts our ability to fight off depressive thinking. While I’m not as well versed on the comings and goings of what serotonin does in our brain, without it, we wouldn’t be feeling happy.

Too many programmers work in cube farms with no windows. Make it a purposeful point of getting outside. Fluorescent and other artificial light won’t cut it, ever.

Go To Bed

Go To Bed

Plenty of evidence in our genome suggests that we haven’t really changed much since we grunted, scratched our armpits, and didn’t wear much covering our body parts. That’s right. I’m talking about cave-people.

You know what cave-people did when the sun went down? They went to sleep. It’s not all that easy to hunt without a light source.

A well regulated circadian rhythm does quite a good deal in brain regeneration. It helps us re-build brain cells, and use that serotonin efficiently.

When you go outside and get your brain to make melatonin correctly, listen to it. When your brain says go to bed… GO TO BED!

Programmers have a unique problem with this that really screws us up. We get way too much light that contains blue-spectrum wavelengths when we stare at computer screens all day.

One thing that helps me make sure I’m not tricking my brain? I use a hue adjusting program, like f.lux, to redshift the screens on my devices. Blue light suppresses our brain’s natural capability to react to melatonin properly. So tone down the blue light, turn up the red light, and make your brain think your laptop is a campfire.

Also, don’t stay up all night reading or tackling interesting side projects. While we all know how awesome the high is of solving a computing problem – sometimes we’re better at solving those problems if we just sleep on them.

Also – this one’s a biggie and will probably make you angry, get the TV or Computer out of your bedroom. I once had a great doctor tell me “The bedroom is for sleeping and sex. Period.” That’s advice you can take to the bank! If you bring externalities into the bedroom, sleep hygiene is super hard to achieve.

As a general rule – you really want to hit at least 7.5 hours of sleep every night. Anything less, and the rejuvenative and restorative affects sleep has just don’t get the job done.

The cool thing now is that smartwatches make it really easy to do sleep tracking. Though I don’t have any hard evidence about how accurate these are, I can tell you my Pebble does a pretty phenomenal job helping me ensure I’m getting the right amount of sleep.

Sweatsweat

Ideally, sweat at the same time you’re getting those great natural rays of sunshine.

If you use the pomodoro technique (you should) then go sweat during the 15 minute long-break that it affords you. Walk a couple of laps outside of your office.

For me, walking helps me clear the cobwebs, re-focus for the next task at hand, and feel re-energized to focus in chunks again.

Getting the heart-rate up to the cardiovascular “breaking a sweat” range really helps.

When our bodies get exercise, we create something called endorphins. That’s the best natural high in the world, because we’re programmed internally to want to stay physically in shape. But as programmers, we sometimes spend too many sedentary hours in a chair.

Our paleolithic ancestors depended on sweat and fitness. Otherwise Mr. Sabertooth would have made a meal out of them.

Sweating Beats Stressing

One of the most important things you can do to reduce your stress load is to go take a walk if you’ve had an intense conversation.

Our emotions – and depression – all have direct link-ins with the hormone levels in our body. Back to those cave-people again. When we got stressed as cave-people, it was usually because we were about to die.

Stress works a little differently now. But our bodies still depend on us getting endorphins to counteract the cortisol hormone created by stress.

The best way to recover from an acutely stressful situation or conversation is to go for a brisk walk. Get your heartrate up a little bit. Your inner caveperson will thank you for it.

Sweat Can Break Sleep – Be Careful

Endorphins tend to trick our brain into thinking that it’s not a good time to be asleep. Back when we lived in caves, endorphins usually happened when we’d just been out hunting in the daytime, or when some kind of predator jumped upon us. Which means sleeping with endorphins flooding our brains is super hard.

Make sure you leave at least an hour (preferably several) between working out and going to bed. Once the endorphins wear off, the melatonin works even better than it would have if they hadn’t shown up in the first place.

Get Plenty of Omega-3 Fatty Acid

The gray matter of our brain uses one very important chemical as the basis for all of the other things happening up there.

Omega-3 Fatty Acid comprises a large majority of the stuff we use to think.

Unfortunately, most food produced in the USA is severely lacking in Omega-3 fatty acid.

I take a fish oil supplement every day, because I suck at eating right, right now. And I know plenty of programmers who think fast-food is an acceptable food group. I promise you, fast food is severely lacking in Omega-3 fat.

If you’re lucky (or dedicated) enough to live on free-range grass fed beef and wild-caught fish as your source of protein, this is not going to be an issue for you.

Grain fed food tends to lead to a disproportionate amount of Omega-3:Omega-6.

The fun thing is, the amount of Omega-6 you eat doesn’t really matter for brain health (though it might clog your arteries). As long as you push your Omega-3 uptake higher, it’s more about the ratio than the raw amounts.

Talk to Real, Living, Human People

Conversation

I’m on several different Slack teams. Slack is an absolutely fantastic tool for team collaboration and idea sharing.

It’s a great way to keep in touch on projects. But it’s also a great way to lose touch with humanity.

Facebook, Twitter, Instagram, Slack, and all of the other platforms that allow us screen-focused individuals to connect with people actually have one extremely critical drawback.

Humans need human connection. Cave dwellers thrived in tribes that lived together, grew together, raised families together, hunted together, and died together.

Our brains crave interpersonal interaction. Which, for most programmers, seems pretty hard. Often introverted by nature, most of the programmers I know tend to keep to themselves and avoid actual human-to-human direct interaction. If nothing else, you can’t really spend a lot of time talking to others when you are working out a difficult portion of code or testing for the 80th time.

It’s important to have humans in your lives. Otherwise, your support network seems limited during those down times.

Don’t Shit On Yourself

This last one is hardest for me. Any time I accidentally cut someone off in traffic, or make some other socially awkward faux pas, I tend to beat myself up about it for a long time.

It’s hard not to overthink a situation. Especially because I’m a programmer, so I get paid to think. All the time.

Programming is an extremely subjective profession, which involves lots of peer-to-peer review time. Which also involves me constantly having to do a really good job of explaining why certain concepts have to apply, and why the team-appointed standards matter.

But, if my depression weren’t under control, I’d regularly worry about insulting a team member; or whether or not I screwed up in that bad traffic.

Here’s a hint – the colleagues I have grow better all the time. As of yet, I’ve never caused a traffic accident or any noticable road rage.

Dr. Ilardi’s book recommends setting an actual, literal, timer for what he calls rumination. If you can’t come to a meaningful actionable conclusion about a negative thought after 10 minutes, it’s time to shut that thought off.

We’re programmers. We have plenty of other things we can devote a huge amount of our brainpower to. Self-loathing really shouldn’t be one of them.

Pharmaceutical Help

I’m not super great at brain chemistry. Or chemistry at all, really. But, I know that chemical interactions in the brain dramatically impact depression.

My super fantastic family doctor introduced me to a relatively new diagnosis, a genetic mutation on the MTHFR gene.

Click on the link. I promise I’m not making up this acronym. It’s the Mother-F’r gene.

Mutations in this gene can reduce your brain's ability to naturally produce something called L- Methylfolate Reductase.

Which can lead to depression susceptibility, because a reduction in that chemical is important to a chain reaction in the brain, allowing serotonin to work properly.

So, I take a couple of prescriptions to help. One’s called Deplin, and the other one is a low dose of Lexapro.

If I get really really good at sticking to the Six Steps of an Antidepressant Programmer’s Lifestyle, I may be able to drop off the Lexapro. But, for now – it stays as part of my regime. Likely for the foreseeable future until my kids get a bit older and I get better at managing my time.

Otherwise, I know that I’m not doing as well as I should be. And I don’t want to be that depressed again. Ever.

Beating Depression Makes Me StrongerMake You Stronger

I reiterate – I have to be vigilant in order to make sure I can call my depression “beaten.” It never really goes away. I have to beat it every day.

You may wonder about the title, and why I included the word “Great”.

What makes depression great is diligently fighting the things that make depression worse. I actually feel more capable of being accomplished than I did before I started becoming depressed.

Living life in a way that combats depression improved my confidence substantially.

Though I’m by no stretch of the imagination the epitome of good diet and exercise practices, just knowing how much a good dietary lifestyle (note – this does not mean going on a diet) and regular exercise regime makes a big difference. It leaves me with more happy days and less stressful ones.

Mental and physical health have extremely tightly woven direct links to one another.

Take Great Care of Yourself

Depression forced me into improving my physical health and mental hygiene, but now I’ve got a great, always present motivator not to lose track of it.

That’s what makes depression great. Being depressed isn’t great. In fact, I hate it.

But, having depression always around reminds me to take care of myself. That is great. It’s kind of like my own internal accountability system.

If I don’t take care of myself, my depression returns. That’s all there is to it.

I’m motivated to take care of myself.

Hopefully, after reading this – it will help you see why self-care is so important, and so often neglected, especially for us as programmers. And you will be motivated as well.

We all deserve to feel great; and, most importantly, to be great.