I was recently diagnosed with type 2 diabetes, and with this disease, almost everyone talks in terms of an exchange diet. An exchange diet requires a fair amount of bookkeeping to manage, and foods are broken down in terms of exchanges in large part so you can easily track carbohydrate intake. The other foods are necessary to keep up your calorie intake and in general, balance your nutrition.

I don't claim this is an original idea. There are various online exchange calculators, the best of which is here. But I've been puttering with Perl Tk and this seemed a suitable project.