By Yasin Mameri December 27, 2017

A Programmer’s Guide to Fasting

Historically, fasting was a religious endeavor, one undertaken to show that you were willing to sacrifice in worship of your deity. Many religious scripts considered overindulgence to be a sin and the surrender of sustenance was interwoven into the tapestry of sacrificial religious rites.

Now, overindulgence is the convention of the western world. We’re cajoled constantly into gluttony by all-you-can-eats, the glistening perfection of celebrity chefs, the wafting seductions of pastry shops, and the late night judgeless greasy takeaways. The Obesity Epidemic, the huge rise in type 2 diabetes, coronary heart disease, stroke and cancer, are all symptoms of this overindulgence, this excess, this immoderation.

Fortunately, the idea of fasting has found a resurgence in the stomachs and minds of athletes and CEOs alike. It is the counterculture to modern-day gluttony—arguably the healthiest rebellion ever seen.

However, though much quieter than the proponents of fasting, there are detractors and debunkers who deny the efficacy of the studies done or their relevance to humans. So is fasting all it’s cracked up to be? What benefit, if any, does fasting hold for programmers?

In this piece, I will guide you through the science of fasting and its long list of potential cognitive and physiological benefits that would be invaluable to any programmer. I'll then walk you through a few simple forms of fasting so that you can get started and have success right away. Worry not, I will be sure to point out the potential pitfalls.

What is Fasting?

Fasting is the voluntary abstinence from the consumption of food or drink for varying lengths of  time.

There are two main types of fasting: continuous and intermittent. Continuous fasting is any diet that requires fasts that extend for days at a time without break. Intermittent fasting is any diet that switches between a period of fasting and non-fasting.

Studies on Calorie Restrictions & Intermittent Fasting

Studying fasting’s effects on the body began in the early 1900s with Cornell University’s Clive McCay (sounds like a James Bond villain) publishing a paper showing that restricting the calorie intake of rats extended their lifespan by a staggering 20-50 percent whilst reducing cancer rates. Pretty cool, hey?

Subsequent studies showed that continuous and intermittent calorie restrictions produced similar results in terms of life extension.

However, intermittent fasting had a greater efficacy in delaying the onset of disorders and diseases that lead to death. Rates of diabetes, high blood pressure, and heart disease were significantly reduced, while markers of inflammation improved, and the heart was younger and more elastic (so now we all know Sia is an intermittent faster. Five points if you get that reference).

Possibly even more pertinent to programmers and the precedence we give our cognition: intermittent fasting was shown to preserve learning and memory functioning while increasing focus.

Mark P. Mattson, Chief of the Laboratory of Neurosciences at the National Institute on Ageing, and his colleagues discovered that intermittent fasting protects neurons against various kinds of damaging stress. The team determined that intermittent fasting acts as a guard against stroke, and slows cognitive decline in mice genetically altered to imitate the symptoms of Alzheimer’s disease.

‘But I’m not a rat!’ said the person in the rat race. Patience, we’re getting there. Most studies on fasting with conclusive findings have been done on animals, not humans. This fact means that a degree of inference is required at this point.

Monkey Business

Let’s take a look at a primate that shares 99 percent of our DNA—the rhesus monkey. In the 1980s, two studies on rhesus monkeys examined the health effects of a 30 percent reduction in calories. The studies concluded that the calorie restricted (CR) monkeys lived no longer than the control group, but the CR group was far healthier—weighing less and with lower levels of cholesterol and triglyceride, and slightly lower levels of glucose, cancer, diabetes, and heart disease.

Talk to Me Straight, Doc

Though I put a lot of emphasis on hard data, science’s understanding of our biology still has a long way to go. Therefore, I do not think that you should blindly wait for science to give you the go ahead before you implement certain dietary practices into your life.

Instead, become an experimenter; bio-hack your own body. Through your own trial-and-error and a thorough collection of data points (body fat, insulin levels, blood pressure, heart rate ,etc.), you will begin to see which foods you respond well to, how much sleep you need for optimal performance, and how often you need to train.

And do not underestimate the use of common sense. It intuitively feels right to say that food—both good and bad—causes the digestive system to work. That if we consume more than necessary, our digestive system has to work harder than necessary with no time for recovery. And that any continued stress in the body is likely to result in disease, disorder, or death.

I do believe, as programmers, you understand nuance and the need for scrutiny in forming opinions. So though the science on the efficacy of fasting is at present inconclusive, I suggest you see how fasting affects you before drawing conclusions.

Extrapolating from the above studies on monkeys, it’s likely that humans will see little or no increase in longevity due to fasting. However, we are likely to see a reduction in excess body fat and improvements in general health and healthspan (the healthy, functional years of one’s life).

