I love to eat! In fact I eat a lot! And I have the great fortune to be the partner of one marvelous chef
that cooks amazing meal almost every day!
But I’m a hacker, I like coding even more then I like to eat. So I spent most of my time sitting in front of a computer without any apparent movement, eating stuff and drinking a lot.
So what I eat everyday is important to me, but I’m not a grano-hippie carrying my bag of nuts and dried fruits. And I believe any diet or restriction on the aliments you can eat are the biggest bullshit ever. What I do is a quick check of the nutrition facts label of each product I buy at the grocery.
Fat
I don’t really check the fat quantity. Saturated fat should be low. But the important thing is Trans fat should be 0. Almost no product with trans fat ever enter my house. This type of fat is transformed in a way your body can not recognize it as fat, so it won’t end up in the right place and it’s not the type of fat you can loose by exercising. It’s there forever, like Microsoft hidden libraries when you install Office!
Sodium
This one is important because it’s high on several products that are low fat or low calories. If it’s low in fat but has more then half your daily value in sodium (often the case for dried noodle soup) it’s a no-no, it would be like eating salt!
Protein
Ever wondered why drinking a glass full of fruit juice will keep you hungry and only one apple can sustain you for a couple of hours ? That’s because the juice doesn’t hold any proteins. Proteins expand in your stomach and make you feel satisfied. If a meal hold lots of proteins you won’t need to eat as much to get going!
Code samples
If you find this boring just read the code bellow, it’s a simplified version of the algorithm in the language of your choice:
Ruby:
def eat?(product)
product.trans_fat == 0 &&
product.sodium < 1000 &&
!product.proteins.empty?
end
Python:
def eatable(product):
return product.transFat == 0 and product.sodium < 1000 \
and len(product.proteins) > 0
C#:
public bool IsEatable(Product product) {
return product.TransFat == 0 && product.Sodium < 1000
&& product.Proteins.Length > 0;
}
Lisp:
(defun eat? (product)
(and (= (trans-fat product) 0)
(< (sodium product) 1000)
(/= (array-total-size (protein product)) 0)))
Closing tips
Even if you have to eat frozen food for lunch there are some good choices out there, just check out those 3 things. Plus, fruits and vegetables are always a winner. But cutting, wrapping the thing can be pretty annoying. To bring back excitement, joy and extaze to your meal think about trying new fruits like: asian pear, dragon fruit, kaki, kiwi, mango… OK that’s enough I’m starting to dribble.
Now what are your tips on being an healthier hacker ? I’d really like to know! Or maybe you’d like to contribute to the translation of the (really complex!) algorithm (or correct my poor lisp coding skills). Please do, I’ll add it with due credit!
Bon appétit!
Warning if you’re gonna submit some code in the comments:
My friend wordpress.com seems to eat some part of the content when we use < or >. This is stupid, but if you’re going to submit some code in a comment, replace the < by < and > by > or just send me your code by email at macournoyer_AT_gmail.com. Sorry for the inconvenient.