topic: Dealing with anxiety (for coders)

Tags soft-skills anxiety

Basically all developers need to face anxiety in their work. While a developer is still learning to code they might face written or verbal tests; and they might need to speak up in front of their peers. When a developer is looking for a job they might need to pass tests, and they’ll definitely need to deal with job interviews.

Even senior coders who have “made it” need to deal with pressure: Imagine you wrote a learning platform used by hundreds or thousands of learners. Imagine it goes down and you need to fix it… yoh. Not fun. Even if prod never goes down you will still need to deal with deadlines, difficult tradeoffs, challenging market conditions and a whole lot more.

Now, it’s important to realize that anxiety is a perfectly normal thing. So if any of the stuff I mentioned above made you feel anxious, then that’s normal.

The fact that anxiety is perfectly normal is actually kinda a cool thing - it means that a lot of people have put time into studying it and coming up with stratergies and solutions that you can use.

Preparation

You can reduce the negative effects of anxiety by preparing yourself for stressful situations.

First understand

It’s worth knowing a bit about how anxiety works in humans. This ted talk has a good overview.

Let’s talk about spiders

Yeah, you heard me 🕷️

The best way to overcome a fear is to face it voluntarily. But you don’t need to face it all at once.

Let’s pretend that you have serious arachnophobia and you want to get over it. You can do it by gradually exposing yourself to the thing you fear. Here’s a recipe:

  1. Get some pictures of spiders and look at them until you’re a bit bored
  2. Hang out in a room where there is a spider in a glass tank until the spider no longer bothers you
  3. Look closely at a spider in a glass tank until it no longer bothers you
  4. Hang out in a room where there is a spider that isn’t in a glass tank. Get closer to the spider over time until you are looking at it very closely
  5. Eat the spider! Victory! Bwahahahaha (just kidding)

Ok, each of those steps might take a while, and depending on how scared you are you might want to put some steps in between. And you might not want to go all the way to step 5 unless you really hate spiders. But you get the point.

Let’s talk about coding tests

Coding tests come up a lot in learning environments, and in job hunting. Coding tests make basically everyone scared. What’s the recipe for confidence?

First of all, it’s worth saying that preparing for the test by studying and practicing the material is important. Obviously.

But just knowing your stuff wont turn off your fear. The best way to overcome fear is gradual, voluntary exposure to the scary thing.

The best way to simulate a real test is to do practice tests. You can also have a friend or mentor test you or just do some coderbyte questions with a timer on.

Dear Umuzi learners

If you are an Umuzi learner on one of our core technical courses: One of the many reasons that we test you so often is so that you can practice dealing with anxiety and working under pressure. Of course we are also interested in the skills that we are testing, and expect that you will perform better over time. If you totally fail a test then the absolute worst that can happen to you is that we’ll give you extra help.

Ideally these tests should not be a source of anxiety for you because they are about practice and growth, not judgement and labelling.

You’re welcome 🧡

Let’s talk about interviews

Interviews can be scaaaaary! But if you break it down it’s just a focused conversation. Again, you can practice interviews. You can get one of your friends, a parent, or a mentor to do mock interviews with you.

Practice resources

There are a lot of ways to practice tests and interviews. You can see a few recommendations in this topic TOPIC: Interview Preparation

Catastrophising

This is also described briefly in the video above. If you often find that you can’t focus on the task at hand because you are too worried about negative future consequences then this is for you.

Overcoming catastrophic thoughts in the heat of the moment can be quite hard. That stuff is emotional! If you are struggle with this kind of thing then you’ll want to spend some time working through your worries while you are not in a high pressure situation.

Here is some food for thought.

If you have consistent problems with catastrophic thinking then you should reach out to a councillor or therapist.

Meditation

Many studies have shown meditation to be useful in maintaining focus, dealing with negative emotions and reducing catastrophic thinking. There are many excellent free resources out there.

It is worth knowing that meditation is hard. Try this: Set a timer for 10 minutes and try to only focus on your breath. You’ll notice that your mind will wonder a lot. If you are like most people you will find the whole situation frustrating and disappointing. You might even feel self-judgement at your inability to focus.

This is perfectly normal if you are a meditation noob.

Meditation is not really about having a consistent focus, it’s more about consistently bringing your mind back to focus when it wonders. The refocusing is where the magic is at. Every time you bring your mind back to focus it is like you’ve lifted a weight, your mind will get stronger.

There are lots of excellent resources and apps out there that you can try out.

In the heat of the moment

Even if you prepare as hard as you can, life’s going to throw you a curve ball. When anxiety strikes you’ll need to be able to deal with it.

There are a few tricks and strategies that can help you. Of course, these strategies also need practice. And you are a unique and special snowflake (just like everyone else) so you’ll need to figure out what works for you.

Writing code

Let’s say you are writing a test, or fixing a piece of code because there are hundreds of users experiencing a bug. The pressure is on and your thoughts are running in circles. What do you do?

Slow it down

That sounds like crazy talk, right? The pressure is on! But taking 10 seconds to calm yourself isn’t going to make a big difference in the grander scheme of things. You can afford 10 seconds. And if 10 seconds is not enough you can afford 10 more. 100 seconds is less than 2 minutes. You can really spare the time.

If you make calming yourself a priority then you’ll save more time than you spend.

So, what can you do in a few seconds that will make a difference?

First, it’s important to take your mind away from the problem. Look at a pot plant, close your eyes, hum a little tune, have a sip of water, do a breathing exercise. Find what works for you. Getting away from the problem and calming yourself causes 2 things to happen:

  • it’s a little system reset. If you are in a mental tailspin then this can pull you out of it. When you return to the problem you will be calmer
  • it helps you to not get so anxious the next time. Your brain will realize that “when x happens, I can just calm myself down. Therefore x is not dangerous and I shouldn’t worry the next time it happens”. Don’t you just love neuroplasticity? Just the act of repeatedly calming yourself will make you less prone to unnecessary panic

Many people recommend breathing exercises. You can just take a few deep, mindful breaths with your eyes closed. Or you can try something like box-breathing as described in the video above. Experiment and see what works for you.

Once you have taken your few seconds of calm, refocus on the problem.

Interviews

A lot of the same advice applies so I won’t repeat it. Just remember that in an interview it’s ok to say “Sorry, I’m a little nervous. Can you repeat that?” And other such phrases. If you need to take a pause and take a breath it’s ok, just maybe don’t pause for too long. And maybe don’t do box-breathing in the middle of the interview.

It’s also ok to slow the pace of the conversation by asking clarifying questions or literally counting to 2 or 3 before trying to answer hard questions.

Levelling up

Of course as you get better at dealing with anxiety, you’ll be able to handle tougher and tougher situations. Your capacity for handling anxiety is like a muscle you can build.

Early in your career or training you might not have had many opportunities to build that muscle so you might not even know how strong it can get. You might think things like “I am just an anxious person” or " I can’t work if there is time pressure" or similar.

Don’t let yourself be limited by those beliefs. You just haven’t had much of a chance to grow yet.

Disclaimer

Anxiety is mediated by brain chemicals, that stuff is complicated. There is such a thing as an anxiety disorder, some people actually need therapy or medication to deal with anxiety. Most people don’t. This article is about a more average kind of anxiety.


RAW CONTENT URL