Yeah, this idea that people who smoke pot are somehow less capable of functioning in society is one of the more blatantly (and demonstrably) false stereotypes. Pot smokers are as diverse as the general population, probably because such a large percentage of the general population are pot smokers.
I am most delighted that the last paragraph was included! Of course coders smoke pot- fucking everyone smokes pot!
I have a small anecdote to share. I was writing a proxy server sort of thing. It was my first foray into the land of C and network sockets and I was even more of an amateur programmer than I am now. I was wrestling with this bug for a few hours. After stepping away from it for a while and smoking a bowl or two, I came back to it and looked at my code in a different light (it was still garbage, even though I was stoned) and immediately found the bug. Sometimes it's able to give you a different perspective which is extremely useful for squashing bugs. Now, I can't do normal coding all that well while stoned...it's only really useful when you need to step back and think about things a little differently. Anyway, as far as silicon valley goes, it's not really surprising. It's not like pot is a counter culture sort of thing anymore. I would imagine the usage in the tech industry is high, but no higher than the general population. I will leave you with a video of snoop dogg smoking blunts in the twitter office