VC money and the active community play huge roles here. There are dozens of meetups you can go to and meet people interested in programming or startups. There are hackathons every other weekend and a lot of tech based conferences are pretty much routine. There are happy hours almost every day of the week at various incubators or shared work spaces or even at clubs hosted by a startup.
The sheer volume of events and startups and tech based companies here blows Boise, Denver, Phoenix, .... all other cities out of the water. That's why SF is so expensive to live in -- all these tech guys get paid $$$ and landlords feel as though they can just keep raising prices to take over that income. It's similar to how NYC got extremely expensive because of all the financial guys making tons of $$$. If there is cash to be had, it'll raise the cost of everything.