I quit smoking pot when it started interfering with my work. Not in a “I’m gonna get fired if I carry on smoking” way. But I was finding it if harder and harder to get in the same coding mindset when stoned and when I was sober, which lead to me rewriting code because it was like two different people were working on the same bit of code at the same time.
I was a heavy smoker back then (would roll two joints at the end of the night, one before I slept and one to “wake and bake” with) and just knocked it on the head.
I will still have a joint on special occasions (basically when I’ve been out with friends who still smoke) but I treat those times like a night of heavy drinking and try to make sure I’m not planning to work the next day as I’m not normally in the mood to code the next day being a “very very light smoker” these days I find it hits me harder these days then it used too, but that could also just be age :-p