You might also want to consider living in Oakland instead of San Francisco and taking BART to the city to work. My rent is 1/3 less and my commute (20 minutes door-to-door) is much shorter than that of many of my colleagues who live in the city. Oakland is a big, heterogeneous city, with really nice districts that offer great dining, bars, and the usual city trappings.
Not just Oakland. The majority of the Bay Area exists to support commuting to San Francisco. The peninsula tech companies are actually a newer phenomenon.
Oakland exists as an industrial hub. Emeryville, on the other hand, exists as a suburb of San Francisco (though I think that with recent business expansion, it's becoming its own city). As far as I know, this is still the case, and more people live and work in Oakland than live in Oakland and commute into SF.