I have personally programmed a lot while tipsy (never drunk, I am not sure I would want to read that code in the morning) and it allows me to get over the humps of writing that utility function that needed to be written but I was putting off, it allows me to just start putting code down in vim without really worrying whether or not it is good enough...
Let me quantify good enough a little better. I am a perfectionist, I tend to write my code methodically and slowly and over-think and overanalyse every last line, I refuse to write a piece of code if I don't think it is good enough.
When I drink alcohol it takes away all of the above and lets me just write the damn code. Most of the time (there have been times that I've been closer to drunk than sober) the code works exactly as required and it passes code reviews without issues. It compiles, it works, and is the "perfect" code for the situation. Sure three months down the line it may need to be re-factored a little bit to add a new feature that was decided on by management, but in the mean time it has shipped.
Now, please don't take my example and think that you can become a better programmer by simply going out and buying a bottle of vodka. It most likely won't work. Should you give it a try? Sure, what have you got to lose? Just don't become dependant on alcohol as a way to function in everyday life. Been there done that, and it is not pleasant at all.
My experience has been really similar to yours. I also was plagued by perfectionism, reworking things endlessly when I was younger. A beer makes it go away, commit to a design decision that is not necessarily ideal because it probably doesn't have to be ideal, and move forward.
I find it helps me focus as it stops my mind from wandering off down infinite stacks over minor issues. Like caffeine though there's a certain precise narrow level where this happens and if you go over that level it doesn't work.
This is exactly my experience. Although I can get into the same sort of state by simply being tired and being ready to go to bed. Just wanting to get something done before going to bed removes a lot of what-ifs in my decision making process.
I too work somewhat the same way. I remember one Friday afternoon in the cab on the way home from work (which we had started drinking at lunch, and it continued until we left). So there I was in the cab, I had a "eureka!" moment, grabbed my laptop, booted up a terminal, and bashed out some code. By the time I got home, it worked, it did what we needed it to do, and I'm there joking with my manager (who was more drunk than I) on the phone telling him about the 15mins of coding drunk in the back of a cab.
Coding drunk is not for everyone, it won't make you into a super-coder that can do everything magically, but if you're like some of us, where perfection limits production, being tipsy or totally drunk breaks those barriers and allows you to just do the job.
My first thought is that you're opening yourself up to litigation. I drink wine and occasionally code with a glass of wine - the easy stuff, and I only commit the next morning. However, making strategic decisions, dealing with human issues and sending external communications is a bad idea.
Someone I'm close is a former CEO and majority shareholder of business that generated 8 figure yearly revenue. His advice to me was to "never hit the send button until the next morning". I'm inclined to give you the same advice.
Alcohol lowers your inhibitions and your sensitivity to the needs and feelings of others. It's a wonderful social lubricant but it also leaves you occasionally cringing the next morning as you remember what you said. Usually there's no record of it other than fading memory. Emails are on the record, so you may be cringing for a long time if you get it wrong and it could be expensive.
I agree with what you say about the effects of alcohol. However, with small amounts, a glass of wine for example, the positive effect of getting things done is way bigger than the negatives for most people. Procrastinating and putting things off for weeks like the author is far worse than little bit of insensitivity in a mail.
Of course it's better if you don't need any toxics to live your life happily.
You wouldn't sign an email with "Also, I'm drunk right now" but that's effectively what you've done here.
Kudos for honesty, but you've now put a time stamp that says, roughly, "I acknowledge being under the influence on Nov 27 2011, and further, this allowed me to behave differently than I normally would." Anyone you've interacted with today can go back to it. It's not just that you might be making bad decisions - you are publicly acknowledging that those decisions were made while drunk.
I think that the advice "Don't hit send until the next morning" is sound not only for post-booze emailing, but for anything done late in the day. Driving whilst overly tired (for example) is known to pose similar risks to driving under the influence of alcohol.
Although mmaunder has only mentioned holding off on emails due to drink, there are many other reasons why one might author an email one evening, but not send it in the morning (e.g. the need to check a fact with someone who has already gone to bed or is otherwise unavailable). That mmaunder was drunk is not an conclusion that can inevitably and reliably be drawn from such a timestamp.
Why is this significant? Alcohol can affect judgement, but so can fatigue, depression or lust. We're humans. Our brains are housed in our bodies and we have to make decisions under all kinds of physical influences all the time.
Barring being in a fanatical teetotaler culture, why does it matter that there's a record of him writing an email while moderately drunk? Business gets done in bars, lounges and karaoke places all over the world.
It's not like he made a spontaneous marriage proposal or signed up for the military. It was just a damned email, and a satisfactory one at that.
I'm the other way round - I try not to send emails etc when I'm drinking, because I think my social behaviour changes a lot more than my programming ability does (it's easier to write a message, but much more difficult to judge if it's the right thing to say).
I find that after a beer or two I'm much more likely to stay motivated to work on the same project, rather than procrastinating or switching to something else. Keep in mind that the line between there and being drunk can be surprisingly thin.
(Homebrewing and working from home are a great combination to find yourself drinking when you shouldn't be)
If you have a problem doing "awkward" things like firing people, paying bills, etc, you need to figure out the root of your anxiety and deal with it.
If numbing yourself with alcohol is how you get through, you may find yourself turning to the bottle more. Alcohol isn't tea or coffee, and boorish behavior isn't a measure of whether alcohol is affecting your life.
Why does "having difficulties firing people" have to have a "root cause" other than "you think of yourself as a fairly decent guy and understand the effects getting fired has on somebody"?
Having difficulty firing someone is normal -- I'm not suggesting that it should be fun. Drinking Gin to give yourself the nerve to fire someone probably isn't fine.
If you have a job to do, you need to be able to do it. If the psychic toll of doing your job requires that you hit the bottle, you probably don't belong in that job.
There is a keen difference between not being able to fire somebody while sober, and preferring to not do so. Similarly I can not drink at parties, but I can do so as well, so I do.
You are mistaking responsible drinking for dependancy.
To rephrase what he's saying: "If you have trouble handling awkward things sober, work on overcoming that difficulty. Having a drink to solve your problems leads to alcoholism, and alcoholism is a much worse problem."
Alcohol leads to alcoholism. It's an extremely addictive substance. The frequency and volume are what put you at risk, the reasons people drink are only poor indicaters of those factors.
Thinking to the contrary can actually put you at more risk, since you might think yourself not at risk if you "only drink socially".
Yeah, sounds like a really great idea to handle business communication while being intoxicated...
If you write 20 lines of BS code, it does not really matter. Thanks to your VCS you revert and finito.
On the hand, one wrong email can haunt you, because it affects people. There is no undo.
I'm having trouble understanding your comments. The article doesn't talk about "entirely different people", we're talking about drunk people. No matter how drunk you are, you don't become an "entirely different person", but you lose the social inhibitions that prevent you from writing the types of emails that offend customers.
And I'm not sure where 2-3 drinks comes from, either. 2-3 drinks get some people drunk, but not large people or regular drinkers. That's not really relevant, because even large people or regular drinkers start to lose those social inhibitions after 3 quick drinks even if they aren't yet 'drunk'.
I think the subtext of my comment was pretty straightforward: after 2-3 drinks, you're not going to send radically different emails to customers; you're certainly not likely to torch relationships.
If anything, over the last several years, what I've found is that stress is far more likely to hurt relationships than intoxication. After a frustrating day, I'm way more likely to be clipped, snippy, abrupt, or unhelpful. That's the stuff that clients and customers remember.
I drink pretty regularly and can't think of a single time that intoxication has harmed a business relationship (indeed, I routinely take clients out for beers, like most other businesspeople do --- if alcohol and "loss of inhibition" was such a force for chaos, one assumes this would be less of a time-honored tradition).
On the other hand, I can think of many times where stress has damaged relationships, sometimes permanently.
I picked 2-3 drinks out of a hat. I know the guy who wrote this post drank 4 glasses of gin before getting on a plane (I'd throw up if I did that; alcohol and air travel don't mix with me), but 2-3 seems like a pretty reasonable casual evening of answering emails.
People are surprisingly easy to offend over email. I know that I've offended some when sober. Sometimes it's because I'm too terse. Sometimes it's because they're reading something between the lines that I didn't mean to say. Sometimes I phrased things poorly. Sometimes I wrote it the email in anger.
Add 2-3 drinks in the mix and I'd probably double the number of offended customers.
Taking customers out for drinks is a completely different situation. It's a lot harder to be misunderstood in face-to-face conversations, not to mention that the customer is drinking along with you.
People are surprisingly easy to offend over email. I know that I've offended some when sober. Sometimes it's because I'm too terse. Sometimes it's because they're reading something between the lines that I didn't mean to say. Sometimes I phrased things poorly. Sometimes I wrote it the email in anger.
It sounds like beer is accentuating (not causing) a problem with email etiquette. Your point and Thomas's point are orthogonal: (1) two beers can make you terrible at things you are already bad at and (2) two beers wont make you terrible at things you aren't bad at. Because the bottom line is that people aren't easy to offend over email. I've written 1 email that has offended someone in the last 5 years and that was mostly intentional.
His comment makes sense in the context of middus's comment. You are highly unlikely to compose an email that "haunt you" unless you are quite drunk. You are still you, and you'll still act in line with how you normally act. Loosened inhibitions at low levels of alcohol are almost without exception quite voluntary.
For most people who have drank before I'd say the line between 'good to go' and drunk comes at about 5 or so, but the number is in fact irrelevant. Just get a buzz, or maybe a little tipsy, and you'll be fine.
"We Brits believe that alcohol has magical powers – that it causes us to shed our inhibitions and become aggressive, promiscuous, disorderly and even violent.
But we are wrong. In high doses, alcohol impairs our reaction times, muscle control, co-ordination, short-term memory, perceptual field, cognitive abilities and ability to speak clearly. But it does not cause us selectively to break specific social rules. It does not cause us to say, “Oi, what you lookin’ at?” and start punching each other. Nor does it cause us to say, “Hey babe, fancy a shag?” and start groping each other.
The effects of alcohol on behaviour are determined by cultural rules and norms, not by the chemical actions of ethanol. There is enormous cross-cultural variation in the way people behave when they drink alcohol. … In … the vast majority of cultures, … drinking is not associated with these undesirable behaviours … Alcohol is just a morally neutral, normal, integral part of ordinary, everyday life – about on a par with, say, coffee or tea. …
This variation cannot be attributed to different levels of consumption. … Instead the variation is clearly related to different cultural beliefs about alcohol. … This basic fact has been proved time and again … in carefully controlled scientific experiments – double-blind, placebos and all. To put it very simply, the experiments show that when people think they are drinking alcohol, they behave according to their cultural beliefs about the behavioural effects of alcohol. …
Those who most strongly believe that alcohol causes aggression are the most likely to become aggressive when they think that they have consumed alcohol. … These experiments show that even when people are very drunk, if they are given an incentive (either financial reward or even just social approval) they are perfectly capable of remaining in complete control of their behaviour – of behaving as though they were totally sober. …
If I were given total power, I could very easily engineer a nation in which coffee would become a huge social problem. … I would restrict access to coffee, thus immediately giving it highly desirable forbidden-fruit status. Then I would issue lots of dire warnings about the dangerously disinhibiting effects of coffee. I would make sure everyone knew that even a mere three cups (six “units”) of coffee “can lead to anti-social, aggressive and violent behaviour”, and sexual promiscuity, thus instantly giving young people a powerful motive to binge-drink double espressos, and a perfect excuse to behave very badly after doing so."
Although many studies have shown that people given a placebo will often behave as if drunk, this doesn't prove that the effect of alcohol is purely psychological. Although people will begin to behave as if drunk, my understanding is they will tend to behave in a manner which they would normally feel slightly inhibited from.
When someone has actually consumed alcohol they will be more likely to perform actions which there is a high (rather than medium as with the placebos) social pressure against.
I can see the coffee example working for both consciously using alcohol as an excuse for socially unacceptable behaviour and the type of results seen when placebos are given but not the more extreme responses associated with higher intakes.
"Kate Fox is a social anthropologist and director of the Social Issues Research Centre (SIRC)"
The SIRC is a well known PR front group for Britain's alcohol industry. I'd like to see the actual studies she's referencing so I can say more than just "this is thinly veiled propaganda."
> In … the vast majority of cultures, … drinking is not associated with these undesirable behaviours … Alcohol is just a morally neutral, normal, integral part of ordinary, everyday life – about on a par with, say, coffee or tea.
It's not a "cultural" thing or however you want to call it. My father is one of the nicest persons you'll ever meet when he's sober, but when he gets really drunk he becomes aggressive and violent as hell. And I can assure you that he's not doing it because he thinks he's "cool" to be aggressive when drunk, my parents live in the middle of nowhere, social norms are the last thing my dad would care about.
This is a really baffling thing to quote (and even more baffling that it has been voted up).
Alcoholism is a frigging nightmare for everyone involved, irrespective of culture, and here you are regurgitating some PR nonsense written by an alcohol industry pundit.
Go spend some time at the emergency room of any major hospital and see all the PAP's (Pissed And Punched), the MVA's involving alcohol, the people getting their stomachs pumped. They deal with this every weekend. Long term, look up Korsakoff's syndrome.
I disagree. I have done exactly what the author did and got drunk before having to send emails. I sent emails I would have never sent sober because I would have been too worried about the implications.
No one is around judging you or knowing you are drunk, you are just writing emails.
I have noticed a similar effect in other areas myself. On example is bowling. Sober, I am terrible, but after a few beers I rock the lane; right before I start to wobble and fail to hit even a single pin :P
Pool and bowling will both improve after a couple of beers - your muscles will relax and you'll start to throw/shoot straighter. It's all technique with these two sports.
I don't need to point out too many beers will affect your technique in an equal and opposing fashion..
I work at a startup that has an amazing office, with a full bar and eight taps for draught beer. This makes it easy to knock back a few while coding throughout the day/night. I'd dare say, that the availability of free drinks coupled with a culture that promotes drinking as a social lubricant is just about the most tempting atmosphere possible.
Surprisingly, people do not take advantage. I think some less mature people may like to brag about how much they can code whilst drunk, but it's just like any other drug: If you can do X, Y, and Z incredibly well while under the influence, odds are you'd do even beter while sober.
If you can "get shit done" while drunk b/c you're no longer afraid of the awkward situations, odds are you'd do even better at handling them sober.
We've never had an awkward situation where someone checks in epically bad code due to being sloppy-drunk that I'm aware of, but that's b/c people are largely self-policing and they realize that what you an manage to do drunk, you can dominate sober.
I don't wish to sound like a prude. We do enjoy the refreshments, but usually after-hours, or at least when doing exploratory R&D, perhaps playing with a new design. To do your best work on the most important projects at a startup, you really to to bring your "A" game.
I think jpdoctor has a valid point. The brain is highly suggestible. It's possible to trick yourself into feeling sad, happy, irritated, bored, excited, or any other state of mind. I could probably conjor up the kind of carefree, impulsive state that alchohol induces just by mindfully directing my thoughts for a few minutes.
This is a pretty interesting article, it's sort of taboo to discuss this in engineering, whereas in business and politics the function of alcohol in getting things done is taken for granted.
Like that author, I also find it much easier and faster to deal with uncomfortable emails when drinking. I also am able to crank out dreary but needed documentation, and it's also when I generally write proposals and cover letters, things with a social component to them needed. It's very helpful and saves a lot of time, just don't go overboard.
I used to say: "There's nothing wrong about coding while being drunk, just don't commit!". But now, it'd be more "There's nothing wrong about coding AND commiting while being drunk, just don't push it!"
You can push. I do. It just goes up to the server into my personal "clone" of the actual project. The Ci server can then pick it up, run it's thing and I can see output from that and then decide whether or not I want to file a merge-request into mainline.
A theory floating around HN a couple days ago was that a few drinks help you focus because they are a tax on your mind. It makes your mind disregard distractions (like second thoughts etc.) because otherwise it simply couldn't function.
I don't find alcohol helps me at all; it takes an edge off me for several days. I very rarely drink, almost only at special occasions and then matched wines with meals and that kind of thing.
But I do find that being somewhat tired helps me get into a certain kind of "getting things done" zone: when the creative planning is not necessary, and mostly the grunt work of pushing things through to implementation remains.
Being tired makes it easier for me to do public speaking and sales presentations. I've never locked up in the middle of a presentation when I've had a bad night's sleep beforehand. It's almost getting to be something I optimize for: set up travel so I'm as tired as possible before presenting.
Heh, yes, I can confirm this. The one time we met you said that you weren't sleeping well (since school had just started) and, as a result, were talking more than usual.
Whenever I'm low on sleep, I'm mostly just irritable and more prone to making mistakes, although once, when particularly sleep deprived, I found myself reading the back of a shampoo bottle as if it were a cooking recipe. A couple minutes in, I realized it wasn't a recipe, thought to myself something like "Snap out of it!" Not more than five minutes later and I was reading the "recipe" again.
Anyways, personally. I'm certainly neither more productive nor more talkative when sleep deprived.
That's exactly my experience, as well, only I think I'm pretty good at creative stuff when I'm tired, in addition to accomplishing any grunt work I have...
yeah, really! We don't need that crap to code especially. Do you think people that do free solo or base jumping will get tipsy just to get more ballsy? no, they get over their fears and that's much more rewarding.
I've coded twice while buzzed and had great results. I think it may have done something to curb my ADD, which led to some serious focus and feeling of motivation- I was able to focus on problems without other distractions floating in my mind. I figured the code quality would have suffered, but that wasn't the case.
I rarely drink so I would not do this regularly, but I would like to find a less destructive way to achieve the same coding euphoria.
Great that it works for you... I'm usually totally off the rails after a drink - I get so relaxed that nothing can bring me back to work, I can't even talk with people... also I fall asleep short after.
Lack of sleep, on the other hand, does exactly what you describe - I don't anguish over every detail and just get stuff done (usually pretty well, too)...
Well I'm drinking Absolut Vodka right now, but that's just 'cause I'm hung over. Writing code is the farthest thing from my mind right now...
Seriously though, let's start a discussion about better coding through chemistry in general. Nicotine patches? Smart/nootropic drugs? Supplements? Preferred caffeine delivery vectors? Etc. What works for you?
I've tried Adderall, Ritalin, etc, and sometimes I'm able to concentrate on the things I need to get done, but unless I'm really careful about saying focused I end up going off on tangents and writing the most amazing but useless code for several hours.
Experimenting with crazy metaprogramming techniques, writing over-engineered utility libraries, experimenting with new technologies, writing epic blog posts, etc. That said, I've learned a lot about programming by going off on those tangents.
Yep - stimulants will give you amazing focus, but you need to make sure that focus is trained on the right thing first. It's best to take them after you're more-or-less on track, or at least committed to a plan. If you just take them while going through a "morning routine" and haven't decided what you're going to be doing, you can easily burn a day on tangents.
(As a third party, you can notice this behaviour in others if those folks are prone to calling you with all sorts of great ideas and things they're going to do today, but by the evening, they're discussing how to improve TLB cache hit ratios for their Ruby-on-Rails app.)
But if you get on track, wow, stimulants can make an amazing amount of difference. They're great for getting a large amount of work done, as well as dealing with complex problems.
"Experimenting with crazy metaprogramming techniques, writing over-engineered utility libraries, experimenting with new technologies, writing epic blog posts, etc. That said, I've learned a lot about programming by going off on those tangents."
Sounds like fun to me.
But maybe the focus you needed was more in the TPS genre? :)
I stopped drinking caffeine because it was having a huge negative effect on my brain and thought processes, it made me highly irritable and a very unlikeable person.
At least Vitamin D is definitely worth it (unlike the controversial suggestions of the OP about booze) - at worst, it will do nothing (i.e. your diet and locale means you have sufficient Vitamin D), but I definitely notice a positive difference.
Well, many people (including me) are low in vitamin D, because we spend so much time indoors. My dermatologist said (only partially joking) that if you're aren't deficient in vitamin D, you're not using enough sunscreen.
If you're deficient in vitamin D, and you know it, then why not take vitamin D pills? They're cheap, they're small, and having micronutrient deficiencies is not cool.
I didn't see your comment until much later. I was just assuming that was a given. Of course if you know you're low in vitamin D, you should be taking vitamin D pills, as I do.
Just about the worst habit I get into is to push major new code live into production and then go out to 'celebrate'. I've fixed so many production issues on a blackberry that was ssh'ed into a server while sitting at a bar counter that I don't even want to think about it. Now I know to push code during the most boring times of the week and go out to celebrate the lack of issues another night.
Just personal experience here, and you're not me so I'm sure itdoesn't apply and please feel free to ignore it, but I did this and it was great for a while. Then shit shows up and I start drinking to cope with problems I should've been facing head-on instead. At the end I had to give it up entirely. Nothing major broken in my case, thank God, but relying on the sauce to write your emails or get you on a plane reminds me of a reflex I wish I hadn't developed.
I've tried coding drunk. It was a disaster - even a couple of beers had me really struggling to produce anything worthwhile. I decided coding was like driving - you need all your faculties to work. [...] I've read things where people brag about coding drunk, and frankly I've been jealous that I couldn't do it. Or code tired, fuelled by nothing but pizza and coffee.
I'm reading Uncle Bob's latest book: "The Clean Coder". In chapter 4, "Coding", he writes about his set of rules and principles for coding (behavior, mood, and attitude while writing code). About 3 AM code, he writes:
The worst code I ever wrote was at 3 AM. [...] I remember feeling so good about myself for the long hours I was working. I remember feeling dedicated. I remember thinking that working at 3 AM is what serious professionals do. How wrong I was! [...] The moral of this story is: Don't write code when you are tired. Dedication and professionalism are more about discipline than hours. Make sure that your sleep, health, and lifestyle are tuned so that you can put in eight good hours per day.
I think this is solid advice. He later says that "The Zone" (aka "flow") should be avoided, which is more controversial... ;)
I agree. Remember we're all programmers, which means we all sit around thinking about how to be perfect all the time, because it's out job, which is a FUCKING INSANE thing for humans to do by and large, and can easily lead to analysis paralysis.
I love approaching work from both the hyperfocused left brain and those mental states where I'm not quite so worried about semicolons, so to speak.
Actually, this is why proof assistants are so great. You drink a couple glasses of champagne at someone's PhD defense reception, and you can go back to your office and try as you may, it won't let you prove anything incorrect.
I admire the work you have put into our project, thank you very much for your efforts. However at this point we would like to look elsewhere for a different perspective. We have a certain style in mind that we do not think you will be able to provide.
We are sorry to have to say this, but unfortunately we will not be able to take advantage of any further contributions from you. The contributions to date will be compensated in full.
The very best of luck with your future prospects.
Sincerely,
jfkdsjfls fjdsklfj
----INSTEAD OF-----
I'm afraid your writing style doesn't fit with what I'm looking to publish. That's not a criticism of your style, it's just a reality. I'm sorry not to be able to go any further. I wish you all the best and will, of course, pay you for the the work you've done so far. If you'd like to have a chat with me that's fine, you've got my number.
I had my current job by sending an email to a company while being drunk, finally i'm very happy with this job, do things while being drunk and you will not regret it ;)
I personally wouldn't be bragging that I turned someone away for their poor writing skill by using an excerpt from a rejection email that includes a comma splice. Real hypocritical. I can only imagine that the publication he referees has the reading level of your average YouTube comments section. Or maybe "getting things done" drunk, like coding drunk, also doesn't work for the author -- but being drunk, he believes it does.
It's only hypocritical if he also said that the editor must necessarily have the best grammar at any publication, which is of course ridiculous. Only grammar nerds think grammar = good writing.
Let me quantify good enough a little better. I am a perfectionist, I tend to write my code methodically and slowly and over-think and overanalyse every last line, I refuse to write a piece of code if I don't think it is good enough.
When I drink alcohol it takes away all of the above and lets me just write the damn code. Most of the time (there have been times that I've been closer to drunk than sober) the code works exactly as required and it passes code reviews without issues. It compiles, it works, and is the "perfect" code for the situation. Sure three months down the line it may need to be re-factored a little bit to add a new feature that was decided on by management, but in the mean time it has shipped.
Now, please don't take my example and think that you can become a better programmer by simply going out and buying a bottle of vodka. It most likely won't work. Should you give it a try? Sure, what have you got to lose? Just don't become dependant on alcohol as a way to function in everyday life. Been there done that, and it is not pleasant at all.