

Ask HN: Drunk programming? - bradhe

Who can do it? Any tips? Back at University I could all the damn time. Now that I'm writing "production code" (lol) I can't for whatever reason...I think I just can't concentrate enough, perhaps? Not really sure what's blocking it.<p>So, can/do you? Any hints or tips?<p><i>Note: Posted while drunk.</i>
======
egrhtj
Booze, nope - checking my code in the morning makes me want to cry because
it's so bad.

Weed, yep - checking my code in the morning makes me want to weep with joy,
because there's so much of it and it's so cleverly done compared to my usual
fare. The only problem with it is that I never comment or use descriptive
variable names... so it can be a bit tricky to get my head around at first.
It's basically done by a much better programmer than me, but one who doesn't
realise the importance of clarity of intent.

------
gexla
I drink socially. When I'm drinking I want to be hanging out with friends, not
coding. Personally, I fall asleep if I get drunk and sit down at the computer.

------
hcarmichel
I think the key to programming drunk is keeping it to one or two beers.
Sometimes when programming sober I become distracted thinking too much about
ideas for other features or even other projects. A beer or two can help ease
your anxiety and help focus. Also the amount of work left to be done to
complete an application can sometimes feel overwhelming and kill my motivation
to continue. Sometimes a couple beers can help with the hardest step which is
just start. So next time your dreading starting a new feature just pop a cold
one, relax and watch the code flow.

------
Khao
Mhmm.. well I can tell that at work we like to take a few beers on Friday
afternoon and it has become a running gag that Friday afternoon code always
has to be double-checked on Monday morning.. For what I can say, we tend to be
really less focused when we're having a beer and we get distracted by talking
to co-workers. In the end, we're not coding as much as we could have done if
we were sober and our code is crappier.

~~~
bradhe
Hmm indeed I think that's to be expected in certain environments...but I've
also heard about people (heard stories, really, so who knows how valid they
are) about people who get drunk and spew out some awesome bit of inspired
functionality. Perhaps it's just that -- a story?

~~~
crpatino
Perhaps, it just _looks_ awesome and inspired when you are still drunk/stoned.
Then, if you dare looking again during the hang over, you will see the full
monstrosity that you have spawned.

In my opinion, this is an urban legend.

------
wkmanire
I have to agree with the majority point here. A stiff cocktail or just some
hard alcohol on ice and I can program (very slowly) pretty well. One beer and
I want to curl up under my desk and go to sleep. As a possible counter-point I
knew an ex-M$ employee that could drink 6 beers during lunch then go back to
work and be productive. :) I have much to learn before I shall become a jedi-
knight.

------
zalew
I have no problem doing casual programming tasks while drunk.

Also, I can code as hell all night long drinking whiskey+coke, while with beer
my motivation vaporizes the moment I open the can.

About student life vs real life, now you're simply tired of working so you're
less motivated to do code when you drink at home to relax. That's just it, I
have the same experience.

------
iuguy
Some of my finest code used to be written whilst drunk. I wrote scanners,
exploits, all kinds of stuff at company kick-offs and in hotel rooms after
nights out.

When you write code for other people to use though, it's best not to get
drunk. I think drunk coding is great for hacking, not so good for production
code. I'm with hcarmichel, keep it to one or two beers tops.

------
SkyMarshal
Buzzed to drunk off wine or liquor actually helps me focus, especially after a
long day. Turn on the classical music too and I'm golden for a few hours.

Past drunk (eg wasted), I can't do it, and beer usually just saps my
motivation completely.

------
byoung2
Alcohol is a central nervous system depressant, so it slows higher brain
function. It doesn't seem like a good match for programming, which is the
essence of higher brain function.

~~~
vineet7kumar
This post reminds of the Ballmer peak comic at xkcd. <http://xkcd.com/323/>