In 2007, Mattson published a clinical study showing a rapid, significant alleviation of asthma symptoms and various signs of inflammation in nine overweight asthmatics who near-fasted every other day for two months.

Certainly, for those with questionable diets, the benefits of fasting are clear: less bad stuff = healthier. And, the relatively sedentary life we live as programmers means we should be on the lookout for simple health wins like those we can get from fasting.

Restricted Calories or Intermittent Fasting?

A restricted calorie fast requires a participant to restrict calories by as much as 15 percent over the long term. The health benefits of restricted calories have been shown in several human studies, The Okinawa Centenarian Study being the most prominent.

The Okinawa ‘experiment’

On the Japanese island of Okinawa, 50 out of every 100,000 people live to be centenarians—a whopping five times as many as in the U.S. Searching for the elixir of life, researchers found:

  • Okinawans have 80 percent lower mortality rates from coronary heart disease and 40 percent lower cancer rates than folks in the U.S.
  • Healthy, older Okinawans consumed 11-15 percent fewer calories than the U.S. Department of Agriculture would recommend for their bodyweight.
  • Adult BMI averages 21—compared to 29 in the U.S.
  • Okinawans who didn’t follow a calorie restricted diet had higher BMIs at all ages, coupled with higher occurrence of Type 2 diabetes and heart disease. This finding, to a great degree, rules out genetics as the cause for Okinawans longevity.

*Note: this study was not a controlled clinical trial, so the significance of these results is still debated.

Despite the possible health benefits, most people struggle with such restrictions. In much of the western world, a single meal could push you over your daily caloric limit.

However, intermittent (non-continuous) fasting is a far more flexible—and therefore more manageable—form of fasting. In fact, you already fast every single day. You go without food while sleeping (unless you’re one of those sleep-eating types!) and break fast when you wake.

Furthermore, during pre-agricultural times (Epipaleolithic Era) when food was got through gathering, hunting, and fishing, people did not have the comfort of consistent, reliable food sources, so many of their waking hours were also fasted.

One study of 71 adults, by researchers at the University of Southern California (USC), found that intermittent fasting for five days a month (consuming between 750 and 1100 calories on those days) reduced cardiovascular risk factors, inflammation, waistlines, and total body fat, while maintaining muscle mass. Sounds like a good deal to me!

Taking all this into consideration, I recommend intermittent fasting over caloric restriction for programmers. After all, the energy requirements of brains tasked with the heavy cognitive loads of solving complex problems are extremely high. So choosing a protocol that won’t inhibit cognition for extended periods—as caloric restriction does—is essential. You’ll be surprised at how quickly your body adapts, and stops secreting ghrelin (the hunger hormone) during those periods where you would have previously eaten.

Types of Intermittent Fasting

There is no one-size-fits-all method to intermittent fasting. What works for one person may not work for the next. Things such as lifestyle choices and body composition will impact how effective any one protocol is with an individual.

With that in mind, have a read through the following forms of intermittent fasting and rule out the ones that would be unmanageable given your schedule/disposition. Then test the rest. Testing can be as exhaustive or simple as you want. You may feel it sufficient to be cognizant of how your body/mind responds to fasting. Or you may decide to build a few spreadsheets, checking many different health markers (weight, body fat, blood pressure, insulin level) and tracking mental performance (brain games, IQ tests, and mental health tests). The choice is yours.

5:2 diet: Eat to your heart’s content for five days of the week and reduce calories by 65-80 percent on the remaining two days. I have had friends that advocate this method as they have two days a week they keep relatively free, by which I mean they aren't scheduled to work and they plan little because they have no energy. Not my cup of tea: I work seven days a week and fill my spare time with hobbies, so this method left me entirely incapacitated. However, there are two cases in which this strategy may be perfect for you:

  1. You work Monday-Friday. In this case, you’ll have to forgo the weekend brunch/drinks.
  2. You can function well off little or no food —I’m still bemused by how little food my programmer friends can survive on while producing beautifully elegant code. In this case, it might be possible for you to have your fasts on work days.

Alternate-day fasting: Non-eating days generally consist of one meal of approximately 65 percent to 80 percent of recommended daily calorie consumption. I found this way even more challenging. But don’t let that stop you! You may find that reducing calories to one meal allows you to spend more time focused on producing great work.

Periodic fasting: Rather than fasting every week, you fast once monthly, bi yearly, or once a year. Typically these fasts last at least five days. I’ve found that using a “fasting-mimicking diet” to gradually step down energy intake over the fasting period helps your body adjust. This is the type of fasting I adhere to. If you find that you’re cognitively slower while fasting, I recommend this method. Block out some time a few times a year where you have little or no programming to do and few people to entertain and allow yourself to ease into the fast.

