THE BLOG

Sorting Is Boring: Computer Science Education Needs to Join the Real World

02/13/2015 01:41 am ET | Updated Apr 14, 2015

Every April, we at Girls Teaching Girls To Code hold a day-long event called Code Camp to introduce 200+ high school girls in the San Francisco Bay Area to computer science. Throughout the day, 40 women in computer science from Stanford University expose students to their first programming language, help them use their new skills on cool projects, and inspire girls to the wide array of careers in computer science.

This past year, one of the concepts we wanted to teach was sorting. Sorting is widely studied in computer science because it's used everywhere, from putting your Facebook timeline in chronological order to reordering your Amazon search results by price. Quickly sorting a long list of items is difficult, so a lot of research has been done on sorting a list efficiently.

To introduce this concept, we devised a team activity for part of the day, during which girls acted out the most common sorting methods. As the organizers, we thought it was awesome -- the girls were learning a core CS concept in an interactive way.

But the girls? They hated it. Sixty-two out of 210 students said that 30 minute session was their least favorite part of the entire day.

We were shocked. It seemed so fun! The girls were outside and interacting with each other. What was there not to like? But after diving into the girls' feedback for the event, we saw many versions of "I don't get the point," "It was boring," and "This doesn't seem important."

It finally made sense. As computer science students, we know why sorting is important because we see it being used everywhere. But from the girls' perspective, we were just saying, "Here is a bunch of ways to sort a list." So of course for them, sorting was boring.

The thing is, the majority of computer science classes teach not only sorting but also every other concept in computer science in exactly this way -- by presenting various algorithms, explaining how they work, and expecting students to enjoy it. Introductory computer science education at universities tends to emphasize the technical aspects of programming, such as speed and efficiency. Assignments ask students to print out prime numbers or determine if a word is an anagram -- certainly interesting and difficult, but not particularly useful. Only several semesters later do students study the interdisciplinary, real-world applications that motivated many of them to learn computer science at all.

This structure causes many students to give up on computer science early on -- a problem that disproportionately affects women. Jane Margolis, a leading researcher in gender equity in computer science, explains in Unlocking the Clubhouse that women tend to be more interested in the applications of a computer, whereas men tend to be more interested in the computer for the computer's sake. Women link their interest in computing to other disciplines at five times the rate that men do. Although there are many reasons for why women abandon studies in computer science, the design of most computer science classes is a major factor in why only 18 percent of undergraduate computer science degrees in America go to women.

After all, at its core, programming is part of a toolkit -- to reconstruct excavated Greek art, provide a quality education to all, and rescue human trafficking victims. It belongs in the same toolbox as English, used to communicate with classmates and colleagues; and math, used to make estimates and examine problems quantitatively.

There are people who love math for math's sake and devote themselves to proving 1 + 1 = 2. There are more people, however, who enjoy using math to prescribe medication and build skyscrapers. In elementary school, we use word problems to show why it's useful to add fractions (ever want to split that blueberry pie?) or find the perimeter of a square. We wait until college, when math majors choose to devote four years towards pure math, to finally set aside the word problems and focus on theory. We do so because math is a valuable skill that is used in so many different professions and contexts, and we don't want kids to give up on math because they don't think it's useful.

So, why does computer science start with theory and end with word problems?

We need to spark an interest in computer science using students' passions. Let's teach introductory programming by demonstrating its incredible potential for impact. Let's teach sorting algorithms from the perspective that they're used everywhere, not just because they're supposed to be in the curriculum. Let's make sure that starting day one, they see what they can achieve using computer science and are excited to come back for the next class.

Computer science is a tool -- and if we want to attract people who intend to use it that way, we need to start teaching it that way from the beginning.

To learn more about Girls Teaching Girls To Code, check out http://www.girlsteachinggirlstocode.org or email girlsteachinggirlstocode@gmail.com.