When Rebecca Taylor, then 13, attended her first Black Girls Code session in California in 2013, it was a revelation.
She had not known any other girls who loved playing computer games as much as her, and was surprised to find herself learning about software with 20 like-minded young women.
"That was really awesome because I finally felt, 'It's not only me,' " Rebecca told the Thomson Reuters Foundation.
Black Girls Code was set up by Kimberley Bryant, an electrical engineer, in 2011 to give African-American girls between the ages of seven and 17 weekend and summer classes in computer programming, app development, and web design.
Ms. Bryant, who was honored by former US President Barack Obama as a Champion of Change for Tech Inclusion, started the charity after her daughter returned from a coding camp as the only black girl, mirroring her own experience decades earlier.
Only 3 percent of computing jobs in the United States were done by African-American women in 2016, despite accounting for about 7 percent of the population, government data shows.
Ms. Bryant believes more young black women need to be trained – and inspired – to pursue technology careers to close the gap between the number of jobs available and people with skills to fill them.
The charity aims to teach 1 million black girls to code by 2040.
"I think of myself as a social activist educator who is addressing the social inequities by way of computer education," she said by phone from California.
"Our goal is to empower this community to go into those jobs that will have a strong financial impact on the future success of their families."
The US government predicts software developer jobs – which earn an average salary of more than $100,000 – will increase 24 percent by 2026, much faster than most other occupations.
Bryant hopes to address some of the historic disadvantages suffered by black women, who have higher rates of poverty and unemployment and lower earnings than white women, according to the Center for American Progress, a Washington-based think tank.
Only 2 percent of African-American women are represented in science, technology, engineering, and mathematics (STEM) fields, while women make up 24 percent of the STEM workforce, it says.
When Bryant studied for a degree in electrical engineering in the 1990s, there were few other female students. It got worse when she moved into information technology, she said.
"I was used to being one of just a handful of women but I wasn't used to being the only woman in the room, which is actually what it looked like on the computer science side," she said.
"Having less women in the field had an impact on women aspiring to go into computer science because they didn't see other women there."
Silicon Valley tech companies started releasing workforce diversity figures in 2014. But progress has been slow, underscoring the challenge of transforming cultures that critics say are too homogenous, white, and male-dominated.
Google's percentage of African-American employees in the US did not move at all in 2015 from 2014, remaining at 2 percent, despite initiatives such as using work time to teach at historically black colleges and universities.
Women made up 31 percent of Google's overall workforce in 2015, up 1 percent from 2014. Figures for the number of black female employees were not available.
Facebook reported in mid-2017 that its black US workforce had increased to 3 percent from 2 percent in one year, after it held its first Black Leadership Day and set up the TechPrep website to promote computer science careers among minorities.
"We're not interested in diversity for diversity's sake," Facebook's diversity director Maxine Williams said in a phone interview.
"We are interested in it because we understand how it helps us make better decisions, build better products."
Black Girls Code classes engage pupils by letting them loose on whatever excites them – building a fashion website, solving a robotics problem, or addressing a community issue.
Thousands of girls have attended, either paying $35 per day or attending for free if they are eligible.
Three-quarters of Bryant's funding comes from recognized corporates, such as the delivery service FedEx and car maker GM, which is investing in tech jobs to develop self-driving cars.
Bryant sees a clear business case for diversity.
"If companies want to survive and stay relevant they must have a diverse staff that is connected in a cultural way to the communities they are trying to reach and are trying to sell to as customers," she said.
Five years after taking part in Black Girls Code, Taylor, now 18, is in her first year of a computer science degree at California State University and is focused on a career programming computer games.
"Before that first session, I didn't know what I wanted to do when I grew up. It completely changed who I was," she said.
This story was reported by The Thomson Reuters Foundation.