Hacker News new | ask | show | jobs
by gerbilly 3010 days ago
As someone who has been programming for 20 years, and experienced a lot of stress from it, it seems to be like I have been unwittingly practising 'anti yoga.'

When I code difficult problems, my breathing becomes light and shallow and from the chest: almost the way you would breathe if nervously anticipating some outcome.

The physical posture is more often than not slumped in a chair, and locked into a narrow range of motion, due to needing to use the keyboard and mouse.

The mental experience is often one of stress due to time pressure, or due to the confusing and often frustrating nature of the work.

The physical body reflects the mental state, when frustrated or confused or even angry, the body tightens, especially in the neck and shoulders.

I'm sure it's possible to program and not to fall into these traps, but for me more often than not this is how it seems to go.

3 comments

It’s not easy, it takes time and effort, but it can be overcome. Mindfulness, setting periodic alarm reminders (at first frequently and then less so) to sit up straight and breathe deeply, meditation, all help a lot. The problem is that it can take a while to start to see results, and people often give up. They’ll come back to it when they pull something or herniate a disc, but until then posture and breathing are not a priority.

You can definitely do it though, it just takes some initial inconvenience and effort. The payoff is not insignificant though, including positive impacts on productivity!

> The problem is that it can take a while to start to see results, and people often give up.

I recall listening to two pretty well known experts in mindfulness meditation, and they said it can take thousands of hours of practice before you start to see profound results. Like anything, it requires practice and patience.

One thing I've found helpful is the training I've done for freediving, which is a lot about relaxation and breathing. And while I've done a lot of "wet" training (exercises in the water), a lot of the exercises can be done "dry" (sitting or lying down) and there's a number of apps on the various app stores (search 'apnea') that will guide you through the necessary breathing exercises.

By building the techniques to do 5-8 min breath holds, you learn to almost reflexively enter a very relaxed state that lets your body use oxygen more slowly. So now when I start feeling stressed, I inhale fully, hold for 3-4 min and then do a ~30 second exhale and all my stress just melts away. As a bonus, I don't get winded as easily and I recover from exercise to a normal breathing pattern much more quickly than I used to.

Hold for 3-4 minutes?!?! I feel like I'm going to die if I hold my breath for more than about 30 seconds
That's because you haven't trained.

When I first started, despite swimming on a fairly regular basis, the longest I could hold for was 90 seconds and to hold that long was agony. But in doing the exercises, learning to relax during a hold and learning that the feeling in the diaphragm isn't a lack of oxygen but, rather, a build up of CO2 which doesn't need to be obeyed, I improved. Over the course of the next 6 months doing 15-25 minutes 3-4 mornings a week, I got my max time up to just over 7 minutes. That requires a full breathe-up, lying prone and I can only achieve that if I haven't eaten in a while since digestion seems to require oxygen. I do the 3-4 minute holds because they're about my limit when sitting upright and not going through my full preparation.

With training, I'm fairly confident I can get anyone under 60 who's reasonably healthy to the point where they can hold for 4 minutes. Really fit people in their 20s can usually train up to 8-10 min holds. What truly gifted apnea specialists can do is nothing short of astonishing [1].

To start, the first thing that most people can learn pretty quickly is to resist the urge to breathe. When CO2 builds up, it causes involuntary contractions of the diaphragm. These usually start to occur 1/3 to 1/2 of the way through a person's maximum hold time, but don't signify an actual need to breathe. So a good rule of thumb is to shoot for double the time when you notice your first contraction. But to ignore what feels like a reflex to breathe takes practice, and that's where the exercises fit in.

My favorite exercise is a form of what's known as a CO2 table...an exercise where you're never short of oxygen, but you don't give your body adequate opportunity to expel CO2 and it builds up. The exercise I do follows the form inhale 1x, hold 4x, exhale 2x where x is whatever level you're currently at. In your case, if you can hold for 30 seconds, you'd start at around a 4 second level, which means you'd inhale for 4 seconds, hold for 16 seconds and then exhale for 8 seconds. Repeat that cycle for, to start, about 15 minutes. I like to lie down when I do my exercise, but some people like to sit, just make sure to relax and breathe normally for about a minute before starting. As you improve, you can up the level while maintaining the 1x-4x-2x ratio and also increase the overall time. My current timing is level 17 seconds and do the cycle for 25-30 min.

Eventually, after building CO2 tolerance, you work on what's known as O2 tables, which accustom the body to lower levels of oxygen, but those are more advanced and should probably be done with supervision. Two other notes to anyone wanting to experiment with this kind of thing...never hyperventilate before attempting a breathe hold, which purges CO2 from the body and can result in actually running out of O2 before the CO2 build up causes an urge to breathe, and never do wet training (in the water) without a qualified training partner. The last one should go without saying, but some people still push their limits and drown.

[1] https://www.youtube.com/watch?v=L89kY5ewgqU

Apart from practicing deep breathing periodically, you might want try getting a lacrosse ball and using it for deep point massage. I was able to release a lot of tension from my neck and shoulders with one. Also, a theraband was recommended to me by a physio so I could do flys to help pull my shoulders back into proper alignment.

I'd recommend seeing a physio - one did me the world of good and was able to suggest exercises and make me aware of what good posture looked like. I've had to do a lot of core strength work to fix bad habits and now I feel much better.

I do this a lot too, and just one word of warning from personal experience: don’t overwork one spot, or apply steady pressure to one spot for a long time. The former is going to cause a feedback loop of swelling and irritation, leading to more overwork, and so on. The latter just hurts, and impinges on circulation.

For the lower back, I recommend a “foam roller” although it hurts at first, my god does it help.

Trigger point balls, can recommend for all sorts of muscle pain and stiffness. I have one at my desk to work out any knots that I get from sitting all day.