Microsoft just promised to spend $500 million to help finance affordable housing for middle-income people in the entire region around its Redmond, Washington, headquarters.

Imagine you're a giant technology company. You've done very well for the past several years, and you find yourself flush with cash--$135 billion of it. You decide it's time to spend about half a billion of those dollars on something that will help your company. Do you build a state-of-the-art gym? Invest in top-of-the-line videoconferencing or virtual reality equipment? Not if you're Microsoft under the leadership of  Satya Nadella and president Brad Smith. Instead, you spend it to help finance housing that teachers, firefighters, cafeteria workers, and nurses can afford. 

The growth of the tech industry in Western Washington has been a boon to an area that once rose and fell with the whims of Boeing and the maritime industry. But, as in other tech-driven cities, the influx of well-paid software engineers has driven housing prices into the stratosphere and well beyond the reach of anyone without a computer science degree. In a Microsoft video explaining the move, a police officer says that although he works in Bellevue, he has to live in Lake Stevens about 30 miles away, the only place where he and his family could find a home they could afford. That makes for what is often an hour-and-a-half commute.

As several observers have noted, the region has seen a lot of construction of luxury homes that are perfect for those software engineers who work for Microsoft or Amazon. And there's been some construction of low-income housing as Seattle and the surrounding towns struggle to address the growing homelessness problem that often plagues high-tech areas. But affordable homes for middle-income households, defined here as those making $62,000 to $124,000 a year, are in very short supply. And because construction in the region is so costly, few developers are inclined to build more.

In fact, construction is so expensive that, The Seattle Times points out, if Microsoft spent the money directly on building housing units, it could only afford to build about 1,000 of them. So, instead, the company is seeking to help finance affordable housing construction. It plans to spend $225 million on below-market loans to real estate developers for building middle-income housing. It will also spend $250 million on market rate loans to help build affordable housing across the region for households making up to $62,000 a year. The last $25 million will be donated to local organizations combating homelessness. 

Microsoft has won widespread praise for the move. "This is long-range thinking by a company that has been around for a long time, and plans to be around for a long time," Margaret O'Mara, a history professor at the University of Washington who studies tech companies, told The New York Times. At the same time, Microsoft's move to address the affordable housing and homelessness crises might cause embarrassment for some of the nation's other tech giants. Or at least it should. Whether in Seattle or San Francisco, homelessness and the lack of affordable housing is a serious problem for booming areas.

And Microsoft's gesture makes other companies' efforts to address these problems seem trivial by comparison. For example, Amazon, headquartered in Seattle, is addressing the homelessness problem by incorporating a 65-bed homeless shelter within one of its buildings. Meantime, the company managed to block a local law that would have imposed a "head tax" per employee on Seattle companies--revenue that would have gone toward programs for the homeless. In San Francisco, a similar measure did pass, with a lot of support from Salesforce founder Marc Benioff. Meanwhile Google and Facebook are solving the housing crisis--for their own engineers--by providing apartments for employees.

But no other company has come close to investing half a billion dollars of its own cash to help create affordable housing or fight homelessness. By making its own region a better place to live, Microsoft is making an investment that can keep paying back for years to come.?