Live data from Hacker News

Is there evidence that drugs can help programmers produce “better” code?

programmers.stackexchange.com

41–50 of 77 posts

Re: Is there evidence that drugs can help programmers produce “better” code?

#41
Speed and Ritalin work really well, highly recommend trying it out once or twice to anyone interested. It's just a fun experience and you get a lot done lol

Glass of wine, relaxes my body which let's me think more and worry less about my comfort.

Nicotine resets my brain after solving hard problems. E-cigarettes are a nice healthier option.

Marijuana is great for sitting down with pen and paper to draw out large concepts or designs.

Coffee is just like Ritalin, just weaker and you don't get the stimulated euphoria.

I find working is impossible unless I have a goal. Psychedelics have let me see life in a different light and feel more at ease with my life plan which in turn makes work easier.

Re: Is there evidence that drugs can help programmers produce “better” code?

#42
post #8

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.

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…

[deleted]

Re: Is there evidence that drugs can help programmers produce “better” code?

#44
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...

Re: Is there evidence that drugs can help programmers produce “better” code?

#47
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

Re: Is there evidence that drugs can help programmers produce “better” code?

#48

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 th…

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

Re: Is there evidence that drugs can help programmers produce “better” code?

#49
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.

Re: Is there evidence that drugs can help programmers produce “better” code?

#50
post #28

Earlier quoted context omitted.

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…

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 pe…

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.
Post reply on HN