Diet for nerds and computer programmers

July 4, 2009

in Books and literature, Geek stuff, Internet matters, Science

Aero Ace biplane

John Walker, the founder of Autodesk, has written an interesting guide on health and weight loss, which is available for free online: The Hacker’s Diet.

Basically, the book focuses on the fundamental mathematical issues associated with weight loss and gain, and describes some useful techniques for transitioning to a lower weight. In particular, the moving average approach to measurement described seems quite valuable, insofar as it helps to separate the ‘signal’ of actual weight from the ‘noise’ of variation in things like water retention. The moving average generates a trend line that seems like it should provide more meaningful guidance than a scatterplot of individual data points, or even a simple curve fit to them.

The book also describes a 15-minute health regimen that ramps up in difficulty and is intended to serve as a minimum level of exercise for life.

The book is quite an unusual one, as health books go. For instance, it endorses frozen microwave dinners as a convenient way to get a predetermined number of calories. It also insists that exercise is not a critical weight loss strategy, and that some degree of suffering inevitably accompanies efforts to move closer to one’s ideal healthy weight. While I am sure people could take exception to this approach, it is good to have variety out there, and encouraging that tools are being created for the ever-larger number of people worldwide that are overweight or obese, and likely to suffer significant health risks as a consequence. Those who don’t want to mess around with Walker’s custom Excel files can use a web-based version of Walker’s approach at

Report a typo or inaccuracy

{ 20 comments… read them below or add one }

Alison July 5, 2009 at 5:06 pm

Douglas Crockford, author of the respected book “Javascript: The good parts”, is another programmer who writes about weight loss:

Alison July 5, 2009 at 5:06 pm

Douglas Crockford, author of the respected book “Javascript: The good parts”, is a programmer who has written about weight loss:

Milan July 5, 2009 at 7:44 pm

Crockford seems to emphasize exercise a lot more than Walker does, though I don’t think the math supports him. It takes a lot of hours to counteract the effect of relatively small numbers of calories.

Losing weight is mostly a matter of intentional starvation.

Milan July 5, 2009 at 7:48 pm

This chapter explains it well.

. July 6, 2009 at 4:36 pm

“A wise engineer once said that all systems, regardless of composition, do one of three things: blow up, oscillate, or stay about the same. Once you understand feedback, you know why this must be. If a system blows up, it is governed by positive feedback. If it stays about the same, negative feedback is on the job. If it oscillates, either negative or positive feedback can be in charge. You have to look more closely at the details.

Feedback doesn’t explain everything, but it explains a great many things.”

Douglas Crockford July 12, 2009 at 9:09 am

“Losing weight is mostly a matter of intentional starvation.”

Starvation produces temporary weight loss. When the starvation stops, the weight is regained and exceeded. This is sometimes called the yo-yo effect. I am writing about permanent weight loss. If the loss is not permanent, then the dieting is just ineffective self-torture.

BuddyRich July 12, 2009 at 10:17 am

Exercise has plenty of other benefits than strictly weight-loss and is essential. For one, it will increase your muscle mass and hence your BMR (ie. Basal Metabolic Rate, the amount of calories you burn at rest) and as a second, it will lower your cholesterol (more specifically raise the good HDL levels so your overall ratio is better). Not to mention, no matter how you slice it, when dieting you burn more than just fat, you are likely losing muscle mass as well, exercise will help counteract that to some extent.

Now, if you are grossly overweight, diet alone will work, and is actually recommended as physical activity is stressful at extreme weights but its when you get down to that last 30 or so pounds to lose, that diet alone loses its effectiveness (just as exercise alone does… the body adapts and you start getting less results for the same things, thats why change in exercise routine and the odd cheat day in food are valuable, to stop the system from getting complacent).

Not to mention, when you do lose significant amounts of weight and have been overweight for sometime prior, loose skin will be a problem. At least with exercise (specifically weight lifting) you can sculpt and tone areas to hide it (not completely though…)

Milan July 12, 2009 at 12:14 pm

Walker’s book explains an interesting theory about why some people find that their weight oscillates dramatically:

“Oscar has the very same feedback curve as Sam, but his is shifted a little to the right, toward eating too much. One day Sam eats slightly more than he needs, and the next day slightly less. But since feedback keeps him within the range his metabolism can adjust to, Sam’s weight stays the same. When Oscar eats slightly too much, though, he’s pushed immediately into the region where he packs on weight. The next day, like Sam, he may eat less but, since that’s within the flat part where metabolism compensates, he keeps all the weight he packs on whenever he eats a little too much.

The shift in Oscar’s feedback curve with respect to his body’s need for calories acts as a ratchet; each excess runs his weight up, but equivalent shortfalls don’t burn off the excess weight. Over time, Oscar begins to see the evidence of this on the scale and in how his clothes fit. Having lived with this condition all his life, Oscar knows there’s only one solution: peel off the pounds. So, for the umpty-umpth time he embarks on a diet: perhaps a sure-fire plan that’s worked before, or maybe the current rage all the celebrities are swearing by.”

