If you don't have any friends you can stay with in San Francisco, a good alternative is booking a bed in a hostel for a few weeks. They're cheap (as low as $25/day, if you're willing to share a room with a few people), centrally located, and sometimes offer perks like free breakfast and coffee. You should take a few extra precautions with your valuables -- I keep my laptop, wallet, and phone next to me when I sleep, instead of putting them in the locker -- but most of the people who pass through are young travelers. There are plenty of options to choose from in the Tendernob, which is basically a hostel/student district, and not nearly as bad as this blog post makes it sound.