Calorie Counting × Meal Planning
maxwellforbes.com
maxwellforbes.com
Example code:
https://github.com/google/or-tools/blob/stable/examples/pyth...
which solves the Stigler Diet problem: https://en.wikipedia.org/wiki/Stigler_diet
The combinatoric difficulty of optimal nutrition planning is not something I see brought up very often, and I find that fascinating in its own right. It's harder than it looks, and I feel many people don't understand why.
Calculate your calories per day, then multiply by 7. That is your weekly budget. Don't budget by the day, there's no margin for error, and you'll hate your diet and stop doing it after a few weeks.
If your daily budget is 1,800 calories, your weekly budget becomes 12,600. Suddenly, having 400 calories of ice cream after a good week of working out and counting calories doesn't hurt and doesn't represent a quarter of your daily allowance. You can still have a normal day of meals with that dessert pay off, and still come in under your weekly budget if you've been planning or eating really light and lose weight.
Because at the end of the day, you have to take your psychology into account. Nobody can sustain eating boiled chicken and steamed broccoli for more than a few weeks.
> Because at the end of the day, you have to take your psychology into account. Nobody can sustain eating boiled chicken and steamed broccoli for more than a few weeks.
Agree
Supports paleo, keto, AIP, banting and general real food "clean" diets.
You can calorie count within these, but focusing on food quality and satiety helps a majority of the people fix the mentality side of fixing what they put in their mouth.
You definitely need to do some care and feeding on your favorite meals (unless you love eating cottage cheese with every meal) and remove meals for days you know you’re likely to eat out, but other than that it just works out of the box.
Here's my cheap, fast, and healthy diet that doesn't require any cooking. I started a few months ago and it's very effective in losing weight and saving time.
Half of a pound container of cottage cheese, plus a large melon (cantaloupe or honeydew are easy to cut once you learn how) for breakfast. One can of sardines for lunch. Another can of sardines, plus a can of vegetables for dinner.
One bottle of water at each meal plus 1-2 more throughout the day. Whenever hungry in between meals, snack on almonds.
You can buy a week or so worth of everything at a time, and some like the fish, vegetables, and nuts can be bought in bulk for months. Effectively no work to prepare anything, the trickiest is really the melons, you can substitute to bananas or grapes for easier fruit but higher carbs. And you can always eat out a meal every few days, estimate how much it makes up and eat that much less.
This costs roughly $10/day, and I'm targeting 1200 calories, which is the minimum recommendation for men. I track everything with an app and allow myself to go slightly higher if I'm hungry at the end of the day. There's about 3-400 calories buffer for those almonds, which I sometimes use for coffee with milk, or for various alternative snacks (e.g. granola bars in bulk turn out to be extremely cheap on a per calorie basis). And then there's a buffer between 1200 and the roughly 17-1800 I'd be at for breakeven, so if I splurge once a week I just don't lose weight that day but I'm not gaining anything.
Here's my advice for quick cheap healthy meals: get a microwave steamer. Throw frozen veggies and meat bits (I use Morningstar brand fake-meat strips but I assume real meat equivalents exist). Takes about ten minutes to make a meal, you can mix up the vegetables and any sauces you want to use on the whole thing.
Before this I drank Soylent for around 2 years, I'm not the kind of person to get bored by lack of variety in food. I just wanted something easier and healthier than Soylent.
The only part of the diet I actually find "boring" is the vegetables. I like everything else, I specifically picked foods from each category I enjoyed enough to eat daily. E.g. I tried several kinds of raspberries and decided I didn't like them enough to have daily.
I can still add variety. Maybe once a week I'll go out and grab a tuna salad, and somewhat less often I'll have a steak salad. And the other week I bought a pack of ice cream sandwiches and had 2-3/day till it was finished, and had less elsewhere to compensate. I may gradually add more things in as I experiment, but this is my base diet, one I can be comfortable knowing it's nutritious.
You are already at ~3500-4200 cal deficit a week. Recommended typical safe is ~7000 (2 lbs).
If you are doing any kind of exercise you will get close to that, but at 150 lbs, im not sure you need that much loss.
Stay safe my friend
It’s 8 eggs a day (soft boiled in a $20 egg steamer)... lots of bok choy or broccoli in avocado oil (oil for calories)... rice... and protein shakes. I microwave the veggies.
Protein shake recipe is Greek yogurt from Costco, frozen berries, oatmeal, a scoop of pea protein, avocado oil.
I combine the two to get 3000 calories a day.
I enjoy food sometimes, like the first few bites, but to me hunger is a disease and eating is a chore. I’ve always had a poor appetite and low-ish (21) BMI.
Really the biggest factor for me was a food I like enough to have daily, and minimal preparation. The cheap is a bonus.
The file-based approach to defining data is a good way to go I reckon - it's simple and easy to update (especially with source control). You can always upgrade to something more sophisticated in future.
How complete/challenging does the unit conversion component feel, out of interest? (I'm reading through `conversion.ts` in the codebase at the moment)
By chance I'm working on some ingredient unit conversion code too - I'd be happy to learn from & share experiences. FWIW the tools I'm exploring are Pint[0] and convert-units[1].
Those unit conversion libraries look awesome! Way better than my pile of hacks. I only added the units I happened to use in recipes (surprisingly few). The most hacky thing is probably all the cooking-specific ways of saying "thing" (clove, pack, fillet, sprig, scoop, etc.).
The most interesting problem I ran into with unit conversions was actually around the user experience: when did I want units converted at all? Right now, the app simply always does it before rendering anything. This means converting to the smallest unit of that type, and then picking the largest reasonable unit to display. This can lead to annoying instances where you put an ingredient in one unit, but another is displayed. I also went a little overboard on the fractions, so you see things like "2/5 tsp" which is just absurd.
This is going to be a brief ramble because it's late here in the UK, but I'm keen to respond because those are exactly what I'm looking into too.
Re: finding the appropriate display units, `convert-units` in particular has a method `toBest` which attempts to find the best-matching display unit for a quantity. The main problem is that it's unaware of culinary measurements (i.e. tsp as you mention, which could round up to tbsp, etc) at the moment.
I reckon that with a few additions to that project, and a few judicious extra test cases[0] to assert the right behaviour, it'd be possible to get it to perform smart display rounding on culinary measurements too.
Ideally those units would only be rendered by when a 'culinary unit system' is optionally enabled. That'd avoid any backwards-compatibility issues for the library -- and also because most users just want to see milliliters and liters by default I'd imagine.
As a slight aside, `pint` has nice support for alternative unit systems[1]. I'm planning to use `cgs` for storage of ingredient quantities since it's fine-grained.
Anyway - I'm probably thinking faster than a practical design, but if you have any interest, I'm probably going to look into extending `convert-units` for this use case a bit more. If it's possible to create a common library we could both use to ease some of the display work, I'd be really happy to collaborate.
[0] - https://github.com/ben-ng/convert-units/blob/93883046e43b5b0...
I have been using "My Macros+" for some time now and it works great. It's a few dollar app (no recurring fee unless you do the subscription, I don't) and then you can add your own meals or pull in meals from the vast database of food items. (Adding your own custom is the way to go, so you can verify accuracy)
Once you have done it for a few weeks it is really simple to maintain, because you just add it from the list. Takes me only about 30 seconds to 1 minute of total time per day to manage.
I also find actually inputting calories per meal helps me remain aware about food choices, while intermittent fasting (12pm - 8pm eating time) has drastically reduced snacking, because in those 8 hours I want filling / healthy meals rather than light (..dangerous) snacks.
I've never quite managed to routinely pre-prepare meals, now I'm inspired to have another crack at it.
In other words, exercise cuts 11-22% of calories on the low end, and only 6-11% on the splurge day.
You eat multiple times a day, every day. I wanna have tasty food, which is also healthy, not too expensive and fast to cook. What is missing is good quality recipes linked to calories and cooking time to make a meal plan.
I just want an app that can give me keto recipes, plan my meals for the week, and tell me what to shop and cook for the week. Seriously, that's all I want. Does this exist?
Any source on that?
> a pretty descent workout burns 200-400
my morning exercise burns 100 kcal (7 min workout) and my evening crossfit training burns 700 (that's what gym website claims)
Built it for myself, then it slowly spread through forums. No ads, and your data is yours and yours only.
The professionally curated foods and CPG[2] source is a much bigger expense.
[1] Linode has since added k8s. I've always had a great experience with them. [2] Consumer packaged goods, think items with barcodes.
If you make it hard to log your food, you won't do it. This makes it trivial.
Also, there are no community-entered foods. This is a feature in most cases. All the food is either from a professionally curated database (Nutritionix) or custom foods you enter.