Before Randi Williams spent last summer in San Francisco, the 19-year-old computer-engineering student from Maryland had only one idea on how to break into the tech industry: Get a bachelor’s degree, get a master’s degree, then start applying for jobs. It’s a formula that seems routine except, perhaps, in Silicon Valley, where internships, connections, and even dropping out of college can be a means to a job at a tech startup.

But a fellowship program with Code2040, a non-profit organization based in San Francisco, flipped her script. Through it Williams found a paid internship at wearable tech company Jawbone just after her freshman year. Over 10 weeks, she took a self-directed crash course in web programming, augmenting her coding knowledge by adding HTML, CSS, and JavaScript to her existing repertoire of Java and Python skills, as well as knowledge gleaned from building the Careers page on Jawbone’s website. She met influential players in the West Coast startup scene—by visiting the offices of Google, LinkedIn, and other tech firms—and formed relationships with mentors she continues to e-mail today.

“Now that I have experience in Silicon Valley, I feel like if I were to apply somewhere, I would be welcomed,” Williams says. “I feel like I have some baseline to walk into these companies, whereas before . . . if I were to apply to any of those companies, it would be like wishing on a star.”

Forging those connections between college undergrads like Williams and Silicon Valley tech firms is central to Code2040’s mission for one key reason: To even be considered for its summer fellowship program, a student must be black or Hispanic, two demographics vastly underrepresented in the high-tech industry. Consider the demographic data Google GOOG released at the end of May, which showed that blacks and Hispanics make up 1 and 2 percent, respectively, of the tech company’s workforce in the U.S.. To Code2040—a name derived from U.S. Census data predicting that blacks and Hispanics will make up a majority of America’s population after 2040—the purported meritocratic merits of the Valley aren’t enough to increase hiring diversity.

“You can’t succeed unless you get in the door,” says Laura Weidman Powers, Code2040’s co-founder. “Yes, you have to be technically talented. But you have to get a seat at the table in the first place. A big part of what we do is smooth pathways into the sector.”

This summer, the program’s third in which it sends fellows to the West Coast, 25 students will be working paid jobs at 18 different tech companies. Providing college undergraduates with relevant industry experience is a substantial part of Code2040’s work, but networking is ultimately the goal, given importance of referrals in Silicon Valley hiring practices.

“It’s very clear to me that the social networks are really what determine the people you end up working with, the people that venture capitalists end up funding,” says Caterina Fake, the co-founder of websites Flickr, which sold to Yahoo YHOO , and Hunch, which sold to eBay EBAY . Fake is now the chief executive (and sole founder) of Findery, a social discovery app that lets users tag their favorite locations around the world with notes and photos. Her new company recently hired its second Code2040 summer intern. The first, she says, has since accepted an internship with Microsoft MSFT this summer, an outcome believed to be a direct result of the intern’s participation in Code2040’s program last summer.

Students must apply to be a Code2040 fellow. To gain entrance into the program last summer, Williams was asked to submit a résumé and pass a coding exam in which she had to program an interactive chess game. After she was accepted, she then had to interview with three technology companies to earn her spot. Jawbone was it.

“They need to meet the same set of requirements as any other intern: outstanding students, really strong technical background and knowledge, cultural and personal fit matches,” says Christian Middleton, the director of software at Jawbone. “Our goal is to find people we can hire after they’re done with school.”

Put differently: “Code2040 is not just diversity for diversity’s sake,” Powers says.

Fake notes that the percentage of minorities earning computing degrees has increased since the years around the first dot-com rush. Of roughly 10,000 computer science bachelor’s degrees handed out in 2013, women earned 14 percent, blacks earned about 4 percent, and Hispanics earned 6 percent, all increases from 2012, according to the latest Taulbee Survey from the Computing Research Association, which for the first time in 2013 requested information about the gender and ethnicity of students enrolled in computing-related U.S. bachelor’s programs.

The gap between learning computer programming skills and the application of those skills, Fake says, lies in who those black and Hispanic students know and whether those people can help them find work. It’s unfair to label Silicon Valley as an exclusively White Male Bro-topia; to do so is to stretch the truth. But for many companies founded by white men and staffed similarly, “It’s all too easy to fall into a kind of a belief that all of the people around you who are, not surprisingly, a lot like you are the people who have the talent and have the merit,” Fake says.

In the fast-paced, West Coast tech world, where talent is continually sought after, pulling new workers from a largely untapped pool of the sort Code2040 cultivates makes sense—and makes for good business.

Hunter Walk, an investor who previously served as a director of product management at Google, is a mentor for Code2040 fellows. His venture capital firm, Homebrew, has made 11 seed-stage investments since raising its first fund in 2013. Walk says his firm looks to back startups run by “people who are interested in diversity of ideas and that almost always means diversity of people.”

“Creating a monoculture where everybody thinks alike is sometimes okay if you’re executing against just one narrow idea, but technology moves too fast in order to bet on that anymore,” Walk says. “As product qualities rooted in anthropology rather than algorithm became important, the diversity of people creating these products became important as well.”

Code2040 hopes to be the first piece of that pipeline.

This story has been updated with additional information about the size of the most recent Code2040 class of summer fellows.