Code sober, get things done drunk
alexmuir.com
alexmuir.com
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.
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.
I code best when I'm relaxed. Alcohol helps me relax.
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.
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.
Of course it's better if you don't need any toxics to live your life happily.
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.
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.
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 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.
This is just pop psychology mumbo jumbo.
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."
Thinking to the contrary can actually put you at more risk, since you might think yourself not at risk if you "only drink socially".
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.
You are mistaking responsible drinking for dependancy.
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.
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'.
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.
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.
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.
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."
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.
Old paper but a good one is The Psychology of Drunken Excess (http://psycnet.apa.org/journals/psp/48/1/18/) but afraid I don't think it's available without paying.
No one is around judging you or knowing you are drunk, you are just writing emails.
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.
"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."
e: talkingquickly's rebuttal is more substantial
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.
You don't get this mess with, say, coffee or tea.
But damn, I used to be in a couple leagues and those 2 pints really put me in the zone.
I don't need to point out too many beers will affect your technique in an equal and opposing fashion..
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.
And when you realize that the drinks are just an excuse, you will be one step closer to enlightenment.
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.
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.
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.
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.
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.
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.
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)...
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?
I enjoy a drink or a cup of coffee, but I wouldn't touch any kind of supplement or nootropic with a barge pole.
http://www.reuters.com/article/2011/11/26/us-vitamind-heartd...
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? :)
(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.
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 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.
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.