. October 20, 2009 at 1:10 pm

From The Times
October 19, 2009

Exercise? A fat lot of good that is for weight loss
In the fight against obesity, we’re urged to get off the couch. Yet new research claims that diet is what counts

In 1932, Russell Wilder, one of the leading obesity experts, lectured the American College of Physicians, saying that his patients lost more weight on bed rest than an exercise regime.

It’s one of those ha-ha moments of medical history, along with doctors prescribing cigarettes to patients to “clear the lungs”. Now we all know that exercise is the best way to lose weight, in the same way that we all know that our obesity epidemic is a result of Western sloths sitting on our ever fatter bottoms. It’s why chubby will be the new norm, with 90 per cent of today’s children predicted to be overweight or obese adults by 2050, costing UK taxpayers £50 billion. It’s why the most insistent plank of the Government’s anti-obesity drive is exercise. It’s why we look at our pudgy kids and cry “To the playing fields!”, and prescribe them ever more PE. It’s why, every new year, we sigh at our expanding muffin top and resolve to Power Plate it away.

That exercise is the key to losing our collective weight is something that we know so deep in our cultural guts that to question it would be ridiculous.

Except that is what the most cutting-edge obesity researchers are now doing. The recent studies show that the benefits of exercise for weight loss have been overstated. This idea is shocking. It goes so far against the orthodoxy that it is not something many can accept. And certainly for governments and the food industry that places them under so much pressure, it is too much to swallow.

. February 22, 2010 at 2:58 pm

“In the 1980s Steve Ward, a professor of electrical engineering and computer science at MIT, described a sure-fire dieting scheme. “All that you need for my diet is graph paper, a ruler, and a pencil,” Steve would explain. “The horizontal axis is time, one line per day. The vertical axis is weight in lbs. You plot your current weight on the left side of the paper. You plot your desired weight on a desired date towards the right side, making sure that you’ve left the correct number of lines in between (one per day). You draw a line from the current weight/date to the desired weight/date. Every morning you weigh yourself and plot the result. If the point is below the line, you eat whatever you want all day. If the point is above the line, you eat nothing but broccoli or some other low-calorie food.

