Hacker Newsnew | comments | ask | jobs | submitlogin
Is there evidence that drugs can help programmers produce “better” code? (stackexchange.com)
101 points by pw7 534 days ago | comments


tokenadult 534 days ago | link

This question is basically a medical question, so it is best answered with the principles of science-based medicine in mind.

http://www.sciencebasedmedicine.org/index.php/about-science-...

First of all, do we have a clear evaluation criterion for "better" outcomes? If the question is about writing better code, is there agreement at the start of an experiment about what "better" means? I'm not experienced in evaluating software code (I'm much more experienced in evaluating psychological and medical research), but it seems to me, from reading HN, that better code could be code

a) that is able to pass all the unit tests with an earlier deadline,

b) that has a smaller total bug count when subjected to code review,

c) that solves a problem that other programmers in the same workplace didn't solve until later,

d) that works around an intellectual property claim by a competing company more convincingly,

e) that meets company stylesheet requirements more exactly,

f) that can be maintained by less skilled subsequent programmers,

and perhaps other criteria.

Any sound experimental study has to meet a lot of other criteria

http://norvig.com/experiment-design.html

to be worthy of believing, and in human drug studies the criteria include

1) sufficiently large sample size (n = 1 just doesn't do the job)

2) treatment-control design (so that some subjects of the experiment get the drug, and some subjects do not)

3) double-blind administration (the subjects of the experiment should not know if they are getting the drug, nor should the experimenters know which subjects are getting the drug)

and many more, especially

4) rigorous statistical analysis afterward.

As Richard Feynman said, "The first principle is that you must not fool yourself--and you are the easiest person to fool. So you have to be very careful about that."

http://www.lhup.edu/~DSIMANEK/cargocul.htm

So anecdotes along the lines of "I took this drug, and I wrote much better code" can be completely discounted, because we don't have access to the coder's before-and-after work product (nor to the coder's detailed dosage history) to know what really happened.

-----

derefr 534 days ago | link

You tend to use the very specific phrase "nootropic drugs" to talk about drugs which help with productivity or creativity or some other aspect of working life. Asking whether there is evidence on nootropics, is just asking whether there are any heavily-tested nootropics. Asking anything else--to lex it out, whether "drugs that have no productivity-enhancing aspect, enhance productivity" is just playing the fool to incite extremely subjective flamewars.

So, let's avoid that, and just focus on nootropics. Is there evidence that they work? Depends on the drug. We have drugs (caffeine, theanine) that are in foods we've been consuming since the beginning of civilization, so we've heavily researched those and are pretty confident in what they do.

On the other hand, new, synthetic compounds, like modafinil, are only really created and pushed through FDA approval if there can be found some sort of therapeutic, non-nootropic purpose in their use: in modafinil's case, treating narcolepsy. This means that their use as nootropics is much less well-researched, and consists mainly of anecdata (however much there is) shared over the internet.

The best you'll find, I think, in terms of data for efficacy of various drugs, is people who have set out to do double-blind studies on themselves: http://www.gwern.net/Nootropics

After reading data-points like these, you might be convinced to try some of them on your own. But be aware that people's body-chemistries can vary widely--especially where things affecting neurochemical balance are concerned--so everyone's reactions to these will still be different. Not in a sense of a "bad trip", usually; just that some things which other people swear by might not have much of an effect on your particular chemistry. So, the best thing to do, as in most situations: first research, then experiment.

-----

klibertp 534 days ago | link

I'm not an expert, but I'd like to comment on your statement that discussing non-nootropics in this context is pointless. I think it is not, and my argument goes like this: you code better when in mood to do so. Certain psychoactive substances make it easier to fall in certain moods, easier to change your mood or even forcibly change your mood for you (like some of benzodiazepines or MDM, MDMA). Their working is not "nootropic" (as in it does not necessarily improve any mental functions) but you're in generally better disposition to code after using them. This is true even for coffee, and even without developed dependence - if you're feeling sleepy, your code will be worse than when you're feeling wide awake, and coffee, being a stimulant that it is, can give you that feeling.

So, what I want to say is that not only measurable enchancement of "cognition, memory, intelligence, motivation, attention" (as with nootropics) can result in you doing better job. For example, while benzodiazepines generally lower cognitive ability, they enable people with depression to actually do something (to code, for example :)). Of course, when overdosed or just not fit for your particular brain, the same psychoactive substance can lower mental function so much, that no amount of optimistic thoughts is going to help you.

I just want to point out that there is more to productivity than memory, intelligence and concentration and that this means that when discussing productivity there is a place for not-strictly-nootropic drugs in the discussion. Although, I have to admit, that place is rather marginal due to very, very varied responses to such a substances among individuals.

-----

