10 ms·
Code sober, get things done drunk
- Swizec 15y agoJust don't get too drunk. 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.
- barrkel 15y agoI 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.
- jakeonthemove 15y agoThat'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...
- tptacek 15y agoBeing 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.
- adbge 15y agoHeh, 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.
- calloc 15y agoI 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.
- droithomme 15y agoMy 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.
- X-Istence 15y agoThis 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.
- bascule 15y ago
- deleted 15y ago[deleted]
- udp 15y agoI'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)
- JackWebbHeller 15y agoReminds me of this XKCD, aptly titled "The Ballmer Peak": http://xkcd.com/323/ http://xkcd.com/323/
- micheljansen 15y agoI 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
- BSousa 15y agoI have the same problem with pool. Usually before the second pint I'm crap, 2-3 is the sweet spot, after that is downhill. But damn, I used to be in a couple leagues and those 2 pints really put me in the zone.
- mafro 15y agoPool 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..
- thret 15y agoFWIW, the graph is around 0.1337 for no other reason than 1337.
- marshray 15y agoReminds me of that scene in Citizen Kane where the reporter has to get completely passed-out drunk to write the review of Kane's starlet wife's opera.
- deleted 15y ago[deleted]
- middus 15y agoYeah, 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.
- tptacek 15y agoDo you drink regularly? I don't know anyone who gets 2-3 drinks in them and becomes an entirely different person.
- bryanlarsen 15y agoI'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'.
- burgerbrain 15y agoHis 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.
- tptacek 15y agoI 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.
- phzbOx 15y agoI 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!"
- X-Istence 15y agoYou 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.
- Jd 15y agoIf the problem is that you are too timid to get things done normally, the solution is not to get drunk. The solution is to get some balls.
- seb_z_lite 15y agoyeah, 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.
- d3vani 15y agoGreat point on taking care of the monotony a few drinks in. How you're coping with disliking flying is a whole other conversation haha.
- itmag 15y agoWell 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? Anyone tried Modafinil?
- udp 15y agoHell no. I enjoy a drink or a cup of coffee, but I wouldn't touch any kind of supplement or nootropic with a barge pole.
- itmag 15y agoNot even stuff like fish oil, vitamin D, piracetam, gingko, stuff like that?
- udp 15y agoNope. Good diet, plenty of exercise. :-)
- waterlesscloud 15y agoDiet is of course chemistry.
- xpaulbettsx 15y agoAt 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.
- cschmidt 15y agoWell, 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.
- bstar77 15y agoI'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.
- nyrb 15y agoMaybe this is true.. people with ADD/ADHD who get lightly buzzed might have boosted their focus. I have noticed that when I drink a single IPA beer and I can think better, write code better, etc.
- deepkut 15y agoJust look out for those typos...
- jakeonthemove 15y agoGreat 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)...
- tree_of_item 15y ago"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." http://www.bbc.co.uk/news/magazine-15265317 http://www.bbc.co.uk/news/magazine-15265317
- talkingquickly 15y ago
- jpdoctor 15y ago> But I think that doing some of the shittier tasks around a startup is easier after a few drinks. And when you realize that the drinks are just an excuse, you will be one step closer to enlightenment.
- tptacek 15y agoI don't think this is a fair comment at all. Drinking definitely does alter distractibility.
- enneff 15y agoI 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.
- Duff 15y agoSounds to me like a recipe for a bad habit. 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.
- burgerbrain 15y agoWhy 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"? This is just pop psychology mumbo jumbo.
- sdfsdf22 15y agoIt isn't. 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."
- burgerbrain 15y agoAlcohol 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".
- Duff 15y agoHaving 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.
- spxdcz 15y agoFor those who didn't spot it, I assume that the title of the post is a take on the quote attributed to Hemingway, "Write drunk; edit sober."
- languagehacker 15y agoI 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.
- djtriptych 15y agoIt'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.
- Ogre 15y agoA general piece of advice I've found helpful is "Write code like you're going to have to fix critical bugs while drunk at 2 in the morning."
- po 15y agoJust 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.
- droithomme 15y agoThis 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.
- deleted 15y ago[deleted]
- jMyles 15y agoI suppose it goes without saying that marijuana is quite a bit better for coding than alcohol?
- mmaunder 15y agoMy 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.
- tommi 15y agoI 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.
- nhooey 15y agoI wouldn't call a glass of wine a toxic.
- kevinalexbrown 15y agoYou 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.
- 15y ago
- glenbo 15y agoI 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.
- eneveu 15y agoI'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... ;)
- hmottestad 15y agoDear .... 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.
- djtriptych 15y agoI 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.
- djtriptych 15y agoI 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.
- joejohnson 15y agoThere are so many reasons why this is a dumb idea.
- deleted 15y ago[deleted]
- deleted 15y ago[deleted]
- ofca 15y agoThat, my friends, is called a ballmer peak. there is a great xkcd comic about this (http://xkcd.com/323/ http://xkcd.com/323/) as well as a great quora thread ( http://www.quora.com/Is-there-any-truth-to-the-Ballmer-Peak http://www.quora.com/Is-there-any-truth-to-the-Ballmer-Peak ). Just dont take it too far when you read this :)
- trurl 15y agoActually, 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.
- justinbaker 15y agoI go for non-alcohol influence..cause it doesn't dumb me down. Just saying.
- gordonslondon 15y agoI 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 ;)
- absintheslink 15y agoJust 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.