Artistic Display of Units of Measure

When I started this project, I viewed it as a straight-forward logic puzzle. I was tasked with creating a system for unit conversion within Gnome Recipes. This is of course math, a subject with which humans and computers find a lot of agreement, and a task in which computers excel (no pun intended). But a subject with which humans have natural talents, and in which computers tend to flounder, is grey area, and it’s just such an area I find myself in now. The converting of units is straight forward. A teaspoon is 4.96 ml all day, in every universe. It’s easy to take a recipe that calls for a teaspoon of something, and make it say 4.96 ml of that thing instead, but what gets tricky is when you envision yourself looking at this recipe. How do you pour 4.96 ml of soy milk? Do you have that kitchen tool? In that case, the answer is obvious, round up. .04ml is so negligible it could almost never make as much difference as the humidity in the air, or the altitude where you’re cooking. By the time you get up to a quart though things are already trickier. A quart is 1.13652 l. Do you round down and lose more than 100ml? Do you keep it as is and expect people to be measuring hundred-thousandths of a liter? When is it appropriate to round vs where do you need to be exact. You could specify certain ingredients as roundable, curry powder: yes, bakers yeast: no. But such a canonical endeavor would certainly step outside of my scope of authority in this small project. Another option is to allow ingredients to be selected as roundable or not-roundable by their author, though this often brings us back to the same problem, if a reader is told to pour 1.13652 liters of soy milk, do they pull out electron-grade measuring equipment from their kitchen cupboard, or do they just end up doing the rounding themselves, regardless of author requested? The third option is a display one, to show the approximation, show that it is an approximation, and find a way (such as on-hover) to display the exact amount, unrounded. I like the third option best, but they all have merit, and I bet there are other solutions I haven’t even thought of. It’s nothing too complex to come up with an elegant solution to, I just found it interesting the way art creeps into science, and how in a way that mirrors the very act of cooking.

Leave a Reply

Your email address will not be published. Required fields are marked *