13 ms·
Is there evidence that drugs can help programmers produce “better” code?
- dlazerka 14y agoAnd 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.
- getsat 14y agoPosted on HN 49 minutes ago, closed as "not a real question" 48 minutes ago. Wow.
- Bockit 14y ago> 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.
- deleted 14y ago[deleted]
- davidlumley 14y agoIronically, 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 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-micro-optimisation-important-when-coding/99473#99473 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 14y agoPower trip.
- xdev 14y agoHonestly 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 14y agoIt 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 14y agoWhoever closed it needs to do more drugs, then they'll know why they are being a...
- deleted 14y ago[deleted]
- xutopia 14y agoThat 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 14y agoDosage 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.
- deleted 14y ago[deleted]
- damncabbage 14y agoflywheel has an interesting reply to this, but he has been hellbanned. Go to your preferences and turn showdead on to see it.
- derefr 14y agoYou 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 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 14y agoI'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.
- antihero 14y agoPsh, 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.
- tokenadult 14y agoThis 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-based-medicine/ 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 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 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.
- fpp 14y agoA 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/ http://duvet-dayz.com/archives/2012/04/13/1199/
- redthrowaway 14y agoDefine 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 14y agoYou 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://www.nih.gov/news/health/feb2009/nida-02.htm * http://thelastpsychiatrist.com/2006/05/ritalin_causes_cancer.html http://thelastpsychiatrist.com/2006/05/ritalin_causes_cancer... * http://www.cchrint.org/2010/11/15/adhd-ritalin-%E2%80%93-brain-damage-heart-attacks-hallucinations-liver-damage/ 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.
- bennyg 14y agoHe may be prescribed it. I understand your sentiment, but Ritalin may make him take a shower and actually make the morning commute.
- Supreme 14y agoOh, I'm sure it works. All I'm saying is that there are many ways to achieve a given neurotransmitter balance. A doctor might give a cancer patient morphine to numb the pain but this has the side effect of encouraging the cancer to spread, among a host of other problems. A smarter doctor would give the patient cannabis to kill the pain and help fight the cancer. It is important to remember that politics play a central role in the medical establishment which tarnishes a lot of what comes out of it. IMO, it helps to keep an open mind and take the recommendations coming out of it into account at the same time - balance is good. I'm not just saying this based on anecdotal evidence, it's been documented - http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0005738 http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjourna... >A pooled weighted average of 1.97% (N = 7, 95%CI: 0.86–4.45) of scientists admitted to have fabricated, falsified or modified data or results at least once –a serious form of misconduct by any standard– and up to 33.7% admitted other questionable research practices. In surveys asking about the behaviour of colleagues, admission rates were 14.12% (N = 12, 95% CI: 9.91–19.72) for falsification, and up to 72% for other questionable research practices. That is an alarmingly high rate of bad science. How can anyone in their right mind listen to their doctor without questioning the recommendations they are given? It's irrational to do so based on the evidence.
- deleted 14y ago[deleted]
- drivebyacct2 14y agoWhich 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.
- PaulHoule 14y agoDrugs 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.
- davidtanner 14y agoInsofar 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-Therapeutic-Journeys/dp/1594774021 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 14y agoI just found a short essay by Benny Shanon, http://pluto.huji.ac.il/~bshanon/ http://pluto.huji.ac.il/~bshanon/ , called Ayahuasca and Creativity. http://www.maps.org/news-letters/v10n3/10318sha.html 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 14y agoDefine 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 14y agoThis 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.
- meds_means_hide 14y agoLSD: 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 14y ago> 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).
- deleted 14y ago[deleted]
- noonespecial 14y agoI 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.
- waterlesscloud 14y agoWe called it "two beer logic" in college. The effect was real, though possibly placebo driven.
- jobu 14y agoIn case anyone is unfamiliar with the "Balmer Peak" : http://xkcd.com/323/ 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-style-graphs http://mathematica.stackexchange.com/questions/11350/xkcd-st...)
- patrickk 14y agoDoes 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 14y agoA couple of beers will definitely get the juices flowing, just as several more will tend to obviate any prospect of productivity.
- photorized 14y agoThe Jobs example was about vision, not "code".
- photorized 14y agoDefine "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.
- tsotha 14y agoReal 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.
- anonymous_mouse 14y agoHearsay: During WWII the code breakers of Bletchley Park were provided with benzedrine tablets.
- pchivers 14y agoFrom 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_experiment 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.
- gourneau 14y agoI wonder how many adherents Steve Jobs have dosed LSD because of his advice.
- waterlesscloud 14y agoI 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.
- marcos123 14y agoIn 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.
- simplexion 14y agoYes.
- backbonejstutes 14y agoSpeed 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.
- sh_vipin 14y agoQuestion 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.
- cynwoody 14y agoI 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 http://www.youtube.com/watch?v=WANNqr-vcx0 [1]http://www.amazon.com/What-Dormouse-Said-Counterculture-Personal/dp/0143036769 http://www.amazon.com/What-Dormouse-Said-Counterculture-Pers...
- abecedarius 14y agoDoug 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.
- scotty79 14y agoThis comes to my mind: http://www.flickr.com/photos/22926987@N00/2198300/ http://www.flickr.com/photos/22926987@N00/2198300/
- lost-theory 14y agoI 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 http://en.wikipedia.org/wiki/Paul_Erdos#Personality
- knarfus 14y agoFor 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.
- yaddayadda 14y agoSpiders 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 http://www.trinity.edu/jdunn/spiderdrugs.htm
- 6ren 14y agoWe have to mention the famous mathematician Paul Erdős http://en.wikipedia.org/wiki/Paul_Erd%C5%91s 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.
- Supreme 14y agoWho 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)?
- ecliptic 14y agoPaul 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.
- Wintamute 14y agoRecreational 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.
- rbanffy 14y agoAccording 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 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.
- marcos123 14y agoIn 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.
- nostradamnit 14y agoLegend has it that Bill Joy created Vi while on LSD, or at least came up the the idea...
- 31073 14y agoI'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.