http://qs1969.pair.com?node_id=519362

this was getting off topic- here seems the right place, under meditations.

Previous, jonix wrote :

"Did you ever code better on any drug - be it legal or not, strong or soft? Just curious, because from my experience, plain soberness and enough sleep is simply best for coding...
"Not that I would condemn recreational drug use entirely, especially caffein and nicotine dont´t distract from coding that much and are even quite socially accepted - but drugs won´t help much solving the problems at hand either. Especially if you are procrastinating on the creation of some usefull but dull documentation."

Drugs won't solve anything. But they can help a little sometimes. And when your life is hell, a little bit of help makes a big difference.

Did I ever code better on any drug.. First off. I want to restate that I am no coder, nor will I ever be- Second, I code.

Thirdly, having a.d.d., the use of *small* ammounts of amphetamines (prescription) and uppers (caffeine- nicotine(open for debate)) can make turn a moment of slamming the keyboard in a fury of trying to hold more then seven things in your head, turn into more of a 'wait, maybe i can look at this another way.'

Personally if I didn't have caffeine and nicotine, I would'nt just 'not code well', I would be a slobbering mess staring into the vaccuum of space in a puddle of my own p1ss blood fecal matter sweat and tears.

I had a friend of some reputation who learned to code C on basically cocaine and lsd. He moved on to some very high paid jobs in the industry. (not still doing that- at least not at work)

As far as pot goes/ if I smoke the stuff, I can't touch a computer for a week. It makes me feel like perl is just about printing html line by line.

Alcohol makes me want to use windows machines. Fortunately, alcohol wears out. And I don't drink around computers just like I don't smoke around children.

Prescription uppers/anti deppres are nirvana in *small* dosages over a period of time. I take about 8mg of aderall most days- split in two. This is an amphetamine, for reference.

My caffeine consumption helps the economy of small countries in South America.

Smoking is more related to women and sex, so it's out of scope.

Anyone else?

Replies are listed 'Best First'.
Re: coding under the influence
by liverpole (Monsignor) on Dec 27, 2005 at 19:08 UTC
        Alcohol makes me want to use windows machines.

    That's ironic, because using windows machines makes me want to use alcohol.  :)


    @ARGV=split//,"/:L"; map{print substr crypt($_,ord pop),2,3}qw"PerlyouC READPIPE provides"
Re: coding under the influence
by tphyahoo (Vicar) on Dec 27, 2005 at 17:52 UTC
    Perl *is* a drug.
      So this raises the dual question: how do you get high on drugs under the influence of Perl? Does it feel better? Worse?
      :-P
        More importantly, can you get an overdose of Perl? :-)
Re: coding under the influence
by holli (Abbot) on Dec 27, 2005 at 18:19 UTC
    I think it's unpopular (grin) but I did some of my best conceptual work under the influence of Weed™. It simply boosts my creativity. Outcoding that stuff however, is best done sober. I mean, sometimes you just need your short time memory ;-)


    holli, /regexed monk/
      my $test=Gimme::Da::Weed->new; print "Yaman!\n" if $test->good($ganja);
Re: coding under the influence
by zentara (Archbishop) on Dec 27, 2005 at 20:40 UTC
    Drugs won't solve anything. But they can help a little sometimes.

    That is true. The Western World ( mostly US ) is the most heavily drugged society in history. From anti-depressants,anti-inflammatories,all sorts of anti-psychotic medecines to the drugs that just keep people alive like blood pressure, blood sugar, and other blood chemistry treatments.

    Even the steroids that the sports people take, are drugs. I wonder how much productivity would drop if coffee became illegal.:-)

    So then we get this crap from the government about keeping yourself drug-free, and I just laugh at the hypocrisy.

    Personally, ( and I know alot of writers who agree) that cannabis is a source of inspiration. In writing novels, it's obvious that it allows the imagination to really be creative. In programming it can be useful too. It may hinder the daily grunt work of going thru mindless computer tasks, but it can be very useful in helping you find creative approaches to problem solving. Sometimes you just need to kick back and look at the big picture, get things into perspective, and let the creative juices flow.

    But just like one man's poison is another man's cure, it is the same with cannabis. If I was in Amsterdam...... oh man would I love it...bicycles and cofee shops.

    I found it real interesting that the Bolivian peasant revolution, elected a president who will make having coca leaves for tea, legal. Now that is what I would like ......... a coca bush in my backyard, and a few big cannabis plants. Make good tea. :-) And it's "all natural" so it's OK with God, even though the governemnt devils may disagree.


    I'm not really a human, but I play one on earth. flash japh
      And it's "all natural" so it's OK with God, even though the governemnt devils may disagree.

      I don't know about that... tobacco is all natural, as is deadly nightshade, hemlock, etc. Take some of those, and you'll be seeing God sooner than you thought ;-). Still, I agree with your main point about the hypocrisy of the US government in banning natural, fairly harmless substances as heathen devil weed, while promoting tobacco and all the various legal drugs (which quite often are more dangerous than the illegal ones).

        I second that to all extents except that I as far as I'm concerned I'd remark that the US government is not unique in regularly practicing this form of hypocrisy. Here in Italy it's just the same and I think really most national governments share it, promoting the use of terribly dangerous or unethical but legal substances, social practices, operating systems and to some extent even programming languages (to keep on topic!) while prohibiting or discouraging others with no clear cut distinction on actual merit and perils involved.
