CodeNewbie Community

Cover image for Coding Under Bombing: 5 War-Tested Steps to Be Productive Under Stress
Alex Lebedev
Alex Lebedev

Posted on

Coding Under Bombing: 5 War-Tested Steps to Be Productive Under Stress

Based on 115 scientific studies, 1 year of research, and every day of the war in Ukraine


Hi, my name is Alex, I’m a backend engineer, and I’m from Ukraine. Over the last year, I learned through more than a hundred scientific studies about productivity and quality of life. I recorded videos, created posts, but then the war started. We’re being bombed and killed by Russia. Like, I got a massive explosion 4 minutes from my place, just a couple of days ago.

Image description

Still, the life going on, the economy needs to run, so I continue my daily job. And in this post, I want to share all the knowledge and experience I got to help you to stay productive in stressful situations. To make it shorter, I made the main points into 5 steps and called it “Coding under bombing“, because it sounds catchy.

These steps could help you to get a handle on your life, to concentrate, and to wake up a little bit happier. It works for me, so I hope it will work for you too.

Image description

Also, in this post, I will ask you to donate to help Ukraine. Not to me, I donate myself. While we run to bomb shelters on time — my family and I are safe. But people in Nothern, Eastern and Southern regions of Ukraine — are not. Not even close. And they could use our help.

There’re public National Bank of Ukraine accounts for that, to support our army and provide humanitarian assistance. I’ll tell about it more, closer to the end of the post. Every bit of help matters. It really does.

Image description

But yeah, getting back to the productivity. Let’s start.


There’s a great saying:

In a critical situation, you will not rise to the level of your expectations, but will fall to the level of your training

And, during the first week of the war, I fell pretty deep. Still, you can get used to almost everything. So the first step I did, and the first step I recommend you to do is to…

Step 1: Put away your coffee cup

Or teacup, if you prefer tea more. And the problem is not in caffeine in general. It’s more about our habits. If you’re tired — you drink coffee. If it doesn’t help — you drink more coffee. The more stressed you get — the more coffee you drink, because it helped you in the past.

And too much coffee won’t make you feel better, it’s a fact. Funny enough, it could make you even more sleepy, I have a separate video about that, with 20 scientific studies included.

So, what I recommend, is to get caffeine without coffee. A regular cup, full of coffee, contains roughly 150 milligrams of caffeine. Could you or I drink multiple such cups a day — yeah, sure, it’s not big a deal. It’s easy to lose count.

Instead, let’s pick a caffeine pill, which you could buy in any drug store. It’s much cheaper than coffee and contains 200 milligrams of caffeine. I take half of it per day — less than 1 cup — and I’m a pretty large guy.

Image description

If you’re stressed — you need to control how much caffeine you get. Too many cups — and you get more nervous, while your day is ruined. I don’t have that much time in between the bombing alerts, so I can’t afford it. And, if you’re in a stressful situation — I bet you can’t afford it too.
Getting to the second step, you need to learn to isolate yourself while working. Or, in other words…

Step 2: Bubble yourself

My favorite method is listening to music. But there’s a catch.

Image description

I didn’t listen to any music while working for the last 3 years at least. If you feel ok and have enough time — silence is the best background because nothing disturbs you. But now I do. Sitting in silence gets me into a stress cycle, because I’m overwhelmed with thoughts. While putting a nice track in the background increases my productivity drastically.

Again, I have a separate video, even two videos in fact, on what’s the best music to help you focus. With tens and tens of scientific research involved.

But, long story short, there’re two main points:

  • Firstly, it doesn’t matter what genre you listen to. Forget all the crap about “classical music makes you smarter” and so on. All that matters — is what genre you like, so your brain feels happier.

  • The second point is, that one track on repeat works much better than shuffling through recommendations. Just pick a song you really like, and put it as the background for a couple of hours. So, your brain gets used to it, and your mental bubble allows you to work as effectively as humanly possible.

Image description

In my case, the working session could last 4 hours as well as 15 minutes. I can’t control it, because I don’t know when the next rocket will come. So, the only way to make it matter — is to put a song in the background, and get things done while I have the time. And it works. At least, it did work for the last 6 weeks.

Which gets us to the third step…

Step 3: Learn to be stupid

And by “being stupid” I mean doing something that uses as few of your brain cells as possible. The more stressed you are — the more effective your rest should be.

Of course, the ideal activity would be thinking about nothing, pure meditation. But I’m not sure many of us could meditate effectively and regularly. Especially while under stress.

Image description

So, let’s get real. Mobile games, where all you need is to click a button every 10 seconds — awesome. Some basic fiction books where the good defeats the evil — even better. Long-running sitcom with dumb jokes and a primitive story — amazing.

As always, there’s a science-backed video I made about how doing nothing makes you smarter.

But for now, imagine your brain as a battery. Every meaningful thought discharges this battery. So, if you need some rest — please, don’t discharge it by scrolling through hundreds of stories. Even if you feel better because of it — you spend so much energy that it will never be worth it.

In my case, it’s a bit harder. While I rest — thousands of people are being bombed and killed. Just a couple of hours from me, right now, when I record this video, people are dying from hunger and thirst. And when I help them — I feel way better. Maybe, if you’re able to help (humanitarian needs or army), you’ll feel better too.

Image description

Just remember that the airplane rulebook says — put the oxygen mask first on you, then on your kid. You can’t help anyone if it’s you who needs help. So, I play tons of three-in-a-row games and try not to think much. And when I get back to work — I could make something happen. The same works for you.

Which gets us to the fourth point, that you should…

Step 4: Learn how to sleep

And while you could say that you know it already, I won’t be so sure.

