Coding and drinking

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Prelates, Moderators General

Yesness?

Very Much
6
10%
Kinda
4
7%
Meh
5
8%
Not really
5
8%
NO
7
12%
This space intentionally left blank
11
18%
Otter
6
10%
Duck
2
3%
Otter/Duck
9
15%
What the hell is going on here?
5
8%
 
Total votes : 60

Coding and drinking

Postby WarDaft » Tue Apr 03, 2012 5:06 am UTC

Do alcohol and programming mix?









I checked, we don't seem to have a thread on this yet.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.
User avatar
WarDaft
 
Posts: 1574
Joined: Thu Jul 30, 2009 3:16 pm UTC

Re: Coding and drinking

Postby Xanthir » Tue Apr 03, 2012 6:25 am UTC

Yes. At least, while you're drinking.

In all seriousness, some types of programming tasks do feel easier when I've had a beer. In particular, I find it much easier to write specs.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
User avatar
Xanthir
My HERO!!!
 
Posts: 4305
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex

Re: Coding and drinking

Postby Proginoskes » Tue Apr 03, 2012 6:52 am UTC

"Type a semicolon; take a drink."

(Gulp!)

Traditionally, it's programming and smoking that generally occur together.
User avatar
Proginoskes
 
Posts: 309
Joined: Mon Nov 14, 2011 7:07 am UTC
Location: Sitting Down

Re: Coding and drinking

Postby Jplus » Tue Apr 03, 2012 9:06 am UTC

How about programming and taking magic mushrooms?
Feel free to call me Julian. J+ is just an abbreviation.
Image coding and xkcd combined
User avatar
Jplus
 
Posts: 1552
Joined: Wed Apr 21, 2010 12:29 pm UTC
Location: classified

Re: Coding and drinking

Postby freakish777 » Tue Apr 03, 2012 1:45 pm UTC

Proginoskes wrote:Traditionally, it's programming and smoking that generally occur together.


Or any task done in an office setting and caffeine.




I'm sure we've all run into "That Guy/Girl" who insists that their better at Math/Programming/Science/Driving while high.
User avatar
freakish777
 
Posts: 350
Joined: Wed Jul 13, 2011 2:14 pm UTC

Re: Coding and drinking

Postby scarecrovv » Tue Apr 03, 2012 1:56 pm UTC

Not so sure about coding drunk, but I find it much easier to write lots of code very quickly if I'm tired. Not really really tired, mind you, but there's a zone where I'm too tired to be distractable, but not tired enough for my brain to shut off completely. It works especially well if it's boring code, without too much thought involved. If I want to do something really clever that takes lots of thought, I need to be awake, but then it's too interesting for me to get distracted.

So basically, it's all about my ability to pay attention.
User avatar
scarecrovv
It's pronounced 'double u'
 
Posts: 644
Joined: Wed Jul 30, 2008 4:09 pm UTC
Location: California

Re: Coding and drinking

Postby Dopefish » Tue Apr 03, 2012 11:22 pm UTC

I agree that I code best when I'm in a bit of a haze (e.g. tired, but not falling asleep tired), as I'm apt to stay focused without getting distracted as above

I haven't actually had occasion to mix coding and alcohol, but unlike driving, it actually doesn't seem like it'd be all that bad. The depressant aspects of alcohol would work to put you into that optimal coding haze state, and although you might come up with some questionable variable names, I reckon you could still throw together a functioning program at least as well as when perfectly sober.
User avatar
Dopefish
 
Posts: 798
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

Re: Coding and drinking

Postby Breakfast » Wed Apr 04, 2012 12:04 am UTC

Jplus wrote:How about programming and taking magic mushrooms?


This would never work. Things like staring at the sky and turning off lights becomes way more important than coding. I bet you'd get some pretty crazy designs if you managed it though. Documentation would be even better.

Alcohol always seemed to make me code better. At the very least I was able to make connections more easily sometimes.

I wonder what the best drug for coding would be? We could use them a performance enhancers. :P
Breakfast
 
Posts: 84
Joined: Tue Jun 16, 2009 7:34 pm UTC
Location: Coming to a table near you

Re: Coding and drinking

Postby Carnildo » Wed Apr 04, 2012 4:13 am UTC

Breakfast wrote:I wonder what the best drug for coding would be? We could use them a performance enhancers. :P


Programming fluid, of course!
Carnildo
 
Posts: 2022
Joined: Fri Jul 18, 2008 8:43 am UTC

Re: Coding and drinking