Re: coding under the influence
by blue_cowdawg (Monsignor) on Dec 27, 2005 at 20:59 UTC

    I have lectured students of mine on the importance of documenting their code. That they should sprinkle comments liberally in their code because they might not be able to get the same potency level of the pharmacutical of their choice when they look at the code six months later. :-)

    "Reality: for those who can't deal with drugs"
Re: coding under the influence
by dws (Chancellor) on Dec 27, 2005 at 18:10 UTC

    Drugs won't solve anything.

    Before making a blanket statement like this, it helps to first qualify it by what, exactly, you're defining to be a "drug", and what, for purposes of the claim, you mean by "solve". Then it helps to back your claim up with evidence.

      A drug is anything that alters your soul through matter.
      If you eat enough paper, it will make you trip. If only you wouldn't die before you had the right ammount. Anything will make you trip. It's just, some things .. it takes less of it.
      Food will alter your chemistry, your blood, the way your neurotransmitters work, and how you and your soul work it out.. well. Anyway.

      Sugar is a drug. You can't peddle sugar unless you're a horse though- or 5 years old.

      For conversation's sake though.. And to further delve in the illusion that human beings can communicate with one another on an abstract level- ..
      I think anything society has a fit about is likely what we call a drug. For conversation's sake. Alcohol, caffeine, all of the fed restrictred substances- everything from tobacco to heroin and ibuprofen.

      I don't think wether it's a legal or unrestricted substance really defines something to be a drug or not. Look at the history of cocaine, opium- Was cocaine not a drug until societies regulated it? :) MDMA (ecstasy, i believe) was entirely fine a few decades ago. Would we say it's not a drug? If it became deregulated, would we no longer call it a drug? :)

      I don't think this topic is off the realm of coding. Maybe it's just me who's a dirty ba5+ard whose friends are all ex junkies and social deviants, hermits and computer n3rds and wh0r35. It seems to me that if you look at a chunk of the geek population, there are a lot of eccentrics and extremists- die hard religious gurus and or paper clip snorting addicts.

Re: coding under the influence
by wfsp (Abbot) on Dec 27, 2005 at 18:20 UTC
    Never, ever, send an email when you're drunk.

    Whatever else you do is entirely your own business!

    John

      Well, not if you're drunk enough to be sure you'll never ever get that address right... now, who's writing me? Oh, the president! What the hell will he have to tell me?!? ;-)
Re: coding under the influence
by davies (Prior) on Dec 27, 2005 at 22:29 UTC
    Disclaimer: this node is being coded with several beers inside me, and more going down.

    When I were a lad, computer club meetings were almost always accompanied by substantial quantities of liquids. Some pretty sophisticated coding was done in these sessions. On the hardware side, two of my friends once came up with an overclocking mod for the TRS-80 model 1 when seriously liquidated. When they had sobered up, even with the working mod in front of them, they couldn't work out how they had done it. So I, for one, would hesitate before condemning alcohol as necessarily bad.

    When programming for fun, I have no qualms about having a beer handy. I'm trying to relax, and a beer is part of that relaxation. Even when programming for work, I will often have a beer handy if I'm working at home (i.e. almost certainly in my own time). More than once, I have cursed a knotty problem, packed up for the night, gone home and suddenly spotted a simple, elegant solution after a few drinks. This is leading me to these conclusions: 1) Relaxation is important. 2) Complex solutions can be solved better by a relaxed mind. 3) Beer is part of my relaxation pattern.

    Against this, though, I have to say that, for me, study is something that has to be done stone cold sober. It's also worth mentioning[1] that I have more than once been so engrossed in a problem that I have ended up with a nearly full can of flat, warm beer!

    I also spend a lot of time under the influence of pseudoephedrine (an amphetamine banned by the IOC). It's an ingredient of my hay fever tablets, and certainly improves my coding. I defy anyone to work sensibly when sneezing every five seconds, and spending much of the remaining time trying to find a dry spot on a handkerchief.

    Regards,

    John Davies

    [1] On the assumption that any of this node or thread is worth mentioning!

      Disclaimer: this node is being coded with several beers inside me, and more going down.

      Perfectly on topic, then!

      For me, to sum up, alcohol or drugs do not strictly help when coding, if ever. And I do not have any personal experience coding for work after having drunk even a single beer, I think. But indeed I agree with you that a moderate amount of an alcoholic drink helps relaxating and being creative - actually I happened to find a solution to problems that had been defying me while at the pub having a beer with my friends.

