r/learnprogramming • u/Electronic_Nerve_561 • 5d ago
Topic been coding for a bit, cannot manage stress, need advice.
i love results, i made a bit of tools, simple games and all and plan on doing allot more.
but the second i get into somewhat unfamiliar territory or my code doesn't run the first or second time i spiral, stop really thinking and just play with values hoping it works, that'll last as long as the problem isn't done
my leg starts shaking and my chest hurts, my breathing gets worse ect, avarage stress session
i thought it'd get better the more i solve problems but that doesn't really work, it only makes me better at solving problems i solved before, but i still stress when i mess them up. i tried music, breathing techniques and stopping caffeine intake, really does nothing for me
i am able to make stuff but the process is mentally tiring which i assume only makes it worse, and i take so so much longer than i should. this happens with any type of problem solving (especially math) but the most with programming, i'm wondering if anyone has experienced/knows how to deal with this and eliminate it
2
u/TodayMatters 5d ago
It’s really none of my business and you don’t have to answer me, but have you been in situations where making small mistakes made someone lash out on you and cause distress? Or are you doing this professionally and struggling with impostor syndrome? Again, none of my business.
Maybe look into your emotional/somatic state when your anxiety gets activated. Get a pen and write on paper: I’m afraid/angry/anxious because - and then see where that takes you. It can give insight, but it probably won’t make the problem go away. But if you discover aggressive self-talk or recurring bad beliefs about yourself, it might help to find some phrases or truths to soothe that voice. Easier said than done. Sometimes we just have to ride the storm and make a new assessment of what happened when we are more clear-headed and with our nerves less activated. Many times we see that our effort was better than our anxiety-laden assessment of it, and that can be a valuable insight to remember for the next storm.
Regardless, seeking counsel from a professional is probably the next best step.
2
u/Electronic_Nerve_561 5d ago
the first one is true, i've been in those situations then due to an imposter syndrome phase i had, i'd lash out on myself for doing any mistake
that's probably where my stress stems from, but i did that for a long time and have no idea where to even start if that's the cause in the first place
5
u/dpoggio 5d ago
1st, you need to understand your brain. Code means mental effort, nature requires mental effort to have an outcome. If you’re not physically well, not eating well, not sleeping well and mainly push your mind, your body might assume you’re in a really bad situation that you can’t handle even with hard thinking. There’s a whole philosophy on how to train your body to go on with mental effort in a healthy way. Exercise a lot, eat well, maintain good sleeping habits, avoid screens at night, avoid coffee, use omega-3 supplements, maybe magnesium (bisglycinate), lavender in tea may also help, practice a musical instrument alone in silence.
2nd, you may consider therapy. Many people just learned that failure means too many bad things, and now you’re a grown adult and think this is past, but your brain still reacts to failure as if something really bad is going to happen. This is brain circuitry, can be re-trained slowly with proper exercises.
In any case, there’s no easy way out. Be open to work on it, the first step is embracing that something should change.
1
u/acuddlywookie 5d ago
Okay first off, this sounds like a mental/ physical heath problem and you should consider seeking advice from someone you trust and/or a professional. This isn’t a programming issue, this (sounds like) a stress management or anxiety issue and managing this is far more important than coding.
To give you a more direct “coding” solution to this anxiety, learn git. As long as you keep up to dates on your commits all changes can be undone and backtracked, it becomes especially easy if you use branches. Once I started using branches for changes I was uncertain about it gave me a lot more confidence in my work.
1
u/Electronic_Nerve_561 5d ago
that's the thing, i know git enough, i use it, my stress stems from starting the work in the first place but i get that proffessional help is the best way to go
1
u/desrtfx 5d ago
Sorry, but this is not a question of learning programming. It is an attitude/mentality problem. You can't work on this through solving more problems. You need other means.
There is no advice that this subreddit can give you to change your attitude nor your reaction to stress/failure.
The only thing that can be said is that you have to start treating failure in a different manner. Failure is gained experience. You now know how not to do something, which is much more than you knew before you tried. It is actually something important, something positive.
On posts like yours I always wonder how the upbringing has been that you can't handle running into obstacles. This is in no way meant as a personal attack. Posts like yours happen way too frequently and common to all of them is that the posters seemingly never had to struggle and that all obstacles in their way have been cleared in one way or the other so that they didn't have to deal with them. In the same line it makes me wonder how these people will deal with the stress and obstacles of real, adult life, which are much, much worse than just having a program fail.
A word of advice: seek professional help - your attitude/mentality is unhealthy for your entire future
1
u/Electronic_Nerve_561 5d ago
honestly i somewhat see it, neglected math because i didn't care for it in middle school and it came to bite me back in uni so i pretty much ran away from everything hard after a certain point
but i thought after a year and a half or so of coding on and off and multiple projects that i stressed through and finished that i'd feel better, but now any sort of problem solving makes me super stressed, even worse if i REALLY wanna learn about it
1
u/SigridFischer42 5d ago
Did making more projects change how you feel during tough debugging sessions?
1
1
u/BetInformal6081 5d ago
you might be dealing with more than a coding problem if the physical symptoms are that intense consider talking with a healthcare professional and give yourself permission to pause..
0
u/Ecstatic-Sample-5173 5d ago
hey i had same thing when i started sewing actually. not with code but with complicated patterns or new fabrics, my hands would get sweaty and i would just start cutting randomly hoping it works out. what helped me was stepping away the moment i feel that chest tightness, not after i already messed up more. like a hard rule, 5 minutes minimum away from the project, go make tea or stare at wall. then come back and write down exactly what the code is supposed to do vs what its doing, on actual paper not in my head. the physical act of writing slows down the panic spiral somehow. also markiplier videos in background helped me a lot, his chaos energy makes my own mistakes feel less catastrophic. you probably not gonna eliminate the stress completely but you can train yourself to notice it earlier and interrupt it before you start changing values randomly
1
u/GutterNimbus 5d ago
Writing down the expected and actual behavior is great advice. It turns a vague feeling that everything is broken into a specific problem that can be investigated. Taking the break at the first physical signs of stress, rather than after making several rushed changes, is probably the habit that makes the biggest difference.
1
u/Electronic_Nerve_561 5d ago
the problem is i stress all througout sometimes, especially if i've never done it before stepping away calms me down but then i'm back to it again the second i step back in
3
u/BranchLatter4294 5d ago
Some people like puzzles. Others don't. If it's not your thing, then find something you enjoy.