I've had wide experience with many different drugs (but I didn't inhale, as one former President claimed). Most didn't help me program. Marijuana got my hungry and sleepy, and I couldn't do much more than eat things like banana anchovie surprise. Other stuff affected me more strongly, making it very difficult for me to focus, or causing me to get lost among all the pretty images or whatever. Caffeine is an exception. I believe it may help me marginally. Certainly it helps me awaken. I can't program in the morning, without something to get my heart beating again.
I'd have to say that my best programming happens when I'm not under the influence of anything, or just using coffee. Anyway, caffeine is the only drug I use any more. Except for Perl, of course...