Brain-friendly Food for Programmers

Healthy food plate

Eating healthy is one of the best changes that you can make in your life. It will not only increase your performance while coding but will help you reach your goals faster and make you happier.

I was always interested in nutrition and healthy diet. In addition, I learned a great deal about brain-friendly food during my online poker career. So all this knowledge translates beautifully into programming.

This is how I would summarize this article in a couple sentences:

A healthy diet leads to a better body and a more functional and alert brain. Which leads to increased performance at work and better code.

#Carbohydrates and the Glycemic Index

To be sure the carbs you’re eating are clean and beneficial to you, it’s necessary to understand the differences between good carbs, which should be the staple of your diet, and bad carbs, which should be avoided.

The most effective way to categorize carbs is with the glycemic index (or GI). GI reflects the rate of absorption of a carbohydrate into the bloodstream, and the effect the food has on blood glucose and insulin levels.

Good, brain-friendly carbs have a lower GI value, whereas bad brain-draining carbs have a higher GI value. All foods are assigned a GI value. Food’s GI value is ranked from 1 – 100.

What do GI values mean?

The higher the value, the faster the carb is absorbed into the bloodstream and the greater the blood glucose and insulin response. It’s best to avoid high-GI foods for the most part.

#The blood sugar roller coaster

Your brain uses around 20% of your body’s carbohydrate requirements, making carbs a staple of efficient brain function. To be sure brain function is optimal, it’s essential to keep your low-GI carb intake steady and to keep high-GI carb consumption at a minimum.

So why are high-GI carbs so unfriendly to the brain?

High-GI carbs, such as junk foods and highly processed foods, are usually digested, converted to glucose, and absorbed much faster into the blood. On the other hand, low-GI carbs are digested, converted to glucose, and absorbed into the bloodstream at a much slower rate.

When glucose is released into the bloodstream, it triggers the release of insulin, which is the critical component that decides how we utilize carbohydrates. Insulin is the hormone that allows blood glucose to be transported into the muscle and liver, where it is then stored as glycogen.

While all this may be meaningless to you, the fact that constant insulin levels in the blood make the brain function more optimally is critical.

If carbohydrate intake is irregular, or higher-GI carbs are consumed, blood sugar and insulin levels become erratic. This “blood sugar roller coaster effect” is harmful to your mental processes while programming. Concentration, energy, focus, and mood all suffer.

In other words, if your carbohydrate intake is irregular, your overall ability to think takes a nosedive.

#GI value chart

To be sure you’re eating a diet designated for solving coding challenges, make sure that carbs you’re eating are below 70 GI value carbs. At the same time, you should consume these carbs throughout the day to keep your insulin levels as constant as possible.

Low to moderate GI foods include fresh fruits, whole grain, bran cereals, fresh vegetables and dairy products such as milk, yogurt, cottage cheese.

Here is 100+ foods GI value chart.

#Water and hydration

It is crucial that you maintain a sufficient level of hydration to ensure proper brain function. While your brain comprises a tiny percentage of your body’s total weight, it receives about 20% of your total blood circulation. And 90% of blood is composed of water. Therefore, this should illustrate just how closely related hydration and brain function truly are.

Even a dehydration level of 1% can adversely affect your cognitive abilities, short-term memory, and attentiveness! Ideally, you should never feel thirsty, but if you do – drink some water immediately.

In order to ensure sufficient hydration levels, the standard advice is 8 x 8 oz. glasses of water to keep your brain in peak condition. However, if your activity levels increase your fluid intake should as well.

You may think it’s too much water and you will go to the bathroom every hour. But that’s actually a good thing. Bathroom breaks will force you to stand up and stretch your legs, and you’ll rest your mind as well. Therefore, being over-hydrated sure beats dehydration.

#Essential fats

While you should avoid bad (hydrogenated) fats, one of the most common misconceptions about nutrition is that fat should be avoided at all costs.

While you should minimize fatty foods in general, there are many essential fats that your body and brain need to run efficiently. These are more commonly known as essential fatty acids.

You may have heard of omega-3 and omega-6 fatty acids, commonly found in fish, fish oils, and flaxseeds. These are critical for digestive efficiency as well as for many other bodily processes. In Fact, DHA, an omega-3 fatty acid, is a major structural part of brain tissue.

I don’t know about you, but I’ll take as much brain tissue as I can get!

#Omega-3 supplements

To make things easier, I just supplement essential fatty acids with fish oil. Supplements are relatively inexpensive, but it’s important to get a high-quality stuff. There are many low-quality products so you should look at the supplements with high doses of EPA and DHA.

Also, ignore the recommended amounts as these are not optimal. I take about 1500mg of DHA per day, so it equals to 7 pills in my case. It depends on the brand, but it will always exceed recommended 1-3 pills a day.

In this awesome podcast, nutrition expert Dr. Rhonda Patrick recommends taking 2400mg of EPA and 1800mg of DHA.

#Vitamins and minerals

Vitamin intake is an essential aspect of programmer’s diet as vitamins do a lot to nourish the brain. Although you can get the majority of the vitamins you need through food, it’s hard, even impossible in some cases (essential vitamin D3 is only produced when exposed to direct sunlight).

You need to really understand nutrition to eat the balanced diet with all the daily requirements of micronutrients.

Through supplements, you can get all the proper vitamins and microelements – and not just to a sufficient level, but to the optimal level. And that helps your brain get an extra edge. Remember:

There is a difference between being just healthy and performing at your best.


It goes without saying that alcohol is detrimental to brain function. According to The Journal of Studies on Alcohol, alcohol has been shown to alter and slow brain function and our rate of information processing. In addition to this, side effects that alcohol can have the next day will alter your mood, outlook, and energy level.

Since alcohol is such a huge part of social culture, it’s not realistic to advise you to cut it out completely. But as with any indulgence, moderation, and proper timing can prevent you from seeing a decrease in your coding abilities. Just be sure to avoid drinking on workdays or day before.

#Put this to use

Now that you understand how to differentiate between good carbs and bad, know about healthy fats, supplements, and hydration, here are some guidelines for a brain-friendly food for programmers:

  • Avoid fried/or fast/heavily processed foods at all costs.
  • You should typically avoid anything made with white flour (bread, pasta, cereals etc.). Instead, choose 100% whole wheat or whole grain options.
  • Keep a glass of water (or better a jug) on your desk. Drink plenty of water that you would never feel thirst.
  • Get to know GI values of main products and eat carbs with GI values lower than 70 throughout the day.
  • Pass up the candies, cakes, sweets, and alcohol as much as possible as they’re not good for your brain function.
  • Buy high-quality fish oil with high DHA, EPA. Also, a potent, nutrient diverse multivitamin.

Most of you realistically won’t succeed in being very strict with your diets, completely cutting out every single indulgence (including myself). You’ll be happy to hear that you don’t need to – as long as you follow this one guideline:

If you’re going to indulge, do so in moderation and don’t do it on a workday.

Sounds easy enough, right?

Leave a Reply

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