The icons of downtown San Francisco are the same whether you’re looking at the buildings or at your phone. In the blocks around the undulating, metal-screened length of the city’s new bus and train terminal, skyscrapers—including the city’s tallest—flash all the familiar logos. There’s Salesforce and its new tower, of course, but also LinkedIn, Google, Twilio, Zipcar, Github, Okta, and Dropbox. Facebook, which already had something like 3,000 employees in one skyscraper, has signed a lease on all 725,000 square feet of another one. It’s a gleaming, pixelated future—mostly clean, mostly shiny, punctuated by cranes and pile drivers pushing foundations through the city’s wobbly ground in search of bedrock.

The iconography changes just a 15-minute walk to the west. The tech businesses are in that neighborhood, known as the Tenderloin, too—most notably Twitter and Uber. But here the city’s biggest problem—and California’s, and the country’s—is just as conspicuous as all those tech billions downtown: Homeless people sit or lean at building entrances. The sidewalks are filthy. Amid a few signs of construction and gentrification, like remodeled theaters and hotels, are bodegas, shelters, supportive housing, aid agencies.

It’s a mind-boggling transition. A neighborhood, maybe 15 square blocks, of developing-world-level poverty in the heart of California, the world’s fifth-largest economy. The Bay Area is the home of Apple, Facebook, Google, Twitter, Uber, LinkedIn, Tesla, eBay, Netflix, Cisco, and much of the capital that funds the early stages of the companies that aspire to join these kinds of lists. Money flows around the Bay Area like packets of information on a global digital network: freely and in great quantity.

Yet on a single night in January of 2017, San Francisco had 6,858 homeless people. Santa Clara County, home of San Jose and a decent chunk of Silicon Valley, had 7,394. (Los Angeles County had 55,188.) California overall had 134,278 homeless people, half of them completely unsheltered, most of them in cities. That’s one quarter of all the homeless people in the US. San Francisco’s recent mayoral race turned, in part, on homelessness, and the governor’s race may, too. The city is turning into a Brechtian horror show where young men wearing Airpods and backpacks emblazoned with the names of gig-economy apps weave e-scooters among people passed out in their own filth.

That’s not even the most frustrating part. This is: Everyone who works on homelessness agrees on the way to fix the problem. Build more homes. Not coincidentally, more places for people to live would help alleviate all sorts of other problems, from climate change to income inequality. But the kinds of housing California needs are not the kinds that get built. The reasons amount to an obstacle course built from policy mistakes, economic vicissitudes, and prejudice. “This is not something like pancreatic cancer, where thousands of scientists are striving to find a solution for a really difficult problem that we literally don’t know what to do about,” says Margot Kushel, a professor of medicine at UCSF who studies homelessness. “We actually know what to do. We just lack the will.”

A recent report from the UCLA Anderson School retells a familiar tale. Housing starts nationwide have doubled since the 2008 crash but still aren’t keeping up with demand. That problem is at its worst in California and the Pacific Northwest (oh, hi, headquarters of Amazon and Microsoft). As the UCLA economist David Shulman puts it in his section of the report, if you own a home in those parts of the world, you are psyched. Value is way up. If you’re a renter without rent control or you hope to buy a home, you are a person whom it sucks to be.