Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Fixing a horrible diet as a programmer
27 points by baddiet on Oct 6, 2010 | hide | past | favorite | 32 comments
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?




Are you sure it's your diet? I'd investigate lack of exercise before worrying about diet.

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.


Completely Agree with the exercise part of this - I exercise before work most days, and it's unbelievable how much of a difference it makes. I also try to go for a walk around lunchtime rather than staying inside to eat.

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.


This works great up until about 35... after that you just can't put that kind of 'fuel' into your system and snowboard all day and feel great. For me (post 35)I like to eat a good omelet before I hit the terrain park; plus I don't have to stop for lunch with a belly full of protein.


I am over 35 and feel fine putting that kind of fuel into my system when I go snowboarding.


Cool, are you in Colorado? We should ride sometime.

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.


I have never been to Colorado. I mostly snowboard at Mammoth, but I moved to the east coast. I really only eat the nachos because that's the easiest thing to get at the lodge...


Ah, gotcha, that's cool. Well if you are ever in Colorado ping me, seriously awesome mountains to ride and echo mountain is (I think) the first terrain park only hill in north america. fun stuff and a helluva workout too.


Ding! I don't exercise. I've gone along with this myth that if you're thin, you don't need to as much. I'll be changing that up!


My first suggestion would be bloodwork. If you are deficient in certain minerals, it can really screw with your energy levels. As the adage goes, you can't improve what you can't measure. Start with a baseline, to make sure there isn't any particular deficiency you are fighting against.

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).


Blood-work/full physical is a good suggestion to start with.

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.


Two places to start:

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.


My metabolism is similar, unless i am eating something (like pasta) that causes my blood sugar to seriously spike, I will not feel hungry, I will just kind of start to drag as the day goes on. The key is to train yourself to pick up on when you are starting to drag, and then go eat something. (I'm still working on this, it is something I have to consciously recognize).

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.


As some others below mentioned, I suggest getting in some exercise. Sitting in front of a computer and coding/debugging/yelling at the computer all day gets a bit stressful and its probably wears you out. Even a short 15 minute morning routine worked great to to get me going to a have a good productive day.

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.


I find that my health is best when I pay attention to exercise, sleep, and diet. If you work out hard enough you'll crave whole foods and uninterrupted sleep. If you consistently give those things to yourself you'll feel great.

If you live on 5 hours of sleep a night and minimal exercise you won't feel great no matter how healthy you eat.


It's not so much the food as the consistency of eating. The advice you've received is correct: eat small meals or healthy snacks periodically. And as you've found out, it's easier said than done for some people.

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.


Yeah, this is definitely what I go through. No appetite and eating dinner is sometimes the first full meal of the day. Some days doing that doesn't affect me. Others, there's a serious hit.


I suggest a Primal diet (meat, veggies, fruit, nuts) and drink water and unsweetened tea. Avoid grains and beans. That sort of diet lets your body adjust to your "proper" weight. For exercise, just do some body weight stuff, pushups, plank, squats, and some walking... no crazy cardio.

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.


I'd say eating enough salad and meat, trying to avoid tons of bread and fried stuff works well for me. Although, i still gain weight if i don't exercise. Gym + sauna is an awesome beginning of the day. You work out in the morning, blood is starting flowing and delivering oxygen to your brain, sauna & sweating takes tons of toxic things out of your body, and you eventually start feeling a whole lot better.

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.


The lack of energy rings a familiar bell to me. I started feeling tired after I ate several years ago. Actually, not just tired, but wiped out. Exhausted. I tried changing all sorts of things related to my diet, but finally saw a nutritionist and doctor who were able to run some tests.

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.


The first step is to understand what biological processes affect hunger and energy levels. I'm going to butcher the details for simplicity's sake, so please do further research yourself.

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.


Thanks for all of the suggestions so far.

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.


I'll add my two cents.

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.


Agreed. I usually eat dinner around 7pm. Scrape by with barely a breakfast or apparently not enough of one, and then won't go out for lunch until 2-3pm. At that point my stomach isn't growling, but I feel spacey. Thanks for the suggestion for balance. ...lacking this, too.


Lots of good suggestions here.

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.


Keep the fruits and nuts and ditch the steak. But a big yes on the exercise. Consider yourself lucky that you don't have to get into a "food fight" with yourself.


Its the same way for me. I have to consciously decide to eat something good. Otherwise, I'll fill up on small things that don't give me much energy.

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.


The best thing you can add to your diet is a good omega three supplement. The best, unsynthesized cold-pressed fish oil you can find.

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.


Since you haven't really specified what you eat (apart from the fact that you have a meagre breakfast and sometimes steak for dinner), it's hard to know where to start. But I'd agree with maxawaytoolong about thinking about exercise if there's nothing obviously wrong with your diet.

Or, y'know, drink more coffee.


As far as food in any given day, I'm likely to have a grilled chicken salad for lunch (not consistently, though). Dinner maybe 3-4 days of the week (which are often big). Usually no breakfast or something unfulfilling from McDonalds when I do eat. I've started adding in raisins and various fruit to start the day, but I'm wondering how many apples do I have to eat in order to feel some kind of way! Perhaps, I'm wrong for thinking I should always be full.


I would recommend you to exercise everyday, as important as diet to get energy, just choose what you like to do and do it everyday.

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.


While I'm sure we all have opinions on the matter, you might do well to consult a nutritionist or your primary care doctor. They'll know your case history, your peculiar health quirks and can give much better advice than the lot of us.


maxawaytoolong could be right. very often people (read "me") feel like have no energy because of too little physical activity.

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 :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: