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.
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.
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.
I think that it is really funny that this is a logical conclusion you made.
See http://www.wired.com/science/discoveries/news/2006/01/70015
Coding on Kratom, on the other hand...
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... ) 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...
[4]http://www.sciencedirect.com/science?_ob=ArticleURL&_udi...
[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
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?
I don't feel that kratom use hinders higher intellectual function in sub-opiating doses but this is difficult to measure.
There is only one good pharmaceutical solution for suppressing tiredness without other side effects: Modafinil. http://en.wikipedia.org/wiki/Modafinil This is an account of extreme Modafinil use and abuse. http://www.erowid.org/experiences/exp.php?ID=45423
I'm not buying that, nobody challenged you and here you are hijacking this thread and posting 1/2 a page of info nobody asked for. Its off topic, and annoying.
(Also the study you cited came to the conclusion that kratom is tolerance building and has withdrawl symptoms What a great thing to be peddling to the masses.)
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.