The Healthy Programmer – Better coding through better living – #programming #bookreview

The Healthy Programmer

Get Fit, Feel Better, and Keep Coding

Joe Kutner

(Pragmatic Bookshelf – paperback)

Yes, you know it is unhealthy to spend all day and much of the night hunched at keyboard, staring at a computer screen, gripping a mouse and nervously clawing at bags of vending-machine snacks because you haven’t had time to eat proper meals.

Yet that is exactly how many of us earn a living: spending long hours writing code, fixing code, or writing about the processes of writing and fixing code.

The work of a programmer can be devilishly complex and tiring. Often, it can be highly stressful, too. And, it can, over the long run, damage your health or even help shorten your life, if you aren’t careful.

Joe Kutner’s The Healthy Programmer takes a pragmatic and low-key approach to showing you how you can start improving the conditions of your body and brain without disrupting your job. His tips, tricks, and “best practices” are backed up by advice and commentary from doctors, therapists, nutritionists, scientists, and fitness experts.

“Having a system or a process is crucial to getting things done,” Kutner says. “In software, we often use an agile method to guide our development efforts. Agile processes are characterized by an iterative and incremental approach to development, which allows us to adapt to changing requirements. The method you use to stay healthy shouldn’t be any different.”

In his book, he shows “how to define a system of time-boxed iterations that will improve your health. We’ll start with two-week intervals, but like with any agile method, you’ll be allowed to change that as needed. At the end of each iteration you’ll do a retrospective to assess your progress.”

Crucially, Kutner’s approach is to start small, by changing one habit, and start gently, by doing some walking. “You won’t be bombarded with exercises and activities right away,” he emphasizes. “Instead, we’ll spend the first few chapters introducing some very simple, but essential, components of a healthy lifestyle. Don’t think that they are too simple, though. These are the activities that will have the biggest effect on your life.”

Kutner’s well-researched, well-written book takes a whole-body approach, with a keen understanding how programmers work.  He has been one for more than a decade and has spent much of that time researching the physical hazards of sedentary coding.

Chair exercises, standing desks, wrist braces, eye-care tips, and dietary recommendations are some of the areas covered. A “Pomodoro break,” for example, can help people involved in many different types of creative work, including programming. The basic approach involves working on a single task for a specific amount of time, such as 60 minutes, with short periods of exercise interspersed.

You might set a timer for 25 minutes, then focus on debugging some code. When the timer goes off, you reset it for five minutes and take a short walk. Then spend another 25 minutes doing a code review. When the timer goes off again, get up from your desk and do some exercises for five minutes. Then start a new task (or continue a previous problem) and repeat the cycle.

You may already have a daily exercise routine.  But Kutner warns that it “can interfere with your job [as a coder] if you don’t coordinate the two activities. If you do coordinate them, you may actually improve your ability to write code. That’s because immediately after exercise, blood shifts rapidly back to the brain, which makes it the perfect time to focus on tasks that require complex analysis and creativity.”

The Healthy Programmer has many good tips for avoiding or minimizing back pain, wrist pain, headaches and other irritants, as well good techniques for “upgrading your hardware,” meaning your body. Numerous easy-to-perform exercises are described and illustrated, including some you can do while seated or standing at your workstation. “[Y]our lifestyle can enhance your ability to do your job well,” Kutner emphasizes. “That’s why staying healthy is the best way to ensure you keep doing this job you love for years to come.”

Si Dunn

Fitness for Geeks – A book that will knock you OFF your butt – #bookreview

Fitness for Geeks: Real Science, Great Nutrition, and Good Health
Bruce W. Perry
(O’Reilly,
paperback, list price $34.95; Kindle edition, list price $27.99)

You know it’s true: You spend way too much time at home and at the office just sitting on your back pockets, staring at computer screens.

You do have some mobile devices. But, to use them, you mostly just carry them into your favorite free WiFi coffee shop and then sit, eat bagels and drink coffee while you poke, occasionally twitch a finger and squint.

 Not much of a healthy workout, is it?

 Many of us now spend most of our days and nights engaged in what Bruce W. Perry calls “a marathon bout of sitting.” Indeed, toss in the time spent sitting in your car as you commute to and from work, and you are a perfect example of a modern lifestyle that some scientists now term “chair living.”

It’s time, says Perry, to move, to skip the elevator and take the stairs (two at a time, if possible) on your way to and from those chairs.

 It’s time to find the company fitness center and start using it. It’s time to pay closer attention to what and how much you are eating, especially while sitting, computing and commuting. And it’s time to realize that you are spending too much time in front of your computer or TV when you should be sleeping.

Perry, a software engineer, journalist and self-described “fitness geek” has written an entertaining, inspiring and downright helpful book that draws from “the many parallels between software design and fitness geekdom, such as the whole concept of antipatterns, or learning how to do something by studying how not to do it first.”

There are, he notes, many apps, websites and devices now that can help you track, calculate and chart effort, calories, distances, sleep and other fitness factors.  He even tosses in a few bits of code that can help you, for example, display the route and distance that you just covered on a bike ride

Now is the time for all good geeks to come to the aid of their chair-shaped, digitally softened bodies.

