So I'm coding a nutrient calculator.....

If your interest doesn't fit anywhere else, leave it here.
Post Reply
the_legacy
Posts: 6
https://cutt.ly/meble-kuchenne-wroclaw
Joined: Thu 08 Sep 2005 00:01
Location: New York
Contact:

So I'm coding a nutrient calculator.....

Post by the_legacy »

Yep. I am a Computer Science major taking a course this year, CS351, Web Development and Internet Programming. We have a project to do for the class and I decided I'm going to code a nutrient calculator in Perl. =)

The old one that used to be up doesn't seem to work too well and the results are just illegible for the average person.... some of the results are just too specific and it kind of overcomplicated things.

Mine is going to be pretty simple. It will present you with a list of all the basic vitamins and minerals, caloric content, sugar, fats and proteins, etc present in the foods you enter. I want to have the results come out in the form of a horizontal bar graph as a percent daily value along with the numbers. It should be pretty cool. This will be hosted on my server at school for all to use. (and hopefully it won't get too much traffic to the point where they pull the plug on it... lol).

I bought a book with a great collection of foods for me to compile into it. I'm going to start with fruits.. then I will add nuts, and eventually whatever other foods I feel worthy for human consumption. :)
User avatar
Oscar
Administrator
Posts: 4350
Joined: Mon 15 Aug 2005 00:01

Re: So I'm coding a nutrient calculator.....

Post by Oscar »

Great idea! :)

The pull-down menus worked fine for me, but if you can parse all the possible entries, that would be better. I would be interested in averages anyway, so 1 banana instead of x grams banana.
Brian
Administrator
Posts: 74
Joined: Mon 18 Jul 2005 00:01

Re: So I'm coding a nutrient calculator.....

Post by Brian »

Good idea.

To save time you might consider ripping the raw data out of the existing calculator (it's in the source).

As for your interface, a simple interface by default is great. But I suggest leaving an option for a "full view" if people want.

I personally like the dropdowns because I can see exactly what is available, and I don't have to worry about spelling differences.
But it might work to parse out natural text and then if you can't parse it to provide them with a list.
the_legacy
Posts: 6
Joined: Thu 08 Sep 2005 00:01
Location: New York
Contact:

Re: So I'm coding a nutrient calculator.....

Post by the_legacy »

Thanks guys!

Yeah I was thinking that I would have a link that you could click which would open a popup window showing all of the available foods in the calculator as well as their default values.

Then, for example, a default value would be one serving. So if your parameter was just "banana", it would calculate for one average sized banana. And if you typed "2 bananas" it would do 2 bananas. Or if you typed "400 gram banana" it would calculate for 400 grams of banana, and so on....

But yeah, spelling mistakes is the biggest problem because I simply won't be able to address them. :p

Perhaps there is no harm in making either input method possible.
Post Reply