Postby Steax » Wed Apr 04, 2012 7:09 am UTC

I avoid any drink with ice in it, because then I get obsessed about trying to consume it before the ice fully melts. It does give a documented speed burst, however...
In Minecraft, I use the username Rirez.
User avatar
Steax
SecondTalon's Goon Squad
 
Posts: 3037
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: Coding and drinking

Postby sourmìlk » Wed Apr 04, 2012 11:09 am UTC

Balmer peak aside, I really don't see how a substance that impairs critical thinking could possibly assist with programming.
Terry Pratchett wrote:The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.
User avatar
sourmìlk
If I can't complain, can I at least express my fear?
 
Posts: 6407
Joined: Mon Dec 22, 2008 10:53 pm UTC
Location: permanently in the wrong

Re: Coding and drinking

Postby freakish777 » Wed Apr 04, 2012 1:18 pm UTC

sourmìlk wrote:Balmer peak aside, I really don't see how a substance that impairs critical thinking could possibly assist with programming.


As an incentive for highly intelligent individuals to do menial programming task that they would otherwise feel are below them.

Manager at Shady Start Up: "Hey Bro, this hack-athon is going to be sweet, we thought of everything, even free beer!"
New College Grad: "I don't think I want to give up my weekend, I just did that for 4 years to get a degree..."
Manager at Shady Start Up: "Come on! Where's your commitment to Shady Start Up?! And BEER!"


(joking, obv the Manager at Shady Start Up also implies that New College Grad could lose his job, and that's the real incentive)
User avatar
freakish777
 
Posts: 350
Joined: Wed Jul 13, 2011 2:14 pm UTC

Re: Coding and drinking

Postby Proginoskes » Thu Apr 05, 2012 7:21 am UTC

Breakfast wrote:
Jplus wrote:How about programming and taking magic mushrooms?


This would never work. Things like staring at the sky and turning off lights becomes way more important than coding. I bet you'd get some pretty crazy designs if you managed it though. Documentation would be even better.


I heard that computer programming was the profession with the largest use of drugs in the 1960s-1970s. Don't remember the source, though.
User avatar
Proginoskes
 
Posts: 309
Joined: Mon Nov 14, 2011 7:07 am UTC
Location: Sitting Down

Re: Coding and drinking

Postby Xanthir » Thu Apr 05, 2012 4:54 pm UTC

sourmìlk wrote:Balmer peak aside, I really don't see how a substance that impairs critical thinking could possibly assist with programming.

Guessing: Because alcohol, as a mild depressant, makes it easier to shut off the babbling portion of your brain and get into the zone?
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
User avatar
Xanthir
My HERO!!!
 
Posts: 4305
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex

Re: Coding and drinking

Postby Mortomes » Fri Apr 06, 2012 1:44 pm UTC

I can't believe no one has referenced the Ballmer peak yet.
User avatar
Mortomes
 
Posts: 11
Joined: Wed May 09, 2007 5:18 am UTC
Location: Utrecht, the Netherlands

Re: Coding and drinking

Postby Dason » Fri Apr 06, 2012 3:12 pm UTC

sourmilk did about 4 posts above you. And Xanthir quoted it in the post directly above yours.
double epsilon = -.0000001;
User avatar
Dason
 
Posts: 1293
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

Re: Coding and drinking

Postby undecim » Fri Apr 06, 2012 11:18 pm UTC

Ducks are assholes.



Mortomes wrote:I can't believe no one has referenced the Ballmer peak yet.

They have, but Microsoft keeps sending Randall DMCA takedowns.
Blue, blue, blue
User avatar
undecim
 
Posts: 286
Joined: Tue Jan 19, 2010 7:09 pm UTC

Re: Coding and drinking

Postby thoughtfully » Sat Apr 07, 2012 6:12 am UTC

Otters, on the other hand, are pretty f'ing badass.
Image
Image
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery
User avatar
thoughtfully
 
Posts: 2092
Joined: Thu Nov 01, 2007 12:25 am UTC
Location: Minneapolis, MN

Re: Coding and drinking

Postby WarDaft » Sat Apr 07, 2012 8:09 am UTC

And a freakish otter duck hybrid, well... to be honest, it defies explanation.

I wonder just how many votes we can get before we get a vote for duck.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.
User avatar
WarDaft
 
Posts: 1574
Joined: Thu Jul 30, 2009 3:16 pm UTC

Re: Coding and drinking

Postby Meem1029 » Thu Apr 12, 2012 3:03 am UTC

So I was randomly browsing reddit and came across a relevant article.
cjmcjmcjmcjm wrote:If it can't be done in an 80x24 terminal, it's not worth doing
Meem1029
 
Posts: 378
Joined: Wed Jul 21, 2010 1:11 am UTC

Re: Coding and drinking

Postby Shivahn » Fri Apr 13, 2012 2:13 am UTC

Xanthir wrote:
sourmìlk wrote:Balmer peak aside, I really don't see how a substance that impairs critical thinking could possibly assist with programming.

Guessing: Because alcohol, as a mild depressant, makes it easier to shut off the babbling portion of your brain and get into the zone?

Systems don't shut off all at the same time, and effects are dose dependent, so a mechanism like that's entirely plausible.

You have to drink more than a little to get significant critical thinking impairment. Similar to how amphetamines can help you get tasks done, even though they also cause psychosis.
User avatar
Shivahn
 
Posts: 2193
Joined: Tue Jan 06, 2009 6:17 am UTC

Re: Coding and drinking

Postby The Geoff » Sat Apr 14, 2012 12:28 pm UTC

In my experience any altered state of mind can help, but only if you've been stuck on a problem for a while. Your brain gets into a little rut, you keep attacking the problem and nothing works - but then you do something that changes your thought processes (drinking, smoking, going to bed, I've even found kitesurfing and rock climbing to work), and bam, epiphany time.

