OAKLAND, Calif. — More than a decade before diversity became a hot issue in Silicon Valley, Jason Young came home on winter break from Harvard to discover that his family was being evicted.

Having grown up in a single-parent home with an absent father who was frequently incarcerated, Mr. Young, 33, can identify with other young black men he now calls “hidden geniuses” — the promising male teenagers who grow up in challenging circumstances mere miles away, but light-years apart, from Silicon Valley’s tech money machine.

That experience led Mr. Young to found the Hidden Genius Project two years ago. The program immerses high school men of color in coding, web and app design, team building and other skills intended to give them a leg up in the tech economy. Mr. Young says he focused on young men because similar groups existed for young women, and because young males face particular challenges in school and their communities.

His project is one of a multitude of grass-roots efforts that have sprung up recently to address one of Silicon Valley’s most acute diversity problems: the scarcity of African-Americans in the tech industry.