

Have you ever coded while high? - rokhayakebe

If i hurt anyone by asking this question it is not what i meant. I just cant stop wondering what a coder could come up with while "high"?
======
ingenium
I find that coding while high never produces good code. I've done it before,
and while I can sit and code for a long time, I just make too many stupid
mistakes. It takes me forever then to go back and figure out what I did wrong
while high; I usually have to wait until I'm sober to debug it. However, the
actual logic of the code usually makes sense and it works, it's just little
things that I forget or simple errors in logic.

The other problem is that while I can code more mundane code, anything that
actually takes a lot of thought is just impossible. I can't remember all the
things I'm trying to do and can't keep everything straight. This is just
because weed basically destroys your short term memory.

I recognize that weed may give you the motivation to code or give you insight
into how to tackle a problem, but just be aware that you'll have to do a lot
of debugging of the code after you come down.

As rms said, kratom is a different story. I can code for hours on kratom and
actually make very few mistakes.

------
jawngee
It's all about smoking the right blend at the right amount. Varying strains
have different properties when imbued, so you have to choose carefully and not
go overboard. You need to know what your smoking, the amounts by which to
smoke it, etc.

I'd say that 90% of my staff smokes on the regular. I find the cognitive
dissonance helps me abstract problems out much more quickly, as well as
increases concentration and thoroughness when tackling an issue. I understand
this is the opposite response one would naturally assume to occur, but it
really is about what you are smoking and how much. If you smoke so much that
you suffer from a round of derealization, then it's going to dampen your
output. Also, it's about how regularly you smoke as well. The more you do it,
the more skill you have in dealing with the high itself. If you don't smoke
weed regularly, social or otherwise, the less capable you will be of being
functional on it.

Naturally, it's not something I'd recommend doing every day, but it's
certainly helped us more than hurt us at our particular company.

There are some negatives, but for me, the positives of smoking and coding far
outweigh the negatives.

YMMV.

------
jey
It worked for me when I wrote GCC-CIL, and that was one of my most productive
periods ever. I worked a 40 hour/wk job at a research lab and hacked on GCC-
CIL on evenings and weekends, progressing so quickly that it freaked out my
mentor. But this data point really means nothing... it's probably just an
indication that you have to be either drugged or insane to hack GCC's
internals without vomiting.

Overall, I don't recommend it. Do it every once in a while and you might have
some cool ideas, but I bet you'll spend most of your time giggling and
watching The Simpsons. I have not experimentally confirmed this, but
apparently proper use of hallucinogens is the way to go for broadening
perspective and etc. I'm personally interested in learning meditation
techniques and seeing what sorts of effects that can have on the mind.

~~~
rms
>you have to be either drugged or insane to hack GCC's internals

I think that it is really funny that this is a logical conclusion you made.

------
chengmi
Ballmer Peak: <http://xkcd.com/323/>

------
nailer
Kevin Herbert, a technical fellow at Cisco solves problems using LSD. He makes
no secret of his use of the drug and is quite open about its contribution to
his work.

See <http://www.wired.com/science/discoveries/news/2006/01/70015>

------
aristus
It only helps with large regular expressions.

------
stevedekorte
IME, stimulants (xanthines, amphetamines, etc) in doses for which their
effects are mild, tend to make me more productive while all other drugs
(depressants, disassociatives, opiates and psychedelics) make me much less
productive.

------
Zak
Only on caffeine, though I have found that alcohol (number of drinks dependent
on language) can help with debugging.

~~~
rms
More or less drinks for functional/mostly-functional languages?

~~~
Zak
More for anything obnoxious like PHP or IE Javascript incompatibilities. Fewer
for things that are hard, but not evil (including functional languages).

------
rms
Weed makes me worse at doing anything that takes serious cognitive ability,
except thinking of ideas -- but I need to wait until I am sober to actually
evaluate the merit of said ideas. As far as coding, I have one friend who says
he is great at coding while high and he is a terrible coder all around. I am
hesitant to think that anyone is truly better at coding while high, because
weed certainly impairs overall cognitive function, especially short term and
working memory. However, I have corresponded with someone on this forum who
has made something impressive and he says coding high sometimes lets him
tackle problems that he has been stuck on for a while. But I really don't
think he made most of his site while high.

Coding on Kratom, on the other hand...

~~~
russ
Nice plug for your Kratom business ;-)

~~~
rms
Kratom is a rare stimulant that makes you more productive. It is unfortunate
that our culture chooses to only tolerate caffeine which makes you twitchy,
and nicotine, which slowly kills you.

Kratom is currently neither a food, drug, or herbal supplement which puts it
in a weird legal wasteland. Kratom is usually consumed as a tea. It is very
palatable when sweetened with sugar and contains healthy anti-oxidants[1]. One
of the active alkaloids of kratom, 7-hydroxy mitragynine is an incredibly
strong opiate, 17 times as strong as morphine[2]. Kratom has been further
tested as a drug on your average variety of small mammals. This study is on a
guinea pig, where they didn't get the 17x number but concluded that 7-hydroxy-
mitragynine is a dose dependant antinociceptive that is stronger than
morphine.[3] They do a follow up study demonstrating cross tolerance with
morphine. [4]