Steve noted that this could also be called the “Bang-Bang Servo Diet” but that would likely be confusing to non-engineers (see “

. November 9, 2010 at 2:05 pm

For 10 weeks, Mark Haub, a professor of human nutrition at Kansas State University, ate one of these sugary cakelets every three hours, instead of meals. To add variety in his steady stream of Hostess and Little Debbie snacks, Haub munched on Doritos chips, sugary cereals and Oreos, too.

His premise: That in weight loss, pure calorie counting is what matters most — not the nutritional value of the food.

The premise held up: On his “convenience store diet,” he shed 27 pounds in two months.

For a class project, Haub limited himself to less than 1,800 calories a day. A man of Haub’s pre-dieting size usually consumes about 2,600 calories daily. So he followed a basic principle of weight loss: He consumed significantly fewer calories than he burned.

His body mass index went from 28.8, considered overweight, to 24.9, which is normal. He now weighs 174 pounds.

But you might expect other indicators of health would have suffered. Not so.

Haub’s “bad” cholesterol, or LDL, dropped 20 percent and his “good” cholesterol, or HDL, increased by 20 percent. He reduced the level of triglycerides, which are a form of fat, by 39 percent.

. January 17, 2011 at 7:54 pm

The most famous equation in nutrition is “calories in = calories out.” But the right-hand side of the equation is more complicated than most people realize.

If you add one 60-calorie cookie to your daily diet, simple math suggests you’ll gain weight for the rest of your life at a rate corresponding to about a pound of fat for each 3,500 calories. But, in fact, as you gain weight, your body has to spend more energy maintaining the new tissue, using up some of the excess calories. A paper published last year in JAMA calculated that the weight gain would level off at six pounds after a few years.

Unfortunately for dieters, the same mechanism works in reverse when you cut calories. Your body becomes more efficient as you lose weight, and soon stabilizes at a new level. As soon as you resume your previous intake, your weight shoots back up.

Researchers are trying to identify the subtle but insistent cues that drive how many calories we consume – and their latest results reveal just how complex these factors are.

Last year, Dr. Chaput published an analysis of data from 537 participants in the Quebec Family Study. He found that a collection of unlikely factors – short sleep duration, emotional eating patterns and low dietary calcium intake – predicted the risk of obesity better than the amount of fat in the subjects’ diets or how much vigorous exercise they did.

. June 14, 2011 at 11:05 am

At high levels of exercise, numerous studies have found that appetite tends to closely match energy requirements. But this relationship breaks down at lower levels of exercise. If you feed someone a 200-calorie snack early in the day, for example, heavy exercisers will unconsciously adjust their appetite to eat 200 fewer calories over the rest of the day. Sedentary subjects, on the other hand, will eat just as much as they normally would have.—and-exercise/article2055780/

. September 18, 2011 at 9:14 pm

The conventional rule for slimming, espoused by both the NIH and Britain’s National Health Service, has the benefit of simplicity: cut 500 calories each day and lose half a kilo (about a pound) a week. Most experts, though, acknowledge that this rule is too blunt as it fails to account for shifts in the body’s metabolism as the kilos pile on. Dr Hall’s model tries to do this. It also accounts for baseline characteristics that differ from person to person. Fat and muscle, for example, respond differently to shifts in diet, so the same intake will have one effect on a podgy person and another on a brawny one. The result (which can be viewed here) is a more realistic assessment of what someone needs to do to get slim.

According to the old version, for example, abstaining from a daily 250-calorie bottle of cola would lead to the loss of 35kg over three years. Dr Hall’s model predicts an average loss of just 11kg. Furthermore, it also acknowledges that a dieter’s weight will eventually reach a plateau—far more realistic than the old advice, which implied, incorrectly, that weight loss will continue steadily.

. April 6, 2013 at 1:08 pm

Physical activity helps to lower the risk of a wide range of ailments, including heart disease, diabetes, breast cancer and depression. But academics remain sceptical that exercise alone can reverse obesity trends, despite some success stories, because the calories thus spent are often replenished by a bigger meal later, as suggested by the phrase “work up an appetite”. Exercise was once thought to speed up the metabolism, causing more calories to be burned all round. Sadly research suggests that it does no such thing. Most experts now agree that a change in diet is the single most effective way to lose weight.

. October 7, 2013 at 2:46 pm

A CALORIE is a calorie. Eat too many and spend too few, and you will become obese and sickly. This is the conventional wisdom. But increasingly, it looks too simplistic. All calories do not seem to be created equal, and the way the body processes the same calories may vary dramatically from one person to the next.

Metabolic syndrome can still be blamed on eating too much and exercising too little. But it is crucial to understand why some foods are particularly harmful and why some people gain more weight than others. Thankfully, researchers are beginning to offer explanations in a series of recent papers.

One type of calorie may be metabolised differently than another. But the effect of a particular diet depends on a person’s genes and bacteria. And that person’s bacteria are determined in part by his diet. Metabolic syndrome, it seems, hinges on an intricate relationship between food, bacteria and genetics. Understand it, and researchers will illuminate one of modernity’s most common ailments.

. February 11, 2014 at 5:56 pm
. June 7, 2014 at 12:07 pm

Long-term weight loss considered nearly impossible

Here’s a CBC science piece quoting several obesity experts argues that long-term weight loss is almost impossible, saying that (uncited) meta-analyses of weight-loss intervention found that in the 5- to 10-year range, most weight-loss was reversed. According to Tim Caulfield, who holds a Canada Research Chair in Health Law and Policy, this is an open secret in scholarly and scientific weight-loss circles, but no one wants to talk about it for fear that it will scare people off of healthier eating and exercise regimes, which have benefits independent of weight-loss.

I found the article frustrating. While I am willing to stipulate that the data on long-term weight-loss suggests extreme difficulty, I wish the journalist had found biologists or doctors to discuss the issue, and had cited actual, specific research to support the claims made, which would make it easier to parse the nuances in the piece. It’s not that I think that interdisciplinary lawyers with an undergraduate science background have something to say on this (I am 100 percent for interdisciplinary researchers, especially on complex questions like obesity), and while I think that psychologists like Traci Mann have a lot to say about some dimensions of weight-loss, it would have been great to find out what endocrinologists and other bioscience-types had to say about the phenomenon.

. June 7, 2014 at 12:08 pm

” For my part, I went from about 250 lbs to about 170 in 2002/3, by eating a very low-carb diet. This morning, I weighed in at 176 lbs. I attribute my sustained weight loss to daily swimming (which I do for physiotherapy for chronic back pain) and a moderate-carb diet, as well as a two-day-a-week 600 calorie fasting regime.

Which is to say, it’s a ton of work to stay where I am, and I know from past experience that if I skip swimming for a few days, or let myself go nuts on carbs for more than a day or two, or skip fasting-days (which aren’t really fasting — just very low-calorie days) that my weight creeps up. I pretty much never eat without making a complex (and tediously unwelcome) calculation about what I’m about to consume, and I often experience guilt while eating “bad” food and shame afterwards.”

. June 7, 2014 at 12:08 pm

Obesity research confirms long-term weight loss almost impossible

No known cure for obesity except surgically shrinking the stomach

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: