News for hackers. Stuff that matters.
Re:Reflecting on one very, very strange year at Uber by blhack on Sunday February 19, 2017 @06:45PM (#13682964)
I have to be honest, I know a lot of people who claim that they can write really good code if they've been drinking.

I just absolutely do not understand how that is even possible. If I have ONE beer, it throws off my ability to write good code, or hold all of the concepts in my head.

One of the weekly coworking meetups I go to always ends at a brewery (there is a brewery next door to the hackerspace where it is held), and while it is certainly a lot of fun being there brainstorming things, I don't understand how anybody gets actual code written after drinking.

Re:Reflecting on one very, very strange year at Uber by keldaris on Sunday February 19, 2017 @08:50PM (#13683604)
I've found I'm markedly better at two specific types of programming activities while mildly drunk (the "mildly" part being quite crucial, for me this means two beers or a couple of slowly sipped glasses of whiskey). One is getting a large amount of boring mindless boilerplate out of the way quickly because the alcohol helps me not get too distracted from sheer boredom. The other is re-architecting high level design after getting stuck on a flawed approach - it seems easier to devise and consider more "out there" ideas without getting too bogged down in implementation details prematurely.

Obviously, that's just my personal experience and while I'm quite confident in my sample size, I wouldn't generalize it to anyone else. YMMV.

Re:Reflecting on one very, very strange year at Uber by morgante on Sunday February 19, 2017 @08:02PM (#13683381)
There are certain types of code which I can unequivocally write better after a few drinks. It's honestly mostly low-complexity drudge work which needs to get done but when sober I can't power through it as fast due to (a) boredom and (b) overanalysis of simple tasks.

This certainly isn't all the code I write (far from it) and it's not for everyone, but it's definitely true for me. That's why I don't think saying alcohol and code can never mix is right, but I agree that it shouldn't be a daily occurrence or the central aspect of company culture. I don't think an optional, after-work happy hour on occasion is such a bad thing though.

Re:Reflecting on one very, very strange year at Uber by mncolinlee on Monday February 20, 2017 @12:21AM (#13684501)
There is something called the Ballmer Peak, which has even been demonstrated in one study. Up to a point, the theory goes, creative work benefits from mild intoxication. Beyond that point, productivity goes out the window. For me, I believe that point is around two drinks. For you, it could be teaspoons. Either way, I wouldn't generally drink before the end of the work day.

Personally, I find coding is hardest when you're blocked or stumped. Sometimes it helps to turn off the inner critic and experiment with code in a way that might feel unproductive during normal work hours. How I approach a problem outside of work is my business as long as the solution is solid.

This should go without saying, but everyone's physiology is different. While most people get drowsy from pseudoeffedrine, it makes me hyper. That's why even if one treatment works for most people, it might not work for you.

Re:Reflecting on one very, very strange year at Uber by nickpsecurity on Monday February 20, 2017 @09:54AM (#13687709)
I'll add that alcohol starts as an upper. It gives you a buzz that makes you feel good and want to do stuff. That's obviously beneficial if you can focus it on a work-related task. Several people here corroborated that hypotheses by saying they do. I've done it, too, in many situations.
Re:Reflecting on one very, very strange year at Uber by tommorris on Monday February 20, 2017 @06:04AM (#13686303)
> There is something called the Ballmer Peak

Wait, we're citing XKCD comics now as if they are peer-reviewed scientific journals?

Re:Reflecting on one very, very strange year at Uber by mncolinlee on Monday February 20, 2017 @09:32AM (#13687512)
There's actually one peer-reviewed study in a psychology journal. Granted, it's only one data point and might not be applicable directly to coding. http://www.cbsnews.com/news/can-alcohol-make-men-smarter-stu...
Re:Reflecting on one very, very strange year at Uber by wheelerwj on Sunday February 19, 2017 @06:48PM (#13682980)
> I know a lot of people who claim that they can write really good code if they've been drinking.

i know a lot of people who say they drive better if they've been drinking too. Doesn't mean it's accurate.

Re:Reflecting on one very, very strange year at Uber by prodigal_erik on Sunday February 19, 2017 @06:52PM (#13683013)
Alcohol definitely blunts fast reflexes. If it also hinders coding, it's not for the same reason. If I had to guess, a little could fix anxiety and perfectionism, while a lot will leave you too incoherent to make something work at all.
Re:Reflecting on one very, very strange year at Uber by TeMPOraL on Monday February 20, 2017 @12:57AM (#13684693)
> If I had to guess, a little could fix anxiety and perfectionism

This is exactly what happens to me, so I sometimes will code after a bottle of beer or a glass of whiskey. But it has to be little - more alcohol and I start losing focus.

Re:Reflecting on one very, very strange year at Uber by st3v3r on Sunday February 19, 2017 @07:29PM (#13683225)
For me, it can be a matter of actually doing it. I often suffer from analysis paralysis, so being a little tipsy means that I will actually write the thing. It'll be terrible, but it'll get done, and then sober me can go back and clean it up.

Or I'll go to far, write it, and it'll be unusable.

Re:Reflecting on one very, very strange year at Uber by z0r on Sunday February 19, 2017 @09:10PM (#13683698)
I used to do this sometimes in university. Haven't done it since entering the workforce, but they say sleep deprivation results in similar performance to being drunk. Not proud of it but I've found myself cornered into nightmare sleep deprived coding marathons by analysis paralysis / procrastination a number of times over the last few years. Alcohol might be preferable.
Re:Reflecting on one very, very strange year at Uber by jacques_chester on Sunday February 19, 2017 @08:00PM (#13683375)
Alcohol increases confidence in one's abilities.

Everyone has some skill they insist they are "better at" when drunk.

Re:Reflecting on one very, very strange year at Uber by Illotus on Monday February 20, 2017 @05:33AM (#13686150)
Back in university days I often wrote assignments while tipsy and then edited them when sober. Cider was just perfect for silencing the inner critic to get some thoughts to paper.
Re:Reflecting on one very, very strange year at Uber by jacques_chester on Monday February 20, 2017 @06:43PM (#13692034)
Well, there you have me. My secret better-when-drunk talent is writing poetry and first messages on OkCupid.

These are only weakly connected.

Re:Reflecting on one very, very strange year at Uber by thecupisblue on Monday February 20, 2017 @08:20AM (#13686943)
"Hold my beer!"

"What?! Are you crazy?!"

"Don't worry, I got this."

Goes on to write vanilla JS.

Re:Reflecting on one very, very strange year at Uber by monodeldiablo on Monday February 20, 2017 @06:32AM (#13686448)
From what I understand, there's a substantial body of research indicating that a slight suppression of the prefrontal cortex can reduce the sorts of inhibitive filters that constrain creative thought. Too much, obviously, and you impair your cognitive ability. Too little, and self-doubt and over-analysis rules.

Anecdotally, I've noticed that I'm significantly more fluent in my third language when I've had a drink or two. I get many, many more compliments. When I'm totally sober, I tend to trip up more and overthink the grammar.

There are lots of ways to reduce a hyperactive prefrontal cortex, including training (practicing art, meditating, etc.), but alcohol is by far the cheapest, quickest, and easiest.

Re:Reflecting on one very, very strange year at Uber by mst on Sunday February 19, 2017 @08:51PM (#13683608)
My best results at pool always come between pint two and pint four.

I do not in any way shape or form endorse doing the same thing with writing production code.

Re:Reflecting on one very, very strange year at Uber by sib on Sunday February 19, 2017 @08:44PM (#13683575)
Without a doubt, I am better at dancing (ok, less awful), if I have a drink or two ;)
Re:Reflecting on one very, very strange year at Uber by TeMPOraL on Monday February 20, 2017 @12:53AM (#13684675)
I sometimes code after drinking. Not often, because I'm obviously sharper when completely sober. But when I'm very stressed, my cognitive potential is significantly reduced. Taking the edge off with a single beer results in a great increase of productivity then.

Also, if you think people can't get actual, working code written when shitfaced, then I guess you haven't met the demoscene crowd ;).

Re:Reflecting on one very, very strange year at Uber by muninn_ on Sunday February 19, 2017 @06:58PM (#13683042)
Clearly you haven't heard of the Balmer Peak
Re:Reflecting on one very, very strange year at Uber by majewsky on Sunday February 19, 2017 @08:18PM (#13683465)
So that's Uber's problem. They hired Google/FB engineers when they should've been hiring MS experts for Ballmer Peak calibration. /s
Re:Reflecting on one very, very strange year at Uber by pweissbrod on Sunday February 19, 2017 @07:17PM (#13683147)
They likely dont tackle work of significant complexity
Re:Reflecting on one very, very strange year at Uber by hamburglar on Sunday February 19, 2017 @07:52PM (#13683326)
This may be the case. I generally say I can't code worth a damn if I've had a beer or two, because my ability to really focus goes way down. But I've also had the experience of getting a bit buzzed and absolutely plowing through a whole bunch of easy-to-write code and enjoying it quite a bit, whereas it was otherwise kind of dull work.
Re:Reflecting on one very, very strange year at Uber by alasdair_ on Tuesday February 21, 2017 @03:51PM (#13699808)
>I just absolutely do not understand how that is even possible. If I have ONE beer, it throws off my ability to write good code, or hold all of the concepts in my head.

There are times when a problem is intractable and I get frustrated through thinking too much about an issue. Alcohol, like caffeine, has its place. I want to stress that I'm not talking about getting hammered at the office, or even mildly drunk, I'm talking about the fact that for some people, a single beer after many hours of work can be helpful in calming them down enough to focus on the whole problem again.

Alcohol can certainly have performance-enhancing effects: comically, the first Olympic disqualification for doping wasn't for steroid use or anything similar - it was for a man drinking "two beers" before his shooting match to calm himself down enough to operate at peak levels.

Re:Reflecting on one very, very strange year at Uber by meddlepal on Sunday February 19, 2017 @11:05PM (#13684210)
I can do exploratory coding when drinking, but I won't waste my time or an employers trying to write production code while drinking. As you note, it just doesn't work.
Re:Reflecting on one very, very strange year at Uber by therobot24 on Sunday February 19, 2017 @07:10PM (#13683109)
i code better after a few drinks - i end up focusing more on the forest rather than the trees.