The usage patterns I've observed in other techies matches suspiciously closely to my own -- which really tends to support the selection bias that many other people have mentioned: drug users tend to be very much birds-of-a-feather, they cluster among their own kind and tend not to notice the other types unless they're being really unsubtle about it.

So with that grain of salt in mind, here's what I've got. The context here is long-term contracting at a wide variety of different offices ranging from button-down big corporate, to tiny angel-funded startups, over a couple decades. All US, mostly outside silicon valley.

Pot: not uncommon, but also not noticeably more or less than the general population as far as I can tell. Most often as a wind-down-after-work thing, very occasionally as a brainstorming tool among the design folks -- never seen this done openly in-office, but on a telecommute day or after hours it wouldn't be too terribly unusual. I did some work with a company in post-legalization Colorado; people there had much the same attitude toward it as in areas where it's still not legal. Which is, increasingly, No Big Deal.

Alcohol: I have the general impression that coders tend to drink slightly less than the general population. With a few exceptions, the ones really hitting the bar hard at the sales meetings and the corporate retreats tended to be from sales and marketing. For what it's worth I know a lot more people who are alcoholics (or former alcoholics) outside the tech industry than I do inside it.

Stimulants: I'm sure there are people using Adderall or the like as a productivity enhancer, but I've never heard anyone discuss it, and have no idea how that usage would compare to the rest of the population. The idea that "everyone has to take adderall to keep up with the rest of the team, it's just so competitive!" is a common thing sounds... odd. (I'm not saying it never happens or doesn't exist. I'm saying that in 20 years of work I've never seen an office that worked that way.) I know of exactly zero coders or designers who use stimulants recreationally. There was one obvious cokehead of a CEO, who was the subject of a fair amount of eye-rolling behind his back; and I've known a few sales guys, investor types, and non-technical managers who were prone to the occasional burst of jitteriness and sniffles, but I've never seen anything like that among the tech people. (I had honestly been under the impression that cocaine had mostly gone out of fashion, until some friends who work in the restaurant industry set me straight. If you want coke, talk to a line cook, apparently.)

Hallucinogens / psychedelics: Not at all uncommon as a "oh yeah I used to do a lot of that back in the day," or, like, "only when I go to burning man / firefly / my pagan festival / etc". Not so much beyond that. Nobody has that kind of free time.

Other: It's difficult for me to imagine downers or opiates being at all compatible with technical work, but perhaps that's just naivety on my part. Prescribed antidepressants are quite common, and have little stigma attached these days. Tobacco smokers are few and far between. I wouldn't be terribly surprised to learn that some of the younger developers are doing ecstasy or whatever counts as club drugs now, but I'm too old to get invited to that sort of party anymore, so have no direct information for you.