I think -- and this cuts both ways -- people into the drug scene naturally gravitate toward others that are also into it, to the point where they think "everyone" does it. I suspect tech's drug problem isn't markedly larger than society's drug problem as a whole; it's perhaps smaller considering knowledge workers get paid based on how well their brains work, and long-term most drugs seem to mess that up.
I'd love to see a concerted effort to study the prevalence of this sort of thing. It's frustrating that I can't validate my expectations here.
I worked for a small startup in Atlanta from 97-2000, then another startup in Silicon Valley from 2000-2004 (yay dotcom boom -- I slept under my desk more than once). I relocated to NC in 2004 and continued to work for that company (from its newly acquired NC office) till it was acquired by HP. I remained at HP a couple years. In 2009, I joined another SV startup (my third I guess) and worked from home for that startup till it was acquired by Yahoo in 2013. I've been at Yahoo, now Oath/Verizon since.
In all that time post-college, I've never used any form of drugs (besides occasional alcohol either outside of work or at a company party, beer bash Friday, etc), never felt any pressure to do so, and I've not been aware of drug use by colleagues with the exception of one person, but even that was hearsay to me.
Some of the stories I read about SV, I wonder how I could be missing so much (see for example, "The Nudist on the Late Shift").
That said, I tend to keep to myself. For me, work is work, and play is play, and I'd rather not cross the lines.
46 y/o, highly compensated software developer, married, father of two, used marijuana recreationally in college (I have a funny federal security clearance story about that...), never used any other drugs besides one not so good evening with LSD. Long distance running is how I keep my head straight, besides getting enough sleep and a relatively good diet.
[1] http://www.independent.co.uk/news/uk/home-news/cocaine-use-i...
As a counterpoint: I've been a developer 10 years. I've worked at a few established businesses, two startups (one U.S. based and one German), and two consultancies. I worked in-person in Charlotte, N.C. and remotely since then. I've never worked in Silicon Valley.
One employer had a "play hard" culture, encouraging alcohol (ab)use outside of work. I didn't stay there long.
Perhaps I've self-selected based on my values (I don't work overtime), but I've never heard drug use condoned in any of those places, or at conferences I've attended. And I've often heard overwork spoken of as counter-productive and exploitative, as a thing that wise coders avoid.
I was not aware that "drug use as a programming aid" existed in the industry, though, human nature being what it is, I'm not shocked.
Just a caution that this shouldn't be portrayed as if it's ubiquitous without statistical evidence of that.