Re: coding under the influence
by TedYoung (Deacon) on Dec 27, 2005 at 18:00 UTC

    As a Nerd(TM), I have had no experiences with drugs. But I have had, and continue to have, many experiences with alcohol. Coding drunk is no fun at all. In fact, I tend to get motion sick using a computer while drunk. When I wake up the next morning, I wonder what the heck I was doing. Although I seem to come up with the best opfuscated code, or however you spell that word. Man, I need a drink!

    Ted Young

    ($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)
      <shameless self promotion>
      Hic! Also see this hic! highly relevant and largely underestimated hic! post of mine!
      </shameless self promotion>

        err, i find this one post of mine to be relevant, too :) ...

        Now one thing i have to say about drugs is that they are supposed to be recreational only ...
        If you use them for work, like you need to sleep but you're late on a project or something, then you cross that line between fun and evil !

Re: coding under the influence
by tilly (Archbishop) on Dec 29, 2005 at 21:36 UTC
    It is a myth that nicotine relaxes people. It doesn't, it is a stimulant. However it does temporarily relieve the stress of your nicotine addiction. With the end result that a person who feeds their nicotine addition carefully is only somewhat more stressed out (and quite a bit poorer) than the same person would be without the addiction in the first place.

    I don't know what connection you are avoiding drawing between smoking and women and sex. Other than the obvious one that someone who smokes tastes bad to kiss, and so non-smokers often aren't interested in them...

    Caffeine is different. People think that it is a stimulant, and it is. (Unless you have low blood sugar, in which case it puts you to sleep. That is because it stimulates you but also reduces blood sugar - and if your blood sugar is low, the second effect matters more. This is most commonly seen in small children.) However there is an issue of diminishing returns. Your body adapts to the expectation that it will be there. So every time you change your caffeine levels, there is a real effect, but then your body gets used to it and your energy level at the new consumption level goes back to approximately what it was before.

    The effect is somewhat like trying to increase the heat of a house with central furnace by using a space heater. The heating system notices that the house is hotter than expected and shuts off the furnace earlier, leaving you right where you were on average. (Though the spot next to the space heater winds up hotter than it was before.)

    YMMV, but for me programming happens when I am calm, rested, alert, in a quiet space and not on any drugs.

      Surprisingly, there is evidence that nicotine really does improve performance on information processing tasks. For example. the paper Selective effects of nicotine on attentional processes (Psychopharmacology 146(2), 1999) begins as follows:
      There is strong evidence that nicotine facilitates some types of information processing (Edwards et al. 1985; Warburton 1990; Sherwood 1993; Heishman et al. 1994),and that this effect does not result from a reversal effect of a withdrawal-induced deficit (Wesnes and Warburton 1984; Le Houezec et al. 1994; Warburton and Arnall 1994; Foulds et al. 1996). However, the specific nature of the nicotine-induced improvements on information processing has proved more difficult to specify.
      The paper goes on to describe a study that, in the authors' view, supports the hypothesis that nicotine achieves these benefits by increasing the intensity of attention.

      Of course I wouldn't recommend smoking, because of the well-known risks, but it's not impossible that it would help your coding in the short-to-medium term.

      Disclosure: I am a nicotine addict. I don't smoke though; I use snus (which appears to be the safest tobacco product around, but is of course not without risk).

