I can remember when 'back east' companies came out to Silicon Valley. They had a corporate wide pay structure that didn't account for differences in cost of living. They had a hard time recruiting and retaining in the Valley because their 'back east' pay scales didn't cut it.
Why do engineers make so much money in Silicon Valley? Because they're worth it! That and the law of supply and demand. Unfortunately, that same law applies to housing. A month or so back, an 850 square foot post war house sold for $2M.
https://sf.curbed.com/2018/3/2/17073100/silicon-valley-house-home-sunnyvale-record-price-crisisSo, if you're coming to the Valley from anywhere else, you probably can't afford to live anywhere near where you work. Plan on commuting from 60+ miles away. Even then, it's iffy. Maybe at 90 miles you can get into a decent house for a more or less reasonable price.
Even better, buy a larger sail boat (40-50 feet) and live aboard up in Alameda (60 mile commute). Right across the estuary from Jack London Square, a few miles away from SF Pier 39, great sailing. I had a smaller sailboat there for 20+ years. Too small to live on but the idea was there.
Or, wait for the next downturn and buy in when you can. For ex-military, make sure you consider your GI Bill benefits. In these high dollar areas, the amount guaranteed by .gov means the part you have to finance separately is likely to be quite low. You need 20% down on the excess of what the VA covers.
I don't live in the high dollar area but the VA covers $417k around here so most houses are fully covered. There is no down payment and no Primary Mortgage Insurance. For a $500k house, the own payment would be 20% of ($500k -$417k or $17k) Just a little side benefit of spending a couple of years in the Army.
There's a lot of magic coming out of Silicon Valley. You can expect that there are some fairly bright engineers creating it.