Ya know, I'm not opposed to that idea. It is possible. I'm not a programmer, I'm an artist and on that account I can say that you really aren't necessarily supposed to be creative at work. It's a very frustrating scenario but true for most artists. You get to be creative outside of work.
On that basis, whatever you want to do outside of work should be your business as long as it doesn't have a negative effect on the hours and effort you put in for work. When I was in college I used to really enjoy going out to the bar then coming home and writing while my buzz wore off. Looking back through some of that writing there is some very good work. The better work is very honest, secure and fluid. In many cases it was rather creative. However, there are also some pieces that make absolutely no sense at all.
We are discouraged as a society from drinking on the job "and in my opinion this is the same as doing drugs on the job, alcohol is a drug," for many important reasons. In my experience the biggest problem with drug use of any kind in relation to performing a task is inconsistency. Too much is a problem, too little wont do anything. For that reason, be sober for at least the hours you spend at your paying job. If you feel drug use improves your creativity, do that at home on your own personal projects and make sure it doesn't take over your life damaging both your personal projects and your employment.
It really comes down to moderation and respecting the expectations of your peers when you are in a situation that could also affect their job performance.
Also encouraging any sort of drug use for creative purposes is very dangerous. Every one is wired differently. Some people are predisposed to abuse, others are not.