Veronica Rivera signed up for the introduction to computer science class at Harvey Mudd College mostly because she had no choice: It was mandatory. Programming was intimidating and not for her, she thought.
She expected the class to be full of guys who loved video games and grew up obsessing over how they were made. There were plenty of those guys but, to her surprise, she found the class fascinating.
She learned how to program a computer to play "Connect Four" and wrote algorithms that could recognize lines of Shakespeare and generate new text with similar sentence patterns.
When that first class ended, she signed up for the next level, then another and eventually declared a joint major of computer science and math. Cheering her on were professors who had set out to show her that women belonged in computer science just as much as men did.
It's a message that goes unheard at many universities. Nationwide, according to the Computing Research Assn., more than 84% of undergraduates who major in computer science are men.
Not so at Harvey Mudd, where more than half — 55% — of the latest class of computer science graduates were women, compared to roughly 10% a decade ago.
Programming is so popular now in this science and engineering corner of the Claremont Colleges that its professors are campus celebrities and incoming freshmen are excited for classes before ever setting foot on campus.
The school's breakthrough came when the department's professors realized that in order to change computer science's reputation, they had to change how it was taught.
"Computing has an image problem … and the faculty just have their work cut out for them," said Jane Stout, director of CRA's Center for Evaluating the Research Pipeline. "They've got to market it. They've got to sell it. They've got to change all the negative stereotypes."
At Harvey Mudd, the professors made the quizzes more fun and created homework assignments designed to bring groups of students together to solve problems.
"It no longer felt like an intimidating subject," said Rivera, who is completing her senior project on facial-recognition algorithms with four classmates. "It felt like something that I could learn, that I could really do, even though I hadn't done any of it in the past."
Harvey Mudd's revamped curriculum has been adopted by other schools, including Northwestern and UC Riverside, which are trying to broaden the subject's appeal.
Increasing gender diversity is particularly important in computer science, a field that has infiltrated every part of modern life but is still primarily dominated by men. Women make up less than one-fifth of tech employees at Google.
"There's a shortage of raw talent in the field," said Ran Libeskind-Hadas, a computer science professor who led Harvey Mudd's curriculum redesign. "Companies are offering six-figure salaries with good benefits to 22-year-olds. For young women not to be able to be part of that economy is just a failing on the part of society."
Harvey Mudd's computer science faculty members first began to rethink the way they were teaching the subject in 2005.
The program was producing successful graduates: the chief technology officer of Reddit, a founding engineer of Pinterest, creators of Adobe Flash software and solitaire for Microsoft.
But just as the field was rebounding from the dot-com bust, only a couple of women each semester were signing up for an advanced course in computer science.
Change needed to begin at the beginning, professors realized. The traditional introductory class was so dry that they drew straws to see who would have to teach it.
Using student feedback, observations from class and a bit of creative social psychology, professors identified three key reasons female students did not major in computer science: They didn't think they would be good at it, they couldn't imagine fitting into the culture and they just didn't think it was interesting.
In the revamped curriculum, instead of having computer science students write arcane code, professors started giving them fun group puzzles and 3-D graphics to create their own games. After freshman year, students were offered research opportunities. They used algorithms to solve evolution questions and analyze DNA sequences.
Female students tended to think more about their careers in terms of its social relevance, and how their work could help the world, Libeskind-Hadas said. Many male students who pursued computer science, he found, were more passionate about building personal projects and ideas.
To help female students feel like they belonged, professors found ways to remove the so-called "macho effect" by which more-experienced students — usually male — intimidated others by answering all the questions. They pulled those students aside privately and asked them to let others speak. They urged students to save their more advanced conversations for time with their teachers outside of class.
They also divided the introductory course into sections based on prior experience, so that those who knew nothing were learning together at a comfortable pace — as were those who knew a lot.
Showcasing women in the field has made a difference, too. Today, more than 40% of the school's computer science faculty is female. Students also are offered a paid trip to the annual Grace Hopper Celebration of Women in Computing, billed as the largest professional gathering of women in technology.
It helps that Maria Klawe, Harvey Mudd's president since 2006, is a computer scientist herself. Her influence in making the field more attractive to women has been recognized by the White House's chief technology officer. She has called out tech executives for not encouraging women. Often dressed in jeans and toting a fuchsia backpack on campus, she greets and encourages many of the 830 students on campus by name.
"Building confidence and a sense of belonging and a sense of community among these women makes such a huge difference," she said. "Once you change the myths and the cultural beliefs about computer science, that has a lot of momentum."
The introductory course is now one of the most popular across the Claremont campuses. More than 40% of non-computer science majors, hooked after the first class, go on to take at least two more programming courses. Within four years, the percentage of women majoring in computer science more than tripled.
Computer labs are now go-to meeting spots, abuzz with chatter and lively groups at work. Students flock to hands-on events such as overnight hackathons to apply what they learn to real-world problems.
Sophomore Mackenzie Kong-Sivert recently teamed up with three other young women to program a light-sensitive robot that would make a ruckus if its owner didn't turn off the light and go to bed with time to get enough sleep. They dubbed it the Sleep Dep Buddy, with "Dep" being short for "Deprivation."
Kong-Sivert says it's been a relief to be able to work with female peers. At her Arizona high school, she often was the only girl in activities such as the robotics team.
"It was a lot of pressure," she said. "I felt like I had to be a good representative and constantly be doing excellently at everything."
That could happen to female students again after graduation. They're lucky to be in the Harvey Mudd bubble, her teammate Lauren Hu said. The real world has to catch up.
Telle Whitney, who heads the nonprofit Anita Borg Institute for Women and Technology, said people are going to start noticing the computer science gender gap more as the need for that skill set grows ever larger.
Whitney and Harvey Mudd have teamed up to help more than 15 colleges and universities increase computer science diversity. The initiative — Building, Recruiting and Inclusion for Diversity, or BRAID — also draws from the work of other schools, such as Carnegie Mellon University and
That kind of effort can't stop with college, said Stout of the CRA, who's concerned that many female students will be so ardently recruited by companies that they won't consider getting doctorates: "We need more women getting these advanced degrees so that they have opportunities to be leaders in the field."
It wasn't coding that drew Harvey Mudd senior Alice Szeliga into classes in computer science, in which she majors with a focus on biology. Her thesis is on the life cycle of a parasite that causes African sleeping sickness, and she's using her programming skills to discern patterns from more than 100 gigabytes of data.
Computer science, she says, is much more than "building a new app." She wants to run a lab one day that conducts disease research "using computational techniques."
In the meantime, she's encouraging other women in her dorm to give computer science a try, even to major in it.
Perhaps, someday, they'll all work side by side, solving the world's problems together.
Follow @RosannaXia for more education news