# DRAFT: The Tareable Diet

I’m pretty amenable to arguments about scale weight being a terrible metric for the goal of changing one’s physical shape. We have another blog post about when and why weight is a good metric to mind.

But let’s assume you’re convinced that you want to literally lose weight. Or that you have a weight that you’re certain you don’t want to exceed, which we’ve argued everyone should have. Everything here applies equally well to maintaining weight as to losing it.

The hard thing about weight loss (besides the eating less bit) is that your weight fluctuates so much day to day, seemingly randomly. That means the feedback is not immediate and you never have a good sense of exactly how much you can eat. But of course the fluctuations aren’t random. With enough data we can understand them and you can get minute-by-minute guidance on how much to eat to stay on track towards your weight goal.

Here’s what you do.

Weigh in immediately before and immediately after every change in your weight. This includes using the bathroom, putting on or taking off clothes, and eating or drinking. Basically whenever anything goes into, out of, onto, or off of your body.

Every time you weigh in, the Tareable Diet App [1] prompts you for what changed and you choose any subset of the following:

1. Breathed
2. Sweated
3. Peed
4. Pooped
5. Clothes on or off
6. Ate
7. Drank
8. Barfed
9. Bled out

Probably we can combine some of those into an “other” category. But point being, the app can collect that data, compute exactly how your weight changes throughout the day, and tell you moment by moment exactly how much food you can put in your face without crossing your bright red line.

In its simplest version, it just tares your clothes (insert joke) and tells you continuously the maximum you’re allowed to let the scale read.

#### Does this require willpower?

Less so than the alternatives! Probably you’re not so willpower-deficient that you’ll pick up a piece of pie, see that it will cost you \$90 to put it in your piehole, and decide to do that.

#### What if I wake up and waste whatever buffer I have on ice cream by 10am?

That’s near-term enough suffering (subsequent hours of fasting) that you’ll not want to do that (much).

#### Wouldn’t this let me eat lots of crap like potato chips that don’t weigh much?

You can and should augment this with your own anti-junk-food rules. But the incentives to eat junk food are no more perverse than your dumb body and its maladaptedness to the modern world already makes them. In fact, the Tareable Diet has a built-in incentive to eat nutrient-dense stuff that will keep you full as long as possible. Namely, less fasting.

In my experience (and I’m quite junk-food-motivated) the Tareable Diet aligns your incentives pretty well to use your safety buffer in a sane order: first water, then healthy stuff, then junk.

#### Is fasting that much unhealthy?

This absolutely means less fasting. You’re constantly shedding weight just by breathing (not to mention going to the bathroom) so it can never be too many hours from hitting the cap before you can eat again.

#### I’m still pretty sure I’d eat a whole bag of potato chips or however much of the bag I was allowed and then have to fast for ages.

It’s not that long, I’ve tried it. Also I kind of think the fact that potato chips are very light is an ice cream truck loophole.

#### Does this incentivize you to dehydrate yourself?

On the contrary, if you’re well hydrated then you get a nice drop in weight every time you pee which allows you to eat something meal-like.

#### But you can go above the line by drinking water, right?

No. No water for you! Say you eat potato chips right up to the edge and are super thirsty. Then you’ll naturally opt for water as your safety buffer builds back up. Which, again, won’t be long. You’ll be fine. I mean, consult your doctor.

#### Anything useful to do with this before the actual app exists?

Yes, I think there’s a best-effort guesstimating version of the Tareable Diet that works well. If you have real money at stake on a Beeminder weight goal, you can keep your money very safe by doing the following.

However many grams below the red line you are when you wake up, just mentally tally up how many grams you’re eating and drinking and keep it below that. Also you can use a heuristic of something like 100g per hour of weight lost just from breathing. (Test it out by weighing yourself a few hours apart with nothing but your breath coming into, out of, off, or on you!) So that gives you an additional 100g per hour you can eat and drink. If you go to the bathroom, guess how much weight that was and add that much to your buffer of what you can consume.

