Live data from Hacker News

Fasting & Programming

mahdiyusuf.com

1–10 of 180 posts

Re: Fasting & Programming

#2
Very interesting, my experience has been slightly different this year.

Normally my brain is thinking 10 different things at one time. It is fairly difficult for me to focus (more so since I work at an office that has 5 TVs that I can see, and a couple of channels I can hear). The first few days of fasting, I was surprised how easily I was able to focus. Frankly I was far more productive than I normally am. Unfortunately, I've since reverted to the natural state of affairs -- I can no longer tune out TVs, youtube clips, etc.

In previous years, the first few days would actually be extremely difficult. I now realize that I was getting what is often called the "carb flu." This year, before Ramadan, I was on a low carb diet (Tim Ferriss' Slow Carb). Perhaps because of that, my body was already used to fewer carbs.

Hunger is not debilitating and if I could have water, I could probably 'fast' for 48 hours pretty easily (such fasting is actually recommended by the likes of "East Stop Eat" author Brad Pilon).

Re: Fasting & Programming

#3
I suffer mainly from the caffine withdrawal. But this is good in a sense. By the end of Ramadan, I typically rid my system of a lot of junk that I'm used to putting into my body. Also, the effects of "performance enhancing" chemicals not being there also means you just have to work harder at what you do. While this may be hard in the beginning, it gets much better as time goes on.

Despite all of this, I know all about Ramadan code. After 5pm my blood sugar drops low enough that I can barely write a line of code without introducing serious bugs or typos. So, I try to get most of the coding done in the morning.

Re: Fasting & Programming

#5
Fasting appears in many of the world's religions. I'm curious about the roots of fasting that have been codified into religious practice. Did the ancients discover that fasting was good for you?

Re: Fasting & Programming

#6
While the author of the linked article expiates the hit coding performance can take when fasting I have personally observed an interesting phenomena during my observation of Ramadan. Namely, I can experience moments of acute lucidity and penetrating insight into a problem at hand.

Usually this occurs when I am in the midst of something that requires a good bit of effort such as tackling a thorny algorithmic conundrum or analyzing a particularly complex call stack. If I attune my mind to repress the pangs of bodily need I occasionally feel as if the external world melts away and I slip into an almost mystical state of oneness with the task at hand. Needless to say, I have been surprised immensely by this development.

One theory I have is that the blood flow that would normally be assigned by my body to the act of digestion is now free'd up to be reallocated to the ole cranium. Plausible? Unsure, but am certainly enjoying these life experiments!

Side note: for those observing the fast I have also noticed that my immune system is closely linked with the gut and my self-imposed starvations can lead to immune system compromise. Make sure you supplement your Iftar goodies with some replenishing nutrients such as pro-biotic yogurt smoothies rich in vitamin C and home-cooked chicken consomme.

Re: Fasting & Programming

#8
I fast regularly and if you already on a low carb diet, then the transition is much easier on your body. I don't notice a a diminishing of mental capacity, but I do notice that I need more sleep.

There are a lot of things you can do to prepare for a fast. For example, cut back on caffeine, sugar and even salt in the days or weeks ahead of your fast. Also, gorging on food the morning of a fast is not really healthy and is a sure recipe for "Ramadan code."

There was a fantastic article on fasting in Harper's Magazine this past March that covers the history of fasting, "Starving your way to vigor: The benefits of an empty stomach." Sadly, you have to be a subscriber to read it online:

http://harpers.org/archive/2012/03/0083829

Fasting doesn't have to devastate your mental faculties. I actually find that it helps me focus, and I have started doing it a few times a year.

Re: Fasting & Programming

#10
I am currently working in Saudi Arabia (here, fasting is a national rule, however I eat because I'm a Indian and non-Muslim) as a programmer, and I've noticed one funny thing - people just become nocturnal. They eat and work in the night and sleep during the day. This is simply the normal routine reversed. Fasting has minimal effects on them, its not fasting, just the time in which they eat is changed! They work shorter during the day and do the hard work in the night.
Post reply on HN