If you want to get fancy with your meal planning, you can use a constraint solver like Google's or-tools to figure out what recipes to cook to meet nutritional (and other) goals semi-optimally:
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.
Not seriously. I work on other similar optimization problems for my day job though, I can definitely imagine adding a bunch more complexity to guide the solver toward the right solution shape (price, volume, meal frequency, preferred foods, variety, etc).
For anyone trying to count calories, here's a tip that doesn't seem to be common knowledge:
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.
I think counting calories you eat is oversimplified anyways. If I do activity, or intermittent fasting or anything that influences the metabolism, that has a big impact. Like living in a house with stairs. How old you are. A ton of other things.
> 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.
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.
I subscribe to EatThisMuch for a lot of this stuff. I think calorie counting through meal prep makes a lot of sense and EatThisMuch does a solid job of allowing me to do things like set macros, black list certain ingredients, account for my schedule and leftover preferences and also has a good (but sometimes flawed) integration with whole foods delivery.
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.
>When I thought about getting my food, I really had three goals: cheap, fast, and healthy.
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.
This gotta be a joke right?
Your story is something I would expect form a 4chan greentext.
In case its not: I am happy you can live with this kind of diet but honestly, it just sounds very horrible for me and if I would need to live like that every day I would become very depressed. It's worth to cook at least simple food, just to have some variety in ur daily live and warm meals are so much nicer than eating cold every day.
Yeah, gotta agree here. I've lost a significant amount of weight, which I've talked about before, and I never had to resort to anything that horrific sounding.
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.
I go out for a warm meal every so often. I just don't want to have to do that every day or to have to learn how to cook.
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.
It's good that you found a way to plan meals that works for you and I am not saying that you should stop.
What I am saying is that most people value the variety of food and actually want their food to taste good so I think your plan is not suitable for the vast majority of people.
I mean I am also one of those people who "eat to live" instead of "live to eat" but your plan is just way too extreme. Even I can feel the difference in my mood when I manage to cook every day and get a decent variety of food.
I started to meal prep every sunday and just prepare food that I then heat for dinner and that worked pretty good for me.
I've been hearing about more and more people doing things like this, but I have to ask (serious question, and I'm not trying to be snarky): do you not enjoy eating food? Eating such boring and repetitive meals every day sounds absolutely horrible to me. Granted, I cook almost every day and really enjoy making and eating varied meals packed with flavor, but even then—do you not get bored at all? Do you not get pleasure from eating cooked meals? I think I would go mental on this kind of diet, but I'm starting to think that maybe I'm an outlier, and most people are happy to simply fill their stomachs.
Sure, I enjoy a nice steak like anyone else. But I don't feel the need to have warm meals everyday, and it's certainly not worth the effort to me.
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.
I started at 170, and I'm 5'8 and mid-20s. Down to low 150s now, will probably stop around 130-140 which is closer to the bottom of the healthy range, and then go up to 17-800 calorie range.
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.
If price is your goal you can do better. The melons (expensive) can be replaced with a breakfast of oats (one of the cheapest, healthiest sources of carbs). This can be more filling too. The cottage cheese and sardines can be replaced with chicken breast, or, even cheaper, whey protein.
cottage cheese is typically high in casein, not whey protein. You can buy casein protein powder just like whey, but it is not as easy to mix. My preferred casein alternative is greek yogurt. Oikos makes a high protein one that has 15g of protein. In this study you can see the effects of both whey and casein protein intake -> https://sci-hub.tw/10.1159/000012817. Protip: Eat your greek yogurt or cottage cheese just before bed as it takes upwards of 8 hours for your system to digest casein (2 for whey), helping provide your body with additional protein during sleep. (preserves lean muscle mass)
To echo some of the other sibling comments about this lifestyle- if you're going to over-optimize nutrition like this, and under-prioritize taste, couldn't you just eat Soylent or Huel or another over-optimized food substitute?
I did Soylent for a while, but I wanted something more natural and in line with the traditional "pyramid". Soylent was sort of my default until I bothered to learn the bare minimum about nutrition.
Great application and writeup, thanks for sharing (and making it open source)!
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].
Thank you so much for your kind words! As a frequent reader but rare poster, I find HN more daunting than I probably ought to.
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.
I'm kind of on the opposite side of this, because I like to have a bunch of different meal possibilities and then mix and match during the week based on what I have going on. I think to do weekly meal planning you need to have a very regimented routine and if you have variability in your schedule then it can get tricky to manage.
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.
This is pretty cool and I would totally use/pay for this if it was in a more usable format. Counting calories works like magic, but it’s a total pain as the author outlines. Does anyone know if something like this exists that doesn’t require editing the code directly? ;)
We're working on an app to make it easier using image recognition. It's called Bitesnap and is available on both Android and iOS. I'll probably open up an API to allow you to query your own data soon as well.
Nice write up! I've always found it difficult to keep on top of diet (much more than exercise), so I've ended up using a collection of techniques / tools to stay on track, including a calorie-counting app, intermittent fasting, smart scale, a fitness tracker and macro-nutrient goals.
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.
I think all these tools are missing the most important circle: satisfaction. Food is one of the pleasures of life. Why you treating it like a chore.
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 currently pay for Trifecta, it's ridiculously expensive. The meals are good though, and meet my nutritional needs and keeps my calorie consumption in check.
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?
> This idea changed how I thought about fitness. The simple reality is that you control vastly more calories through what you eat than what you burn through exercise
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)
If you don't eat the calorie it doesn't have to be burned, your exercise to calorie burned is questionable since there is no real way to measure how much you burned doing those workouts and it verys per person based on a number of factors. Even if you did burn 800 calories a day if you consume 3k without knowing it your still not going to make progress on your weight loss goals.
Hosting is not a big expense, though I recently migrated from Linode to GCP for redundancy and infrastructure-as-code (Kubernetes)[1]. This increased expenses substantially.
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.
Joy: once you learn the ropes, it's an order of magnitude faster to add entries. It was designed to be opened for as little as possible each day.
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.
You know, one way to short-circuit all this "we have no idea what is going on with nutrition" business is to build an app where you 1) record what you eat and when, 2) record how you feel and what happens to you physically and when, and finally 3) correlates the two to draw conclusions over time on what ingredients are making you feel which way.
Ate (formerly YouAte) does this pretty well. It doesn't do the correlation analysis for you but it does allow you to easily log the food, whether it's on-track / off-track with your goals, how you ate it, where you ate it, and how you felt.
high protein and low/no carb. You can be more keto (high fat), but the key is to keep your carb bucket low, so your body is oxidizing fatty acids for its fuel source. (rather than glucose from carbs)
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.