Max Chavez remembers the moment when he finally found the coding error that was causing his two-dimensional red and yellow ball to defy the laws of physics.

He was watching the ball on an old Mac computer on a cafeteria table at East Palo Alto Academy. It was 2016, he was a freshman at the high school and he’d become part of StreetCode Academy, a local nonprofit that provided free training for students to bridge the tech divide in Silicon Valley.

Instead of glancing off the wall, the ball was doubling back on its original track. A StreetCode teacher walked Chavez through every line of his code until Chavez finally identified the culprit: a stray “-1”. He remembers the rush of excitement he felt — and its broader significance.

“People who came from my community don’t have the chance to have that spark,” said Chavez.

The next year, he became a StreetCode teacher himself. Now, he’s studying computer science at UC Berkeley. And StreetCode, which started operations in a cafeteria, has moved onto Facebook’s campus.

Founded in 2016 with $1 million in seed funding from Chris Cox, chief product officer at Facebook, has grown from helping about 20 students a year to around 2,000, primarily in East Palo Alto. The organization links students from East Palo Alto, where the median income is $30,000 a year, with tech professionals, provides training in a variety of computer science fields, and offers seed funding for student startups.

Though East Palo Alto is surrounded by the immense capital of Facebook, Google and Stanford University, many of its residents have little access to the tools of the technology industry. “We have community members inside of that environment that have no access, no computers, no mentors, no conception of what technology is,” said Olatunde Sobomehin, CEO and co-founder of StreetCode. “We really are in this desert, literally in the middle of the Amazon rainforest.”

StreetCode Academy co-founder/CEO Olatunde Sobomehin, left, leaves the stage after introducing Chris Cox, Facebook’s chief product officer, standing with microphone, during a StreetCode fundraising and celebration event at Facebook headquarters June 13, 2017, in Menlo Park. (Kevin Kelly / Daily News) 

Chavez started playing with code in middle school by watching online tutorials. “I was probably into hacking,” he grinned. “I gotta learn somewhere.” But while East Palo Alto Academy sat in the heart of the world’s tech capital, it didn’t have a computer science classes, like the “Computer Programming 1-3” class available at Palo Alto’s $20,000-a-year private high school, Fusion.

“What you see in Silicon Valley, more so probably than any other place in the world, is that you have extreme gaps in mindset, extreme gaps in skills, extreme gaps in access,” said Sobomehin.

Chavez says that has serious consequences. He pointed to the problem of artificial intelligence’s facial recognition failing to decipher non-white faces. Just a few weeks ago, the New York Times reported that Facebook’s artificial intelligence asked users watching a video that included Black men if they wanted to view more videos about primates. Facebook apologized and is fixing the problem.

“People from different backgrounds matter,” Chavez said. “So things like the facial recognition incident don’t happen again.”

Recently, StreetCode developed a new way to use non-fungible tokens, or NFTs, for its own fundraising. NFTs are one-of-a-kind digital copies of pictures, videos or even Tweets that someone can buy – like a Leonardo Da Vinci painting that exists only behind a computer screen. After a chance online encounter inadvertently instigated by MC Hammer, StreetCode developed philanthropic NFTs, or pNFTs. StreetCode hopes the new approach will bring a small part of the $174 million spent on NFTs since 2017 back to non-profit organizations and StreetCode students like Brian Miller, a seventh grader in at Greene Middle School in Palo Alto.

Miller’s affinity for video games like Minecraft and Street Fighter spilled into an interest in coding when he was about 7. But the computer science summer camps and after school programs that some of Miller’s friends attended were financially out of reach.

After a recommendation from a friend of his mother’s, Miller landed in a StreetCode orientation and was hooked. His mother, Bridget Miller, was just as excited. Tech jobs are the future, she said.

“It can give you the key into Silicon Valley,” she said. “Where I might not be a part of that Silicon Valley society myself, StreetCode can make it to where my son can, and he can pave the way and bring the diversity.”