Topic 3
Coding Healthy
Introduction
Software development can be a dangerous activity for the software developer. The danger of the profession is a quiet danger which is faced every day and often goes ignored. When I picture an industry that is conventionally considered dangerous, the first imagery that comes to mind is of the methods that industry has implemented to alleviate danger. My image of a construction worker is wearing a hard-hat, neon-vest, and probably ear protection of some kind. My image of a welder is wearing welding goggles and gloves. Even my image of a gardener wears gardening gloves and maybe a sun-hat. This is because the dangers of these activities have been observed and precautions have been taken to prevent a negative outcome. The safety equipment we see is addressing dangers which have been identified and taken seriously.
The software industry, indeed the office industry as a whole, suffers from non-threatening dangers. These dangers are the burden of continuous stress and a sedentary lifestyle. Even simply stating these dangers, they feel underwhelming. They are tired dangers that we read about too often and act on too little. These dangers are obvious, but not threatening. That's what makes them so dangerous. The fight against these dangers is a tortoise and hare situation. We can see them, but we don't take them seriously. Because we don't take them seriously, they can become a serious threat.
Continuous Stress
Stress can have many adverse effects on your health and well being. Stress is particularly dangerous if it is sustained for a long period of time. As a software developer, stress is an unavoidable product of the job. Two ever-present factors of software development are time constraints and accountability. Both of these things can trigger stress responses. If you have to rush, that's stressful. If you make something that is important, moving that forward is stressful. Failure is also stressful, and I won't say failure is impossible to avoid, but it is certainly difficult to avoid.
Aside: I've eaten my fair share of humble pie. I ate a few bitter slices around the time of publishing this. That's stressful.
When I was in college I used to do regular vocal recitals and public music performances. I remember a piece of advice from one of the music faculty about performance stress that went something like
"Stress is an ever-present aspect of performance. You should always feel a little stress or you aren't invested in the outcome" (Music Faculty Member)
The stress that should exist is more of an anticipatory energy. This energy should be a driving force encouraging us to do better when we can. This stress shouldn't be a bad stress but there should be a stress-like response which encourages extra care. A professional stress, the stress of being invested in the outcome.
There are situations where code-motivated stress can become debilitating. Particularly if a mission critical process is performing unexpectedly and you are responsible. If that situation is not resolved quickly, the stress can be damaging. Similarly, the in-the-moment stress must be suppressed in order to pursue a solution in an orderly manner (stress can encourage repeated mistakes)
Stress is inevitable and not all levels of stress are bad, but chronic stress and debilitating levels of stress should be avoided if at all possible. If you go home with stress and come back the next day with it, that stress can be a real drag on your life and can wear you down.
Sedentary Lifestyle
The second danger in the computer industry is the sedentary lifestyle. Whether you are at a standing desk or a sitting desk, you are not moving much when you code. The small amount of movement that happens around the office, while it may help with stiff legs, doesn't fully alleviate how much time we spend still. An article on medlineplus.gov lists some of the health risks of an inactive lifestyle as Obesity, heart disease, high blood pressure, high cholesterol, stroke, metabolic syndrome, type 2 diabetes, some cancers, osteoporosis, increased depression, and anxiety. That's a scary list of problems. I definitely don't want any of those problems.
What can we do?
The goals are to manage the accumulation of stress in our life so that it doesn't reach a damaging level and to create semi-active lifestyles while performing a sedentary task.
We can picture the management of these goals as being controlled by a series of levers. These levers are labelled Sleep, Food, Exercise, and Relaxation.
-
Sleep
-
Sleep is magic.
Sleep is the most powerful lever in controlling one's health. I won't pretend to know why this is true and apparently, others won't either , but sleep dramatically affects health.
I need 8 to 10 hours a night or I will get run down. I find that when I have less sleep, it is hard to focus on things and I become forgetful. If I keep up a bad schedule, I will get sick. I've also met people who can get 5 hours a night and do just fine.
Lucky folks them. Not me though. Maybe not you either.
-
-
Food
-
Eating healthy can promote activity by providing energy and can reduce stress. My favorite quote about food is from Michael Pollan who says
“Eat food. Not too much. Mostly plants“ (Michael Pollan)
That's the most sound advice I could give. I'm no nutritionalist, but I know that eating poorly makes me feel bad and makes it hard to get things done.
-
-
Exercise
-
Too often exercise is interpreted as a full lifestyle change. It is easy to make unrealistic expectations of what can be done to get more exercise.
My advice, do little things. It's better to go for a 5 minute walk every day than a 50 minute walk once. Play the long game. Exercise doesn't need to be difficult to be helpful. Overdoing exercise makes it harder to repeat and repeating exercise is where the magic happens.
If you wanna get ripped, go to a gym and get a trainer. If you want to stave off the creeping damage of a sedentary lifestyle, then introduce small pieces of exercise that become embedded into your life.
I do three ten minute walks a day. One in the morning during my break, one in the afternoon over lunch, and one in the late afternoon for an afternoon break. I also do some light strength training in the morning and evening at home. It's not much. All told, I get probably an hour of exercise a day. The walks at work have become so automatic that I ceased thinking of them as exercise a long time ago.
-
-
Relaxation
-
I've noticed that relaxation is hard to find these days. There are a great many activities that masquerade as "relaxing" but don't actually encourage a relaxed state.
In particular for me videogames, watching videos (TV, Streams, whatever), and reading the news are activities which pretend to be relaxing but don't let me relax at all.
You will have to figure out what is relaxing on an individual level, because people are different and find different things relaxing.
I find drawing, painting Warhammer 40K miniatures, playing guitar, and non-technical reading to be relaxing activities. For me exclusive focus is relaxing. Others may find that tedious, so find what works for you. Exercise is also relaxing for me (but light exercise, not anything crazy: just movement)
The important takeaway is that relaxation is a method for reducing stress and it is worthwhile to pay attention to what is being done for the sake of relaxation and what is actually relaxing among those activities
-
Conclusion
I have been fortunate in that I have an employer which allows me the freedom to work towards my health. I have the benefit of a morning and afternoon break, along with a one hour lunch (plenty of time for food and a walk)
Walking has become part of our office culture (not due to my efforts, but I have taken advantage of the culture) Our whole department goes on the walks these days. The walks are a great chance to get to know each other and discuss problems we are working on. They're little informal meetings that also help us maintain our health. If you can push your company to do the same, I would highly advise it. (Although the first few walks may be a bit awkward if you don't know each other well)
If you take anything away from this then I hope you take away the idea that while we do not wear hard-hats or safety equipment, that in no way makes our jobs safe. It is up to you to identify the points of danger in what you do and take them seriously. Figure out what you can do to alleviate the dangers you identify. If we can get ahead of the danger, then we can lead by example rather than by consequences.