Sarah Walker, a freshman from Fullerton, California, had no interest in computer science when she came to Duke last fall. But when another class didn’t fit into her schedule, she signed up for Duke’s introductory computer science course, Compsci 101.
“I thought I would be surrounded by tech geeks who sat alone at their computers all day,” Walker said. “But I came to realize that computer science lets you do things that are applicable to all sorts of fields.”
Now she’s using her new computational savvy to expand a nonprofit she founded in high school to raise money for an elephant sanctuary in Thailand.
“You wouldn’t think that running a nonprofit requires a lot of technical skills, but it does,” she said. “You get a problem and you think, ‘I could solve this on paper and it would take me 25 hours, or I can write one line of code and all of a sudden there’s my answer.’ The efficiency of it is super cool.”
Long viewed as the entry point for a field dominated by male coders and computer whizzes, Compsci 101 is undergoing a transformation at Duke. Women undergraduates now comprise 45 percent of the students. (Nationally, women make up only 14 percent of those who go on to major in computer science.) The numbers of Hispanic and African American students have also risen.
Overall enrollment in the class this academic year swelled to 318 students in the fall and 297 this spring, the most ever.
Since 2010, computer science professors have been revamping the course to place more emphasis on real-world applications and solving problems in small groups with peer tutors. Many lectures include discussions about Duke alumni who took the course, or professionals doing creative work in the field.
Most important, class lessons are now more fun and appeal to a broader range of students.
Breanna Polascik, a freshman from Chapel Hill, enrolled in the course because she thought it would be a helpful skill set to have if she pursued a graduate degree in business. “What I like about computer science is it’s a really good blend of creativity and logic,” she said.
One of Polascik’s first assignments was to write a program that moves and turns a virtual pen across the screen to draw a picture. The lesson challenged her and others to learn about loops, a programming concept that instructs a computer to do something over and over again.
“I sent it to my mom and said, ‘Look what I made!’ ” Polascik said.
In another assignment, students wrote a program suggesting books or movies a person might enjoy based on previous ratings submitted by others. Similar to the recommendation software used by Amazon, YouTube and Netflix (“If you liked Guardians of the Galaxy, you might also like King Kong”), the assignment taught general concepts such as machine learning.
When their code works, the students do victory dances, chanting and spinning in their office chairs, which they videotape and upload to thegreendance.com for extra credit.
“I like the challenge of writing a program; it’s kind of like solving a puzzle,” said Kyler Brown of Matthews, N.C., a member of the Duke football team who recorded his Compsci 101 victory dance wearing a Batman mask.
Brown took his first computer science class at the end of his sophomore year and is now a double major in computer science and visual studies.
“I especially like web design because it combines coding and art,” he said.
This spring, freshman Sarah Walker became one of Compsci 101's undergraduate teaching assistants. Although she is an excellent student -- she was the valedictorian of her high school class -- she wouldn’t have been eligible to enroll in the course before it was revamped since she didn’t have the previous programming experience that was required at the time. Nor do more than two-thirds of her current classmates. “My high school didn’t offer computer science,” she said.
Even though some high schools offer classes in computer science, fewer students sign up than might otherwise because many states don’t count these classes towards graduation requirements for math or science. They consider them electives.
“It shouldn’t matter where you go to high school," said Duke computer science professor Owen Astrachan, who helped lobby for the new requirements for Compsci 101. "We wanted to make sure that students everywhere have equal opportunity. It’s an equity issue.”
“Relative to the composition of students on campus, we are approximately 5 percent above the national average in each category,” said Lee Baker, associate vice provost for undergraduate education.
Campus officials agree with Astrachan and welcome the class’s success in attracting more -- and more diverse -- students. Still, the department continues to face challenges.
For women in particular, Astrachan noted, a lack of peers and role models remains a challenge in many upper-level computer science classes.
For the past eight years, with full financial support from Duke and sponsors such as Yahoo and MetLife, dozens of Duke women have joined computer science professor Susan Rodger and others in attending the Grace Hopper Celebration of Women in Computing, the world’s largest conference for women in computing.
“It’s been very inspiring to me and to them to see so many successful women in computer science,” said Rodger, who at the 2014 conference presented a project she and colleagues spearheaded to create Wikipedia pages and playing cards about notable women in computing.
Female computer science students at Duke have managed to build community in other ways as well. Last November, computer science and math double major Mollie Breen joined more than 500 students from across the country in an event called “HackDuke: Code for Good.”
Over 24 hours, small teams of students collaborated on software or hardware projects related to four themes -- poverty and inequality, health and wellness, education, and energy and environment.
Breen and her teammates built a temperature monitor designed for premature newborns who are born at home and can’t make it to a clinic.
Breen’s teammates Christine Schindler and Karmyn McKnight, both engineering majors, designed the circuitry for the device, and Breen wrote a program to send the data to the cloud so physicians can monitor an infant remotely.
“We’re friends so we’ve always talked about our schoolwork, but it’s neat to be able to work on a project together and actually put what we’ve learned to work,” Breen said.