Hacker News new | ask | show | jobs
by newbear 2998 days ago
So where’s the meal plan app? ... I had similar idea and started with a spreadsheet, I havnt finished yet but thought the problem was interesting and would like to see how you solved it. My idea was to have a list of recipes that you pick for a meal plan and the app would output the grocery list.
2 comments

Mine was really simple, I basically created a SQLite DB with all the recipes I like and where to look them up from. Then I had an interface that would randomly pull the recipes out of the table and assign them. It was basically like (select 1 meat, 1 side, 1 starch, unless it was a one-dish-meal like lasagne).

I ran into a bunch of problems with generating pretty much the same meal multiple times per week. So, I then inserted a "likeness" score for how much I actually liked that item (ex/ brussels sprouts were a 2, sweet potato fries a 9), and then used that as a seed for the probability of showing up.

It was super personalized and I recently found Big Oven which is actually much better than what I had done (it also generates grocery lists and can incorporate random food blogs). The one problem with that app turned into another side project. They limit how many recipes you can OCR into their app. So, my workaround was to create my own "food blog" by uploading a bunch of static sites on my personal website and then linking them. (because food blogs are free to link).

This is a hard problem... I also wanted to do something similar for years, but EatThisMuch beat me to it and did a fairly good job.

It's challenging because you can't optimize using continuous variables, since you aren't going to eat 0.001283834 of a pizza for example, or 4.910 cans of tuna because your below your protein target. You have to deal with whole numbers, and moreover the results need to make sense and not taste like garbage.

I remember reading something from the creator of EatThisMuch that stated in the early days he would actually get silly things like that... here: eat this 28 cups of cottage cheese and you've hit your targets!