Re: coding under the influence
by toma (Vicar) on Dec 29, 2005 at 08:39 UTC
    My old calculus prof, Dr. Robert Appleson, insisted that it was not safe to drink and derive.

    Many monks are MidnightEngineering, and have a drink. When too wasted to code, they wander into the chatterbox quoting Ginsberg and Bukowski, only to be driven out by the cheer of morning tea in Britain.

    It should work perfectly the first time! - toma
Re: coding under the influence
by blazar (Canon) on Dec 27, 2005 at 17:42 UTC
    I had a friend of some reputation who learned to code C on basically cocaine and lsd.

    Well, cocaine I can believe. Not that I have much experience with drugs at all, either personal or indirect, but as far LSD or other psychedelic drugs are concerned I find your claim at best extremely difficult to believe! Maybe he learnt C in a period in which he was also using LSD, but I doubt that he did code during a trip...

    As far as pot goes/ if I smoke the stuff, I can't touch a computer for a week. It makes me feel like perl is just about printing html line by line.

    Maybe because you, like so sadly many others still think that is a web-oriented programming language having mostly to do with "CGI & C."?

    Alcohol makes me want to use windows machines. Fortunately, alcohol wears out. And I don't drink around computers just like I don't smoke around children.

    Alcohol and *NIX can coexist, as long as you keep that minimum amount of lucidity needed not to drink and root!

      Well, cocaine I can believe. Not that I have much experience with drugs at all, either personal or indirect, but as far LSD or other psychedelic drugs are concerned I find your claim at best extremely difficult to believe! Maybe he learnt C in a period in which he was also using LSD, but I doubt that he did code during a trip...

      Don't assume that LSD is always all about pretty colors, shiney lights and sex with hippie girls and/or boys. LSD can be an extremely heady drug and (on occasion) provide a suprisingly high level of thought clarity. In fact, most of the "myth" of LSD trips are not really just LSD, but a combination of LSD and other drugs (usually pot). It is also worth pointing out that, the drug trade being the way it is, it is highly unusual to find pure LSD, and most times it is cut with such wonderfully "healthy" substances as strychnine (rat-posion) and low grade "bathtub" speed (basically cooked up over-the-counter cold medicine).

      Having never mixed cocaine (never found it appealing) and LSD myself, I cannot truely say for sure. But one drug (coke) providing the front brain stimuli, and the other (LSD) providing the "creative clarity" I would say it is highly likely that this did in fact work. Although I really really really don't recommend anyone actually try to prove my theory, as bad LSD trips are a very serious and very ugly thing which can do some really serious psychic damage.

      Now, let me also caveat this by saying that all of this is based on ~10 year old experiences, but I highly doubt that the world (and the drug trade) has changed all that much since then.

Re: coding under the influence
by spiritway (Vicar) on Dec 28, 2005 at 03:53 UTC

    I've had wide experience with many different drugs (but I didn't inhale, as one former President claimed). Most didn't help me program. Marijuana got my hungry and sleepy, and I couldn't do much more than eat things like banana anchovie surprise. Other stuff affected me more strongly, making it very difficult for me to focus, or causing me to get lost among all the pretty images or whatever. Caffeine is an exception. I believe it may help me marginally. Certainly it helps me awaken. I can't program in the morning, without something to get my heart beating again.

    I'd have to say that my best programming happens when I'm not under the influence of anything, or just using coffee. Anyway, caffeine is the only drug I use any more. Except for Perl, of course...

      I am addicted to caffeine as well, I just can't help it. Really I only take two or three coffees a day, but if at a certain hour in the morning I still haven't had one, then I begin to have a headache - not something unberable, but annoying indeed. If I have a cofee, then it disappears in a quarter of an hour or so.

      Having said this, caffeine doesn't really work much: with precise referring to programming, I once had to do some coding for work after a week end in which I had basically slept one third of what I usually (need to) sleep every single night. I was so tired that I was continuously falling asleep: I tried having the whole output of a moka for five persons, but that just didn't make me less tired and sleepy. So I resigned and tried to sleep on it, but then while still being just as tired (or even more) I couldn't sleep!

        if at a certain hour in the morning I still haven't had one, then I begin to have a headache

        This is a result of a mild addiction to caffiene -- your headache is a withdrawal symptom. If you could live with the headaches for a few days (2-4, in my experiences), you would probably stop having them.

        Not to say that addiction is a problem, unless it starts negatively impacting your life. If you were drinking so much caffeine that you developed heart trouble, but couldn't stop because of the horrible headaches, that might be the line where caffeine addiciton becomes harmful.

        As for me, I've gone off of caffeine a number of times, and I did feel better -- didn't sweat as much, found myself able to do moderate work for much longer periods of time, and certainly stayed more hydrated (if you drink your caffeine source, you don't drink as much water, but caffeine makes you lose water faster). On the other hand, I found it harder to deal with certain kinds of stress, and had difficulty focusing (like a milder form of A.D.D.).

        Plus, decaf coffee tastes like butt. ;-)

        <-radiant.matrix->
        A collection of thoughts and links from the minds of geeks
        The Code that can be seen is not the true Code
        "In any sufficiently large group of people, most are idiots" - Kaa's Law