derefr 534 days ago | link

Certainly, if you have a problem with your mood, whether caused by stress, chemical imbalance, etc., that is damping your productivity, then using a mood-altering drug can remove that damping effect and let your productivity return to an optimal level. This is different, though, I think, from "enhancing" productivity, which usually refers to things that can be used to move someone "beyond" the normal human optimal performance in some way.

What a part of me wants to say is, "the literature for returning humans to optimal mood is broad and well-researched, and shouldn't really be the topic of Amateur Medical-Advice Hour on a social news website; the best thing to do if you have a problem with your mood is to speak to a therapist/psychiatrist, who will recommend you a course of action based on current medical best practices." But...

I have to admit that that really isn't exactly true. Therapists and psychiatrists aren't required to have any more knowledge of neurochemistry than any other doctor; they'll be able to follow a guide and tell you that if you're depressed they should take you through cognitive behavioral therapy and prescribe you an SSRI (and then an SNRI if that doesn't work, and then a TCA if that doesn't work, &c) but they probably won't think about the serotonin production pathway and suggest that you might need more Vitamin B. This is one benefit of the internet: the people who are experts on their little staked claim of knowledge can give it to the people who seem to need it, instead of those people having to go around and talk to experts in all sorts of different fields to get the perspectives from those fields. On the other hand, it's pretty useless to give these pieces of advice to no-one in particular, without a specific problem at hand to solve. It's a bit like doing science without a hypothesis to test; everyone sees their own--more often than not false and overreaching--interpretation of the data.

The one good thing that does come out of these threads is that they tend to get more people to say "wait, that sounds like me, maybe I have [X mood disorder]," ask their doctors about it, and it turns out that they do. This is in stark contrast to usual hypochondria surrounding most diseases; where a person will be quick to diagnose themselves with [X cargo-cult symptom-matching thing-they-don't-understand] to explain why their neck always aches or they keep coughing up yellow phlegm, people are wary of assigning themselves mood disorders, since most people feel that society will still consider them "guilty" in some way for having the problem ["you're just lazy" &c], and they definitely don't want to bring it out in the open to the point where they identify with it. Discussions with a bunch of people chiming in to say "oh, yes, I thought I was [X fault-of-character], but really I just had [Y chemical imbalance] and some [drug] fixed it right up" can really push people to investigate this sort of thing where they otherwise wouldn't consider it.

I think the best compromise is that solutions should be discussed in the context of particular problems. Nootropics are an exception, because they don't solve any particular problem, other than the problem of wanting your life to be "even better-er"; but, for example, a root-level comment in this discussion about marijuana use really won't have anything good happen to it; each person will be looking at it in the context of a different problem and either implicitly accepting or rejecting the idea prima facie because of that. Better to ask a specific question, like "what drugs and/or therapies could be used to cope with stress-induced anxiety in the workplace"; then the discussion could actually go somewhere worth reading :)

-----

pstuart 534 days ago | link

The whole issue of "better living through chemistry" is a big experiment and the "professionals" may have better training but they can only guess as to what may or not work for an individual. In the end it's always a try and see approach.

-----

Supreme 533 days ago | link

> benzodiazepines generally lower cognitive ability

On the subject of a particular drug sometimes being useful and sometimes counter-productive, the missing link is that the brain has several points of neurochemical homeostasis - these are also known as 'moods'. Moving from a given mood to another requires some combination of influences. E.g. moving from mood X to Y may require a boost in dopamine while moving from mood Z to Y may require more GABA. This is why it's relative and different people are not affected by the same drugs in the same ways - their baseline levels of major neurotransmitters differ. So one person has a natural tendency towards mood X while another tends towards mood Y - i.e. one person has naturally high dopamine levels which another has high levels of serotonin.

I believe that these tendencies are the result of the body adapting to the conditions it grew up in. The major factors I can see are diet, the social situation (both in terms of family and culture-at-large), amount of exercise, genetics and pollutants.

I completely agree that mood and productivity are inherently inseparable. It's not a one way relationship either - they affect each other. Hell, everything in the brain seems to affect everything else in the brain. It's a giant web of dependencies and influences. It reminds me a lot of badly designed legacy software systems - everything makes sense when you dig in deep but looks like an absolute mess from afar.

-----

otakucode 534 days ago | link

You made a good point that I just wanted to make explicit, because I think it is generally not something people know or at least not something they've thought much about - The FDA has a very specific mandate. They regulate any substance which "treats, prevents, or cures any disease." They specifically do not regulate, or test for, any substance which would claim to improve the functioning of a healthy person. If a drug came out tomorrow which would enable you to lift 50 kilos more tomorrow than you can life today, the FDA would have no jurisdiction over it (unless someone wanted to give it to patients suffering from muscular impairment due to a disease, of course). This is also one of the reasons why the FDA does not regulate alcohol and cigarettes. Those substances are not meant to treat, cure, or prevent anything.

