Jul
26
2011

Hacker’s Diet

I’ve been following John Walker’s Hacker’s Diet for about nine months now. I love the simplicity of it.

“Anyone can control their weight. It’s a simple matter of balancing calories.” – John Walker

Mr Walker’s book is a fun, simple read. If you are technically inclined and you want to lose weight, you should certainly read The Hacker’s Diet. The book introduces a model of the human body as a rubber bag full, mostly, with water. Every day stuff goes in and stuff comes out, but the rubber bag always obeys the laws of physics.

If you eat more calories than you burn, you gain weight at a rate of a 3500 kCal/lb. Simply count the calories you eat and subtract the calories you burn and the resulting number will tell you how quickly you will gain (or, hopefully, lose) weight.

But I think it’s even simpler than that.

If you weigh yourself every day, you can quickly figure out whether you are gaining weight. If your weight goes up, you are eating too much. Eat less.

Ok, ok. It’s not quite that simple. Your weight can vary by a couple of pounds each day as you retain water (or, as John Walker delicately puts it, solids); but if you plot the moving average you get a surprisingly stable trend line. From that trend, you can figure out your daily excess (or deficit) and decide to eat more (or less) accordingly.

People who work in software development use a planning technique called yesterday’s weather. The idea is based on weather forecasting. Imagine a computer that monitored the humidity and the temperature and pressure and a thousand other variables and used it to predict the weather with an accuracy of 82%.

It turns out that, if you just predict that today’s weather will be the same as yesterday’s, you’ll be correct about 70% of the time. That’s close enough for most purposes and it saves you a really expensive computer.

In my case, the prediction that I’ll eat about the same number of calories today as I did yesterday saves me lots of tedious calorie counting. With a little practice, I got quite good at knowing whether I was eating too much or too little and adjusting my intake accordingly.

Here’s my trend since last October:

You can see from the chart that I lost weight pretty steadily for several months. My daily deficit held steady at about 250 cal/day for most of that time. 250 calories is about a bagel a day and represents the loss of a pound every two weeks. Since I don’t really like bagels anyway (or french fries, or bread, or candy) it was easy to stop eating them. I hit my target weight about a month ago and, since then, my weight has crept up a little (I don’t like bagels but I do enjoy beer).

The little red dots are a warning sign that I might be eating too much (notable red dots: The Captain’s Table Dinner in January and Piratefest in July) and the prominent red 74 says that I need to have half a pint less beer at Quiz Night.

Like any good hacker, I decided that I didn’t like any of the weight trackers out there so I wrote my own for my iPhone (it was also an excuse to learn Objective C). I might decide to stick the app on the app store one day but, for now, it’s just a bit of fun that I am sharing with some friends. Ping me if you want to play along too.

Epilogue

This post is from 8 years ago. The iPhone app is long dead but I wrote a little web app a few years ago.

It’s a bit bare on the bones but it has served me, a handful of friends and a couple of strangers well enough for a while now.

Try it if you like: Slimming with Strangers

Slimming with Strangers 2019

If you weigh yourself in pounds, it works pretty well. If enough people nag me, I’ll let you enter your weight in stone or kilograms.

Tags: , ,

7 responses to Hacker’s Diet

Ben Smith July 29, 2011

The hacker’s diet has served me well – first helping me move from from 230lb to 200lb, and now again on my way towards a target weight of 180lb.

I like the focus on food rather than exercise. The diet treats exercise as a good way to get fit, but not to burn fat – and it’s right. Eating less is the easiest way to lose weight.

In any case, I’m glad you’ve build an app! I’d take you up on the offer to play along, but I’m an Android guy. Maybe I’ll follow your lead and build my own for Android!

Do you track your weight in any other way online, or just using your app?

Kevin July 29, 2011

I like the Hacker’s diet for the same reasons as you, Ben, but I was definitely attracted by the appeals to engineering and common sense seem to be missing from every where else. I especially like the focus on two things: the trend chart and the daily deficit. If you are red, you are in trouble! Feedback loops work!

I downloaded maybe 10 or 15 weight tracking apps before deciding to write my own. All the others I tried were too complex except one – WeightBot – that was great except the charts didn’t span months.

I have been using physics diet too as well as Walker’s own Hacker’s Diet Online but I find them both too fiddly to use every day.

I hear Noom on Android is very good. It probably doesn’t have the Daily excess concept, but it looks simple and its very popular. If I ever finish my app, I might port it to Android.

Thanks for stopping by!

Stuart Thompson August 1, 2011

Simplicity is a wonderful thing. I haven’t read the book, but I’ve got it on my list now. I’ve been losing weight pretty consistently for about eighteen months now. Down from 220lbs to 190lbs and chasing 180 next. The things I’ve found that really make a difference were/are:
Quitting soda
Drinking beer linearly instead of binging. Leaving a few hours between final beer and bedtime.
Planning around meals out. Big dinner tonight? Eat smaller lunch and do workout in late afternoon.

I’m still fighting it, and I still binge with beer. Big meals come up and exercise takes a break for the weekend. However, the general trend is down and as you pointed out that’s what really matters.

Great work guys. Keep it up!

Victor December 7, 2016

What’s the best way to ping you?

I would love to take a look at that iPhone app!

Soooooo happy to have stumbled onto your writing through this post!

Ragged Clown December 7, 2016

Hey Victor,

This post is from several years ago and the iPhone app is long dead.

By an odd coincidence, I’ve just rewritten the app as a mobile web app. You can sign up here:

https://stark-eyrie-28983.herokuapp.com/slimmers/

It’s pretty bare bones still. I’ll finish it one day. Maybe.

Victor December 7, 2016

Oh wow– I figured that would be long gone after half a decade haha

I’ll poke around, thanks!