Imagine your job is to deliver packages from one high-rise building to another. The pay is good, the packages aren’t heavy, the buildings are right next to each other. But the only path between the skyscrapers is a creaky 2X4 plank stretched from one roof to the other. Imagine the gut-wrenching, harrowing experience of teetering over the edge hundreds of feet in the air. When asked why, management says “Well, it’s not ideal, but it’s the most direct route. Putting up anything else will be too costly. Anyway, what’s the problem? It gets the job done.”
Now imagine walking the same distance over another 2X4 plank, but this time, it’s only a foot off the ground. The actual task and skills involved are exactly the same, while the emotional and psychological toll couldn’t be more different. The key difference then is the cost of failure.
Which place would you rather work? Which place gets its deliveries promptly, on time, and in good condition? Which has lower costs, burnout, and turnover?
This is, of course, a metaphor for software development. Too often programmers work at a completely unnecessary level of risk, deploying without test suites, staging environments or other guardrails. The process continues because “it works” (at least until it doesn’t). Whether due to scarce resources, ignorance or bravado, this environment takes a dangerous toll on employees, their happiness, and the business as a whole.
Remember, just because you can deliver software that way doesn’t mean you should.
Sources of Anxiety
I’d like to discuss anxiety from the lens of software development, how it relates to our work and how you can mitigate it for yourself and your team.
For all its joys, software development has its fair share of terrors. Every developer has at one time or another felt the icy sucker-punch of fear from a frantic midnight alert that Production is down, or the announcement that you’ll have to migrate to yet another new Javascript framework.
There’s the constant churn of technologies, the inescapable fact that you will never grasp more than a small sliver of the tools of your field. There’s the uncertainty of promising features, delivery timelines, and cost estimates with vague roadmaps and iffy feasibility.
Meanwhile the high demand for seniors and scarce support for juniors creates a vacuum of experience at the top which pulls many juniors (and sometimes mid-level and seniors) into positions above their comfort level, frantically learning on the job while fending off imposter syndrome.
None of these factors are exclusive to software, but understanding the principles involved with anxiety enables us to better manage ourselves and our teams.
Psychology of anxiety
Anxiety is a state of discomfort, negatively valenced emotional arousal. It differs from fear in that fear has a specific source, while anxiety is more generalized.
For me, the crucial insight is that anxiety is self-reinforcing and self-rewarding. When you approach your fear, you are punished, instantaneously and unavoidably. Say you’re afraid of public speaking. And it’s your turn to present in class. As you approach the podium, your heartbeat pounds, you begin to sweat, your mouth dries up, and the cadence of the self-critical voices inside your head change from inner monologue to inner rap diss track. Every system from your amygdala to your sweat glands are shouting the same message. Fear fear fear.
On the other hand, when you withdraw from the stressor or object of fear, you are instantly rewarded. The bell rings, class is over, you won’t have to speak today! You feel a flood of relief as you step away from the mic. Tension eases, your heart rate calms. Relief relief relief.
Of course next time you’ll be even more scared (because speaking was scary) and even more tempted to back out (because avoiding was so pleasant). A few rounds of this pavlovian reinforcement and you’ll learn to avoid public speaking whenever possible. This instantaneous double carrot and stick is hard to counter, because they’re wielded by your own brain, not any outside force. The carrot and stick are wired into your very nervous system. And because they are so powerful in their effect and instantaneous in their timing, they can drive our behavior unless we take steps to counter them.
Anxiety leads to avoidance leads to less experience. Inexperience leads to feelings of incompetence and, you guessed it, more anxiety. So, in summary: When working on anxiety, you need to do the thing that feels bad and avoid the thing that feels good. This is obviously a bit of an uphill battle.
Takeaways for Software Development
Organizational steps to reduce anxiety
Let’s think back to our 2X4 analogy. How can we lower the anxiety level? The obvious solution is to make the path 1. Easier to stay on and 2. Less costly to fall off of.
1. Easier To Stay On
Replace the plank with a footbridge, add guardrails and safety nets. For your software this could mean adding robust test suites and automating deployments. It could mean adding linters, performing fuzzing or code analysis to automatically check for vulnerabilities before they go live. It definitely means solid documentation, following the principle of least privilege, and adding branch protection. A new dev should never be able to accidentally delete the production database on day one. In software, we can shape our work environment. You’re building the target, so paint the bullseye as big as you want.
Make sure developers know what to do when they’re uncertain. Sufficient support, mentorship programs, and Q&A channels where people can gut-check or raise red flags is invaluable.
2. Lower The Cost Of Failure
If you can’t outright prevent failure, making it less costly is the next best thing. Make secure database backups, and make sure they actually work. Mitigate version upgrade risks with staged rollouts and a clear rollback plan. Lower the social cost of failing by cultivating a blameless culture where mistakes are shared learning experiences instead of finger-pointing blamefests. If one person made the mistake it’s likely a matter of time before someone else does. Encouraging people to speak out and share their missteps instead of hiding them can save the next guy. If your courier falls off the 2X4, maybe ask why it happened and how to prevent the next time instead of jumping straight to the blame-game.
Personal steps to reduce anxiety
Vicious to Virtuous / Cycles can go both ways
We talked before about how anxiety leads to avoidance, leads to inexperience.
So, flip that vicious cycle into a virtuous one. Take anxiety as a signal prompting approach and learning. That learning will lead to mastery, leading to confidence, and further approaching and experience. Train yourself to approach when your brain is telling you to avoid. Seek out the gnarly classes no one wants to refactor. Pick up a book on that technology no one understands. Turn “I don’t want to think about that” into “Maybe this is something I need to spend more time on”. Or even “Maybe I should call in help on this one”.
Become Competent
If you’re afraid to do something because you’re bad at it, “get better” is an underrated and surprisingly effective solution. That might sound tautological but it’s really worth considering. The solution to “I struggle with public speaking” is “do more public speaking”. A couple rounds in a debate club might not win you any prizes but it’ll certainly level up your skills. Similarly, if you’re terrified of being the on-call engineer in the next 3am crisis, ask to sit in on a more experienced developer’s shift when they’re in the hotseat. Or offer to write up documentation of the most common recent crises and their resolutions, to get context and feel for the process. Whatever your area of weakness is, approach it. Take a course, start a hobby-project. Accept and come to terms with the fact that you can master this skill you currently suck at. Approach when you want to avoid.
Again, “get good” sounds obvious, but the blinders of fear are quite opaque, and can hide the solution that’s right in front of you.
Make Peace with Discomfort
Accept that your work entails a level of uncertainty and risk. The better you make peace with that, the easier you can sleep at night. And remember, you’re great! You’ve built impressive things and solved tricky bugs before, and you can do it again.
Classic Solutions for Anxiety
At some point you’ve made what changes you can in your environment and what’s left are the good old standbys of mental health. You’ve heard them before: sleep, exercise, diet, meditation, therapy, walks in the woods and supportive social relationships. They work and are worth every bit of effort they require.
Anxiety is a signal. Often a good one.
Finally, remember that anxiety is a signal. Often a good one. The correct response to stressful situations is stress. Of course you should watch out for the signs of maladaptive stress– chronic, long-term stress or extreme anxiety are neither normal nor sustainable. But being blasé about serious risks is not a good strategy. Anxiety is an adaptive response intended to solve that problem by rallying resources, focusing attention and prompting serious reflection. But it may or may not be helping your current situation, and so it is up to you to calibrate it to an appropriate, manageable, and, most importantly, useful level of stress.
Accept the signal, acknowledge you’re facing a challenging task not to be taken lightly. Recognize that it demands effort, ingenuity, and careful consideration of risk. And then deal with it.
You got this.
Loved the article? Hated it? Didn’t even read it?
We’d love to hear from you.