I'm not clear on whether such a 'strengthening' drug would be legal to sell, just that the FDA could not authorize it for sale.

-----

danneu 534 days ago | link

That's not true.

What you defined is a drug.

    Accordingly, these ·products are drugs, under 
    section 201(g)(1)(C) of the Act, 21 U.S.C. § 321(g)(1)(C),
    because they are not foods and they are intended to affect
    the structure or any function of the body. Moreover, these 
    products are new drugs as defined by section 201(p) of the 
    Act, 21 U.S.C. § 321(p), because they are not generally
    recognized as safe and effective for use under the 
    conditions prescribed, recommended, or suggested in
    their labeling.
And you bet the FDA cares.

    Under sections 301(d) and 505(a) of the Act, 
    21 U.S.C. § 331(d) and 355(a), a new drug may not
    be introduced or delivered for introduction into 
    interstate commerce unless an FDA approved application 
    is in effect for it.

-----

ekianjo 534 days ago | link

Completely false. Be it for the potential side effects of such a substance, it would be considered as a drug anyway since it would require proper medical monitoring. Even cosmetics are sometimes at the borderline of drugs based on the claims they make and the effects they have.

The reason why alcohol and cigarettes are not regulated as drugs is rather based on historical, political and economical factors. They have existed for a long time and people are considered responsible enough to know how not to abuse them, they have a well known risk factor, and they bring back lots of tax money to society when authorized.

But for any new substance, you bet FDA would be involved, no matter whether you call it a drug or not.

-----

pchivers 534 days ago | link

From what I understand there is only one study on the relationship between creativity and LSD:

Psychedelic agents in creative problem-solving: a pilot study. Harman WW, McKim RH, Mogar RE, Fadiman J, Stolaroff MJ. Psychol Rep. 1966 Aug;19(1):211-27.

http://en.wikipedia.org/wiki/Psychedelics_in_problem-solving...

The results suggested that LSD has a positive effect on creative problem solving. I think it is a shame that no follow-up experiments have been conducted.

-----

marcos123 533 days ago | link

In my opinion, the most fascinating and progressive areas of study are the ones that aren't studied, due to a multitude of political reasons. It makes me feel quite bad for people that can't fully entertain an idea if it hasn't been through a randomized, double-blind placebo study.

-----

gourneau 534 days ago | link

I wonder how many adherents Steve Jobs have dosed LSD because of his advice.

-----

waterlesscloud 534 days ago | link

I recently read the book _What The Dormouse Said_, which is about the early days of silicon valley computer culture and the interaction of that culture with the counter culture.

According to that book, there was a notable portion of the people in that early SV culture who at least experimented with LSD, and there was even an organization called the "International Foundation for Advanced Study" in Menlo Park that was founded by an engineer to study the possible benefits of LSD use among engineers.

-----

PaulHoule 534 days ago | link

Drugs in programming, as well as other occupations, play an emotional role as much, or more so, than a cognitive role.

If Habit A helps a programmer who'd otherwise be sidelined by emotional problems stay in the chair, it may help that programmer be more productive than they would be otherwise. Of course, addictions don't help us face those problems in the long term, and often let them get worse.

All sorts of drug-related behaviors exist among programmers. Many shops full of brogrammers celebrate beer o' clock at 4pm. Other programmers sneak out alone or with friends at lunchtime to a bar or convience store to enjoy some alcoholic drink.

Many programmers abstain from intoxicants at work, except for the common stimulant caffeine. Others are hooked on opiates after being perscribed them for chronic or acute pain.

LSD, even the weak stuff common in North America from 1970 to 2001, is profoundly distracting. Years ago I ate a pinch of mushroom dust and found that 25 minutes later, I couldn't keep my eyes straight to even look at a computer screen. On the other hand, it's the only sacrament that's clinically proven to more create spirtual experiences than a placebo -- the ability of hallucinogens to create profound changes is practically unlimited.

Long before the statute of limitations, I once received a gift of several dexedrine pills from a friend diagnosed with ADHD. I took one on the the first day of a new project and felt euphoric. I wrote several hundred lines of beautiful code that would serve the nucleus of a system that was planned to replace critical functions of a production system that tens of thousands of people depend on every day.

A week later I had a more sobering experience. I was tasked with upgrading another production system, and with the dexedrine tab in me I felt cocky and by 9:08 am I'd deleted the master instance of the production system.

I got forbearance from my co-workers because we had a backup ready, and a tested restore procedure, so we had the system back in 13 minutes and soon proceeded with the upgrade.

