Paysa claims the median SWE in mountain view makes around $190K total comp, with like $65K of that being bonus and stock. (that's lower than I would think from talking with people, but a lot of my friends are mid to late career and working at the more desirable companies, so I guess that makes sense.)
Note, a lot of companies pay more. according to paysa, the mean Facebook SWE makes like $230k in Sunnyvale (the closest location to mountain view that paysa has information on facebook for.)
Trulia claims that the median 1 bedroom in mountain view is $860K, which is higher than I thought; (santa clara, where I live, it's $622K) 20% of that is $172K... so four and a half years of living off your base salary would be required (three and a half if you commute in from santa clara) I mean, depending on your tax bracket, of course.
And all this is looking at the median, and in the comment I'm responding to, you were talking about the best SWE jobs at your company. I can tell you that it's not at all unusual for individual contributors who are pretty good but not famous or anything to do rather better than the paysa numbers, salary wise.
All that said, I personally don't plan on buying at these prices; (and I'm a sysadmin and have no degree; I'm gonna make maybe 15-20% less than a SWE with a degree at my level) I think right now, landlords are willing to lose money on the actual rent in order to make money on the appreciation. I dunno if this is a good idea long-term, just 'cause if this is the new normal, if housing prices keep rising, I might actually price myself out of desirable metros, and be forced to move to a second-tier city, which I would find unpleasant... but I see no reason to hurry to those second tier cities. Certainly, rent seems to be limited by what people can pay, and as someone SWE-ajacent, I make more than most people, even here in the bay area, so something would have to go wrong with my career to the point where I wasn't making more money than most people locally for me to get priced out of the local rental market.
I mean, if there were smaller, cheaper places available, I'd drop a quarter-million on a "plan b" just so I could continue to live around here if my own career went south... but I probably have much stronger social reasons to stay than you do.
Some of my friends and I have been considering investing in real-estate in a second tier city, just to hedge against the case where real-estate continues to climb globally, but paying half what a house costs here seems high for that. A buddy of mine has been talking about Cleveland (one of his value functions is functional public transit) Cleveland is a lot more than half cheaper than the bay area... but I don't think I'd want to live there.