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.
That sounds like a great way to get murdered ( http://www.neighborhoodscout.com/ca/oakland/crime/ ). What are some of the places that are better or should be avoided?
Crime of that sort in Oakland generally involves only those who consider it an "occupational hazard".