That was a portent of things to come. The project I was working on had no project manager and a group of stakeholders that hated each other. I tried to code my way of a difficult interpersonal problem and ultimately it all came apart. A year later I deployed the new system with hardly any testing and of course it didn't work. After a week of month of daily patches, each bug fix breaking something else and spreading database corruption, we threw in the towel and reverted to the old system.

My contract didn't get renewed at that employer the next year, and that was the beginning of my being a "journeyman" as a mercenary maintenance programmer.

Perhaps I shouldn't blame two amphetamine pills for something that was so much bigger; but I like the story that the pills started the project out in a state of spiritual misalignment. Had I listened to people instead of coding, things might have worked out differently. I might even have quit and had an easier time getting my next job.

Some programmers adocate nootropic drugs like Piracetam but I think those are just as bad as speed. They mess up your reward pathways and make you feel like you're Tony Stark but they don't really make you a genius.

I for one am addicted to caffeine and find it quite difficult to stop, even though it screws up my digestion almost to the point where I throw up. It's terrible, but at least I'm better off than the alcoholic and dope addicts I've met.

-----

klibertp 534 days ago | link

> Perhaps I shouldn't blame two amphetamine pills for something that was so much bigger;

No, you shouldn't. IIRC there was not even slightest trace of the substance in your body after a few days. Please, don't attribute to the drug things that can be equally well explained by inexperience in social interactions, emotional immaturity or any number of other reasons, inluding bad luck. Have you been using the drug for half of that year - maybe. But it's obvious that whatever made you "code and not listen to people" was not the drug. I mean no offence, and I guess it is, maybe, somewhat, possible that using a drug twice changed your character and way of thinking for a year, but I find it really hard to believe.

-----

mnicole 534 days ago | link

> Years ago I ate a pinch of mushroom dust and found that 25 minutes later, I couldn't keep my eyes straight to even look at a computer screen.

