Perhaps paradoxically, I really enjoy programming a lot more when I smoke and tend to spontaneously work on things much more frequently high than sober. It's not always my best work, but otherwise I would probably be playing video games and I can always clean it up later.
It's also not for everyone and I have taken several year long breaks because it can give me anxiety.