Susan Wojcicki’s twofold formula for reform: Make computer science mandatory and adopt paid family leave.
How would you respond if your 10-year-old daughter told you it was “super lame” to like computers? Now imagine that conversation playing out at home with one of the most powerful women in technology.
“I was in shock,” YouTube CEO Susan Wojcicki told attendees Thursday at the industry’s single-largest conference dedicated to women in technology, the Grace Hopper Celebration. Understandably, she was also somewhat hurt by the revelation, considering that her girl spent many hours of her first decade visiting the Googleplex with her mother, Google employee No. 16.
But, Wojcicki admitted in retrospect, she shouldn’t have been surprised. Stereotypically speaking, the system does very little to encourage girls to consider computer science as a future career. Unconscious bias—including brothers who hog the home computer to play games—begins to develop at a very early age.
“Today that pattern is playing out with girls throughout America,” she said. “They are led to think that tech is insular and antisocial. And they are never given a chance to correct those perceptions.”
The alarming reality is that fewer young women are graduating with computer science degrees than in the mid-1980s, despite an urgent need for tech-related talent across virtually every U.S. industry sector. The numbers thrown around often in Houston at the Grace Hopper event this week: women represent fewer than 18% of those earning computer science degrees, versus more than 30% just 30 years ago. You wouldn’t know that by roaming this sold-out convention, which even offered free childcare to encourage attendance. More than 12,000 attendees crowded the halls, up from 8,000 last year.
Many of these attendees have dedicated themselves to the cause of mentoring the next generation, and each other. In the absence of leadership from school systems or local governments, there are plenty of grassroots initiatives emerging to exposure girls to potential career opportunities in computer science and engineering. The “Hour of Code” project, started by Iranian-born entrepreneur Hadi Partovi, is organizing events in early December to expose both young girls and boys to software development. “My message is that our schools should be teaching computer science,” Partovi said. So far, the organization has trained more than 15,000 teachers to do just that.
Another organization, Girls Who Code, has touched more than 10,000 girls with its bootcamps. Its goal is to reach 1 million “alumni” by 2020. What next? Encourage companies to hire them. This week, it signed more than 20 prominent organizations—including AT&T T , Facebook FB , IBM IBM , Goldman Sachs GS , PMorgan Chase JPM , LinkedIn LNKD , Microsoft MSFT , and Twitter TWTR —that have pledged to make filling positions from this pool a priority.
As of right now, computer science is not a required subject in the United States, unlike physics, mathematics, or chemistry. Chicago, New York, and San Francisco are unique in their system-wide support to changing this. On the other hand, countries like the United Kingdom, Israel, and South Korea are moving to make this curriculum mandatory.
“Unless we make computer science a priority, we risk making gender and class issues worse. And, as opportunity flows to those with a computer science backgrounds, as a nation, we risk our future competitiveness,” Wojcicki said.
The scarce pipeline of female software developers and engineers isn’t the only worrisome issue. YouTube’s CEO also criticized a common culture that praises people for working long into the evening.
“It intimidates people who want to have a normal life,” she said. “It punishes people who have a commitment at home, whether those people are male or female.” For the record, Wojcicki leaves her YouTube office most days in time to share the evening meal with her family.
Generally speaking, women are 45% more likely than men to leave the computer science field mid-career. Wojcicki—and many others commenting publicly and privately during the Grace Hopper event—said one of the most effective ways that tech companies could combat the retention issue would be to embrace far more aggressive paid maternity leave policies.
“When women are pressured to be on call, some of them decide it’s just not worth it to return,” she said.
When Google GOOG extended its own leave to 18 weeks from 12 weeks, its attrition rate among new mothers fell by 50%.
The United States is the only developed nation that doesn’t offer maternity benefits nationally, Wojcicki notes. That leaves it up to individual companies to take a stand. Aside from Google, tech companies demonstrating leadership on this issue include Netflix, which adopted an “unlimited” parental leave policy this year, and Microsoft, which offers 20 weeks (12 of them paid).
So far, Wojcicki is the only person to make use of her own company’s paid maternity policy five times. Each time, she used it as a chance to refresh her relationship with both her family and her career. She’s also happy to report that her daughter is far more interested in computer science, after spending some time at an all-girls coding camp. “She is starting to use technology as a way to build out her ideas. I was able to turn her around,” Wojcicki said.
Subscribe to Data Sheet, Fortune’s daily newsletter on the business of technology.