Sleep is the first sacrifice you make if you want more time for yourself. To watch more Netflix, play more games, scroll through more Facebook posts, and so on. And you’re not alone, at least 50% of people don’t know how to sleep. They’re either not sleeping enough or oversleeping. There’s a video I made, with tons of scientific proof on how much sleep you should really get.

If to take one more point from it, people who sleep for 7–8 hours are almost two times better at mental tests, than people with bad sleep. And, I’m sure, if you want to get things done — you need every opportunity to be smarter.

Image description

But easier said than done, right?

If you’re nervous, you couldn’t sleep enough. It takes much more time to fall asleep in the first place, with all the thoughts in your head. And when you’re tired enough to blackout — you have only a few hours left.

For me, it’s a bit more complicated, because there’s no bombing schedule. So, I could sleep for 2 hours, then for 3 hours, and then again for 2 hours. It’s not ideal, but it’s alright, until I get enough hours. And so should you.

Image description

If you get back from work, stressed out, you could either scroll Reddit until you are tired enough, or sleep for one hour to make something happen. There’s no need to sacrifice the second part of your day if the first one was awful. I’m serious about it. One additional hour of sleep could do wonders.

And to make things even better, you could improve the quality of your sleep too.

  • Firstly, wear a sleep mask. The less light you get, the better you regenerate your energy.

  • Secondly, use earplugs. The less you hear, the less your brain needs to think, and the better you regenerate your energy.

  • And thirdly, put your phone on silent mode, while sleeping, if you can afford it.

Also, I’m not suggesting “stop browsing your phone before sleep”. It would help, for sure, but I don’t want to give any advice I don’t follow myself :)

This moves us to the last step…

Step 5: Do whatever you want, while it helps

It sounds pretty generic, but hear me out. For example, physical exercises are a great way to deal with stress. They stabilize your mind, help you feel better, and increase your energy levels.

Image description

So, maybe I exercise in the morning, or go to a gym? Hell no, I don’t have the mental capacity for that now. But with each bombing alert I run down from the 8th floor to a bomb shelter, and then go up to the same floor. Multiple times a day or night, with 1 or 2 backpacks full of water, food, and power banks. Plus, we often pick some additional water or snacks to share with people in a bomb shelter.

Does it count as physical exercise? Sure. Does it help me to work better? Yup. Would I recommend my method? No, I won’t.

Image description

The same goes for healthy food and staying hydrated. Not enough water will slow your mind, and not enough food or heavy snacks will make you tired too fast.

Before the war, I could easily skip breakfast or lunch because, you know, “I’m working, I’m concentrated, I don’t have time”. But now always have time for eating and drinking, because the next bombing could last multiple hours or even days.

Does it count as a “healthy lifestyle”? Technically, yes. Does it help me to work better? Yup. Would I recommend my method? No, I won’t.

Image description

What I’m trying to say, is there’s always something that could help you to concentrate and to feel better. Even if you can’t control it. Like, a long way to work gives more time for reading. Night shifts give enough silence to calm down and accept yourself. And so on and so forth.

So, don’t limit yourself. Every stressful situation, even the war, will end. Sooner or later, or at least I hope so. For now, as a finishing touch, let me add one more step, or rather…

Personal advice

A couple of years ago, I loved watching public TED talks about the greater good. How to make the world a better place, how to help people, and so on.

Image description

And some of the speakers were people with cancer. They were pretty calm, most of the time, and some even looked happy. They often said, that because of their condition, they could actually understand what’s important in life. Like family, actual life goals, and making a difference.

I didn’t fully understand them at that moment, and I still don’t. But, one of the rockets Russia sends on my city could easily destroy my place. We’re far enough from the frontier, and there’re millions of Ukrainians you should care about more. But the possibility is there.

And from such a perspective, the defeat of the favorite sports team doesn’t look like that big of a deal. Or TV series with an awful last season. Or a pizza delivered late and cold. Or anything like this.

Image description

The problems that made me mad just a couple of months ago, now don’t look like problems at all. The whole definition of a “stressful situation” changed. I don’t recommend the method, but the next time you’re stressed about something — try to think how important it will be in a week? Or in a month? In a year?

Because you have a choice. And 40 000 000 Ukrainians do not. I won’t show you images from our destroyed cities because they’re terrifying. You could easily see them by opening Reddit or Googling. But all the death and pain your local media are showing — it’s really happening. You could see it, you could touch it, you could feel it.

Image description

I wrote a large portion of this post in a bomb shelter. And thousands of Ukrainians are sitting in such shelters just right now (see the alarm map), when you’re reading this post. They’re being bombed or something way worse. And even if you can’t change your life right now, you could surely change theirs.

As could I, so my wife and I donate weekly, using the same accounts I ask you to. We buy supplies for the army, and send packages with food, medicines, and oncological drugs to damaged regions. Hell, we even paid our taxes 3 months upfront. Tens of my colleagues and people, who checked my posts on social networks, contribute too. Even the company I work with is double-matching every Ukraine-related donation.

And, just to make sure, I don’t expect you to drop everything and start donating all of your life savings. Everyone has their own problems to deal with. But, as I said at the start, every bit of help matters.

Image description

It could mean breakfast for someone who lost both of their parents. A warm blanket for someone whose house was destroyed by a bomb. A medicine for someone in need to keep their heart beating. You got the idea.

All the National Bank of Ukraine's credentials for our army and humanitarian needs stay the same.


And that’s all for today. Feel free to like this or share this post, it makes a difference. And, if you have questions or something to say — let me know in the comments. Stay safe.

Discussion (2)

Collapse
gracie profile image
Gracie Gregory (she/her)

Thank you for sharing your story, @sortafreel and for telling us how to get involved. I'm so sorry. Slava Ukraini 🇺🇦 💙

Collapse
sortafreel profile image
Alex Lebedev Author

Thanks for reading it! Героям слава!