Thanks to the good graces of
I now have my very own
web page. Isn't it hip.
I have written open-source free nutrition software,
which records what you eat and
meals for nutrient levels in terms of the "Daily Value" or DV
which is the standard for food labeling in the US.
The program uses the
free food composition database
This free nutritional analysis software was written for desktop systems and
uses Tcl/Tk/SQLite. If your system does not have Tcl
and you don't know how to get it, check out the free
(community) version of Tcl called ActiveTcl from
By experimenting with NUT, you can find the optimal level of the various
nutrients and how to implement this with foods available to you.
NUT can help reconstruct the lost instruction manual to your care
and feeding because, when the authorities and crackpots disagree on the
proper human diet, you can design an experiment using the food
composition tables to discover the truth!
Features of NUT include:
The complete USDA database, your personal data, and the program code all stored in a portable SQLite database
Foods easy to find and add to daily meals
Configurable for 1-19 meals per day and
any dietary plan--including ketogenic, low carb, zone, low fat
Comprehensive meal analysis for any number of consecutive meals
Presents both easy-to-read percentage summaries and
in-depth nutrient analysis,
including Omega-3 and Omega-6 essential fatty acids
Calorie Auto-Set feature uses linear regression on daily scale measurements of weight and body fat percentage to find optimal calorie level for improved body composition
Allows recording of recipes and customary meals for fast data entry
Sorts foods richest in each of the 150 nutrients
Reveals which foods contribute most to user's nutrition
Runs on Linux, Windows, and Mac using Tcl/Tk, a freely available and
scripting and GUI language
The price is right--it's free!
And you can read and modify the source code.
If you just want to "track" nutrients, there are a zillion applications and
web sites to do it. NUT is for the person who wants to actively experiment
and change diet toward the optimal, not just "track" it. When you make a
dietary change, say lowering carbohydrate, you will experience benefits but
you will also experience problems, and you will have to make other
changes in order to solve those problems.
It is like computer performance tuning: after you fix the biggest
bottleneck you then see the second biggest bottleneck that was behind it, and sometimes you have to read about the hardware and software to guess what the problem is.
There are a lot of nutrients
you will have to look at and a lot of tough food choices you
will have to make.
NUT is the best tool for the job because I designed it to optimize my own diet, and I have used it and maintained it for years, adding necessary features and discarding useless features as I saw what works and what doesn't.
NUT is both an experimentation tool that can help you determine your optimal
diet and a meal-planning tool that lets you experience
the optimum as often as you wish. NUT can be used for tracking but NUT is
mostly about planning what you are going
to do and then actually doing it to see if it works.
Just about any eating plan will feel optimal when you are losing weight; it is when you are trying to
maintain an ideal weight that the sub-optimal plans always fail and start pushing you toward obesity or frailty, or else destroy your mood.
You need to know what an optimal plate of food looks like and what really
matters on it. Just eating what is supposed to be "healthy" is no match for
actually determining what makes a detectable difference to your well-being.
No MD or diet guru is going to do this for you, although they can offer clues where to look.
Give your body a tune-up with NUT. Like everything else worthwhile, nutrition is a learn-by-doing skill, and book learning doesn't get you very far in developing problem-solving ability.
To begin: Nonjudgmentally record everything you eat for a couple of weeks to
establish a baseline.
Make a change to see how you feel. If there is no improvement, revert.
The best changes are those that actually teach you something, such as consistently eating too much
protein within your calorie level and then consistently eating too little protein
within your calorie level in quantities measured so that you know where the optimum is because you know how it feels above and below.
As you go through the nutrients, it's analogous to learning how to arrange the logs in the fireplace to get the biggest,
longest-lasting fire (with the least damage to the fireplace. Don't we want to feel good in this life?)
the newest version of NUT, NUTsqlite-1.9.3.zip. You will also need the USDA database, sr27nut.zip, or you can get the database from the USDA.
NUTsqlite is portable across Windows, Mac, and Linux thanks to Tcl/Tk; however, that doesn't mean there aren't quirks on the various platforms:
Windows: No complaints so far.
Mac: The launcher for Tcl doesn't seem to set a sensible working directory, so either hard-code the full path name to "nut.sqlite" in the Tcl scripts, or else run the scripts from the command line (Terminal). Email me if you don't know what I am talking about.
Linux: Running on a normal high-resolution monitor requires magnifying the GUI for legibility, but there are bugs in Tk when it is not at its native resolution (click once on a scroll-like widget and it just keeps going!). Therefore, if the bug bothers me,
I run at a lower resolution than I might otherwise and I don't change the value of the appSize variable in "nut.tcl" to get a bigger GUI. However, I get fairly good results with an appSize of 1.4 and a screen resolution of 1280x720.
Ubuntu: A user had to "apt-get install libsqlite3-dev libsqlite3-tcl" to get NUTsqlite to work.
Android: There is an Android version of Tcl/Tk from http://www.androwish.org. If you want to try it, let me know how it works with NUTsqlite because I don't have an Android device to test on.
the legacy C/C++/FLTK version of NUT, nut-20.1.tar.gz. This version compiles easily and provides essentially the same functionality as the Tcl/Tk/SQLite version. You will also need fltk-1.3.2-source.tar.gz, the graphical toolkit this version uses. The console program in this legacy version (which doesn't need FLTK to compile) automatically writes a version of the meals database that can be read by the new Tcl version to preserve your personal data. I don't plan to make any further updates to the legacy version of NUT.
In this 2004 paper, D. Richard Hipp lays down the plan I stole for NUTsqlite. I worked on four versions alternately, C++/Qt/SQLite, C/GTK+/SQLite, C++/FLTK/SQLite, and this one, and whenever I became disenchanted with what I was doing, I would switch to a different version. D. Richard Hipp's plan came out on top because I enjoyed working on it and using it more than the other versions, so it was the project that I actually finished. Also, Tcl performance is surprisingly good without threads, because tasks can be atomized using variable "traces" so that only small parts of an algorithm run when necessary and complete quickly so they don't block the GUI.