The Caffeinated Coder: Is Caffeine Good or Bad?

Written By John Sonmez

For a long time I've wondered about the benefits or detriments of caffeine. I've always been one of those coffee drinkers who didn't have to have coffee, but drank it when it was available.

I've never really noticed how caffeine affected me, because I never really paid that much attention.

But, I've always been curious, especially as a software developer, whether or not caffeine had an overall positive or negative effect.

For the purposes of this post, I'll equate drinking caffeine with drinking coffee, since most of the studies are done on coffee and not caffeine specifically, and most of my caffeine intake comes from coffee.

Businessman Using Laptop In Coffee Shop

Anyway, about 4 months ago or so, I stopped drinking coffee completely. I tried to cut out pretty much all caffeine. About a month or so again, I started drinking coffee again. In fact, I am sitting in a coffee shop here in Maui drinking some coffee as I type this post.

Quitting coffee

When I first stopped drinking coffee I didn't really notice any withdrawal effects. Some people report massive headaches and nausea, but I didn't notice anything really. Perhaps just a bit more sleeping. Now, that might have been because I never was a big coffee drinker. I would usually have 1 or 2 cups a day and a few diet cokes.

You might be wondering why I decided to quit caffeine in the first place. Mostly it came from the idea that I didn't want to be dependent on any substance and I thought that the extra energy or boost I was getting from caffeine must have been coming at some cost. I wanted to see if I could achieve more even energy levels by avoiding caffeine completely. And really I was just curious to see if I would even notice the difference.

One of the first differences I did notice, after about a week, was that I did feel more level. In general, I felt like my energy levels were the same throughout the day, except for at night when I was a bit more tired than usual.

no coffee

Being more level was what I was going for, so in a way that was good, but I also started to feel more depressed. At first I thought I was imagining it, but having been back on caffeine now for over a month, I am sure that being off caffeine was causing some amount of depression. I figured this mood change would lessen over time, but after about 3 months, it didn't seem to change. I only started to see improvements in mood after I started drinking coffee again.

I also noticed that I started to feel less motivated. Now, this could have been somewhat of a coincidence, since I had just gone through a period of working very hard, but I suspect it was somewhat related to not having the caffeine.

Part of the reason for the lack of motivation might have been related to my difficulty in focusing. I did notice that without the caffeine, I was having a more difficult time sitting down and working for extended periods of time. I was much more likely to be distracted and start checking Facebook or doing something else, rather than staying on task.

Overall though, quitting caffeine didn't really seem to have any positive benefits. I was expecting to feel better and have steady energy levels throughout the day. I was also expecting better sleep, but I really didn't notice anything but negative effects.

Adding caffeine back

I finally decided to start drinking caffeine again. I'm not sure exactly why, but I think I got to the point where I realized that I wasn't getting any notable positive benefits from quitting caffeine, so I was curious to see if I would now gain some positive benefits from adding it back.

I have to say that as soon as I started drinking coffee again, I began to notice an increase in overall happiness. My mood, in general, seemed to improve. I did not expect this at all, but after a few weeks, it was pretty apparent that adding caffeine back into my diet was the cause.

I also immediately noticed that my ability to focus increased. I found it much easier to sit down and write a blog post or work on something for several hours at a time without becoming distracted. Even now, as I am writing this post, I am finding it extremely easy to write without being tempted to do something else. The whole time I was not taking caffeine, I was struggling with sitting down for more than 30 minutes to work on something.

About the time I started taking caffeine again, I had decided to start doing some all-day fasts in order to drop some weight and to keep from gaining weight while I was on semi-vacation here in Maui. I had seen several studies that showed that caffeine, especially combined with Yohimbine, (which I am also taking,) had some positive effects on fat loss. I can't completely confirm that this is the case, but I have lost significant fat during this time period and do feel like my appetite is suppressed to some degree.

Now, I don't want to pretend that adding caffeine back was all good. There was at least one detrimental effect I noticed. Once I started drinking coffee again, I noticed that it was much more difficult to get good sleep. I noticed that even drinking decaf coffee in the evening seemed to cause me to have sleeping difficulties. Fortunately, those effects did seem to subside, especially when I started making sure to cut my caffeine consumption after noon each day. But, really that was the only detrimental effect I noticed.

What about the studies? What do they say about caffeine?

Obviously, everything I've talked about so far has been from my own observations, experimenting on myself, but there have been plenty of studies done on drinking coffee and consuming caffeine. So what do they say?

Well, most studies say that drinking coffee is good for you. I really couldn't find anything that showed any conclusive evidence that caffeine was bad for you. There were a few studies that showed some possible negative effects–especially if you drank way too much–but, overall almost all the research points to positive effects for coffee and caffeine.

One of the most documented effects of caffeine is on energy levels–no surprise there. Caffeine has been shown to increase energy levels by basically suppressing adenosine in the brain. This has the effect of letting more of the brain's stimulants do their work. So caffeine doesn't actually give you energy, it just stops your brain from regulating it so much.

Studies have also shown a positive increase in brain function. Focus levels and memory seem to be improved by caffeine consumption and some studies have shown that it may help stave off diseases like Alzheimer's and even Parkinson's.

I talked about this a little before, but caffeine is in just about every fat burning pill out there. The reason is because studies have shown that it has appetite suppressing effects and can help increase metabolism. These effects have generally been shown to be pretty small though, so I wouldn't give them that much weight.

Finally, and not so surprisingly, caffeine has been shown to ward off depression. I wouldn't have believed this one if I hadn't experienced it myself, but I've seen a couple of studies mentioning this effect.

There was some early research that pointed to coffee and caffeine causing heart disease and higher rates of cancer, but most of those studies were flawed because they failed to take into account that the more frequent coffee drinkers were also more likely to be smokers. In fact, many of the recent studies show that drinking coffee is likely to help you live longer.

If you want to read a good book on caffeine, check out: Buzz: The Science and Lore of Alcohol and Caffeine.

So should coders drink caffeine?

I'm sure you can guess what my opinion on this is. Overall, I think it is beneficial–but, in moderation.

Plenty of data suggests that drinking too much caffeine starts to decrease the effectiveness of it. If you drink 10 cups of coffee every day, your body will adapt to it and pretty soon you will stop getting the benefits of being more alert and focused.

It seems that you get the best benefit if you don't let your body get too adapted to it and you time the caffeine intake with the times when you need extra focus and energy.

I would say that you can actually get extra work done with no real additional cost if you can consume caffeine at the right times. I always suspected that you paid for that extra energy somehow, but now I don't think that is the case. So, yes, caffeine can actually help you be a better coder.

With that said, I would avoid drinking caffeine later in the day, because it definitely can disrupt your sleep. Caffeine usually has a half-life of about 6 hours, so it is probably best to steer clear of it in the afternoon, not just the evening.

In summary, after experimenting on myself and reading all the research I could find, I don't see any benefit from abstaining from caffeine. It seems that if you do it right, you can get a net positive effect with almost no drawbacks. So, drink up.

If you liked this blog post and you'd like to read more about how you can be a better programmer, join over 5,000 other software developers who have become part of the Simple Programmer community.