Fitness for Geeks is organized into 11 standalone chapters that you can read in any order, Perry says. The chapters are:

  1.  Fitness and the Human Codebase: Reboot Your Operating System
  2. Fitness Tools and Apps
  3. Food Chemistry Basics: Proteins, Fats, and Carbs
  4. Micronutrients: Vitamins, Minerals, and Phytochemicals
  5. Food Hacks: Finding and Choosing Food
  6. Food Timing: When to Eat, When to Fast
  7. The Other World: A.K.A Outside
  8. Hello, Gym! Finding Your Way Around the Fitness Facility
  9. Randomizing Fitness and the Importance of R & R
  10. Code Maintenance: Human Fueling and Supplements
  11. Lifestyle Hacks for Fitness

 There is no complete escape from chair living, of course. We still have to sit at our home computers, sit in front of our TVs, sit in our cars, sit at coffee shops, and sit, sit, sit at the office.

But chair living does not have to consume us and kill us. We can find the time to make better choices: Skip the escalator and the éclair; eat a carrot and take the stairs. And we can find tools that can help us enhance those choices – digital and physical. They are already out there. 

Mainly, we just have to make ourselves get off our butts for a little while each day and do something healthful with the time out of chair.

Bruce W. Perry’s new book can help you discover – yes, even program – a workable path to better living.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir. He is the author of an e-book detective novel, Erwin’s Law, now also available in paperback, plus a novella, Jump, and several other books and short stories.

Consuming too much information can make you fat, clueless & dead – The Information Diet – #bookreview

The Information Diet: A Case for Conscious Consumption
By Clay A. Johnson
(O’Reilly, hardback, list price $22.99; Kindle edition, list price $19.99)

In this controversial new book from O’Reilly Media, veteran software developer, open source guru and political advocate Clay A. Johnson makes the forceful argument that our current mania for consuming information is killing us, mentally and physically.

First, we are sitting too much and too long while consuming data from the Web, from TV, from smart phones, from books, and while driving around in our cars listening to blather on the radio.

And, much of what we are consuming is crap – the digital equivalent of high-fat junk food and raw sugar. Some of us now are driving ourselves to destructive distraction through gluttonous obsessions with tweets, status updates, downloads, videos,  instant messages, text messages, emails and restless Web surfing.

For instance, suppose a tweet just went by mentioning some kind of rumored problem with pig populations in Zambia, and you idly read it, processed it in your head, wasted a few more seconds of your life, and took another sip of your latte and took another bite of bagel while continuing to sit on your butt much longer than you intended.

Then you checked your Facebook account on your iPhone or iPad, took another sip of your latte, took another bite of bagel, and went back to Twitter and followed a link to what seemed to be a review of a movie you’ve already seen to see but turned out to be just a lame blog post about how Mitt Romney and Newt Gingrich resemble certain characters in Avatar. Then you took another bite of bagel, another sip of latte and checked your email and followed a link to something about Lady Gaga.

More wasted time. More attention to generally useless information. More sedentary life gone by.

We now spend nearly 11 hours a day consuming – frequently gorging on – information, Johnson’s book points out. And it’s driving us to distraction – and killing us.

First, the physical dangers. Johnson notes: “In 2004, one physician coined the term Sedentary Death Syndrome to classify all the diseases that come from the sedentary state. The effects: heart disease, diabetes, cancer, and yes, obesity. Some researchers are calling it the second largest threat to public health in America. What are we doing when we’re sedentary? Few of us are meditating. We’re consuming information.”

He continues: “New research points to sitting, especially amongst men, as a leading cause of death. Even if you exercise regularly, it turns out that sitting for long periods of time can be deadly.”

It’s also easy to lose track of time and lose control of time management while distracted by the free flow of information. Something unexpected or surprising or outrageous on the Web grabs your attention, and your carefully crafted to-do list for the day is shot to hell. And, relationships can be affected: “Just a quick check of email when we get home can often end up in evenings entirely lost to LCD screens…” instead of talking and paying attention to each other.

Then there’s the problem of “attention fatigue.” Writes Johnson: “About two years ago, I started to wonder: what the heck happened to my short-term memory? And where did my attention span go? I’ve written a little pithy 140-character tweet, sent it into the universe, and in no more than five minutes, I’ve received a reply. The only problem is, I’ve already forgotten what I wrote in the first place. I’ve had to go back, and look at what I said just five minutes ago to understand what the person replying to me is referencing.”

This book offers more dire warnings about consuming too much information. But the author also offers ideas and recommendations for achieving “Attention Fitness.” You can still have your information and consume it, too, in deliberate, conscious doses that are healthier for your mind, body and your participation in American democracy.

If you pay attention to this book long enough to actually think about what it points out and proposes, you may figure out how to get healthier again, how to regain your focus – and how to better understand the ways you are being duped by some of the misinformation constantly sucked into your head by your addiction.

You can become a more conscious and proactive consumer of information and not just another wasted – and life-wasting — data junkie.

Si Dunn‘s latest book is a detective novel, Erwin’s Law. His other published works include Jump, a novella, and a book of poetry, plus several short stories, including The 7th Mars Cavalry, all available on Kindle. He is a screenwriter, a freelance book reviewer, and a former technical writer and software/hardware QA test specialist.