Personally, I'd avoid both areas for the reasons you stated. The homeless/gutterpunks/tourists in Haight get pretty annoying, and there really is no neighborhood feel in SOMA. In SOMA, people are there to work, or to network, or because it's trendy. Other parts of the city it's a lot easier to get to know your neighbors.