

Show HN: Create a perfect meal with linear programminga - jwally
http://mathfood.com

======
ccccc0
Nice job! However I don't clearly understand the Results section. I mean, I
_can_ work it out, but it should be _obvious_.

With your supplied example, here was my train of thought when I hit solve: I
get "Egg whites: 239.05". Am I supposed to eat 239 eggs? Probably not --
that's a lot for one meal. So there must be a unit; grams? well I don't know
how much an egg weighs, plus I don't know the proportion of the white within a
full egg. I certainly won't open Wikipedia right now to solve it!

That said, I love the design, especially the top illustration, so my point was
just: if you can make the results more human-readable, that would help.

------
Detrus
I don't get the final result. It's in grams? I then have to figure out how
many eggs or chickens make up 300 grams? Weighing everything gets annoying.
I'd rather eyeball.

For me it's clearer to work by pictures of the food, like [http://office-k-
chiro.com/wp-content/uploads/2014/02/office-...](http://office-k-chiro.com/wp-
content/uploads/2014/02/office-k-chiro-protein-food.jpg) that's what I'm
dealing with IRL and it's easier to memorize 5 jumbo eggs vs 300 grams.

And by that logic, I'd rather drag and drop pictures to build up the meal, get
the nutritional information after than the other way around.

~~~
jwally
It is in grams.

Watch the video demo from around right here:
[https://www.youtube.com/watch?v=irTdDJ6fu-c#t=97](https://www.youtube.com/watch?v=irTdDJ6fu-c#t=97)

When I'm doing the same problem in the actual tool, there's a "details" button
which pops up a screen telling you the meal's details and how much of each
food to eat.

You can click on the foods in this area and it'll tell you how many eggs 300g
egg whites requires (I actually click on cheese in the video, but you get the
idea).

~~~
Detrus
Yea that's pretty well hidden in the UI. My attention span didn't last to the
end of the video.

------
jentulman
This is generally quite nice. To add to some of the other feedback, I felt it
could do with more verbose help text and more importantly for my brief play
with it, more focus bringing basic staples to the top of results for food
search.

I tried to add just bacon and it took rewatching the demo video and some
guesswork to figure out searching for 'bacon raw' would get to basic bacon.
Trying just 'bacon' or 'pork' only gets lots of babyfood and soup related
answers in the generated dropdown.

~~~
jwally
The search definitely needs work. The food database is from the USDA so the
descriptions are wordy. For what its worth, when you're searching you can use
an exclamation mark to negate a term. For instance "!baby !cere banana" gets
me all banana related foods that don't have "baby" or "cere" in them (which
for some reason is a lot).

------
warcode
I understand the minimum amount for protein while building muscle and the
maximum amount of carbs for keto, but shouldn't the general use-case be to
keep the amount of calories in check per meal?

Making a meal consist of 1400 grams of carrots because there was an automatic
ceiling on chicken due to protein seems silly.

Seems like its a good app, but it needs sane defaults.

~~~
jwally
Thanks for the feedback! I tried showing it in the video (maybe needs more
explanation) but you can set a max and a min on a diet item. Say you want to
eat Egg whites, cheese, potatoes, and ketchup. Because ketchup and potatoes
are both carbs the tool will probably choose one or the other; not both. What
you could do is set a max on the amount of ketchup @ say 28 grams. That way
all of your carbs aren't coming from ketchup.

------
Kiro
This looks really cool but... Carbs, protein, fat and... cheese?

~~~
jwally
:D Was trying to demonstrate that its possible to set boundaries on the food
items you pick. If I set the cheese requirement @ 0 (technically min=0,
max=0), I can double the amount of bacon I get. It allows you to decide which
is more important: Cheese or Bacon.

------
jclos
It looks nice, but I am not sure as to what new things it brings over, for
example, eatthismuch.com (who generates menus from an already populated food
database).

~~~
jwally
Thanks. I hadn't seen eatthismuch.com before. Very clever.

Eatthismuch (from what I've just now looked at) appears to approach the
problem like this: "What are your diet goals? What kinds of foods do you like
to eat? Ok. Here's a menu telling you what to eat."

There's a thing (that's starting to die down now) with nutrition called "if it
fits your macros" meaning that you can eat anything that you want to eat
(pizza, hot-dogs, hamburgers, tacos, etc) as long as your ratios are kept
sturdy. Mathfood helps you do that.

------
jimkri
The only thing I didn't like was, the text over the graph paper. It was a
little hard for me to read. But its a cool idea, I like it.

------
psp
This thing rocks! I always thought about building something similar - didn't
know it's called linear programming though.

------
joeyspn
Looks interesting... How is this different than MyFitnessPal + a Macros calc?
is open source?

~~~
jwally
Open source? The LP engine is, but the site probably has a bit of code stink
in it @ the moment. Once I get some time to clean it up, I might open source
it. Benefits to open sourcing?

Not super familiar with MyFitnessPal, but MathFood allows you to say "I want
waffles, eggs, and bacon for breakfast but I want to keep to my super strict
diet ratios. How do I build this meal to hit those ratios?".

~~~
gabemart
What's the LP engine please? Thanks!

~~~
jwally
Can't promise its pretty but:
[https://github.com/JWally/jsLPSolver](https://github.com/JWally/jsLPSolver)

------
jwally
Would love some feed back on my first web-app. Thanks!

~~~
slykat
Technically, I should be really interested in this app as I've been spending
the last few months trying to hack my diet. However, I tuned out after a few
minutes. Specifically: * There is a huge wall of text. Most users (or at least
me) want to learn what the product is by playing with it, not by reading. *
Lots of form fields before you get value. I looked at the start point and
immediately walked away. A large form scares away users. * It's weird that
your height input only takes total inches instead of the normal feet + inches
(users don't want to do math) * Not sure what the value is here - if I'm a
consumer and I actually know the % calories across carbs, protein, and fat
then why would I need this app? people who have a metric for that (like I do)
probably fall into a really small niche of health obsessed people who already
know how to make their diet hit their targets. I use myFitnesspal and I know
exactly how to hit my targets.

Basically my summarized feedback is focus on the UX and a broader demographic.
This is an awesome problem to tackle and I like your approach but I don't
think many people could benefit with it the way its currently setup.

FYI this is awesome first web app - the amount of functionality you've
provided is awesome.

~~~
jwally
Awesome points. Thanks for the feedback. You're right, target audience is
pretty niche. Bodybuilders, figure athletes, gym rats, etc.

I probably didn't communicate it well but the value of the tool is this: How
do you build a meal that meets your diet goals (fat, protein, carbs) given
that foods have a mix of each type.

------
GvS
Very nice, but it's missing units in Results.

