Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Have you ever coded while high?
13 points by rokhayakebe on Dec 9, 2007 | hide | past | favorite | 36 comments
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"?


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.


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.


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.


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


Ballmer Peak: http://xkcd.com/323/


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


It only helps with large regular expressions.


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.


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


When does caffeine make you high? It just makes me jittery and easily agitated, so when I make a mistake I feel like throwing the computer out the window.


Aside from developing a physical addiction, I respond well to caffeine. More of it generally makes me happy and stimulated.


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


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


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


Nice plug for your Kratom business ;-)


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... ) 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


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?


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.


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


[citation needed]


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


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


I would not recommend kratom or any stimulant as a substitute for sleep. The best thing for your productivity is natural sleep. For the purposes of productivity enhancement, I think kratom and coffee are best consumed during a day as slowly as possible... if you feel yourself getting tired or distracted, take a sip.

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 trying to push a drug here, I'm trying to tell the truth."

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.)


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.


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


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.


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.


Say no to drugs.


Did any one try programming on Modafinil?


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


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


Thanks


Yes, double good when taken while high.


Lots of parentheses?


Try for, winamp visualizations.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: