

Ask HN: How much of your production code have you written while drunk - savoy11

This is pretty much straight-forward. I'm trying to co-relate being drunk and production code, so please be honest here - how much of what you have written and is still in production is while being under the influence?
======
cperciva
None. I don't drink, and if I'm impaired in any way (e.g., sleep deprived or
brain-fogged by antihistamines) I don't write code.

Doing otherwise is just plain irresponsible.

~~~
savoy11
Right, but I'd like to hear the reasoning behind that. You mate with women
while being drunk, you do lots of other stuff - and most of it is good. So why
not code?

Give me the explanation behind that.

~~~
cperciva
_You mate with women while being drunk..._

I don't think that's a good idea, either. In both cases, if you make a small
mistake you might need to support it for the next couple of decades.

------
aphyr
I've written code drunk (read: one beer, I'm a lightweight) a few times--
mostly for personal projects, but at work occasionally. The results tend to
vary: sometimes it's bloody inspired, other times I have no idea what I was
thinking. It does seem to help with ``analysis paralysis''; where there are so
many conditions and overlapping cases to consider that you can't even begin
writing the code. Sometimes forging blindly ahead helps you think through the
problem better.

But always check your commit logs the next day. :)

------
iuguy
While drunk, probably very little. I used to when I was a lot younger. In fact
about 8 years ago I wrote the smallest /bin/sh execve shellcode for x86 I'd
ever seen while completely out of my tree. I was amazed it worked.

These days I generally find that a beer is fine, two can give a temporary
boost in productivity (as I find it easier to focus) but more than that and I
have to stop.

Alcohol's probably the wrong substance to code on. Something like caffeine is
probably better.

------
pavlov
Interesting question.

Personally I find my work to be fairly similar to a writer's, in that my prime
responsibility is to produce something interesting for an audience. Nobody
will hold me liable for the means I've used to get there. So, like many
authors, I'm not averse to having a few drinks while working late at night.

------
madhouse
Production code? None. Random bits and pieces? Quite a lot.

Some of the bits and pieces I wrote while intoxicated did end up in
production, but only after careful review, so... that doesn't really count,
does it?

------
Jabbles
Just because I like to check HN whilst I'm at work doesn't mean I don't care
about the quality of my output. I don't write code whilst drunk, in the same
way I wouldn't expect a doctor to do his job whilst drunk.

~~~
savoy11
The co-relations of driving, being a doctor, etc are really making me laugh
hard. How much of what you have guys written is that important? FourSquare...
look at me, I'm at McDonads and taking a pee

You guys are taking yourself why too seriously, for a (most probably) lousy
job.

------
ehutch79
all of windows was? see: <http://xkcd.com/323/>

