A group of millennial-age technology workers stand near signage for Google at the Googleplex, the Silicon Valley headquarters of search engine and technology company Google Inc, Mountain View, California.

Barely a decade after the worst housing crash in history, home prices are soaring, and fewer buyers are able to afford the homes they want. In fact, a growing number of Americans, including tech workers who are paid relatively well, are unable to live in the same communities where they work.

Teachers, first responders, restaurant workers and, surprisingly, computer programmers have the hardest time affording a home near their jobs. This is according to a new study by Trulia, a real estate listing company.

Researchers there used the latest median wage data for each occupation group from the Labor Department's employment report, and then calculated the share of homes for sale in each market that are affordable to each category of worker. They define affordability as one's monthly payment on housing taking up no more than 31 percent of one's paycheck. They included homeowners' association fees on the property, property tax and insurance into the affordability.

In tech-heavy California, where workers in the sector make six-figure salaries, very few can afford to buy a home. In San Francisco, programmers can afford just 5 percent of the homes for sale, and in San Jose barely 12 percent, according to Trulia. These workers earned a median wage of $122,993 in San Francisco and $115,660 in San Jose, but median home prices in both cities are well over a million dollars.

But it's not just in California, where home prices are highest. Barely half of programmers in Chicago; Charleston, South Carolina; Minneapolis; and Newark, New Jersey, can afford to buy the median-priced home. The numbers are even lower in Portland, Oregon, and Miami.

James Heller works in health-care technology and has lived in Burbank, California, all of his life. Recently divorced, he had to sell his old home but found he could not afford to buy something else in the same area. He ended up moving about a half-hour outside of Burbank to Valencia.

"I've lived in Burbank all my life, and I love it, but housing has gone through the roof there," Heller said. "The basic thing was the amount of money in my budget, and I wasn't going to spend 12 percent more for 25 percent less space."

Heller doesn't actually mind his new hometown, but he is now a half-hour away from his daughter and his mother, who both still live in Burbank.

"It has separated me from my hometown. I would prefer to live in Burbank," Heller said.