Obviously some of these are healthier than others, but in general a "CTRL-ALT-DELETE" on your brain seems to be beneficial when you're stumped.
User avatar
The Geoff
 
Posts: 144
Joined: Wed Jun 08, 2011 6:22 am UTC

Re: Coding and drinking

Postby Missinggoat » Mon Apr 16, 2012 5:47 am UTC

I actually had a fairly adverse reaction the other day. I'd spent two hours putting some finishing touches on page I was coding, then I bought a nice Mac 'n' Jack's. I struggled the last half hour to finish up the task. I forgot everything about my code and couldn't make connections between the javascript and php. It was a little disappointing. But I got it done.
Missinggoat
 
Posts: 5
Joined: Mon Apr 16, 2012 5:41 am UTC

Re: Coding and drinking

Postby TheAmazingRando » Thu Apr 19, 2012 10:10 pm UTC

A little bit of alcohol can get you in the zone. Too much and you're in another zone altogether.

More importantly, though, there are times when coding can be a very menial task, requiring just enough intelligence and focus to be impossible to automate, but not enough to actually be stimulating. In situations like this I find that a bit of distraction is beneficial. It keeps you from focusing on how boring the task is, and what you might lose in immediate productivity you gain in walking away without feeling like a zombie, and falling asleep without seeing code every time you close your eyes, or breaking down your dreams into a context-free grammar.
User avatar
TheAmazingRando
 
Posts: 2305
Joined: Thu Jan 03, 2008 9:58 am UTC
Location: San Diego, CA

Re: Coding and drinking

Postby Falling » Tue Apr 24, 2012 8:05 pm UTC

Just came across this:

Spoiler:
Image


Seems to apply pretty well to code writing as well
Falling
 
Posts: 175
Joined: Mon Nov 24, 2008 4:30 pm UTC

Re: Coding and drinking

Postby WarDaft » Tue Apr 24, 2012 11:36 pm UTC

That particular tactic might help with Kernighan's law actually. As long as you practice writing code with good style conventions even after having a bit to drink, you should be able to figure out what you were trying to do and then fix it while you're sober, then it might actually be downright helpful. Might also be decent practice finding out just how good your coding conventions are when you have much less mental connection with what you were thinking when you wrote it. If your drunken self can explain the code to your sober self, then your sober self should be able to explain it to the next person that has to work on it.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.
User avatar
WarDaft
 
Posts: 1574
Joined: Thu Jul 30, 2009 3:16 pm UTC

Re: Coding and drinking

Postby undecim » Wed Apr 25, 2012 2:20 am UTC

I'm going to have to do some research on this topic...
Blue, blue, blue
User avatar
undecim
 
Posts: 286
Joined: Tue Jan 19, 2010 7:09 pm UTC

Re: Coding and drinking

Postby WarDaft » Sat May 19, 2012 11:53 pm UTC

Nooooooo.....

Someone finally voted duck.

Hmm, this gives me an idea for a forum game.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.
User avatar
WarDaft
 
Posts: 1574
Joined: Thu Jul 30, 2009 3:16 pm UTC


Return to Coding

Who is online

Users browsing this forum: No registered users and 6 guests