00:00:18.800
Alright, so I want to ask everybody to stand up. You had to know that I was going to do this at some point in the talk, right? Okay. I was going to ask you to do an exercise called the Hindu squat, but I don't think we're going to have enough room with the cinema-style seating. So, what we’re going to do is a sort of Hindu half squat. Alright, everyone get a little space behind you, between you and the seat behind you. Put your arms out in front of you, palms facing down, and then just squat down until you tap the seat behind you. Thrust your arms into your chest and then swing your arms back up in front of you, sort of springing up. Alright, everybody ready? And down and up. Down and up. Down and up. One more, down and up. Okay, thank you! You can sit down now; we’re done. You're ready to watch my talk now because your mind has been turned on and it's ready to learn. Your heart rate is probably a little elevated, which means blood is pumping more rapidly to your brain, and that can actually create a short-term improvement in cognition, problem-solving skills, food intelligence, and memory. It even promotes the growth of new brain cells.
00:01:21.470
The title of my talk is 'Build a Bigger Brain,' and I actually mean that somewhat literally. In just the last few years, a ton of science has emerged that explains the mechanisms behind how the movement of our body relates to the function of our brain. I’m going to talk about some of that science today and explain how it relates to you and your duties as a programmer. I'll distill it down into some essential specific exercises or activities that you can do every day to improve your health, boost your brain power, mitigate pain, and even reduce your risk for disease and premature death. But before I go any further, I have a disclaimer. This is probably the only software talk you'll ever hear with a disclaimer. Although I don’t know, Jim’s talk on drones might should have had one. But I'll put these slides on the web; please go take a look at this. The too long, didn't read version is: Take everything I say with a grain of salt and use your best judgment. I’m not a doctor. Even if I were a doctor, you shouldn't take my word at face value. Each of you has unique concerns related to your medical history, family history, injury history, and you need to weigh those carefully when making decisions about your health. What’s right for you may not be right for someone else and vice versa.
00:02:26.370
Now, while I'm not a doctor, I am a programmer, so I'm familiar with the challenges we all face on a daily basis when taking care of our health. I'm primarily a Ruby developer, very active in the JRuby community, a core committer on TorqueBox and a number of other JRuby projects. Throughout my career, I've been interested in health topics related to being sedentary, and about a year ago, I decided I wanted to create a book called 'The Healthy Programmer.' So I started researching and consulting with doctors, scientists, researchers, nutritionists, physical educators, physical therapists, and many others. What I’ve created, I believe, is a unique approach to health and fitness for people who write code. I cover a wide array of topics, but today I'll focus on those related to exercise and how it affects our brain and our ability to do our job.
00:03:13.500
I’d like to begin with a story about Ohio. Don’t say anything because you might know the answers. Ohio, sort of like Texas, is not particularly known for being a healthy place. But there is one part of Ohio, Holmes County, which is located in the middle about where the second 'O' in Ohio is. By some measures, Holmes County may be the healthiest place in America. A recent study done there on 26,000 people found that the rate of cancer was an astonishing seventy-two percent lower than the national average. In another study on a similar group, researchers found that there were almost no incidents of heart disease, type 2 diabetes, or obesity-related health issues—almost none. Again, this is very different from the national average but also distinct from the surrounding counties. So, what’s going on in this part of Ohio? Well, I’ve intentionally withheld an important piece of information: all the participants in these studies were Amish. In fact, these studies were conducted in Holmes County because it has the largest Amish population in the United States.
00:04:21.639
If you’re familiar with the Amish or if you've seen the movie 'Witness,' then you know that Amish societies embrace hard physical labor. They're typically agrarian and have a reluctance to adopt new technology, which is essentially the exact opposite of being a programmer. While we sit all day in front of Apple’s latest invention, the typical Amish farmer is out in the fields working very hard. In fact, the average Amish farmer does about 52 hours of moderate to vigorous physical activity each week—that's more than I get in a month, and I’m pretty active. The average Amish farmer also walks about nine miles every day except Sunday, equating to a little less than 19,000 steps per day. Do you know how many steps per day you take? Or the average programmer takes? A number of studies suggest that it's a little north of 4,000 steps per day—just a shadow of what these farmers take. And it turns out that this difference in step count is one of the primary factors leading to the different health profiles between these two communities.
00:05:10.860
Now, there are a number of other factors like smoking habits and diet and whatnot, but step count is important. I’m not going to advocate that you become Amish to become healthy, but you probably do need to take more steps. Certainly, a number of studies have shown that people who work in professions that require them to walk more tend to be healthier. Jobs like custodians and restaurant servers are a good example. One of the first studies to show this was done in 1950 by British physician Jeremy Morris. Dr. Morris was simply trying to understand if there were different life expectancies associated with different jobs, so he began a study on double-decker bus drivers and conductors on those big iconic red buses in London. What he found was that the conductors, who walked around all day collecting tickets and often went up and down the stairs, were significantly less likely to develop or die from heart disease than the sedentary bus drivers, who sat most of the day.
00:06:09.390
He extended his research to mail carriers who walked their routes versus those who did not and found the exact same results. Dr. Morris’s research was the very first of its kind. Before 1950, many people suspected that exercise was good for your health, but we had no scientific evidence connecting the two. Today, of course, we have a wealth of evidence and we understand this clearly. We have case studies like Dr. Morris's, but we also have specific laboratory experiments that explain how certain aspects of exercise affect our health. One relevant study was done in Japan in 2007. Researchers took 246 sedentary adults—people who were not doing any form of exercise prior to the study—and enrolled them in a five-month walking program, where they supplemented their daily routine with a little walking, some of it slow, some brisk.
00:07:18.320
After those five months, the researchers found that participants had increased their physical fitness, as measured by aerobic capacity and thigh muscle strength, by twenty percent. They also observed significant drops in blood pressure and reduced lifestyle-related diseases, such as type 2 diabetes and heart disease, by another twenty percent—all of this just from walking. So, that brings us to the first activity I want you to take away from this discussion: walk more! Specifically, you should be getting 10,000 steps every day. If you don’t have a pedometer, get one. Find out how many steps you're taking. You can get a pedometer on your phone, a Fitbit—there are all sorts of great options. After a while, you'll learn what it feels like to take 10,000 steps, and you won't have to rely on the device.
00:08:41.100
I think you'll discover that very small changes to your daily routines can have a profound effect on this number. So, try parking intentionally in the back of the parking lot instead of circling the front looking for the best spot. That can add as much as a thousand steps right there. Try taking the stairs instead of the elevator. In fact, I challenge you to never take an elevator again—it’s possible! The great thing about stairs is that they require a little more effort than walking on flat ground. That’s important because some of your daily step count needs to come at a higher intensity level. Specifically, you need to get your heart rate to fifty to sixty percent of its maximum, and the rule of thumb the CDC uses for this is 1,000 steps in a ten-minute period. So, a brisk walk, enough to get you breathing a little heavy but not sweating or needing to change your clothes, is the equivalent of walking stairs.
00:09:49.530
In total, you need at least 20 minutes of that level of moderate activity every day. Now, 20 minutes is not an arbitrary number. The best science tells us that after the first 20 minutes of daily moderate exercise, your risk of disease and a premature death drops dramatically. Continued exercise beyond 20 minutes, 30 minutes, or an hour is good for you, but to the dismay of my Ironman triathlete friends, it's sort of a diminishing return. That initial difference between doing nothing and 20 minutes of moderate walking every day can have the biggest impact on your health. Here’s the best part: You don’t have to do it all at once. In fact, a number of studies have shown that spreading exercise throughout your day might actually be better for you than doing it in one lump sum.
00:10:40.820
Going for a five-minute walk in the morning, a five-minute brisk walk at lunch, and a ten-minute brisk walk in the evening might be better for you than that 30-minute trip to the gym. In fact, I would argue that walking periodically throughout the day is the single best thing you can do for your body. But it’s also one of the best things you can do for your mind. As I said before, exercise—even as simple as walking—improves your cognition. It does this in two ways. The first is that it gets your blood flowing faster, which increases oxygen and glucose levels in the brain, essentially feeding your brain more rapidly. This provides a short-term improvement to higher-level thinking, such as problem-solving skills and cognition. The second way is that exercise promotes the production of proteins that strengthen neural chemical connections in your brain, which improves your memory.
00:11:43.410
The mechanism behind this is a protein called BDNF, which has been dubbed 'Miracle-Gro for the brain' by one of the researchers I referenced in my book. This protein is produced in your brain, and it binds to the receptors in the synapses between neurons. This effectively increases the voltage of those connections and improves their signal strength—your brain is electric, after all! In addition, it activates genes inside those neurons which promote their growth, protect them from stress, and actually promote the production of more BDNF. In fact, scientists in the laboratory can apply BDNF to neurons in a petri dish and watch them sprout new structural branches—this is very powerful stuff, and it has an amazing impact on our brain and our memory.
00:12:57.300
Now, BDNF and its effect on the brain was discovered a little over a decade ago, and a Nobel Prize was awarded for that. Shortly after that, a number of other studies emerged studying BDNF. One study found that mice running on a spinning wheel produce more BDNF in their brain than mice that sit around. That study was seminal because it led to an explosion of scientific research connecting exercise to cognition in humans. We've now learned that people learn vocabulary words twenty percent better after a single bout of exercise. We've also learned that people memorize strings of letters more accurately after a single bout of exercise. Studies like these tell us how exercise and BDNF improve our memory. But as I said, it also improves our higher-level thinking, specifically cognitive flexibility. Cognitive flexibility is a brain function that allows us to shift thinking between different concepts.
00:13:58.320
To demonstrate this, if I were to give you the name of a common object and ask you to think of alternative uses for it, for example, I might say 'a newspaper,' and you might think, 'I can roll it up and swat a fly with it; I can potty train a dog with it; or I can wrap dishes up for packing or moving.' Each time you shift your thinking between those different concepts, you're using your cognitive flexibility. It turns out that this type of brain function plays a very important role in the creative problem-solving process. And I don't think I need to tell you that the problem-solving process is a big part of what we do as programmers.
00:15:12.810
So, a recent study used a test just like I described. Researchers gave participants a number of different common objects and asked them to think of alternative uses. The researchers then had half of the participants watch a movie and the other half run or walk on a treadmill at sixty percent of their maximum heart rate. After 35 minutes, all the participants were tested again with a new set of common objects. What they found was that the movie-watching group performed at the same level after the movie as they had before—they were the control group. On the other hand, the treadmill group performed significantly better after the exercise; they were able to think of more alternative uses. This study, and many others like it, suggest that going for a walk or getting some exercise before debugging some code might help you identify and solve problems better.
00:16:10.040
Or maybe going for a walk or getting your blood flowing before a pair programming session or a code review might help you get the most out of it. Other studies have shown that exercise after learning something new also helps you retain those new memories. So the next time you learn about a new programming language feature or watch a video of a talk like this, go for a walk, and you’ll be strengthening those connections that you’ve recently created in your brain.
00:16:58.490
Now, this has actually led some researchers to theorize that the reason riding a bicycle creates such a profound memory is that when we learn to ride a bike, we’re creating this sort of perfect stew in our brain where we’re generating new neurons and new synapses, and at the same time, we’re getting aerobic activity that is producing BDNF and strengthening those connections. And that might leave you wondering: Shouldn’t I just walk all day? Isn’t that the way to get the most out of my brain? Yes, a number of studies have shown that walking treadmill desks are very good for your health.
00:17:58.420
The problem is that those same studies have shown that they reduce your desk dexterity and thus reduce your productivity by about fifteen percent. That's important because all the activities I’m recommending for you today are intended not only to improve your health but also to make you a better programmer. So, I don’t typically advocate for the use of these walking desks, but if you use one or if you want to use one or if you like them, then by all means do it—they're good for you, but they’re not necessarily right for everybody. Likewise, standing desks may not be right for everyone; in fact, no one should stand all day long. Standing for long periods puts excessive strain on your circulatory system and can cause problems with your arteries, cause varicose veins, and even lead to blood clots, which of course can be lethal. In fact, if you’re predisposed to developing a blood clot because you smoke, are pregnant, have high blood pressure, or a family history of blood clots, then you probably shouldn’t use a standing desk at all.
00:18:46.890
Now, despite those concerns, a number of researchers and experts advocate for the use of standing desks—but only in shorter intervals, about 20 minutes at a time, before taking a break. The reason these experts like standing desks has several aspects. First, it increases your caloric expenditure; you burn about 50 extra calories per hour standing as compared to sitting. Now that's probably not significant enough to help you lose large amounts of weight, but it has been shown to help you maintain weight loss after reaching a certain goal. Another reason these experts favor standing desks is that they promote higher levels of physical activity. Studies done with students working from standing desks have shown they are more likely to move around and walk away from the desk when they're standing, leading to a higher level of physical activity.
00:20:01.880
And that shouldn't be undervalued; that small amount of movement can have a big impact on your metabolism. But the most important thing about standing—and the ultimate reason I recommend you use a standing desk periodically throughout your day—is that it prevents you from sitting. And that’s important because sitting is not the metabolic equivalent of breaking even; sitting is killing us. Now that may sound brash or overstated, but the fact is there is a ton of science that links the time you spend sitting in your life to your mortality. One of the most significant studies was published in 2009; it was done over a twelve-year period on 17,000 Canadians.
00:20:57.720
After the researchers adjusted for things like diet, age, smoking habits, and physical activity levels, they found that participants who sat the most were fifty percent more likely to die prematurely from any cause. What’s most important about this study is that it was controlled for physical activity levels. What that means is that even people getting 20 or 30 minutes of exercise or going to the gym for 40 minutes a day were still more likely to die prematurely if they sat the remaining 10 to 15 hours a day. In other words, sitting can counteract the benefits of exercise. Another study published in 2012, over a four-year period on 222,000 Australians, found essentially the same results. I could literally go on all day referencing studies that connect sitting to your mortality, heart disease, diabetes, and even cancer. Clearly, sitting is not good for us.
00:22:12.600
But as I said earlier, standing all day is not good for us either. So, what is the best position to work from? It turns out the best position to work from is whatever position you are not currently in. Changing positions is essential to your health. When you think about it in terms of human evolution, it makes sense. We’ve evolved to be moving creatures, and sitting in any one position for an extended period of time is simply unnatural for us. I want you to imagine for a second prehistoric man out on the savannah sitting in a comfortable office chair; he’s going to get eaten really quickly! So movement has evolved—our bodies have evolved to move as a survival mechanism, running away from prey, or running for prey, or running away from predators to survive.
00:23:16.020
In fact, that kind of thinking, combined with all this science that relates exercise to the brain, has led to advances in the field of anthropology. A group of researchers recently discovered that the animal species with the highest endurance capacity, primarily rats, dogs, and humans, also have the highest brain-to-body size ratio. It led those researchers to hypothesize that the human brain evolved not based on criteria associated with intelligence, but rather based on criteria associated with physical activity. That is to say, running after prey may be responsible for our superior brain.
00:24:07.840
You may have heard of these Indian tribes in Mexico that hunt their prey by running them to death. We are one of the few species capable of that because of our aerobic capacity. Now, I’m not going to advocate that you run your food to death, but you do need to move more. Specifically, studies have shown that just five minutes of movement out of every hour can counteract the negative consequences of sitting. So, getting up and going to the bathroom can be good for your health. Or the next time you need to send an email to one of your coworkers, get up, walk down the hall, and talk to that person. You’ll get some of your step count that way too! If you absolutely cannot get away from your desk, try doing some exercises from your chair—like little leg extensions or overhead claps. I like doing these while I read my email.
00:25:16.060
The important thing is that you’ll be getting your muscles to contract. That’s crucial because when your muscles don’t contract for long periods of time, gene activity starts to change at a cellular level. So, when you're sitting for two, three, or even four hours without ever getting up, make it a point to take five minutes every hour. Additionally, you need to change positions every twenty minutes. You don’t have to stop working or leave your desk; just if you’ve been sitting for 20 minutes, stand up! If you’ve been standing for 20 minutes, sit down! Constantly move.
00:26:17.420
In fact, I use a timer to help me do this, and I’ll talk more about that later on. Changing positions every twenty minutes is good for your metabolism, but it's also good for another aspect of your health that I haven't addressed yet: pain. Truly, to be healthy, you have to be relatively pain-free. Now, how many of you have had back, neck, or wrist pain in the last year that was significant enough to interfere with your ability to do your job well? Yeah, a number of studies suggest that eighty percent of people who work at a computer have experienced such pain in the last year.
00:27:30.080
I think as programmers, we’re sort of uniquely predisposed to this because in addition to the eight or nine hours a day at work, we often come home and continue working at a computer. We do this not only because we love what we do but also because to hone our craft or improve our skills, we have to practice. So, we sit in front of these machines and practice all day long. But we’re not the first people to face that problem. In fact, pianists have faced that issue for over 500 years, and over time they’ve come to reject the notion that a life of pain is necessary to master their instruments. Hopefully, we’ll get to that point too. This wasn’t always true for pianists; in the early days of the harpsichord and the organ, it was believed that pain was just part of the job.
00:28:50.660
However, that began to change in 1735 when C.P.E. Bach published an essay on "The True Art of Playing Keyboard Instruments." In that essay, Bach was the first to address many of the fingering and positioning issues that had confused keyboard players for over a century. Since Bach’s time, those ideas have been refined and improved to the point that, in schools like Juilliard and the Royal College of Music in London, posture and movement techniques are part of the curriculum. In fact, during the research for my book, I interviewed a musician who studied at the Royal College of Music in London and learned many of these techniques. Today, he teaches them to musicians, singers, and even computer users in the United States.
00:30:01.790
One of the things I learned from him is that your posture is very individual. We all have subtle differences in our proportions—like the length of our arms and its ratio to our torso—and these come into play when setting up your workstation, so it's important to experiment with your setup. In fact, this expert even recommends using mirrors and video cameras so you can watch yourself work and observe how you sit and move. Despite that individuality, there are a few heuristics you can follow to sort of get the best or an 80/20 solution for a good setup. The first rule is that your elbows should always be level with your wrists. This is true whether you’re sitting or standing. I see too many people working from a standing desk that’s set too high, which creates a negative bend in the wrist—this can lead to wrist pain. This will also help with neck and shoulder pain.
00:31:23.130
The next rule is that your monitor should be at eye level and 20 to 40 inches from your eyes. So if you’re standing, you may need to raise it up a bit. To test the distance, your arm is about 20 inches long, so when you’re sitting in front of your computer, try reaching out toward the screen. If you can touch it, then you’ll probably need to move a little farther away. This will help with neck pain, and it will also help with eyestrain and computer vision syndrome, which is a leading cause of headaches for people who work at computers. The next rule is that your feet should always be supported. This is true obviously if you’re standing, but also if you’re sitting. They shouldn’t dangle off the end of the chair, so you may need to use a footrest to prop them up.
00:32:27.360
Once you achieve the right chair height, you should adjust the height of that footrest so your hips are level with your knees. Now, the positioning of your lower body is not actually related to lower body pain; instead, it's related to back pain. This is because muscles like the psoas, which connects to your lumbar spine, travels through your pelvis, and attaches to your femur (your upper leg), can become stiff or when your leg is stretched in a way that causes it to pull on the lumbar spine. This can create a sensation often mistaken for a herniated disc. However, the psoas isn't the only muscle related to back pain; all of the muscles in your trunk are intended to support your spine, and no matter how good your posture is, if you're working at a computer all day without using these muscles, they will gradually decondition and essentially atrophy, just like the muscles of an astronaut in space.
00:33:38.170
As with astronauts, it doesn't take long before these muscles weaken to the point that they can only support the spine for a few minutes. When that happens, you start to slouch, which causes eighty percent of acute and chronic, nonspecific lower back pain. It’s widely agreed among doctors, scientists, and therapists that exercise is the most effective treatment for back pain. One of the leading researchers in this area, in fact the leading researcher in the world, is Dr. Stuart McGill at the University of Waterloo in Canada. Dr. McGill has a laboratory with electromagnetic tracking equipment that he hooks up to people, so they look like Frankenstein, and then he has them do specific exercises.
00:34:59.030
What he's testing is the forces of each exercise and to see which muscles are activated and how they strain different parts of your body. One thing he’s discovered in his research is that the exercises that improve the health of your back are not necessarily the same as the exercises that improve athletic performance. The exercises that he recommends for desk jockeys are not the same as those he recommends for martial artists. When we sit at a computer, we need stability, while martial artists and wrestlers need dynamic strength and movement. You probably didn’t make this distinction when you were growing up—you learned traditional exercises like sit-ups, which are terrible for your back.
00:36:05.220
Dr. McGill has three exercises that he calls 'The Big Three,' which are designed to improve the health of your lower back and reduce back pain. The first exercise is a side bridge—a position you might see in a Pilates program. You hold this position for seven to eight seconds, relax, repeat a few times, and change sides. The second exercise is the bird-dog, which is similar to a tiger pose in yoga. From all fours, you extend a opposing arm and leg, hold for seven to eight seconds, relax, repeat a few times, then change sides. The last exercise is a curl-up, which is a modified version of the half sit-up. This exercise has become so uniquely associated with Dr. McGill’s program that it’s often called the McGill curl-up.
00:37:24.000
What’s different about this exercise? First, one leg is straight and one leg is bent. You then place your hands below your lower back, curl up, and curl your shoulders off the ground. Hold for seven to eight seconds, relax, repeat a few times, switch your legs, and continue. The reason you put your hands below your lower back is to prevent your spine from flattening out when you curl your shoulders up. That’s important because all of these exercises are designed to improve the strength and stability of your core muscles without flexing your spine, as flexing your spine is what leads to more back pain. This brings us to the next activity: build strength.
00:38:57.000
Dr. McGill argues that most people should do these exercises every day, and you can supplement them with other strength exercises like push-ups or the Hindu squat. The idea is to use your muscles and keep them conditioned regularly. These exercises are not explosive strength training exercises; they’re classified as therapeutic exercises, so you can do them every day.