Monday, March 15, 2010

Coffee and programming

A mathematician is a device for turning coffee into theorems. -- (attributed to) Paul Erdos
Coffee is indeed an omnipresent drink in many different science fields - probably for its property of aiding concentration and focus over a short period of time. In the field of software development, just think about the Java platform and programming language, named after a coffee, whose symbol is a cup and certain constructs are called beans. Many programmers declare themselves coffee addicts, and present guides to coffee roasting and brewing.

As you probably now, high consumption of caffeine, which is the principal psychoactive component of coffee, is not very healthy. The reason is the substances in a cup of coffee are derived from coffee beans, and the Coffea plants have been naturally selected to produce hazardous chemicals. Plants generally do not want their seeds to be eaten: while the man-made cultivation, which favors the more productive varieties, dates back to some centuries ago, the natural selection of the Coffea plants has been a continuos process for thousands and thousands of years. That's why roses have spines and poison ivy is... well, a bit poisonous.
The overall effects of a moderate consumption of caffeine, as they have been exposed by scientific studies, are controversial. And the picture cannot be different: there are many types of coffee, also with different serving sizes, and possibly different effects (and side effects). Particular beverages such as tea and Coca Cola contain caffeine, but in a much lower concentration.

My current practice is avoiding influential substances as much as possible. I drink occasionally a cup of tea in the morning, mainly because of the cold season. I did multiple rounds of coffee in the past, but the benefits on concentration (and in recovering from hangovers) were not very significant on me, and I also had to add the side effects on my stomach and my sleep cycle, which is an important variable in my life.
Nearly every morning I see many students come in with hot, tiny espressos made by automatic machines. I guess it's more a placebo than a real help. In fact, they are usually not the most brilliant ones in the classroom, but the ones that sleep less.

Do you drink coffee? What is your idea of its benefits and disadvantages?
 

Image courtesy of Julius Schorzman.

15 comments:

  1. I personally do not ever coffee consumption, both when preparing for exams and when I program. Rather I try to sleep enough to be brilliant all day.
    Drinking coffee causes me trouble sleeping so as to come into an infinite loop to take the coffee to stay awake but then can not sleep.
    So my policy is to avoid coffee

    ReplyDelete
  2. I just drink lots of water all day and I'm fine. Whenever I bump into someone in the kitchen in the morning and they make a "no coffee?" comment, I always say the same thing: If you don't drink coffee, you don't *need* coffee. Look at the people for who a morning cup of coffee has been their habit for 20 years. They virtually cannot function at all until they get that first burst of energy.

    ReplyDelete
  3. coffee is a smell :winkwink:

    ReplyDelete
  4. Coffee's just another drug, milder than most but nevertheless. Which means that taken in moderation there are nice benefits.

    With regards to coding, I find a cup of coffee to be a great pick-me-up after a longer bout of work. Too much coffee has detrimental effects though, as seemingly my brain starts running faster than my fingers can type.

    ReplyDelete
  5. Caffeine has very little effect on me; I actually drink coffee more for the flavor than any other reason. As such, I typically do not drink more than 2 cups a day, and will generally skip normal American coffee in favor of more flavorful alternatives, such as espresso (which, when brewed correctly, often has less caffeine than a cup of American coffee), French press, and Turkish or Arabic coffee (this latter is almost like tea in terms of complexity).

    ReplyDelete
  6. Thank you all for your opinions and comments. There is a running myth about the caffeine-and-soda addicted programmer but I see there are simpler lifestyles than staying on drugs to be enabled to code. :)

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. There's always the subject of excess. As a dedicated father, lack of sleep is always an issue if you want to have a career. Studying a new computer language, handling multiple projects and wanting to be a good husband and Dad takes a lot of time. I can function on about 6 hours of sleep; heavy work days I need a pick me up. I have gotten work done, cooked food and programmed some fantastic code by having a good cup of coffee.
    Coffee does not help me write good code, but being alert helped me write good code. Coffee, Red Bull, Monster, or caffeinated tea all help when sleep is not the option. Sometimes good fruit juice can help or even a good lollipop like Jolly Ranchers or a Blow-Pop.
    There's no myth in being tired and getting a boost for a few hours to complete a task. I don't think the writer should be speaking for everyone's else's life style.

    ReplyDelete
  9. I drink coffee. And I program. And damnit, I love my coffee. I am careful not to drink it late in the day when it might affect my sleep. And I do make it my business to get 7 hours of sleep a night. But a nice cup of coffee (Coffee coffee, not this esspresso-capo-latte-fluffy-nutter-butter nonsense), the warm feel of the mug, the beautiful aroma, and the caffeine addition is almost a necessity. I've stopped in the past, but I enjoy it, and until the doctors say "No more!" I'll continue to <3 my coffee as I hack away at code.

    ReplyDelete
  10. Sure, I drink my cups of coffee every day. It certainly makes for a good recreational moment...and taste.

    If you are too afraid to drink coffee due to its "drug" effects, you probably shouldn't eat that many things either. These days, there is more artificial crap in your beef than in a good cup of coffee ;) Besides: you gotta live -- at least a little! Where's the joy in life if you can't enjoy simple food and drinks?

    IMHO.

    ReplyDelete
  11. I drink coffee, sometimes little, sometimes more, sometimes enormous amounts. However, once I feel I'm addicted (I need lot more to feel the effect, and get headaches without) I completely stop until feeling normal again.

    Oh, and there is some brown stuff calling itself coffee that should be prohibited by law. I found out you will not so fast get stomach pain of *good* coffee as you may get of a dirt-cheap robusta dominated blend.

    ReplyDelete
  12. Coffee is drink of programmers...

    ReplyDelete
  13. I drink 2-3 cups of coffee every weekday. On weekends I usually don't drink coffee as I mostly drink it only at work.

    Coffee is a great drink. I've noticed that it helps me be alert and focus on whatever I am doing. I think you're absolutely wrong when you say coffee doesn't help.

    It certainly helps.

    ReplyDelete
  14. I drink a couple of cups of coffee a day when I am at work. The only reason is that I like to drink something and coffee is easily available. I have never noticed being more focused or alert because of drinking coffee. The only effect as far as I have seen is that it makes me visit the restroom more often.

    ReplyDelete
  15. I drink Kool-Aid, and for some reason it works.

    ReplyDelete