Can I ask what you thought was going to happen? Not to discredit your experiences (obviously everyone's different), but it sounds as if you're trying to place a lot of blame on perceived expectations, which can lead to some really disappointing results in any situation.

-----

001sky 534 days ago | link

Sobering reminder. Performance = output/time. so the timeframe is critical. its trivial to increase productivity in the "short term". in ways that are unsustainable (or: unhealthy). Exogenous modification of brain's chemistry is, however, rarely healthy, over long-time-horizons. At least given the evidence to date.

-----

marcos123 533 days ago | link

Yeah, but when you think about, everything you put in your mouth is an exogenous modification of, at least your body's chemistry, if not your brain's chemistry.

We live in a world of gray areas, not black and white.

-----

001sky 533 days ago | link

but when you think about it

There's sense, and common sense. lots of things in nature will kill you if you eat them. lots of things in nature are unhealthy if you eat them in excess, over the long run. phschoactive drugs? are no different, even naturally occurring ones in food-like form. common sense and experience will illustrate that your body is ~self-regulating. if you f@ck with it (too much), it will f*ck with you back. =/

-----

redthrowaway 534 days ago | link

Define drugs. I know Ritalin is an invaluable tool when it comes time for me to sit down and hack, but can also be counter-productive in limiting my creativity.

I think it would be self-evidently false to suggest that no mind-altering substance could lead to a state of consciousness more conducive than the baseline for a given activity, but I would stop short of recommending any particular drug for programming. If it works for you, do it. If not, don't.

-----

Supreme 533 days ago | link

You do realise that you're doing something quite dangerous by turning to dopamine-influencing drugs to motivate you, right? This class of drugs can change brain structure, promote cancer growth and generally make you devoid of emotion. At the very least, protect yourself with anti-oxidants and NMDA antagonists. There are plenty of less serious things you can take/do if you simply lack motivation. Exercise, cut out sugar and caffeine entirely and try Noopept.

Also see:

* http://www.nih.gov/news/health/feb2009/nida-02.htm

* http://thelastpsychiatrist.com/2006/05/ritalin_causes_cancer...

* http://www.cchrint.org/2010/11/15/adhd-ritalin-%E2%80%93-bra...

But for the love of god, think about what you are doing to your body. There are other ways, just look a little harder.

-----

redthrowaway 533 days ago | link

I've been on Ritalin since I was 10. I used to take it daily, now I just take it when I need to concentrate for extended periods of time. Thank you for your concern, though.

-----

bennyg 533 days ago | link

He may be prescribed it. I understand your sentiment, but Ritalin may make him take a shower and actually make the morning commute.

-----

redthrowaway 533 days ago | link

Nothing at all like that. I was prescribed it for ADHD as a child. Now, I take it if I'm cramming or spending all night in the lab. Generally, less than once a week.

-----

noonespecial 534 days ago | link

I scale the Ballmer Peak on a regular basis. I've semi-scientifically mapped out the exact amount required to get the desired effect. I've started trying to plot the continuous consumption rate required to spend more time at the summit.

I have spreadsheets.

-----

jobu 534 days ago | link

In case anyone is unfamiliar with the "Balmer Peak" : http://xkcd.com/323/

For extra points, I would love to see your spreadsheet data plotted as a xkcd-style graph (http://mathematica.stackexchange.com/questions/11350/xkcd-st...)

-----

patrickk 533 days ago | link

Does this actually seriously work? I've never tried coding while intoxicated, let alone heard of the Ballmer peak till now.

Wonder what variables you would track? Type of drink, percentage alcohol in it, how long since you last ate, how quickly you drink the alcohol, your height and weight? Should there be a variable for being Irish (high tolerance) ;-) Last one was a joke btw!

-----

redthrowaway 533 days ago | link

A couple of beers will definitely get the juices flowing, just as several more will tend to obviate any prospect of productivity.

-----

waterlesscloud 534 days ago | link

We called it "two beer logic" in college. The effect was real, though possibly placebo driven.

-----

6ren 534 days ago | link

We have to mention the famous mathematician Paul Erdős http://en.wikipedia.org/wiki/Paul_Erd%C5%91s

  After 1971 he also took amphetamines, despite the concern of his friends, one of
  whom bet him $500 that he could not stop taking the drug for a month. Erdős won the
  bet, but complained that during his abstinence mathematics had been set back by a
  month: "Before, when I looked at a piece of blank paper my mind was filled with
  ideas. Now all I see is a blank piece of paper." After he won the bet, he promptly
  resumed his amphetamine use.
He also liked coffee.

Note: effective programming in the real world is absolutely not the same as mathematics - but some would argue that the essence of it is.

-----

rbanffy 533 days ago | link

According to popular wisdom, "There are two major products that came from Berkeley: LSD and Unix. We don't believe this to be a coincidence." It's, of course, incorrect (http://www.lemoda.net/people/jeremy-s-anderson/index.html), but, in any case, it's a funny one.

Now, on a more serious tone, a lot of programmers these days take some kind of drug, be it to control their ADHD, Asperger and other assorted medical conditions, be it to supplement something they think their brain is burning through faster than our hunter-gatherer heritage made us budget. I have noticed, however, some friends of mine who started taking ADHD medication (Methylphenidate, the only ADHD drug approved for use in Brazil) that became, indeed, much more focused and productive (amazingly so, sometimes), but that's not a double-blind study.

It would be fun (if horrendously complicated) to design a good study for that.

-----

xutopia 534 days ago | link

That reminds me of the time I was taking pot while in college. During one class I was completely zoned into the cursor and moved it back and forth 5-6 pixels across the screen.

My experience though it is anecdotal seems to rule out at least cannabinoids.

-----

mistercow 534 days ago | link

Dosage is an important consideration, though. I know someone who used to use pot as a programming aid, but he had to be very careful with the dosage. By using very small amounts spread out over the day, he could maintain a flow state that let him churn out code for hours and hours. He didn't find it all that helpful for design and planning, but for large projects that involved an overwhelming amount of fairly boring work, he found it to be a helpful tool.

The problem was that if he used too much, he'd be pretty much useless until it wore off some. Smoking a plant is not exactly what you would call "precise dosage administration", so this was a fairly significant issue.

-----

damncabbage 534 days ago | link

flywheel has an interesting reply to this, but he has been hellbanned. Go to your preferences and turn showdead on to see it.

-----

getsat 534 days ago | link

Posted on HN 49 minutes ago, closed as "not a real question" 48 minutes ago. Wow.

-----

Bockit 534 days ago | link

> It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

It seems pretty specific to me. If you have evidence, present it.

I can see an argument for it being too broad, but it saddens me that a question such as this is closed when it has the potential to be very interesting.

I suppose it also has the potential to devolve into a giant drugs flamewar, which may be why it was really closed.

-----

davidlumley 534 days ago | link

Ironically, if you posted the same question on stackoverflow you'd probably be directed (or have it moved) to programmers.stackexchange.

Frustratingly, I can't find anything in the FAQ which would indicate why the thread (and countless others) have been closed: http://programmers.stackexchange.com/faq

Questions which are similarly open ended and perhaps more subjective are still left open ( http://programmers.stackexchange.com/questions/99445/is-micr... ). If anyone has more insight into how/why questions get closed on programmers.stackexchange I'd love to hear it!

-----

jamesrom 534 days ago | link

Power trip.

-----

xdev 534 days ago | link

Honestly I'm not a huge fan of programmers -- in the beginning I thought it would be a good place where we could have these debates and talk about general programming/programmer issues. Stack Overflow was the place for specific technical questions, "how can I do X?" -- programmers could be a good site to have a Socratic debate on the virtues of various programming methodologies - "Why should I do X over Y?". Honestly we need a good forum for debunking the various cargo-cult ideas or at least presenting all sides in a debate in one location.

I understand the stack overflow format may not be the most appropriate -- after all these questions may not have a "best" answer, or that best answer may change over time. To counter that, perhaps the person asking the question could just pick the answer they went with and offer some context why it worked for them.

If all the questions must have a specific answer, then I fail to see what the difference is between SO and Programmers -- I would follow the DRY principle and remove the duplicate code.

-----

inghoff 534 days ago | link

It just seems to me like relevant, interesting questions get closed all the time because just because. It's getting pretty annoying from the StackExchange network.

-----

mung 534 days ago | link

Whoever closed it needs to do more drugs, then they'll know why they are being a...

-----

davidtanner 534 days ago | link

Insofar as programming involves problem solving I believe the answer is an unqualified "yes".

In _The Psychedelic Explorer's Guide: Safe, Therapeutic, and Sacred Journeys_ by James Fadiman, Ph.D a chapter is devoted to discussing the results of a study on the use of the psychedelic substance mescaline to enhance creative problem solving.

http://www.amazon.com/Psychedelic-Explorers-Guide-Therapeuti...

This study was conducted at the Institute for Psychedelic Research at San Francisco State University.

I'll quote at length from the book chapter: "The participants were 26 men engaged in a variety of professional occupations: 16 engineers, one engineer-physicist, two mathematicians, two architects, one psychologist, one furniture designer, one commercial artist, one sales manager, and one personnel manager."

"Nineteen of the subjects have no previous experience with psychedelics."

The subjects were selected based on their psychological stability and motivation to solve a specific problem they had at work.

They met in small groups for several days before the psychedelic session and were told what to expect and given instructions in the use of the drug-effect for problem solving.

The subjects were given 200 milligrams of mescaline.

After six weeks the subjects were given questionnaires on how the effects of the session had effected their ongoing creative ability as well as how valid and acceptable the solutions conceived during the session seemed to them at that time.

Some (but not all) examples of solutions obtained by the subjects under the drug-effect:

* A new approach to the design of a vibratory microtome

* A commercial building design, accepted by the client

* A mathematical theorem regarding NOR-gate circuits

* Design of a linear electron accelerator beam-steering device

There are several tables full of numerical data. Table names include "Application of Solutions Obtains in Experimental Sessions" and "Work Performance Since Session".

My conclusion: Psychedelic substances can be used to enhance creativity - but as always who is using them and how they go about it makes all the difference.

-----

davidtanner 528 days ago | link

I just found a short essay by Benny Shanon, http://pluto.huji.ac.il/~bshanon/ , called Ayahuasca and Creativity.

http://www.maps.org/news-letters/v10n3/10318sha.html

Quotes from the above article that I feel are most salient for this discussion of drugs, creativity and problem solving:

"As explained in Shanon (1998b), ayahuasca can also induce very impressive ideations. It is very typical for ayahuasca drinkers to report that the brew makes them think faster and better -- indeed, makes them more intelligent. Several of my informants reported the feeling of potentially being able to know everything; I too had this experience. While, this overall feeling is not objectively provable, my data do reveal some ideations which are truly impressive. Especially let me mention philosophical insights attained by drinkers without prior formal education. Some of these resemble ideas encountered in classical works as those of Plato, Plotinus, Spinoza and Hegel. Significant insights are more likely to be encountered in domains in which drinkers have special competence. Personally, with ayahuasca, I had many insights regarding my professional field of expertise and to which, following further critical scrutiny, I still hold. I have heard the same from other persons."

-----

Zenst 534 days ago | link

Define better code. Code at that point/moment in time in comparision, maybe. Code later on that is more robust and well documented so that others can understand and change if need be better, probably not.

People say drugs help you do this and that, but over time you gain tollerance, have downsides when drug wears off. So is this another tortoise and hare comparision nomatter how it is thought thru.

Now if drugs help you to do what you can't, be it atheritis or the like, or pain medication. Something that counters a condition you normaly have that limits your abilities, then sure they do make better code. But as a rule it has too many exceptions to make such a brash statement by using such a losely drifined term as drugs in a title without better focus onto specific groups/types/needs.

What goes up must come down, employers don't pay for your comedown, nor do they pay for your supply, so beyond the offcie coffee or prescription mecial needs. I'd say meditation and better mind focus and planning/whole mental approach can do more for anybody to produce better code than any off the shelf solution. On balance take the free coffee and run with it.

-----

meds_means_hide 534 days ago | link

This comment reads as some general pondering about "no there's no way ahead except hard work". Just because there are tradeoffs doesn't mean there's not a clear advantage.

Thinking that humans have somehow evolved to behave at maximum performance for engineering or software design is an odd belief.

As far as "it must come down, it can't last", there was a leader (for 10 years) of one of the world's top air forces that was a morphine addict. Using "office coffee or prescription" is just a no true Scotsman argument.

-----

fpp 534 days ago | link

A group of scientists from the University of Illinois at Chicago have shown that moderate consumption of Alcohol may boost creativity.

... and there is of course the Ballmer Peak

http://duvet-dayz.com/archives/2012/04/13/1199/

-----

antihero 534 days ago | link

Psh, anything that gives you a different perspective on life is important. LSD gives you a vastly different perspective on reality, so I guess if you relate that to life in a meaningful way, is fairly important.

-----

cynwoody 534 days ago | link

I don't know the answer, but I am reminded of John Markoff's 2006 book What the Dormouse Said: How the Sixties Counterculture Shaped the Personal Computer Industry[1].

If you've forgotten what the dormouse said, listen: http://www.youtube.com/watch?v=WANNqr-vcx0

[1]http://www.amazon.com/What-Dormouse-Said-Counterculture-Pers...

-----

lost-theory 534 days ago | link

I think stimulants and amphetamines definitely have an effect on programming. Maybe it affects quantity more than quality, but Paul Erdos, one of the most prolific mathematician ever, comes to mind:

  His colleague Alfréd Rényi said, "a mathematician is a machine for turning
  coffee into theorems", and Erdos drank copious quantities. After 1971 he also
  took amphetamines, despite the concern of his friends, one of whom (Ron Graham)
  bet him $500 that he could not stop taking the drug for a month. Erdos won the
  bet, but complained that during his abstinence mathematics had been set back by
  a month: "Before, when I looked at a piece of blank paper my mind was filled
  with ideas. Now all I see is a blank piece of paper." After he won the bet, he
  promptly resumed his amphetamine use.
http://en.wikipedia.org/wiki/Paul_Erdos#Personality

-----

meds_means_hide 534 days ago | link

LSD: I have found it possible to use it to gain insight. (Cisco systems had some key person(s?) using LSD to design products.) The problem is that you can trick yourself quite easily into "discovering" things which end up not meaning much. So you do need some care, and perhaps someone to help guide you. For beginners, I'd say LSD's bigger benefit is being able to reshape how you think and handle life rather than understanding some new data structures. It's definitely a "must do this at least once in a lifetime" type of thing.

Stimulants are fantastic. Amphetamines provide focus as well as a nice perky feeling to keep you happy while coding. Ritalin (methylphenidate) works too, but I find it harsher and not as pleasant as speed. As the name hints, it makes you fast at things. Talking, thinking, calculating, coding. I notice with Ritalin, doing mental math happens instantaneously - I surprise myself. The focus can be a drawback: if you don't plan, you can end up focusing on something "interesting" yet time wasting. So prepare your day, first.

Opiates (such as time release oxycodone) are fantastic for keeping optimism. By keeping your mind in the right state, you can end up being much more productive. Again, the benefit is the drawback: being overly optimistic means your risk calculations and general decision management might be way off. (Biggest downside here is addiction, but it _is_ manageable, at least if you have money.)

Pot I've not found useful for much as far as work. I did try coding on it, and ended up writing an infinite loop and thinking it was the coolest thing in the world. Alcohol can sometimes be slightly helpful, in a similar manner as Xanax; just by relaxing and getting one into a better mindset.

-----

klibertp 534 days ago | link

> Opiates [...] (Biggest downside here is addiction

Dependency. Addiction is very similar for all the things you mention, physical dependency is unique to opiates (at least in comparison with LSD, pot and amphetamine).

-----

abecedarius 534 days ago | link

Doug Engelbart took LSD. Probably other prominent hackers around there/then, but I don't remember. (From Markoff, What the Dormouse Said.)

I can't answer about helping with coding.

-----

photorized 534 days ago | link

Define "better code."

There are medications that can influence focus, energy levels, productivity.

Problem is - we still don't really understand how the human brain works. The implications of introducing outside chemical stimuli can be horrendous. You may have noticed that big pharma companies are now focusing less on psych meds.

-----

Wintamute 533 days ago | link

Recreational drugs can certainly be part of a happy, functional social life when used responsibly by people with non-addictive personality types. Hallucinogenic drugs can give profound and life changing insight on your mental processes, although YMMV. Coding while actually high will not help you produce quality software.

-----

sh_vipin 534 days ago | link

Question should rather be : "Should writing better code be a reason to take drugs?"

For that matter, it's not the best code that makes a good product. A good code is just part of it.

-----

tsotha 534 days ago | link

Real evidence would require a double-blind test, but there is already such a large productivity difference between programmers you'd need a pretty large sample.

And what possible metric could you use to determine if the code is "better"? That's a really subjective thing.

-----

dlazerka 534 days ago | link

And better music. And better paintings.

Many great people did drugs. But don't mess correlation with causation please. Maybe great people are just more predisposed to drugs, while drugs actually harmed them.

-----

scotty79 534 days ago | link

This comes to my mind: http://www.flickr.com/photos/22926987@N00/2198300/

-----

knarfus 534 days ago | link

For me, "better" code seems to come from a combination of confidence, creativity, and concentration (maybe not all at the same time).

I need a certain amount of confidence to go after a difficult chunk of work that may not really lead anywhere or may turn out to be too big a task to accomplish in the available time.

I need a certain amount of creativity to come up with new avenues to try when I'm stuck on a problem or starting to brainstorm a new project.

And I need a certain amount of concentration to power through a hard coding task (both to tune out distractions and to keep a lot of information in short-term memory).

I have zero experience with hallucinogens, but my understanding is that they can help immensely with creativity but are really lousy for concentration (anyone care to chime in?).

Straight depressants don't really help me with any of the above, although I gather some people get more confident after drinking. I tend to go straight from "pleasantly unwound" to "I really need to get to sleep".

My experience with (legally prescribed) stimulants is that they're really pretty great for confidence and concentration. I also find that being slightly behind on sleep is less of an impediment to coding, and when I get into social settings I'm much more engaged and generally better at interacting with people.

The flip side is that I often can't sleep well, and I can rarely nap, so if I get too far behind I end up clicking around the web like a zombie all day. Paradoxically I'm a lot less interested in socializing, even while I'm better at it. All told I would say it's neutral to negative on creativity.

I'm also not totally comfortable with what effect five, ten, or twenty years of daily use will have, and part of me really wants to maximize the portion of my life spent without taking a pill every day. So it's a mixed bag.

-----

marcos123 533 days ago | link

In regards to the original question, Yes. Contrary to some peoples' beliefs, experiencing new perspectives is good for learning, problem solving, living. Francis Crick supposedly discovered the DNA helix while in the alternate universe that is an LSD trip.

-----

yaddayadda 534 days ago | link

Spiders not programmers, but definitely a graphic indication of ability to create - or not - detailed patterns while on various drugs http://www.trinity.edu/jdunn/spiderdrugs.htm

-----

nostradamnit 533 days ago | link

Legend has it that Bill Joy created Vi while on LSD, or at least came up the the idea...

-----

photorized 534 days ago | link

The Jobs example was about vision, not "code".

-----

anonymous_mouse 534 days ago | link

Hearsay: During WWII the code breakers of Bletchley Park were provided with benzedrine tablets.

-----

31073 532 days ago | link

I'd suggest looking at the book Imagine by Jonah Lehrer. It doesn't refer to coding specifically but he talks about ways to foster focus and inspiration. The author looks in to all ways to get to these states of mind including drugs.

-----

simplexion 534 days ago | link

Yes.

-----

drivebyacct2 534 days ago | link

Which drugs? I've been writing an application for 4-5 years. It's my "learn a new language" project and it's pretty complex and I recently rewrote it and exclusively worked on it under an influence of one or another of things, but nothing like Adderall or Ritalin. I just finished the final version of this project in Go and it is far and away the most readable, performant version I've written. It's also the first version to properly protect against all types of races.

-----

ecliptic 533 days ago | link

Paul Erdos famously swore by their productiveness.

From Wikipedia:

His colleague Alfréd Rényi said, "a mathematician is a machine for turning coffee into theorems",[31] and Erdős drank copious quantities. (This quotation is often attributed incorrectly to Erdős,[32] but Erdős himself ascribed it to Rényi.[33]) After 1971 he also took amphetamines, despite the concern of his friends, one of whom (Ron Graham) bet him $500 that he could not stop taking the drug for a month.[34] Erdős won the bet, but complained that during his abstinence mathematics had been set back by a month: "Before, when I looked at a piece of blank paper my mind was filled with ideas. Now all I see is a blank piece of paper." After he won the bet, he promptly resumed his amphetamine use.

-----

Supreme 533 days ago | link

Who wouldathunk that doing LSD could turn someone into a complete asshole with no regard for an open culture and a penchant for superficial things which don't matter in the least (like one button devices)?

-----




Lists | RSS | Bookmarklet | Guidelines | FAQ | DMCA | News News | Feature Requests | Bugs | Y Combinator | Apply | Library

Search: