(AP) -- Daniel Macias is the face of Silicon Valley seldom seen by those who don't live there.
When he was 19, he wasn't starting what would become one of the world's most successful tech companies, like Mark Zuckerberg did at that age when he founded Facebook. Macias spent his 19th birthday behind bars, where he'd been sentenced for assault.
Now 20, Macias spent a recent day learning to build houses as part of a construction job training program near Facebook's headquarters. He hopes to join the carpenters union when he finishes the program.
"If I wasn't going to school, I would have been in the streets," Macias said.
Money and jobs abound in Silicon Valley for people with the right high-tech or business skills. For those who don't, the Great Recession has meant the same challenge as anywhere else in the country.
Facebook moved into its new offices on the former campus of Sun Microsystems along San Francisco Bay not long before announcing plans for an initial public offering. Inside, employees wrestle with the enviable problem of what to do with their money once the IPO makes them overnight millionaires.
A short drive down the road, East Palo Alto saw the number of murders double from four to eight, a significant spike for a city of just 28,000 people. Average income hovers just under $18,000 annually, compared to more than $66,000 for Silicon Valley as a whole. The unemployment rate in December was 17 percent, compared to 8.3 percent region-wide.
Those disparities stem in part from the complicated histories of the small cities that span the Highway 101 corridor threading through the heart of Silicon Valley, and in part from national economic trends that have spared few struggling communities. They also reflect some changes unique to the most recent tech boom, fueled by social media, cloud computing and mobile apps.
As per capita income rises in region, the median income has fallen, suggesting that as some people are getting richer, more are making less. The percentage of students in Silicon Valley public schools receiving free or reduced-price lunches has increased steadily over the past several years, an indication of hard times for more families.
Data on these economic trends are collected every year in the Silicon Valley Index, compiled by local nonprofit analysts. This year's report highlighted the recovery of the region's high-tech economy as wildly successful companies like Facebook go on hiring sprees.
But that recovery has not had the same ripple effect on the region as a whole compared to previous tech booms, said Russell Hancock, head of Joint Venture, one of the groups behind the index.
In the past, companies like Hewlett-Packard Co. and Lockheed Martin Corp. brought mid-level jobs to Silicon Valley along with the expected science, engineering and management positions, Hancock said. But globalization has sent the manufacturing jobs overseas. Meanwhile, information technology has made once-plentiful clerical and office positions obsolete.
"The technologies that we invented here have actually eliminated entire classes of jobs," Hancock said. Without those jobs, the prospects for workers without high-end tech skills have become even more challenging:
"If you took away tech, our region would look like any other region, maybe even worse," he said.
The contrast between the haves at Facebook and the have-nots in East Palo Alto nearby has stirred some tension. City Councilman Carlos Romero is pushing for the company to do more to address traffic and the resulting air quality issues created by the influx of new workers. He also worries that especially after Facebook's IPO, newly flush employees will start buying up the city's relatively affordable real estate close to their offices and send housing prices spiraling higher than low-income residents can afford.
"This is not about making sure that Facebook doesn't come into the community," Romero said. "This is about making sure East Palo Alto is not left out."
Nearly half of Facebook's employees take some form of alternative transportation, and the company is placing a hard cap on the number of vehicles allowed on and off campus to keep traffic down, said Facebook spokesman Tucker Bounds. Facebook has also been working with local developers on efforts to build housing for employees on vacant land near the campus to lessen the impact on the existing housing market, Bounds said.
Facebook has initiated some outreach into the surrounding community, including support for the program where Macias is learning to be a carpenter, known as JobTrain.
Kail Lubarsky, director of marketing at JobTrain, said no graduates have gotten jobs with Facebook yet, but she said she's working with the company in hopes of establishing an internship program. JobTrain has culinary arts training that could lead to jobs for students in Facebook's cafeterias. But the real goal is to place students in entry-level jobs that could let them advance to join the ranks of the in-demand coders, designers and executives who thrive most in Silicon Valley.
At JobTrain, some students said they were gunning for Facebook jobs. But many said they were simply grateful for the chance to start over, to get a foothold in an economy that has challenged many of them, even in a place where on paper the recovery is in full swing.
Macias said he sees parallels between his effort to get ahead and the Facebook employees up the road, whom he sees as average people who worked hard and succeeded.
"They took advantage of opportunities," he said.
Explore further: Mark Zuckerberg becomes a home owner: report