DEV Community

Cover image for 🤔How to avoid stress during coding?
Chetan Atrawalkar
Chetan Atrawalkar

Posted on

🤔How to avoid stress during coding?

Do you want to know how to dealing with stress while coding?
Here's some tips to do when you're feeling stressful and make mood relax.

1. Do Some Light Stretching
Stretching can be an effective strategy for preventing and alleviating stress. One way that it does so is by lengthening the muscles to relieve tension. Most of us experience a good deal of stress in our daily lives, especially us software developers during coding time. There never seems to be enough time in the day! And that stress builds up without our realizing it, creating physical and mental stiffness.
stretching
2. Step Outside And Explore Nature
Being in nature, or even viewing scenes of nature, reduces anger, fear, and stress and increases pleasant feelings. Exposure to nature not only makes you feel better emotionally, it contributes to your physical wellbeing, reducing blood pressure, heart rate, muscle tension, and the production of stress hormones. It may even reduce mortality, according to scientists such as public health researchers.
Nature
3. Play Your Favourite Video Games
Video games are engaging and enjoyable, which reduces stress. Gaming results in dopamine secretion, which makes you feel good. Video games present a challenge and reward you for overcoming it, which leads to feelings of competence. Gaming can create a flow state, which is similar to meditation. Video games give you instant rewards, which help to reduce the stress of achieving long term goals.
Video Games
4. Call A Family Members Or Friends
When you’re feeling stressed, take a break to call a friend or your family member and talk about your problems. Good relationships with friends and loved ones are important to any healthy lifestyle. They’re especially important when you’re under a lot of stress. A reassuring voice, even for a minute, can put everything in perspective.
call a friend
5. Read A Book That Inspires You
Research has shown that reading fiction is more effective at reducing stress than listening to music, sipping tea, and taking a walk. In fact, stress levels were shown to be reduced by 68 percent after reading. While your brain is engaged in the story, your heart rate slows down and muscles relax. Because there is so much work for your brain to do, reading is a very effective way to focus your energy and improve your concentration.
Read book
6. Meet Up With Your Best Friend
During stressful times, being around a best friend decreases levels of the stress hormones. Having good friends and a strong social support network can relieve stress. One study published in the Annals of Behavioral Medicine found that people who discussed difficult times in their lives had a lower pulse and blood pressure when they had a friend by their side.
Meet Up With friend
7. Eat Your Favourite Snacks
Most of time developers continuously write codes and feel stressful, so this time take a break and eat a favourite snacks or stress relief food. While there are many ways to cope with stress, one strategy is to eat stress-fighting foods. Like Chocolate, nuts, yogurt, fatty fish, banana, carrots etc.
food

I hope you like this tips please drop your comments about your thoughts and suggest more tips if you know.
For more content follow me on
Instagram @chetan.fullstack

Thank you!

Top comments (50)

Collapse
 
qwby profile image
Dominik Halfkann

I would add to that: Meditation.
It helps relief stress and anxiety, can make you more focused, you’ll have more patience and experience a whole lot of other positive effects.

Collapse
 
deedy profile image
Patryk Kudla

@qwby , Could you please send some tutorial/books on how to start meditation? I would like to start, but I don't know how to do it. :)

Thank you in advance!

Collapse
 
qwby profile image
Dominik Halfkann • Edited

tbh I’m still a novice myself. I started some while ago with the Calm app for meditation. On the web I learned there are more forms like meditation in nature and walking meditation. I already felt positive effects just by working with the app 10 minutes a day. But as I said I’m not that informed yet myself, maybe someone else has some more interesting ideas on where to start.

Thread Thread
 
deedy profile image
Patryk Kudla

Thank you very much! I will try this app.

Collapse
 
chetan_atrawalkar profile image
Chetan Atrawalkar

Yup this is also useful tip
Thank You ❤️

Collapse
 
okyanusoz profile image
okyanusoz

Another tip that (usually) works for me:
If there is an error in your code and you can't figure it out and you are stressed, just code on another project for a bit and come back to your code later.

Collapse
 
chetan_atrawalkar profile image
Chetan Atrawalkar

Thanks for share ❤️

Collapse
 
robertetiga profile image
Robert Etiga • Edited

Hello,

I'm Robert. I am just getting started with Web development, and I have found that taking a walk while listening to my favorite playlist seems to do the trick for me. If you haven't tried this exact combination, I urge you to. Tell me if it helped you too.

Collapse
 
chetan_atrawalkar profile image
Chetan Atrawalkar

Yes 🥰

Collapse
 
robertetiga profile image
Robert Etiga

Hello,

Chetan, it's been 10 days already, and I find that meeting up with your bestfriend is a really good option too. Truth is there is no best way. I believe a developer always has options. What do you think?

Collapse
 
mikeyglitz profile image
mikeyGlitz

Sometimes you have to imagine the worst possible scenario and work back from there.
What happened if you hit rock bottom? The upside is things can only go up from there.
You got fired? Did you really like that job anyway? Did you get fired? Or were you liberated from a bad relationship?

If that doesn't work, pick up something heavy and lift it until you can stop thinking about it.

Collapse
 
adithyahere profile image
Adithya

Coffee or chai would also help!

Collapse
 
chetan_atrawalkar profile image
Chetan Atrawalkar

Yes😋🤗

Collapse
 
aaditkamat profile image
Aadit Kamat

The 3rd and 7th tips that you have mentioned for combatting coding stress are ways to give you that dopamine rush your brain needs to stay motivated on long term goals. I would like to suggest that coders exercise caution to ensure that they don't turn into bad habits. Eating banana, nuts and carrots are good for your health but the other foods you mentioned aren't if consumed regularly. Other than, these are quite good tips and I'm going to bookmark this article for future reference.

Collapse
 
chetan_atrawalkar profile image
Chetan Atrawalkar

Ok thanks for your motivation 🙏

Collapse
 
unlucky profile image
UnLucky

I basically just sleep or game
The best way is ofc hanging out with friends

Collapse
 
chetan_atrawalkar profile image
Chetan Atrawalkar

Nice 👍

Collapse
 
fradar profile image
FRADAR

Awesome!

Collapse
 
chetan_atrawalkar profile image
Chetan Atrawalkar

Thank You ❤️

Collapse
 
fradar profile image
FRADAR

One word: MUSIC. It helps me a lot during coding, and I keep a special playlist that I listen to during programming. Instrumental music such as classical, electro, jazz, lo-fi is perfect for setting the right conditions to get some serious work done in a calm mood. These styles of music are also thought to help you sustain your focus, so they might be perfect for coding. I normally listen to the band Twenty One Pilots, as I love their songs. Here they are: music.youtube.com/browse/VLPLekNfB...

Thanks!

Collapse
 
rhazkoomar profile image
Raj Kumar Ranabhat

Good one. Thank you 💗😊.

Collapse
 
chetan_atrawalkar profile image
Chetan Atrawalkar

🤗❤️

Collapse
 
kishan_bharda profile image
Kishan Bharda

For me, memes. It solve all the stress anywhere anytime.

Collapse
 
cokacode profile image
theoldman

what the duck you gonna do when the temperature is 44 degree Celsius

Collapse
 
cokacode profile image
theoldman

Well now its -6

Fuck it

Collapse
 
georgewl profile image
George WL • Edited

I would add to that:
Take more holidays

Collapse
 
willnode profile image
Wildan Mubarok

I avoid stress by having multiple projects at the same time. So if I'm bored at one project, I can switch to another one. Idk if it's a good advice though :)

Collapse
 
vannsoklay profile image
@vann_soklay

thanks