Ask HN: Fixing a horrible diet as a programmer
Lately, I've been paying more attention to how much work I'm doing as a programmer. I get things done, but I feel bedraggled. I'm 25, but I lack the energy you figure a 25 year old would have. The cause? My diet sucks. I typically wake up, start coding, have a very meager breakfast, eat lunch fairly late, and then sometimes, have a big dinner (steak, etc.). My energy levels are never consistent, however. I do know I have a high metabolism, though, and this clashes with any serious eating I'll do even on the days where I eat three meals a day. In the event that I do eat something heavy, less than 2-3 hours later, I will feel as if I haven't eaten.
I've been told to keep snacking (fruits, nuts, etc.) throughout the day, but I never seem to actually be eating enough to not feel washed out. The key is that I never actually feel hungry, though.
I've been trying to figure out how I can do better with my diet as a programmer. A lot of things I've read are aimed at losing weight. I've been the same weight +/- 5lbs. for the last 10 years at least, so that's not my concern.
Does anybody have any recommendations for foods programmers should be eating to maintain energy levels?
(
32 comments
| 27 points
| on HN
)
In my experience the act of sitting in front of a computer all day just makes me feel lethargic, no matter what I eat. I went on various forms super healthy diets and none of them really changed anything. I generally felt much better when I went to the gym for 2 hours before going into work. However, I felt even better on the days I didn't go into work at all.
I can eat garbage like nachos, beer, french fries and go snowboarding all day and feel on top of the world. I determined that sitting around all day is a slow death, and my body was letting me know.
In terms of diet, I try to eat smallish meals every 3-3.5 hours. A nice mix of protein, complex carbs, vegetables, fruit, healthy fats like nuts etc works for me. I found the best way to avoid eating unhealthy stuff was simply not to buy it - sounds stupid but it's crazy how long it took me to do.
Each there own on 'fuel' - that doesn't work for me and truthfully I just don't have the urge for that kind of food much these days, esp. if I'm about to go hiking, boarding, hockey, etc.
After that, it's all about balance. I use the iPhone app 'Lose It', which tells me my percentage of calories from fat, protein, carbs and alcohol. It also provides a companion website which shows you graphs of your intake, weight, etc... I find having my dietary data available has been the single biggest improvement in my ability to manage my weight. Though in my case, I've been desperately trying to loose weight. I have lost, and kept off 35lbs over the past year. (No, I have no connection to Lose It, just a very satisfied user).
I'd second the need for working out, or at the very minimum getting 'active'. You might find it's better to do something like play a sport, or take up swimming versus 'working out'.
I would also recommend taking a multi-vitiamin. Hit your local WholeFoods or Vitamin Cottage (or something similar).
Other than that, adjusting/being more conscientious of what you're eating is something else to get on. Making small adjustments can go along way. For example, I always eat a salad with my dinners - just a habit of my up-bringing. You might consider ordering fruit or even coleslaw instead of fries. Or brewed tea instead of a Coke.
Making small adjustments like this goes a long way. Once you get the ball rolling in the other (healthy) direction it gets easier; suddenly that rock-climbing class you always thought about doing seems like a fun way to spend Saturday instead of more inactivity.
Of course it's all about balance... inactivity can be a good thing if you are doing things like learning to play an instrument, reading a good book, or just enjoying your family/friends company.
1. Get your Vitamin D levels checked. I started to run into the same problems in my 20's and as soon as my Vitamin D levels were checked and supplemented, I've been all set. But it took over five years before I got to that point.
2. Don't buy packaged foods and start eating whole grains. You need foods that digest more slowly and refined grains and sugars need not apply. I highly recommend quinoa. I can have a bowl for breakfast and I'm good to go all day. It can be prepared with fruits and nuts or vegetables and yogurt. Also look into steel cut oats.
I kind treat my diet as a dynamic programming problem. You have a few variables to think about:
Price of food Speed of digestion Ease of preparation Nutritional content
You can give different categories of food different values, and kind of estimate what things have better min/max heuristics.
Eggs are a very good morning food, for example, they're cheap, high in protein (therefore nutritionally good and digest slowly), and they're easy to prepare. Plain yogurt is similar.
You can do different things to get your ease of preparation and get price down. I can make a fairly healthy chili with lean ground beef and various veggies. It is mostly meat and fiber so it digests fairly slowly, and is high in protein. Normally it is relatively intensive to make it (takes me a couple of hours of time). However, if I make a big batch of it at the beginning of the week, I can freeze part of it (in reusable serving size containers) and eat it whenever. The preparation difficulty becomes similar to that of a tv dinner but it is cheaper/healthier. (Similar can be done with other soup/stew like concoctions).
I also keep a tin of nuts on my desk next to the computer if I need a quick pick me up.
I am somewhat in a similar "lack or energy situation". I used to be very good about having consistent exercise schedule, I felt great and productive during coding. Then about a month ans a half ago I have significantly increased the amount of free time I spend on my side project which resulted in the sacrifice of exercise, a more destabilized sleep cycle, and more stress.
The first 3 weeks after a change of schedule were ok, but then I was starting to feel more tiered and a bit unfocused even after stabilizing my sleep. As the only thing that changed about what I did was the exercises, I think that played an important role.
As I have no knowledge in the magic of supplements and nutrition, but only have my experience, I would suggest throwing in some regular exercises and see if that help.
I do know that suggestion is a bit hard to start on, as I myself have so far failed at dragging myself back to the gym after not being there in 1.5 months.
If you live on 5 hours of sleep a night and minimal exercise you won't feel great no matter how healthy you eat.
I sympathize: I used to be ungodly thin, with a lightspeed metabolism and no appetite at all -- often my first meal of the day would be dinner! When I started lifting weights I had to learn to eat enough or I was constantly feeling faint. Get used to eating. Keep snacks already prepared and eat at fixed times during the day. I ate a lot of apples, tuna sandwiches and lots & lots of milk. IIRC, I even set an alarm to tell me when it was time until I got used to eating regularly.
The good news is that once you've done it for a few weeks, it becomes second nature.
For more info, I like marksdailyapple.com (no affiliation) They've got buku info there and a very active community. I've been losing weight on it but I was overweight... I've got all day energy though so it's a win-win for me.
The other recommendation is sunshine. Go walk around 1-2 times a day and soak up the good stuff.
Although, having a chocolate bar when working long hours to keep your brain awake works well too. From time to time, i'd say, but not on a daily basis.
A stool test and a genetic test confirmed Celiac disease--meaning my body was having an autoimmune reaction to eating wheat, barley, rye, and (non-certified gluten free) oats. Celiac disease/gluten intolerance is NOT an allergy and will not show up on a typical food allergy test.
If you're having fatigue after you eat, I cannot recommend strongly enough that you see your doctor and specifically request a stool test and genetic test for Celiac disease. (There's also a blood test, but it doesn't work for everyone.) You may find you have it--1 in 133 of us do, but in America 95% go undiagnosed. Or you may find you have its lesser form, gluten intolerance.
The only cure is to completely 100% avoid gluten. It is tricky, but well worth it in terms of energy.
I also suggest that anyone who has Type I diabetes, Crohn's, colitis, lupus, or general digestive issues get tested for Celiac/gluten intolerance as well (via stool test if at all possible.) The tests are painless and if you find out you do have it, other weird symptoms like fatigue and joint pain may disappear if you eliminate gluten.
Celiac disease and gluten intolerance are genetic, so if you get tested and it's positive, your family members should test, too, even if they have different symptoms or no symptoms.
You get hungry and/or tired because your blood sugar is too low, and your cells are craving some energy. So you eat, and your blood sugar rises. Your body then produces the insulin to turn that blood sugar into usable energy in your cells, and you regulate to a normal, satiated, energetic state for awhile, until your blood sugar starts to drop, and you become hungry and/or tired again.
The reason snacks are recommended is because it's not just what you eat, but how you eat it. If you spike your blood sugar (e.g. eat a bag of candy), your insulin will also spike, reducing your blood sugar to "I'm hungry and tired" levels again before you're actually in need of more food. It's a regulatory system, so your body overcompensates when you introduce a shock to the system.
It will take you time to adjust to a better system, because you're purging your habitual behaviors, and your body will resist this change even though you know it is beneficial.
I highly recommend looking into the "south beach diet". The only "diet" part of it is the first two weeks, when you effectively quit simple and refined carbohydrates (which break down into blood sugar far more quickly than fats and proteins, and therefore create spikes in your regulatory system), and break the addiction you have to an unhealthy cycle. You'll have to force yourself to eat protein in the morning, eat when you're not hungry, eat vegetables, and generally retrain your body with all the normal "diet" behavior.
You only have to do this for 2 weeks (and it's not too hard to do any diet for 2 weeks). After that, you've effectively returned your system back to a normal state. Then it becomes about re-introducing a lot of the things you enjoy, but approaching them with a full understanding of how your body is processing them.
This, of course, assumes your problem really is nutrition. Sleep cycles (and deprivation), exercise, light exposure, and more serious medical conditions (see your doctor, I am not one!) can also be contributing factors.
I know you didn't say you wanted to lose weight, but I want to share that the south beach "diet" (really, "lifestyle") helped me lose weight and, far more importantly, keep it off for the past 3+ years.
I'll admit I don't exercise nearly as much as I used to. After college, I moved from a big city where everything was within walking distance to one where a car is necessary for everything--no widespread public transportation and not bike-friendly. In that, I've totally fallen off my walking regimen. Out of boredom back in the city, I'd walk 2-3 miles a day (even though a perfectly good train system was in place) and come back feeling great. I never realized it mattered so much!
My eating habits weren't entirely different then, but I got out more and did walk so the exercise was there.
Will still go visit a dietician, but also go back to walking and taking all of these food suggestions to heart.
Have a good substantial but well balanced breakfast. There is a reason they say it is the most important meal of the day. Assume that on average that you have dinner around 5pm or 6pm. Skipping breakfast or having a meager breakfast and then a late lunch (1pm or 2pm?) means you haven't eaten for about 20 hrs. A big dinner won't carry you through that much time.
I'll also agree with the other suggestions I've seen. Consult your doctor, and make sure you're getting enough sunlight and physical activity.
Try to balance your life.
Specifically for breakfast, there are a lot of ways of getting an awesome breakfast without spending a lot of time. Spend one evening making eggs in muffin tins (http://www.suite101.com/content/mini-vegetable-frittatas-a27...), freeze them, then in the morning, pull out two and microwave. Getting a good breakfast + exercise (outside, in the sun) should help a lot with energy levels.
I try to have an apple or a few handfuls of grapes a day. They're small and only take a few minutes to eat. Plus, my energy goes right up after the meal, in a way that feels good. Not all jittery, like after a double espresso.
You will find your mind more alert within hours of first taking it if you are like 95% of westerners that are severely lacking this essential brain food.
Also, you probably need more exercise, less coffee, and more water.
Or, y'know, drink more coffee.
Start very very gradually, first day just get out of the office, second day one minute, trird two.... Take 30 days for making it a routine. You will feel stronger and happier.
your body always gives you what it thinks it need (=which is what you demand, or not, from it). so doing some sports may solve that issue quite easily.
for the diet: if you don´t eat for long amounts of time like more than 4 hours, that´s not good, ecspacially if you eat big amounts afterwards.
another important thing is what you eat. try to cook something. fast food is just as bad as easy and comfortable it is. hope that helps a bit :)