Re: coding under the influence
by gloryhack (Deacon) on Dec 27, 2005 at 20:32 UTC
    I wouldn't call it a drug, but the root of Sweet Flag (acorus calamus), chewed, has often helped me to get through a particularly vexing problem, be it in code or in life, in the cleanest and most rational manner. Calamus is an amazing little plant.

    I don't recommend the entheogenic route that some young psychonauts have tried, as it's a sure-fire recipe for an exceptionally unpleasant experience.

    Caffeine might keep me going, but it's often in the wrong direction. I might solve the problem at hand, but it's likely to be in some verbose, obtuse manner.

      This is true - I almost forgot about calamus. It seems to have a very gentle stimulating effect on me, even gentler than caffeine. I've never tried it for programming, but perhaps I'll do that - it might be useful...

Re: coding under the influence
by gregor42 (Parson) on Dec 29, 2005 at 21:11 UTC

    If there was a drug that caused temporary deafness without any nasty side-effects I might consider it beneficial to my coding -- since most of the time I can't hear myself think with these paper-thin cube forests we have to work in these days.

    Everything else is mood enhancement. As such, in my experience the most effective combination is sugar, caffeine, and curry. Nothing makes me so productive as being alert and content.

    I have a firm rule to never touch the keyboard when drinking - it makes my mind slow & my fingers turn to ham, making typing alternately hillarious and utterly frustrating.

    Also, you can't be 100% sure you're not outside of the dev sandbox when you're drunk so lager + root_access = downtime

    Of course, blowing up my own machine in the middle of the night is just SOP ... we all have Frankenstein evenings in the lab during our lives... if you haven't - I highly reccomend doing so. Obsession builds character but then again also betrays an "addictive personality". Your milage may vary.



    Wait! This isn't a Parachute, this is a Backpack!
      It sounds like you might like these little gadgets.

      When they say Exceptional noise isolation they mean uses noise cancellation to cuts out all background noise. I know very demanding people who swear by them.

      So put them on, put on some John Cage, and code in peace. :-)

      UPDATE: I looked at their advertising a little more, and I am not so sure that they use active noise cancellation. I think they just are effectively very good earplugs with speakers inside them.

      If there was a drug that caused temporary deafness without any nasty side-effects I might consider it beneficial to my coding -- since most of the time I can't hear myself think with these paper-thin cube forests we have to work in these days.

      This reminds me of a show by the italian comic actor Antonio Albanese in which he said something along the lines of:

      I wish you could become deaf. But not always! The sense of hearing should come back every now and again: exactly whenever you say something utterly stupid, so that you can hear it too!

      (Of course this is an extremely poor translation and doesn't even slightly convey the original sense of humor of the piece - if anyone can come up with a better one, please do!)

      Paraphrasing this for Perl, if I really really hated a (Perl) programmer, I may say:

      I wish you could become blind. But not always! The sight should come back every now and again: exactly whenever you code something utterly buggy and stupid, so that you see that horrible {output from your program,syntax error} too!

      :-)

Re: coding under the influence
by phaylon (Curate) on Dec 27, 2005 at 20:30 UTC
    That reminds me that I really need to try coding on Absinth.

    Ordinary morality is for ordinary people. -- Aleister Crowley
      That reminds me that I really need to try coding on Absinth.

      Absinthe makes the heart grow fonder...

Re: coding under the influence
by pajout (Curate) on Dec 28, 2005 at 11:42 UTC
    I think this theme is more psychological than chemical/physiological. Somebody codes just for enjoy, somebody codes just for money. And the most of coding people, including me, want both :)
    Well, I am addictive on nicotine, and, probably, on caffeine (both java and tea). And on adrenaline, endorphine, enkefaline and other internal drugs too. And sometimes I am very drunk or stoned.
    But I code with clear mind, mostly. This is good for concentration, invention, not attracting too divergent or crazy thinks. External chemistry can help a little bit in a special situations, but it is wrong way of life.