I'm writing this blog because of a problem that affected me for some time. Going through life with this, I learned that this is more common than I thought. That's why I believe some people might relate to what I write in this blog and if that's true then it's a win for me.
Anxiety is a very broad subject so for this blog I'll remain in the realm of competitive programming.
Since I discovered Codeforces, I was fascinated by how easy it was to take a high quality contest. The first couple of contests, I didn't really care at all about my rating or how fast I solved the problems. I just solved them like I was practicing.
Last year, things changed. A big deal of doubt regarding my skills hit me. All my achievements felt like just some dumb luck. I felt like an imposter. I wanted some concrete evidence that I was worth something at all.
Since then, I feel like I trained more than ever before and learned a lot of new things that back then I had no idea of. But this doubt never left me. It even got stronger.
Also, for every onsite contest that I participated in, I never really felt that I was pleased by my results, even though statistically my results got better. When I actually performed objectively bad, it was a clear indication in my eyes that I knew absolutely nothing.
During contests, I take an enormous amount of time thinking about my end result and how it is going to affect me. Likewise, I almost lose my ability to think about a solution during a contest when I have no idea from the start. I just panic and my mind goes blank.
Now, I want to tell you about my last experience with Codeforces Round #567 (Div. 2):
My goal was so that at the end of the contest I would be master. The contest starts, I quickly solve A and then I start to panic about B. It's a big number problems and my Huge struct is not working (used it before and worked without bugs). Also, my code got to more that 100 lines pretty quickly as the panic made me write a lot of duplicate lines. I was dissappointed by my code. I tried C, but didn't read it through and wrote a wrong solution. I was at the 1 hour mark and I only wrote A. My stress levels were of the charts. I started to tell myself how stupid I was and that I should just quit the round.
But then I did something that made me feel better. I put my head on my desk and rested for about 10 minutes. Now, I felt a little bit relaxed and was able to see that I didn't need to change my code that much to get accepted. I solved C and started working on D. The thing is that 10 minutes before the end I only had A and C but I didn't panic. I'm very proud of it. I submitted D and passed. In the last 5 minutes, I also rewrote B and it passed with 2 and a half minutes left. My rating actually increases. I see this as a win, I conquered my anxiety this time. It might not feel as a big thing to some people, but it gave me the urge to write this blog.
I think that just resting is a good way to decrease your anxiety but there's also some other quick ways to cope with anxiety. You only need a couple of minutes (less than 5) and believe me when I say that you would waste a lot more time if you just ignore it:
—Breathe in through your nose and hold the air in for several seconds.
—Then purse your lips and gradually let the air out, making sure that you let out as much air as you can.
—Continue doing this until you are feeling more relaxed.
—Lying on your back, tighten the muscles in your toes for 10 seconds and then relax them completely.
—Do the same for your feet, ankles, and calves, gradually working your way up your body until you reach your head and neck.
Anyhow, if you tried coping with it alone and felt like nothing changed at all, you should talk with your friends/family and maybe seek professional help. You are not alone in this, a lot more people than you think have anxiety related issues and you are very brave for trying to get better.
I hope that my blogpost was useful to some extent, and didn't feel too pessimistic.
Now for the end some questions to ponder:
1) What do you think is the root cause of your anxiety?
2) What is your drive in pursuing cp?
If you have certain tips to manage your anxiety, I'll be glad to hear them. :)