Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I just read this quote from Steve Jobs:

"Doing LSD was one of the two or three most important things I have done in my life."

Also a quote from that article:

He was hardly alone among computer scientists in his appreciation of hallucinogenics and their capacity to liberate human thought from the prison of the mind.

Although I am aware of the fact that Jobs was not a programmer, this quote got me thinking if there's any evidence to support the theory that drugs can help make a "better" programmer.

  • Has there ever been a study where programmers have been given drugs to see if they could produce "better" code?
  • Is there a well-known programming concept or piece of code which originated from people who were on drugs?


So I did a little more research and it turns out Dennis R. Wier actually documented how he took LSD to wrap his head around a coding project:

At one point in the project I could not get an overall viewpoint for the operation of the entire system. It really was too much for my brain to keep all the subtle aspects and processing nuances clear so I could get a processing and design overview. After struggling with this problem for a few weeks, I decided to use a little acid to see if it would enable a breakthrough, because otherwise, I would not be able to complete the project and be certain of a consistent overall design[1]

There is also an interesting article on wired about Kevin Herbet, who used LSD to solve tough technical problems and chemist Kary Mullis even said

"...that LSD had helped him develop the polymerase chain reaction that helps amplify specific DNA sequences." [2]


Sadly the question was closed again but there was a great discussion on HackerNews.

From HN user pchivers:

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.

share|improve this question

closed as not a real question by HLGEM, gnat, Mason Wheeler, back2dos, World Engineer Oct 30 '12 at 22:44

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, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

What does Steve Jobs has to do with programming? Do you know of a piece of code, which was written by someone under the influence? Yes, I definitely know a piece of code which was written by someone under the influence (and it works flawlessly). –  Yannis Rizos Oct 27 '12 at 19:25
You should read up on the effects of LSD to understand why this might be. Multiple studies have found that it alters thought patterns and thinking of a problem in a different way is the very definition of creativity. –  maple_shaft Oct 27 '12 at 20:43
Oh and Steve Jobs could be considered more of a marketer than a developer ;) . It was the other Steve that got the first Apple going. –  James Poulson Oct 28 '12 at 1:43
Check out "Ballmer peak", xkcd.com/323. (How was this one missed?) –  henginy Oct 30 '12 at 12:30
You really need to define "drugs" here. Sudafed will improve my programming if I have a cold. Caffeine will improve my programming if I'm tired. There's also cognitive enhancers, alcohol, hallucinogens, barbituates, sedatives, tranquilizers... IMO this is Not a Real Question until "drugs" is better defined. Any given drug can significantly impair (or possibly improve) almost any functioning depending on the usage. –  Ben Brocka Oct 30 '12 at 13:10

3 Answers 3

I wouldn't show up to work while under the influence of cannabis, and certainly the last thing I would like to do while high would be write code or do anything work-related, but from personal experience I can't deny that some drugs have the ability to make you think different than you would when sober, and some people definitely might take advantage (or inspiration) from that and apply it to something like programming.

I guess it depends not only on the drug, but also the way the person reacts to it.

share|improve this answer

I've programmed more productively under the influence of alcohol before. Point and case. (And yes, alchohol is indeed a drug.)

Alternatively, when I have a headache, I take drugs to alleviate them. An example drug is acetaminophen (which you can buy over the counter at your local drug store; just don't give it to your cat). Programming headache free definitely improves the quality of my code.

share|improve this answer
Point and case I think you mean "case in point". –  tnorthcutt Oct 31 '12 at 1:43
I found at uni being hungover increased my productivity - I could only concentrate on one thing and therefore had no distractions –  Luke Lowrey Oct 31 '12 at 2:14

Taking recreational drugs at some point of your life, might change the view you have on the word. But this will not make you a better programmer.

And for sure, you will not produce quality software, if you will be writing it in altered mind state (drunken, stoned, high, tired, sleepy, angry, depressed, dazzled, etc). Moreover, imagine, if the code being developed is life critical - health, defense, airspace, automotive - what kind of irresponsible person would be coding such stuff without having a clear mind ?

p.s.: though, anyone, who honestly says i code better after a beer or two, requires a reality check.

p.p.s: steve jobs was not a programmer at all. neither was Kary Mullis, or Dennis R. Wier.

p.p.p.s: english language has ambiguity with the word drugs. I don't see references to its other meaning (medicine) in the original question, so my answer ignores this meaning.

share|improve this answer

This post does not cite any references or sources. Please help improve this post by adding citations to reliable sources. Unsourced material may be challenged and removed.

The question is asking for citation of studies, you are simply citing opinion. Right or wrong it doesn't answer the question. –  Jimmy Hoffa Oct 30 '12 at 22:26
question asks: Is there any evidence ? - i say: no, there is none, and the ones you cite are invalid. How can i add source to absence of evidences? Or do you doubt harmful effects of drugs? You wanna challenge the official position of medicine, society and government ? - eat drugs, make great code, and prove them all wrong! While your job is outsourced to Ukraine ;) youtube.com/watch?v=kE81pXnTAuo –  c69 Oct 30 '12 at 22:41
How can i add source to absence of evidences -- you could link to scientific studies showing that taking drugs doesn't improve programmer productivity. The youtube video is not a scientific study. –  user39685 Jan 8 '13 at 17:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.