Time-restricted feeding: No calorie restrictions here. Instead, eating is restricted to a window of eight, 10, or 12 hours per day. This is the most popular, and arguably the most manageable form of intermittent fasting, used by athletes, bodybuilders, and John Sonmez alike. Studies have shown that frequency of use is a big predictor of success with habits. So implementing something you can set and forget, like time-restricted feeding, is very likely to increase successful long-term implementation.

When Not To Use Intermittent Fasting

You may want to avoid intermittent fasting if:

  • you’re pregnant
  • you have or have had an eating disorder
  • you suffer from chronic stress
  • you sleep poorly

Intermittent Fasting: A Caveat

Often, the truth is bastardised by agendas and dogmas and cognitive biases and belief systems. This distortion can be seen with intermittent fasting or with antioxidants or turmeric or even marijuana. As soon as you fail to see the color, as soon as something is black and white to you, you are no longer reasoning.

Do not fall prey to the heresy of silver bullets. Intermittent fasting may be a singular tool in your rise to the upper echelons of the programming world, but it is not the single tool that will ensure your rise to the top—such a tool does not exist. As programmers, our flexibility ensures our survival, adapting with the changes in technology and demands for particular languages is essential. Taking this flexibility into our relationship with health is powerful.

Utilize a holistic approach: exercise frequently, eat well, sleep enough, meditate, and socialize. Implementing the Pareto principle (roughly 80 percent of the effects come from 20 percent of the causes) here is a good idea. Just because you fast doesn’t mean that when you do eat, you do so with the indiscretion of a garbage can.

With that in mind, let’s delve into the titillating world of cheat days.

Fasting and Cheat Days

Pizza Flat Color Vector EPS10

Within the fitness community there is an almost endless supply of personalities that will preach that intermittent fasting allows you the comfort of eating whatever you want and however much of it you want on non-fast days—commonly known as cheat days.

YouTube videos and Instagram posts show boastful, wasteful spreads of pizzas and burgers and cookies and chocolate and ice-cream and alcohol and…the list goes on and on so far your stomach would turn. This extravagant spread is what you can have! They say. This and abs Zeus would be jealous of. How wonderful. They’re having their cake and eating it, too.

Interestingly, in a study by Freedland (Prostate Cancer Prostatic Dis 2010; 13:350–5) on the effects of intermittent fasting on prostate cancer growth in mice, mice that over-ate on non-fasting days did not have any improvement in survival rates, nor a reduction in tumor growth delay.

The term ‘cheat day’ creates negative associations with fasting. It’s important to be careful with the words we use as they inform our decisions. Think ‘cheat day’ and you’ll be primed to game the system–in this case, your system. Instead, simply consider them ‘replenishment days’. In other words, these days are not an excuse to gorge, they’re just another day of eating. You may use your replenishment days tactically to partake in work dinners/drinks.

In my eyes, fasting, or any diet or fitness regime, should be undertaken primarily for the health benefits and increased longevity. This modern day focus on the superficial quick fix, leads to short-lived beauty and lives of pain.

Think Fast, Human!

To summarize, fasting has a huge body of research behind it showing its efficacy in producing a smorgasbord of health and cognitive benefits in animals. Many studies have also pointed to the effectiveness of fasting in humans, however there is, as of yet, none that are comprehensive or conclusive.

So, when deciding whether to fast we must make a judgement call, considering both the potential reward and risk. And, as long as you are avoiding malnourishment, the potential risk for healthy adults is practically non-existent (many studies back this idea).

The stationary workstyle we adhere to is a precursor to many health issues. As programmers, we’re asked to find new innovative, elegant solutions to complex problems. Problem solving is what we live for. And if you’ve ever felt lethargic, bloated, inflamed, or you’re struggling to lose that belly fat, fasting very well may be the elegant solution to your complex problem.

Here, as in many areas of a programmer's life, testing is paramount. Find what works for you. If fasting doesn’t work for you or you don’t like it, you can always return to life before fasting. Assuming you maintain a healthy input of nutrients, it is an incredibly low-risk eating pattern.

I think it logical to incorporate fasting into your life and just see how you feel. You may be surprised with the results!

About the author

    Yasin Mameri

    Yasin is an insatiably curious chap with many interests which all converge around giving individuals the tools required to improve their businesses, careers, relationships, and themselves. Most days Yasin meditates to quieten the inner monkey man who seems intent on destruction. He despises mushrooms: they just give up in your mouth. No amount of meditation or stoicism has helped him with this thus far. Check out his ideas on business, productivity, fitness, and relationships and dating at http://yasinmammeri.com.