(Or simplify further and ignore water altogether — you pee that back out in a matter of hours anyway.)

It won’t take long to get a rough feel for all of that. And if you’re off a bit and find yourself above the red line, it won’t be by too much and you can just fast your way back on and then continue with guesstimating. Gradually you’ll get pretty good at it!

## Footnotes

[1] Yes, it’s pronounced the same as “terrible”.

## Notes for a technical spec for MVP with no UI

We can do this as a new aggday.

It just assumes all double weigh-ins strictly within 120 seconds of each other (i.e., either the same or consecutive minutes when viewd as a time of day) are before-and-after tarings. You can still always weigh in multiple times but not within 120 seconds else it will think you’re taring it. So two weighings in a row where the 2nd one is higher means subtract that delta for the rest of the day.

What if you don’t get dressed fast enough? You can just hold the clothes if you haven’t put them on yet. Or get dressed in stages as long as you wait two minutes between stages.

(Why 2 minutes instead of 1? Because if you see weigh-ins listed at 10:03am and 10:04am, those could be anywhere from 1 second to 119 seconds apart. You want it to be clear from just the HH:MM times of day whether the weigh-ins were close together enough to be tared.)

What if you put on or take off more clothes later? You just have to keep in mind that any time you do that you need to weigh in right before and after.

Here’s an example that illustrates that it works:

1. Wake up naked and weigh in at 70kg.
2. Time passes, moisture is lost, you now weigh 69.9kg.
3. Time to get dressed: gather clothes, step on scale without and with them. Weights are 69.9 & 70.4 ⇒ Δ = +0.5.
4. Now all weights the rest of the day get 0.5 subtracted.
5. Oops, it’s warm out, let’s ditch the sweater.
6. Make sure it’s been at least 2 minutes and then weigh in with and without sweater: 70.4 & 70.2 ⇒ Δ = -0.2.
7. Now we have deltas [+.5, -.2] which sum to +0.3.
8. So all subsequent weights get 0.3 subtracted.
9. Your current weight with clothes-except-sweater is 70.2.
10. So your real weight is 69.9, which is exactly right.

What if you forget and weigh in twice in a row for no reason? If the scale is accurate then you’ll add a delta of zero, which won’t matter. If the weights are randomly different, as they sometimes are, then that will throw everything off the rest of the day. But only slightly, which should be fine.

Or if you notice you did that, just weigh in a third time. More than two weigh-ins during the same or consecutive minutes — a sequence of more than 2 weights with less than 120-second gaps between them — are not tared.

What if you put on a kilogram of clothes but when you tare the clothes back off again it happens to only see a delta of -0.9? Then you’ll be back to naked but Tareable will think there’s still a net delta of +0.1. So it will tell you you weigh 0.1kg less than you really do. That might be live-with-able or ideally there’s an option somewhere to throw away all the deltas. Or if it at least shows you the net delta it’s using and you know it to be wrong (like you’re naked again and it should be zero) you can just purposefully do a new taring with 100 grams of something in your hand to coerce it back to zero.

### Algorithm

testdata = { {1, 70}, {100, 69.9}, {100, 70.4}, {200, 70.4}, {201, 70.2},
{300, 70.2}, {400, 70.1}, {459, 80.1}, {459 + 59, 80.1}, {600, 80.1} };

tareable02[{{t1_, v1_}, {t2_, v2_}}] := v2 - v1

(* Helper for tareable *)
tareable0[l_] := If[Length[l] != 2, 0& /@ l, {0, tareable02[l]}]

(* Tareable algorithm. Adjusts the datapoints by treating all pairs
of datapoints within 120 seconds -- a string of more than 2 datapoints
with gaps less than 120 seconds doesn't count -- as a tare operation.
Assumes a list of datapoints sorted by timestamp. *)
tareable[data_] := Module[{d},
d = Accumulate@
Flatten[tareable0 /@
Split[data, Abs[First[#1] - First[#2]] < 120 &], 1];
MapThread[{First[#1], Last[#1] - #2} &, {data, d}]]