Why do programmers love beer?
Why do programmers love beer?
Join the DZone community and get the full member experience.Join For Free
You've been hearing a lot about agile software development, get started with the eBook: Agile Product Development from 321 Gang.
Everyone knows the 99 Bottles of Beer song, and many programmers have rendered the loops of its lyrics into a programming language. There are countless pieces of code that feature the mesmerizing chant of 99 Bottles of Beer. Here’s the one in Python, for instance:
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- """ 99 Bottles of Beer (by Gerold Penz) Python can be simple, too :-) """ for quant in range(99, 0, -1): if quant > 1: print quant, "bottles of beer on the wall,", quant, "bottles of beer." if quant > 2: suffix = str(quant - 1) + " bottles of beer on the wall." else: suffix = "1 bottle of beer on the wall." elif quant == 1: print "1 bottle of beer on the wall, 1 bottle of beer." suffix = "no more beer on the wall!" print "Take one down, pass it around,", suffix print "--"
Judging by the count of programming languages that were used to convey this lyrics, software developers have some special kind of love for beer. I’m not a software developer, but I’ve been around many programmers who like to spend their late nights in the office with a slice of pizza and a bottle of beer nearby. Of all the drinks that humans can possibly allow in the office space, with the exception of coffee, beer is probably the most popular one, especially for late afternoons. It appears that beer has the quality that makes it a secret productivity booster, which is never advertised as such, but rather taken jokingly. Heh, you weird programmers, who can create something useful while drinking beer? That’s what an ordinary human might think.
Not so. Some programmers have a story that explains the power that beer has on them. I’m not ready to pull a “research” done by a super-reputable university out of my pocket, so I will tell what I’ve heard from a friend. This phenomenon is related to the agility of mind. For someone with a heightened brain activity (read, for someone with a curious and restless mind) having a beer quiets the brain exactly to such an extent as to allow transcending to this optimal flow that helps to shoot pieces of code and experience the state of immersion mixed with quiet enjoyment. After having this conversation, I’ve done some research and found a graph that seems to back up this theory (they call it “The Ballmer Curve“):
The point is: how much beer can one have until the programming skills deteriorate? For how many hours will this spike linger? From what I’ve heard, it can keep a beer-driven zealot shoot great code all night. The feeling is purely subjective. Some of the people I talked to use cognac instead of beer (that’s a more rare breed of programmers). It appears that programmers do not trust the pharmaceutical industry, because of the controversies associated with it. No energy booster pharma will ever make it right for people who write code. That’s a common sense logic, because how a drug company can possibly be motivated to come up with a pill that will bring this golden state of mind, focused and yet relaxed, to a software developer? Hmm, there might be some motivation, but anyway: pills are just plain boring. Taking a pill is not accompanied by this invigorating surge of a charged boost that comes with beer. Anyway. Some great Friday afternoon coding might still be in store for you… so how about go and get yourself a 6-pack of good beer? :)
Published at DZone with permission of Olga Kouzina , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.