The median home price in SF is $1.6M. At median SWE salary in SF, the mortgage is >70% of your take-home pay assuming an improbably large 25% downpayment ($400k). More realistic assumptions put it at ~85% of take-home.
Perpetuating myths about lattes, (or avocado toast[1]) does nobody any good; they are not the reason homes are unaffordable. Homes are unaffordable due to insane zoning policy and Prop 13.
[1]: https://money.cnn.com/2017/05/15/news/millennials-home-buyin...