Erowid[5] is the authoritative list of studies[6] on the subject of kratom.
You can read more than 50 personal experiences with kratom, mostly with
regards to it as a recreational drug though some individuals there use it as a
substitute for real opiates or to potentiate other drugs. Most of the negative
experiences can be attributed to people incorrectly consuming kratom[7].
Kratom is properly consumed as a tea with lots of sugar and the extra kratom
powder filtered out with a french press.

Kratom is completely legal everywhere except some of its native Southeast
Asia: Thailand, Burma, and Malaysia, and Australia[8]. It is legally grown in
Indonesia and India, though I haven't found any real Mitragyna Speciosa sold
out of India. Most of the guys on Ali Baba are selling fake kratom, except PH.
All of the kratom on the market comes from this mystery world landowner who
owns dozens of legal drug plantations in all the continents. If anyone could
undercut him for one of his major products, the second supplier would make a
lot of money because a successful international kratom operation could source
kratom 100 fold cheaper than PH. This would require you to grow your own
kratom, in a warm, wet climate or travel to Indonesia and give people money to
take you to the kratom, which would probably work. Unfortunately, I don't have
any contacts in Indonesia or anywhere else where Kratom is legally grown.
Maybe one of these days I can take a sourcing trip.

I'm not trying to push a drug here, I'm trying to tell the truth. This is a
substance with a lot of potential and I would love to collaborate on research
with anyone that is interested.

[1]The antioxidant alkaloids in Cats Claw (
[http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=Retrieve&db...](http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=Retrieve&db=pubmed&dopt=AbstractPlus&list_uids=15649507)
) and Kratom ( <http://www.erowid.org/plants/kratom/kratom_journal2.shtml> )
are similar. I'll write up a comparison eventually but here are the raw
sources for now.

[2]<http://www.thieme-connect.com/DOI/DOI?10.1055/s-2005-837822>

[3][http://www.sciencedirect.com/science?_ob=ArticleURL&_udi...](http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6T99-4H40J48-1&_user=10&_rdoc=1&_fmt=&_orig=search&_sort=d&view=c&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=215e6795bf74d94792757f1f32c8e3c5)

[4][http://www.sciencedirect.com/science?_ob=ArticleURL&_udi...](http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6T99-4H40J48-1&_user=10&_rdoc=1&_fmt=&_orig=search&_sort=d&view=c&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=215e6795bf74d94792757f1f32c8e3c5)

[5]<http://www.erowid.org/plants/kratom/kratom.shtml>

[6]<http://www.erowid.org/plants/kratom/kratom_journal.shtml>

[7]<http://www.erowid.org/experiences/exp.php?ID=36154>

[8]<http://www.deadiversion.usdoj.gov/drugs_concern/kratom.htm>

~~~
yters
So, are you a major user yourself? Even caffeine, which I use out of weakness
and necessity, I worry about. Subjectively, it seems like my increased focus
and lack of tiredness comes at a cost to my higher intellectual functions. No
objective proof of this, though subjectivity counts for something.

Has anyone here achieved good enough control over their body where they don't
need this stuff? Have you found a significant difference between operating on
and off drugs when going without sleep for long periods?

~~~
ericb
I strongly recommend naps! It doubles the daily time when I can hit a flow
state while coding, which is when I produce my best code. In terms of coding,
I find the cloud that comes from tiredness to be worth always avoiding. I do
this because coding's not like moving lumber where you're just slower if
you're tired. Instead you'll move the lumber to the wrong place! If I'm not
at-peak, I dedicate that time to grunt-work, research, but not coding. My
newest approach is personal "sprints" where I ignore all distractions, set a
big goal and race at it for 1-2 hours.

~~~
nextmoveone
einstein never slept, he only took naps several times a day.

~~~
jey
[citation needed]

~~~
rms
It's an urban legend. Einstein was not a polyphasic sleeper; he was a heavy
sleepy.

<http://en.wikipedia.org/wiki/Polyphasic_sleep#Urban_legends>

~~~
nextmoveone
thanks for that correction, i 'learned' that in like the 8th grade, but only
just now researched it when the citation was asked for...

------
mrtron
I find I write my best code when I am extremely tired and working late into
the night.

Mind you, I need to have a good idea in my head already of how I want to solve
the problem, but I write a whole chunk of code often in one evening (or all
nighter). When I write code and am entirely awake, I often get bored or
distracted, or keep trying to rethink ways to solve the problem better.

I definitely can't code after a beer.

------
SwellJoe
Crap: This post, code produced while high, and all responses to this post
(this response included).

------
kingnothing
I never produced anything worthwhile while high back in my experimentation
days. Having said that, coding while drunk, especially with other people, is
quite enjoyable. It can be a bitch to debug though, all depending on how drunk
you ended up getting.

------
awt
I've found that drinking a beer or two and coding with loosened inhibitions
allows me to take on riskier approaches to solving problems. Things that might
ordinarily seem too hard or like too much work seem less so.

------
aswanson
Say no to drugs.

------
marcus
Did any one try programming on Modafinil?

~~~
brl
I only tried it every single day for the last 6 months. Works for me.

~~~
rms
I would be curious if you got it from a doctor or the internet, etc. Send me
an email if you get a chance.

------
rontr
Lots of parentheses?

------
Ras
Try for, winamp visualizations.

