As a programmer at a startup, everyone seems to accept marijuana, alcohol, and caffeine as acceptable, though I think it's considered unacceptable to be high at work (but probably nobody would care). Opiates are considered taboo, and rightfully so. Adderall is prevalent and easily available.
For me personally, after an exploratory phase of trying all the drugs, I've figured this much out:
* MDMA, LSD, mushrooms, 2-Cs, etc can be great for expanding your world view and generating new ideas or as therapy, but aren't really helpful in a white-collar worker sense. None of my peers would judge each other based on use these weekend drugs, but IMO they shouldn't really have a routine place in anyone's life. I'm pretty sure this is why people go to burning man, as a sort of drug-induced retreat.
* Dissociatives (ketamine, DXM) are a strange class of drugs. I believe that ketamine or dextromethorphan will ultimately be seen as the most effective treatment for chronic depression. These probably don't have any place for daily use, but could be useful to get out of a depressive state. The research isn't in yet on this though, so tread with care.
* Cocaine has supply chain issues, so I refuse to try it, but it's also very expensive and doesn't seem to be that effective for productivity compared to alternatives.
* Modafinil and armodafinil have gained popularity lately (probably because of grey-market sales), and they're super effective for staying awake, but not very effective for improving productivity.
* Amphetamines (adderall, vyvanse, dexedrine) and phenidates (ritalin, focalin) are super useful, but have to be used with care. I have an adderall prescription which I use a couple times a week to power through the week's work. This is great for me because I work from home and can spend an uninterrupted day or two crushing the work for the week. These drugs are unfortunately prescribed daily for ADHD patients like myself, but you'd have to be insane to take them every day. You'll quickly burn out after about a week and be worse off than you were before you started taking them. People consuming massive amounts of caffeine probably need one of these drugs instead. These drugs are addictive, but not seriously so... stopping will mean a couple days of rest before going back to normal.
* Benzos (xanax, klonopin, etc) are super useful for anxiety, but the same rule applies to be careful. They're only useful a couple times a week before you develop an addiction problem. Xanax is great for getting to sleep and resetting your schedule, and klonopin is great for when you're going to have a super stressful day with things outside of your control and you'd like to temper your emotions a bit. These drugs make you not give a fuck and feel great, which can be a problem for some, but is another tool in the toolbox of the responsible drug user. I have also have a prescription for both klonopin and xanax, but my doctor knows I don't take them daily. Almost anyone drinking alcohol daily probably actually needs a benzo and counseling about responsible use. I don't use alcohol for stress relief, but I will have a few drinks at a party. These drugs are addictive, but very seriously so... stopping suddenly once you've developed an addiction can cause erratic behavior and seizures.
* Tobacco seems generally frowned upon, but vaping is somewhat acceptable. Sometimes I vape low amounts of nicotine to help deal with stress, but I always regret it and end up quitting. It's much easier to quit than cigarettes.
* Marijuana I use daily, usually after work and before bed. My doctor thinks I might have PTSD from various life events, and I have some very disturbing dreams. Marijuana both lets me change my perspective, which helps to end the work day or shift my mood when I'm really upset about something, and it lets me turn off dreaming while I sleep so I can get better rest. If I stop using marijuana, no withdrawal happens, but disturbing dreams do.
* I don't like opiates, so I don't take them and don't know that much about them, other than they seem to cause the most problems for the most people. I would love to understand how people enjoy them though... They make you feel warm and sleepy, but with nausea and constipation. I don't think this is a good trade.
If I wasn't a relatively privileged person as a tech worker, I would likely not be able to go to my doctor and demand adderall, xanax, and klonopin while being open about my marijuana use. It is nice, however, to have a drug toolbox that's completely legal and insurance paid (well, except for the weed).
All together, I would say that drugs (whether prescription, off-label, or illicit) have had a hugely net positive impact on my life, both professional and personal.
Let me know if I can answer any questions for you and good luck with your project. I hope you'll find that education and safe access are better than prohibition.