程序员要注意的健康问题
今天网上看到一篇文章,感觉蛮好的,看下英文原版的吧,多联系下英文。最下面也放出了
由yeeyan翻译的。原文如下:
By Zed A. Shaw
Common Programmer Health Problems
I’m currently working on the last few lessons in Learn Python The Hard Way and I want to include a lesson on general health problems programmers run into during their careers. I find many programmers seem to ignore their body’s physical state when they’re coding, most likely due to the intense concentration required. I’m hoping other people could benefit by simply understanding a few health related problems programming has almost caused me or caused many other people I know, and how I avoided them.
I probably won’t put this whole blog post into LPTHW since it’s a bit much, but I will make a shorter version of it. Please feel free to let me know if you hate it or like it or if you have some additional resources I could reference.
My Background And Qualifications
In the past I was a top qualified soldier in the US Army, and I have studied many martial arts. These days I’m not as into working out and studying martial arts as I used to be, instead focusing on yoga, meditation, and simpler activities. When I was younger I was incredibly fit, and still am because of habits and practices I ingrained in myself from an early age.
First a quick list of martial arts I’ve studied for various periods of time: Ninjitsu, Aikido, Judo, Muay Thai, Wing Tsung, Capoeira, and Arnis in no particular order. I would say only Muay Thai is the one I studied most consistently, for probably about 6 years. The others I studied for about 1 or 2 years if I could. I moved around a lot so the only way to study was whatever was in the area.
Also, in the US Army I was at the top of my physical fitness exam, going from barely passing to maximum scores consistently in about 2 years. This involved about 2-4 hours of working out nearly every day if I remember it correctly, which in the Army isn’t that difficult. There’s really nothing else to do.
Finally, I’ve been the exact same weight, flexibility, and nearly the same strength my whole life, whether I worked out or not, which means that I probably can’t tell you about how to lose weight. I’m most likely genetically predisposed to be this way. That means you should adapt my advice to fit your life and what you’ve found healthy.
With all that being said, as I’ve gotten older I much more enjoy the less violent and more “supple” forms of exercise. I feel Yoga is excellent exercise because it’s deceptively difficult. I’d also vote for Pilates, swimming, dance, and anything that doesn’t cause direct impact on my body. I especially have to watch out for my hands for reasons I’ll explain in a bit.
Alright, that should give you an idea that I know something, but more importantly, while doing all of these things, I also wrote software professionally. After getting out of the Army I averaged about 8-16 hours of coding and study a day. I also touch type and I play guitar, yet I’ve mostly avoided carpel tunnel and other RSI problems.
Hopefully, my experience maintaining my physical health will help you gain some or keep yours.
Common Problems Programmers Face
Programming is a deceptively damaging field to be in, partly because it doesn’t seem like you’re doing much, and also because of the attitude many programmers have toward their body. You should care about keeping yourself healthy because, when your body is in good shape, that removes “friction” from your mental capacity so that it can focus on important things rather than annoying little problems with your physical wellness.
Obviously the advice on eating right, going outside, getting exercise has been said by everyone. I’m not really going to tell you how to eat, or work out, or how to do a martial art or something else to stay healthy. If you are interested in those things, then please find a professional who can train you and help you.
What I do want to cover are a set of particular problems programmers have from their daily profession. These are just simple really obvious things that for some reason programmers don’t realize aren’t supposed to be happening:
- Pain in your wrists from Repetitive Strain Injury (RSI).
- Problems with your eyes from staring at moving print for extended periods.
- Back problems from poor posture, especially in the lower back and upper shoulders.
- Bowel and urinary issues from not crapping and pissing when you should.
- Dehydration from drinking too much caffeine and not enough water.
- Problems with hemorrhoids and the prostate for guys from sitting too much. Yep, I’m gonna go there.
- Vitamin D deficiency from lack of sunshine.
- Sleeping disorders from staying up late and drinking too much coffee.
- General stiffness and soreness from a lack of stretching in general.
I’ve had to struggle with all of these problems at one point in my life because of programming, guitar, or actually from lifting weights wrong. In each case I was able to get healthy and then avoid it the rest of my life, and really only deal with a few problems periodically. You may think some of these are stupid, but believe me, many programmers have these problems for various reasons even if you might not.
The General Cause
Overall the general cause of all of these problems can be summarized as treating programming as an obsession. You may want to be very good at it, like I did, so you exclude everything else in your life in order to master it. You don’t go to the bathroom, you have macho 10 hour coding sessions, you don’t eat right, and all manner of mythological beliefs about “real programmers”.
Truth is real programmers are kind of idiots. They don’t eat right. They don’t have sex on a regular basis. They can’t run without gasping for breath. They have huge problems with their internal organs not caused by disease. Really, it’s just not worth it if you have to kill yourself to be good at something.
So, as you read through each of these problems and how I’ve cured them, remember that it’s all about just having a balanced life and not being obsessed with coding or your business. Trust me when I say you will actually become better if you take it easy on yourself and stay healthy.
Wrist Pain
This is probably the one I struggle with the most, because I code and play guitar quite frequently and for long periods of time. I’ve had pain in my wrists periodically since I started coding professionally at 22, but I always had a set of Aikido exercises I did to get my wrists straight.
You see, Aikido has these fantastic wrist exercises that make your wrists strong and supple at the same time. They developed the exercises to avoid injuries during practice since many of the Aikido techniques involve wrenching, ripping, and breaking the joints in the arms, wrists, and shoulders.
For me these exercises have always fixed any misalignment and pain, and they’ve allowed me to code for long periods of time without much trouble. Typically the only time I’ll have problems is if I’ve switched keyboards and have a new odd keyboard layout, but if I do I simply do the exercises for about a week every time I go to code and they get strong again.
Now, if you have serious carpel tunnel or another kind of RSI then consult your physician before trying these. If you do them, then start very slowly, and do not try to make them hurt. Stretching should not hurt, it should just be “mildly uncomfortable”. If it hurts, then you are straining to do the stretch.
What you actually want to do is relax into every stretch you do. It’s hard to explain, but instead of forcing your joint to a certain position, bring it to that position and then think about relaxing it or “letting” it move a bit further.
Keep this in mind, and then here’s a set of videos that show you how to do each exercise:
Here’s how you use these exercises before you sit down to type (every time!):
- First, you need to warm up, so put your hands out in front of you and grab at the air as fast as you can 20 times. Then shake your hands, then rotate your wrists 10 times one direction and 10 times another.
- Start with the first exercise you’re best at, and do 5-10 of them at a medium speed.
- Continue through each one, but after each one shake your hands and arms and rotate your wrists to realign them. These exercises do some moving of the bones in your wrist, so shaking them sort of makes them settle back in.
- NEVER do too much strain on your wrists. Do just enough to get them going and feeling supple and relaxed, but the motto “no pain no gain” will only damage you.
Do these each time you go to type, every day, and any time you stop. It doesn’t take long to do them, and after a bit of discomfort as your wrists start to adapt and get realigned, you’ll start to feel better.
One more time though: DO NOT DO THIS WITHOUT CONSULTING A DOCTOR FIRST You do these at your own risk, so don’t sue me if you fuck up your wrists because you didn’t pay attention. These exercises have been done for maybe thousands of years in various martial arts, so I know they aren’t dangerous but everyone is different. You could screw yourself up bad if you do them wrong, so if it hurts stop doing them and talk to a doctor!
Guitarists Are Worse
Programmers will get RSI but it’s nothing compared to what guitarists and bassists get. For various stupid reasons there’s myths around many of the big name musicians and their claims of studying “8 hours a day” or “16 hours a day!”. Because of this guitarists will kill themselves and damage their hands making it impossible to play.
Guitar is a hard instrument on your hands, so even a little pain can put you out of commission. I learned this the hard way in school because, like an idiot, I believe my instructors when they said I had to study 8 hours a day. I literally thought they meant 8 hours straight, so I did that for about a month and then BAM!
Fucked up my thumb and gave it a bone spur and all my fingers hurt like crazy. My wrists were solid, but my fingers just couldn’t take it. Like an idiot I didn’t listen to what I already knew which is any new activity has to be gradually increased like any other work out.
The only way I could fix this, and it took nearly 1.5 years, was to do the following:
- Find guitars that didn’t hurt my hands. The idea that you can “play any guitar” is crap. Get the best guitar you can that doesn’t hurt you.
- Do the above exercises, and then some more for my fingers.
- Start slowly rebuilding my fingers and thumb by doing a set of exercises to improve their strength and relaxation.
- Constantly focus on relaxing while playing so that I could use a lighter touch.
- Avoid bends as they hurt my hands and caused me injuries.
- Changed my position and playing style so that I’m able to move around quickly without having to grip the guitar, instead my thumb is on the back of the guitar where it’s comfortable.
- Adjusted the height of my guitar so that it was comfortable on my shoulder and hands to play.
- Always play standing up now, rarely sitting down for long periods of time because the position is awkward, and if I do I keep the same position.
After doing that for the last year my hands are finally feeling good and have healed up, and I’ve not got good habits that prevent me from injuring myself. I’m an old guy so these things are important, but that also means I can’t do anything that might hurt my hands.
My hands are my life right now, so that means no boxing, capoeira, or anything else I really want to study. I have to much riding on my hands to waste it on a punching bag.
Eye Strain
I think this isn’t as much of a problem as it was for me, but you have to watch out for your eyes. I had perfect better than 20/20 vision when I was younger, but from decades of computer use my eyes are “slightly off”. I have a minor correction in glasses and these days I just wear them all the time even if I only need them a little bit. The world is just annoyingly fuzzy without them.
Back in the bad old days we stared at CRT screens all day, which had horrible annoying flicker and screwed up quite a few eyes. These days it’s not the flicker so much as the poor font rendering on most LCD screens. Thanks to patents owned by Apple (I think) many computers can’t render fonts well on an LCD screen. Some folks though think Apple’s font rendering looks “fuzzy” so your mileage may vary considerably.
In my case I try to get out for about 2 hours a day and not look at a computer. Either I do something that doesn’t involve reading like play guitar, or I go for a walk or to the park. I may not do this for a full 2 hours but I try to not start at a computer screen for at least 2 hours a whole day.
This will also help with headaches you might have. Frequently programmers will think that the lighting in a room is what gives them headaches from using a computer, but really it’s bad posture, shitty fonts, not drinking enough water, and just using the computer for too long at a stretch.
Instead of doing some extreme thing like turning out all the lights in your office, just have good lighting and use a color scheme that fits the type of LCD you have and the room’s lighting. It’s the combination of room/area lighting, LCD brightness, LCD quality, fonts, and your color scheme that will make you feel better.
But most importantly, just take a break.
Back Problems
I’ve been extremely luck to have a good solid back most of my life. Even though I’ve been sitting in a chair for a good portion of that life, I still have a good flexible and strong back.
For me, the problem is in my upper back, neck, and shoulders. I tend to hunch over the keyboard and have to force myself to sit up straight. In fact right when I started typing this section I noticed I wasn’t sitting up straight and had to correct it.
Now, the choice of chair matters, and I tend to like either Aeron chairs of some kind of solid small stool or bench. I’m currently very much liking my little $40 piano bench I used to sit on to practice piano. It doesn’t have a back so it forces me to sit up straight more often and engage my core muscles (stomach and back muscles).
For my shoulders though it’s entirely stress. I tend to “scrunch up” my shoulders when I’m focused intensely and that causes my whole upper back to hurt, sending pain all the way up my neck and head. It gets really bad if I practice guitar for long periods at a time.
What I’ve found helps the most is stretching your upper arms and doing push-ups. Stretching your upper arms is as simple as grabbing a door jam, grabbing it, and pulling each arm or both arms in a different direction. Try these if you’re feeling stiff:
- Grab a door jam with one arm so your palm faces the front of your body, then pull your shoulder out so you stretch your chest and the front of your shoulder.
- Grab the door jam with one arm so that your arm crosses your body, and again with your palm facing the front (kind of backwards), then pull so your shoulder at the back is stretched.
- Put both arms on the door jam in front of you, right above your head, and stand away from it a bit so that you lean down and pull your arms above you and back.
If you do that, and also rotate your shoulders and shake your body out you’ll start to feel much better. Maybe combine this with your wrist stretches before you work each day.
Another big help is doing some push-ups. I wouldn’t do these at work or before you work because it will make you tired and make it hard to work. I’d instead just do 10 a night before you go to sleep. Just 10 will do a lot for your chest, back, wrists, and neck. Don’t do them very fast, but do them slowly and focus on balancing your body when you do them.
Dehydration
This one is simple, and I’m guilty of it quite frequently. I find I drink a ton of coffee, and because of that I have to make sure I drink some water too. If I don’t I get headaches and really don’t feel right. The problem with dehydration is it’s hard for you to tell you’re suffering from it until it’s too late.
What I suggest, and what I’ve started doing more, is that you drink a bottle or cup of water with every non-water beverage you drink. I also recommend you ditch the sodas. They’re just full of nasty fake sugar that make you fat and cause diabetes, and they’re not rehydrating you. If you gotta drink something then plain black coffee is pretty damn good, but again drink some water with it.
Bowel And Urinary Problems
Alright the next two are kinda gross so I won’t go into what happened to me, but I’ll say this:
Go to the fucking bathroom right when you have to go. Don’t wait.
You wouldn’t believe how useful this advice is and I really wish I’d been told it when I was younger. Because I would code non-stop like a “real programmer” I would skip bathroom breaks and hold it in for far too long. The problem is with bowel movements your body just stops telling you to crap, and then it builds up.
This eventually leads to constipation and it’s a motherfucker on your health. For your urinary tract it causes problems that are less important, but you can get infections and other nice little surprises.
If you’ve already screwed up, the best thing to do is go get some fiber tablets and take them then stay home ’cause it’s gonna get ugly.
Then, when you feel you need to go, just get up and go for the love of god. I’m telling you, your brilliant idea will come more naturally after you poop.
Hemorrhoids and Prostate Health
The other problem you have from not using the restroom when you should is that you get hemorrhoids. Yeah yeah, I know, really gross and I promise this is the only time I’m gonna mention them ever. But, many programmers have them and are ashamed to talk about them or even know what causes them so I’m going to lay it out for you. I’ve actually done all of these but only had them once or twice:
- Sitting for a long period of time.
- Lifting heavy weights without proper equipment.
- Not taking a dump when you actually need to.
- Forcing a dump when you don’t need to.
- The worst one though: Sitting on the toilet reading.
This last one is the killer let me tell you. If you don’t have to go, then do not sit on the can hanging out. What this does is put all the weight of your body and bowels on your already probably screwed up rectum and then pushes it out. Nasty. That also then causes hemorrhoids because the pressure increases in your blood vessels unnaturally.
These are just freaking gross, but they’re also potentially harmful. Yes, you can get some that are so bad you bleed all over the place. If you have some, please go see your doctor and deal with it. You may need surgery, so just do it. I didn’t but man it was close. One year I was lifting weights, working in a warehouse, coding non-stop, and not using the bathroom.
Yep, I was idiot, so don’t make the same mistake. Make sure you do these three things to keep your ass healthy:
- Eat some veggies regularly, or eat some fiber tablets at least.
- Go to the bathroom right when you have to go.
- Don’t force pressure down there in any way.
This can also damage your prostate if you aren’t careful, but usually that’s from sitting on your ass all day. Just get up and walk around or take breaks and you’ll fix that problem. If you find blood in your urine or you have problems peeing, go see a doctor because it might be more serious. If you pee a lot it can also be bad, so again see a doctor.
Vitamin D Deficiency
Vitamin D is weird. You really only get it from the Sun but you don’t need much direct sunlight to get it. Maybe like 5-30 minutes depending on how strong it is. It’s also tied to your calcium levels, and a lack of phosphate, but if you eat regularly and something other than potato chips that shouldn’t be a big problem.
Some of the things you can get are depression, screwed up teeth, pain in weird places like in the bones in your arms, cramping muscles, and just generally feeling like crap. If you’re really bad you might need to get a prescription from a doctor, but usually you can just make a plan to go outside for 30 minutes when the Sun is high in the sky.
In fact, I think this is one of the problems with catered food at many startups here in the Valley. Since you are inclined to stay in the office and eat food and constant leftovers, and because many offices have poor lighting, you tend to not go outside when the Sun is out. Combine that with poor sleeping habits and you can really be screwing up your vitamin D levels without knowing it.
Just something as simple as not eating the catered lunches and walking outside at noon to get your food could help more than you know. Anyway the food is better.
I got minor vitamin D deficiency when I lived in Vancouver and Seattle. Up there you just don’t have sunshine for months on end, and for me that was a killer. Some people can handle it, but for people like me who lived on a tropical islands in his teens, this was just murder.
So, if you have sunshine, get out and grab some when you can.
Sleeping Disorders
I’ve always had a flexible sleep schedule, usually depending on the season and the region. In some areas I trend toward a night owl persona and stay up really late doing things then sleeping in. Lately since moving to SF I’ve been getting up earlier and not staying up as late, and I’ve actually been feeling really good lately.
Sometimes though, and I’m not sure why, I feel way more productive in both music and coding late at night, or very early in the morning. I think it’s because I’m still in a tired state and so my brain is relaxed. I also think it’s because it’s very quiet and I can just hang out and think with no distractions.
Either way, this need to either get up very early or stay up very late sort of screws with my sleep schedule. I find that I much prefer getting up early as I get older. I feel more awake and rested during the day. If I stay up late and sleep in I feel like I have a hangover and I can get headaches.
If you have problems sleeping though, I have a very simple kind of meditation that I’ve been using for years to help you crash. It takes a bit of practice, but it totally works and works quickly.
First up, if you can, get the best damn bed you can afford. 2000+ dollars is nothing for a great bed. I spent at least 2200 on a sweet Tempur-Pedic. It’s totally worth it.
Now with your awesome bed here’s how you start practicing getting to sleep easily. It’s kind of a self-hypnosis trick:
- Make sure that you’ve killed all sounds and lights that might be in your room.
- Lay on your back and put your hands on your body somewhere comfortable, or at your sides.
- Start breathing in deeply and slowly and breathing out, as you do this imagine you can see the air flow in and out of your body.
- Once you start to see your breath, imagine that you’re looking through a window and outside the window is a large huge open space with stars in it.
- As you breath feel yourself float through the window and slowly out into the massive expanse of stars, all floating softly around you.
- Keep this going and then just let this floating spread into your bed and out around you until there is nothing.
You probably will crash out at around 4 or 5, but if not just hang out and keep letting yourself float and melt until you do.
If you have severe insomnia then definitely talk to a doctor about it, but try this out, as well as exercising like crazy for about an hour or two a day. Exercise will definitely make you sleep.
Stiffness And Flexibility
If you constantly feel “stiff” or unable to move well, then you probably need to stretch regularly. Really the best thing you can do is go to yoga about once a week, and then try to do the exercises on your own. If you can’t do that, then go get any number of books on basic stretching from the library or from a book store. You really just need a simple book on the subject, and you don’t need to do too many.
I think if you did about 5-6 big stretching exercises a night before sleeping you’d feel very relaxed and see a major improvement in your general health and feeling.
Relaxing your body through stretching relaxes your mind as well, so a great way to improve your creativity and boost your ideas is to do yoga or stretching for about 30 minutes, then take your morning shower. Combine this with some meditation and you’ll start to see a major improvement in your general ability to mentally adapt and start to see yourself make odd connections you wouldn’t have before.
I’m not sure why this is, but a relaxed mind is crucial to spontaneous creativity and idea generation.
A Simple First Step
This is probably a lot of information for one person, and I seriously hope that you don’t have all of these problems. What I recommend though if you don’t have these issues is that you try to avoid them. If you’re just starting out then you need to maybe adopt a simple “coding warm-up” routine you can go through before you code.
Here’s what I do before I sit down to code, or before I play guitar, and whenever I get stiff and need a break:
- Rotate all the joints in your body by just moving your wrists, arms, neck, back, and hips in a few little circles. Say 5 one direction, then 5 in another direction.
- Do a small number of the wrist exercises and shake your wrists between each set.
- Stretch your arms above your head as high as you can, and then stretch them back as far as you can, and then pull them across the front of your body.
- Finally, carefully use your hand to pull your head to the right, left, forward, and back a bit.
If you just did this you would avoid quite a few programming injuries. Since programming isn’t really that physically taxing it’s fairly easy to avoid hurting yourself, so this is really all you need.
However, if you have a specific problem, then again consult a physician and try some of my advice if they say it’s alright. Nothing I’m proposing here is radical or weird, just basic exercises and common sense, so it should be alright with any doctor. I just don’t want to get sued so remember I told you to ask one first.
Hopefully that helps you out, and if not just remember the advice in case you run into these. If you’re lucky they won’t be a problem but I think every programmer I know has had something like this at least once.
If you have other problems along these lines, then feel free to email me and I’ll reply with some advice.
Take care.
程序员也要养生
作者:泽德·A·萧
我最近在写《深度Python》的最后几节课,我还要加一课:关于程序员在其职业生涯中普遍的健康问题。我发现诸多代码人在敲代码的时候好像不在乎他们的身体状况, 很可能是太过于全神贯注。我希望人们可以通过知晓一些与编程者相关的健康问题而获益,并可以避免曾经发生在我身上,而且就我知道也发生在很多人身上的问题。
我可能不会把这篇博文全部放进《深》里,因为有点多。但我会写个缩减版。请您惠知喜好,或有我可以引用的附加资源。
我的背景和资历
我以前是一等合格美国士兵,并学习过多种武术。近年来我未像过去学武术一样奋力工作,而是专注于瑜伽,入定和一些简单的活动。我小时候是异常健康的,现在依然如故,这归功于我早已根深蒂固的锻炼习惯。
首先先列一下我学过的武术:忍术(Ninjitsu),合气道(Aikido),柔术(Judo),泰拳(Muay Thai),咏春(WingTsung),卡波耶拉(Capoeira),阿尼斯(Arnis),其排序不分先后。我要讲只有泰拳我是连贯学习的,大概有六年时间。其他的用了一到两年时间。我去了很多地方,因此学习之道就是那儿有什么便学什么。
而且,在部队里我是体能测试优秀,几乎是连续两年满分通过的。如没记错,这其中有几乎每天两至四小时的训练,这在部队里不算什么。除此之外,别无他事可做。
然后,不论我干不干活,我如今一直保持着同样的体重、灵敏及力量。所以我无法告诉你怎么减肥。我很可能先天基因就是如此。这意味着你要根据自身情况来调整我的建议。
有着前述的体魄,当我渐老我更喜欢侵略性弱以及更灵活的一些运动。瑜伽是不错的,常被误认为很难。我同样把票投给普拉提(Pilates),游泳,舞蹈等一切对我身体无直接影响的运动。我尤其注意我的手,缘由我也会说到。
好,写这么多是让你知道我还有点能耐,但是更重要的是,在干这些的同时,我是一个职业编程者。在退役后,我平均每天学习八到十六个小时。 我使用盲打而且玩吉他,我还避免了腕道综合征,以及重复性劳损问题。
希望我保健的经验能帮你恢复或保持健康。
程序员常见健康问题
编程乍一看是个耗人的领域,一方面似乎你没有做很多,另外和很多代码人对待其身体的态度有关。 你要一贯地保持健康,因为身体好时会减少对精神的摩擦损害,而将注意力集中到要事上,而不是你生理上的小毛病。
显然建议就是大多人说的饮食,外出活动。我这里不会教你怎么吃或健身,或者哪种武术。如你对这些感兴趣,找一个职业的来帮助你锻炼。
这里要说的程序员们平日的职业病。他们相当明显而且平常,由于某些原因他们并不在意这些本不该发生的事情:
- 腕部疼痛(重复性劳损)
- 盯着看移动的打印进度以及其后的句点造成的眼部问题
- 姿势不当造成的背部不适,尤其是背下侧,肩上侧。
- 肠道和尿道的问题(不能正常大小便)
- 摄入太多咖啡因,而且喝水少造成的脱水
- 坐姿保持太久,造成男性的痔疮或前列腺问题(我一会再细说)
- 光照不足造成维生素D缺乏
- 熬夜或者喝咖啡过多导致的睡眠失序
- 缺乏伸展导致普遍的僵硬和疼痛
我一直跟这些问题作抗争,因为编程,弹吉他,或者举重时误伤。每当我重获健康的时候,我就知道了此后怎样避免。只有一小部分问题是周期性的。你可能觉得这里的某些问题无关紧要,但请相信我,许多程序员都有这样那样的问题,且原因不一,即使你还没有。
一般原因
一般来说,可以总结成嗜编程为命。你可能想成为个中翘楚,就像我一样,因此除了生活除了编程别无其他。你不去卫生间,你勇猛地进行10小时连续编程。而且你饮食不规,只神笃“真正的代码人”这一信条。
事实是真正的编程者都是有点傻蛋。他们从来吃不到正点,做爱也没有准。跑步从来都气喘吁吁,他们的内脏有一些严重问题,但不是疾病原因。真的,在你精通某件事之前灭了自己可不是很值。
所以,在你看到这些问题以及我怎么解决的时候,记住这都是为了有一个均衡的生活习惯,而不是沉溺于编码或者其他什么事。相信我你会实实在在地好起来,如果你给你自己减负并且保持健康。
腕部疼痛
这个可能是我用心最多的。因为频繁且长时间地编码、拨弦,我的腕部有着周期性的疼痛。那年我22岁,刚开始职业性地编码。但是我一直有一个合气道的功课,这样我的腕部就会恢复如初。
你知道,合气道有着绝佳的腕部练习,从而让你的腕部变得结实又柔软。他们创造的这些练习可以避免伤害,原本的许多技巧就有扭、撕扯、手臂和肩关节的脱节。
这些练习治好了我的所有关节错位和疼痛,并让我长时间编程且没有任何大问题。我唯一可能出现问题是因为我要把现在的键盘换成新的古怪布局的键盘,但如果我练习一周合气道我就有可以重返代码并依然强健。
现在如果你有严重的腕道综合征或者其他类型的重复性劳损问题,先咨询你的医师再行尝试这里的技巧。如你要做的话,开始时要轻慢,不要让你感到疼。伸展应该不会疼,只会轻度有点不适。如果你感觉疼,是过度拉伸了。.
你实际想每次伸展运动得到放松。这有点难解释,但不是强迫你的关节在某个固定位置,而是先到达一个位置,想一想放松而后再到更远的位置。
记住这一点,怎么做练习则有很多视频:
下面介绍当你坐下来打字的时候怎么去做锻炼(每次都要这样):
- 首先要热身,将手伸向前方在空中尽可能快速地抓20次。然后甩手,再做手腕单侧弯曲10次,然后换方向弯曲10次。
- 用你最擅长的,以中速做5至10次。
- 继续做各项动作,但甩手和甩胳膊,弯曲手腕后到要归位。这些动作会移动手腕中的骨头,甩的时候它们就会归位。
- 千万不要做过头,让你手腕感到损伤。要适度恰好,并放松。那个“没有付出就没有收获”只会伤害你。
每次敲代码前做这系列动作,每天要做,而且停下来的时候也做一次。用不了多长时间,一段时间的不适之后你的手腕就会开始适应并回到正常,并感到好许多。
还有:在做这些之前先咨询一下医生。你做这些可是自己冒风险,所以自己不小心搞坏了手腕不要来起诉我。 这些是千年武术中的家常便饭,所以我知道它们不会有危险,但各人情况不同。如果你做法不对可能后果严重,如果感到疼痛立即停止并咨询医师。
吉他手更糟糕
程序员的重复性劳损在吉他手或贝司手跟前可是小菜。这起因是诸多愚蠢的理由,许多著名的音乐家讲一天八小时或十六小时学习法。正因如此,吉他手们糟践自己,最后不能演奏。
吉他对于手来讲是硬乐器,所以有一点点疼痛你就歇菜了。我在学校的时候,像个傻比一样轻信我的老师自己一天练八个小时的琴。我字面理解就是一下子就八个小时,我这样折磨自己一个月然后就崩了。
我的拇指有了赘骨,其他的指头疼痛难止。我的手腕还耐得住,但指头已经不行了。 二逼呵呵的我没有听那句话,任何新的运动需要循序渐进。
我解决这个的唯一办法,而且用了一年半,是做以下的事情:
- 找把不伤手的吉他。说你啥样吉他都能玩是屁话。去找个最好的不伤你手的吉他。
- 做上面的锻炼,我的指头做得更多。
- 通过做练习,慢慢开始恢复指头的力度并注意放松。
- 在弹的时候注意放松,拨弦的时候更轻巧。
- 避免弯曲,这些曾导致我的手受伤。
- 变换姿势和演奏风格,不抓紧吉他就能快速移动,舒服地把拇指压在琴颈背面。
- 调整吉他高度,让我的肩和手都觉得舒服。
- 站着,很少长时间坐下,长时间摆一个姿势是很别扭的。
去年做完这些后我的手最终痊愈了,并且感觉良好。我还没有不让我弄伤自己的好习惯。我已经老大不小了,所以这些对我很重要,但这也意味着我不能做那些可能弄伤我手的活计。
我的手现在是我的命根子,所以不能再打拳了,或者其他我还想学习的事情。因为打沙袋我手上已经有多处凹陷了。
眼疲劳
我觉得这对我不是问题,但你最好悠着点。我年轻的时候比20/20还要好,但用了几十年电脑有点偏了,曾经用过眼镜矫正,我用得着的时候一直戴着,没有它们看周围的世界真是恼人的模糊。
在黑暗时期我们天天还瞅的是CRT显示器,烦人的闪烁已经把一些人的眼睛整垮了。现在的问题是多数LCD屏幕对字体的糟糕渲染。 我想归功于苹果公司的专利,多数LCD屏都不能正常渲染字体。尽管有人认为苹果的字体看起来毛茸茸的,所以对于你的好处将很难说。
我想每天两个小时不看电脑。要么我去玩吉他不用费眼力,要么去公园散步。我可能不是整整两个小时都去这样干,但是加起来要保持两个小时。
这对于你可能有的头痛有助益。多数时候程序员可能会想玩电脑的时候开着灯导致了头痛,但其实是因为体位不对,还有糟糕的字体,饮水不足,而且是跟电脑打持久战。
不是把你房间的灯都关掉,只需要合理的照明,选择适合你液晶屏和室内灯光的色彩方案。 即融合室内照明,液晶屏亮度和字体,以及让你感觉更舒服的色彩方案。
但还是先休息一下吧。
背部问题
我挺走运的,背一直还可以。尽管如此,我相当多时间是坐办公室,并保持着灵活强健的脊背。
我的问题是背的上半部分,脖子,肩部。我习惯猫在键盘上,所以必须强迫自己坐直。事实是,刚刚敲这段话的时候我就没坐直,才想起矫正一下。
现在选择你的座椅很重要,我喜欢艾伦椅(Aeron),那种硬质小凳子或长凳。现在非常热衷我的40美元的钢琴凳,过去我坐着它弹钢琴的。因为没有后背,凳子会时时逼迫你坐端正 ,并调用我的核心肌肉(肚子和背部)。
我的肩部完全处于压迫状态。我习惯于在我全神贯注的时候收紧双肩,这样让我的整个背上部感到疼痛,一直蔓延到脖子和头部。当我长时间玩吉他的时候问题更糟。
我发现最有效的解决办法是伸展上肢,做俯卧撑。伸展办法很简单,抓住门框,然后双臂同向或反向拉伸。你觉得身体有点僵硬的时候试试下面这些招数:
- 用一只手抓紧门框,手心朝向你的身体,然后向前挺胸,越过肩位。
- 用另一只手握紧门框,胳膊交叉在前,手心继续朝里,然后伸展肩部,使背部得到伸展。
- 两只手都抓住门框,高举过头,稍向后站呈倾斜,然后来回拉伸。(就像站着做俯卧撑)
如果你做了,同时做抡臂,摇摆,你就会觉得好一些。或许在你开始干活之前加一些腕部伸展。
另外就是做真正的俯卧撑了。我工作的时候并不做这个,因为它会让你很累,难于工作。在睡前我做十次,这十下足以对付胸、背、肩、腕。 不要过快,要慢,注意在做的时候使身体平衡。
脱水
这个问题不大,我时常有点内疚。我发现我一天狂喝咖啡,正因为这样我想我也该喝点水。如果我没有头疼那倒有点不对。脱水的问题很难发觉,直到你发现的时候已经晚了。
我的建议(我也要多做的)是,喝其他非纯净水的饮料时也喝一杯水。同样请勿喝苏打水。它们只是一堆伪糖,让你变胖导致糖尿病,还有它并没有给你产生水。喝纯黑咖啡吧,它们真他妈好,记着再喝些水。
肠道及尿道问题
好吧,接下来的两个问题确实不雅,所以就不提发生在我身上的事了,但我要说这句话:上厕所的时候他妈赶紧去,别犹豫。
上厕所的时候他妈赶紧去,别犹豫。
你不知道这条提示有多有用,我真希望我年轻的时候知道这句话。因为我是一个拼命汉从不间断,跳过上厕所,憋相当长时间。 肠道问题就是你的机体不再告诉你你该拉屎了,只是愈积愈多。
这样的话最后会导致便秘,这将终结你的健康状态。对于尿道倒次要,但是你依然可能会有感染和其他令你惊奇的事情。
如果你已经搞砸了,你去弄一些纤维片,待在家里然后吃掉,不要去外面,因为后果很囧的。
然后,你觉得是时候了,拾起身去拥抱上帝吧。我告诉你,在你拉完屎之后你的伟大想法才会自然迸发。
痔疮和前列腺问题
另外一个不上厕所会导致的就是痔疮。我知道够恶的,我保证只提这一次。但是,许多编程者有这个问题,并羞于启齿,他们并不知道为什么。下面听我一一道来,我做过下述所有事情,但是只得过一两次痔疮:
- 长时间坐着。
- 举重东西,不用辅助。
- 该去解决内急的时候不去。
- 强迫自己去拉屎,实际上不需要。
- 最糟糕的:坐在厕所里看书。
最后一条就是罪魁祸首。如果你不是必须要大C,可别老泡在那。这相当于将你整个身体和肠子的重量压进已经泻完的直肠上,并试图挤出来。恶心至极!这导致痔疮因为你的血管中的血压不自然地升高。
确实臭烘烘的,但潜在危害很大。恩,危急情形是血流一地,这时候谁都知道去看大夫。你可能需要手术,但做无妨。我没有做但也差点:有一年我在举重,然后在库房工作,不间断编程,没有用过厕所。
是,我是个大笨蛋。你可别学我。为了你的屁屁的健康,请做以下的事:
- 多吃果蔬,至少吃点纤维片。
- 该解决个人问题时赶紧的!
- 任何情况下不要压迫直肠。
还有一个导致前列腺的问题,如果整天坐在屁股上的话。站起来转转就可以。如果尿血或者排尿困难,去看医生,否则会更危险。
维生素D不足
维生素D有点怪。的确只能通过晒太阳产生,但你并不必去专门为此去暴露在阳光下。5到30分钟就好,取决于光照的强度。还与你的钙水平和磷缺乏程度有关。但你要是饮食规律,并非只吃些薯片的话,就问题不大。
还有一些事比如消沉,搞坏的牙齿,一些奇怪部位的疼痛比如臂肘的骨头,肌肉痉挛,总体来讲就是跟烂泥一样。同样,如果你觉得不行的话去看医生,正常情况下在日头正盛的时候,去外面溜达半个小时足矣。
事实上,我觉得一个问题是硅谷里很多刚起步公司提供的餐饮。因为你要泡在办公室,经常吃残汤剩饭,而且照明也不好,太阳高照的时候你也不出去晒下。加上你的睡眠习惯你的维生素D状况就糟糕透了。
不要吃盒饭,在中午去外面吃一顿。好处你自知,而且外面的食物好多了。
我在温哥华和西雅图的时候有轻微的维生素D缺乏,那儿光照不足,对于我来说简直要我命。有人能搞定,但是像我这样青年时代在热带岛屿上度过的人,不足的光照确实就是杀手。
所以,你趁有太阳的时候出去晒晒。
睡眠失序
我的睡眠时间一向很灵活,跟季节和地域有关。有时候我如猫头鹰附体,熬夜熬到很晚才睡。最近搬到旧金山后开始早睡,不再晚睡了,最近感觉很好。
有时候,我不确定为何在夜里创作音乐或编程倒多产。我认为在一个疲惫的状态下我的大脑确是在休息的。我还觉得是因为夜里更安静,没有滋扰。
不管怎样,早睡晚睡已经把我的睡眠机制搞砸了。当我渐长我更喜欢早起,我觉得白天更清醒更放松。熬夜后再睡往往觉得自己有遗留反应,而且头疼。
如果你也有睡眠问题,我有一些简单的调适方法助你入睡。需要实践,但很有效。
首先,花你的血本买个好床,2000+美元不算多。我买了2200块的Tempur-Pedic. 的确很值。
有了床,开始练习助睡法,有点自我催眠的意味:
- 关掉你房内的所有灯光和音响。
- 躺下,让手放在让你舒服的位置。
- 缓慢地深呼吸,并想象空气流进身体及逸散出体外的场景。
- 当你能注意到你的呼吸之时,想象你在看窗外辽阔的太空,悬星满布。
- 然后伴随呼吸幻想自己漂浮在空中,渐入巨幅的星系,一切星辰,皆伴随你左右。
- 持续幻想,感觉你的床也在漂浮,直到皆不见。
你或许在四五点睡觉,但不是要出去的话,就幻想自己漂浮直到你真感觉融化了。
如果你有重度失眠,还请咨询医师。但还是试下这招,一天做一到两个小时。练习后绝对会让你入睡。
刚柔并济
如果浑身不适难于活动,这时就该做下伸展运动。当然最好莫过于去瑜伽馆每周做练习,并回家自己练习。如果没有时间,可以买书或在图书馆借N多教程。入门级就可以,你真的不需要太多。
我想如果你晚上入睡前做5-6个大幅的伸展练习就够了。你会觉得相当放松,你的健康状况和自我感觉也会有提升。
伸展身体的时候同样要放松大脑,增长创造性的一大妙法就是做瑜伽或半个小时的伸展运动,然后早晨冲澡。 伴随禅定你就会精神自适并发觉个中未曾体验之奥妙。
我也不知为何,但是精神之松弛对于突发的灵感多有助益。
迈出第一步
上面的内容可能对于你有点多,我当然希望你不会都有这些问题缠身。然而我建议,尽管你可能没有那些毛病,但要避免它们的发生。如果你要开始编码,请采用“编前热身”。
下面就是我在敲代码前要干的,或者玩吉他前,以及我变僵需要休息的时候。
- 活动身体各关节,只需将腕、臂、颈、臀转摇几下。比如正向五次,然后反向五次。
- 在各部分前做一些腕部练习,摇一下手腕。
- 将臂举过头顶尽可能高,然后向后伸展尽可能远,然后伸到身体前面来。
- 最后,小心地用手扶着头分别向右、左、前、后摇几下。
如果你做这些的话,将避免一些编程会带来的伤害。因为编程并不会大伤体能,避免受伤还是很容易的,因此上述部分就够了。
然而,如果有特殊问题的话,继续去咨询医疗师,如果得到他们允许可以试试我的这些方法。我这儿说的无过激或奇异的方法,只是些基本的练习和一些常识,因此是个医生都会许可的。我告诉你要咨询别人是只是因为我不想吃官司。
真希望这些能让你变好,如果没有的话,记下建议,以防出现这些状况。如果你够好运连一个问题都不会有,但我觉得是个程序员都有或多或少的问题。
如果对上述的事情持有疑问,大可给我发邮件,我会给你一些建议(email me),保重.
转载请注明来源:tanglei's blog 唐磊的个人博客——《程序员要注意的健康问题》
posted on 2012-02-18 00:43 java课程设计例子 阅读(320) 评论(0) 编辑 收藏 举报