DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

UK-US Data Bridge: Join TechnologyAdvice and OneTrust as they discuss the UK extension to the EU-US Data Privacy Framework (DPF).

Migrate, Modernize and Build Java Web Apps on Azure: This live workshop will cover methods to enhance Java application development workflow.

Kubernetes in the Enterprise: The latest expert insights on scaling, serverless, Kubernetes-powered AI, cluster security, FinOps, and more.

A Guide to Continuous Integration and Deployment: Learn the fundamentals and understand the use of CI/CD in your apps.

Related

  • What Do You Mean by Debugging in C?
  • Advanced Python Techniques Every Programmer Should Know
  • What Is Pair Programming?
  • Top 8 Recommended Books To Become a Better Programmer

Trending

  • What Are the Pillars of API Security?
  • Understanding JWKS (JSON Web Key Set)
  • Smoke Testing and the Spaceship Analogy
  • API Module Decoupling

Why do programmers love beer?

Olga Kouzina user avatar by
Olga Kouzina
·
Jan. 20, 14 · Interview
Like (0)
Save
Tweet
Share
12.3K Views

Join the DZone community and get the full member experience.

Join For Free

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 “):

programming alcohol chart

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? :)


Programmer (hardware)

Published at DZone with permission of Olga Kouzina, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • What Do You Mean by Debugging in C?
  • Advanced Python Techniques Every Programmer Should Know
  • What Is Pair Programming?
  • Top 8 Recommended Books To Become a Better Programmer

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: