Quick links

‘Computer Science for All’ (Really)

Prof. Sedgewick’s last live lecture

Picture this, students.

You’re in one of the biggest lecture halls on campus, but it’s still too small. You’re sitting in an aisle and can’t see the screen. The sound system stops working halfway through. And, of course, you’re sweating because the temperature in the hall is above 90 degrees.

So what’s new, right? Well, how about if this is the last lecture you have to attend?


Two prominent Princeton computer-science champions predict, with only a subtle wink, that this last live lecture will take place before you know it. Robert Sedgewick and Kevin Wayne say that this event is inevitable and will be a milestone in our recognition of how computers have come to dominate all aspects of daily work and life. Experts have long known that active learning like that stimulated by online lectures is much more effective than the passive learning that is commonplace in live lectures.

For students of COS 126, the introductory computer-science offering that has become Princeton’s most popular course, the future is here. Live lectures ended in the fall 2015 semester, as the course shifted to a “flipped” class model in which students watch lecture videos at home and attend class meetings and precepts only for interactive and team exercises.

Sedgewick, who taught the course in the fall, said students have embraced the change, and many expressed a preference for the new format. “The online lectures allow me to focus on the information instead of trying to constantly take notes, because I know I can go back to the lectures whenever I need to,” one student wrote in a course critique. Sedgewick said his course ratings climbed to the highest level ever, with no weakening of academic performance.

COS 126, which Sedgewick introduced in 1992 and the two have been developing together since Wayne joined the University several years later, is the engine of the professors’ passion to strengthen the world’s embrace of computer science. The two are fervent advocates for the role of computers in daily life and the pressing need for everyone — not just science and math whizzes — to be able to engage with and exploit computation in whatever they choose to do.

Sedgewick, the William O. Baker Professor of Computer Science and the founding chair of the department in 1985, said COS 126 came about because “the world needed a course in CS that could stand along traditional courses in physics, biology, chemistry, and other sciences.”

Although the idea was unusual in the mid ’80s, Sedgewick said he “got very good advice from a well-respected physics professor: ‘Develop a great course, and the students will come.’”

They surely have. In a column published by Princeton Alumni Weekly in December, University President Christopher L. Eisgruber ’83 said, “Now, Princeton undergraduates flock to the subject in droves. Computer science has become one of Princeton’s three largest concentrations” and COS 126 had the largest enrollment of any undergraduate course.

“Fifty-six percent of the Class of 2015 graduated having enrolled in at least one computer science course,” Eisgruber said in the column. “The department is a leader among American universities in the percentage of female majors; in 2015, 28 percent of Princeton’s undergraduate computer science degrees were conferred to women, far surpassing the national average of 18 percent.” For this year’s graduating class, more than a third of CS majors are women.

Sedgewick and Wayne stress that COS 126 is innovative because it takes a deep and broad approach that includes the theory of computation and computer architecture as well as an interdisciplinary approach to programming.

“Every topic is infused with applications to the natural sciences, social sciences, engineering, and commerce,” said Wayne, the Phillip Y. Goldman ’86 Senior Lecturer and the faculty instructor for COS 126 during the current semester. “We refer to this as ‘programming with a purpose,’ where our goal is for students to learn how to exploit computation to address practical problems.”

“We leverage what students know and are studying in other disciplines,” Sedgewick added. “Our ideal programming assignment shows how a fundamental CS concept plays a critical role in an application from another discipline. Students write programs that simulate the motion of bodies in space, make music, build language models, and address many other fascinating applications.”                           

In order to accommodate students of differing backgrounds, precepts are run at various levels, including some for students who have never programmed before. The precepts are one example of the innovations that have arisen from the cooperative efforts of faculty, graduate students and undergraduates who deliver the course each semester. “This world-class team has created a novice-friendly learning environment in which any Princeton student has the support and encouragement to thrive,” Wayne said.

The two professors emphasize that a key to the importance of computer science for students from nearly all majors is the crucial role of algorithms: systematic, step-by-step problem-solving procedures developed through computational thinking. While the introductory course explores the basics, the fascinating topic is covered more deeply in COS 226 “Algorithms and Data Structures.”

“One measure of the success of COS 126 is the number of students going on to COS 226—more than half,” Sedgewick said. “And that has ratcheted up the enrollments in all CS classes and the number of majors.”

“Students learn not only about classic algorithms but how to apply them to solve real-world problems,” Wayne said. “As the amount of data we generate each year explodes, the importance of efficient algorithms grows. A good algorithm can make the difference between being able to solve a problem in practice and turning the computer into an inefficient heating device.”

The two stress that COS126 is constantly evolving to keep up with changes in the digital world. In a December presentation titled “Computer Science for the Masses” delivered to the ACM-IEEE-CS meeting during Computer Science Education Week, Sedgewick and Wayne described how the predominant view of computer science changed from the 1970s (anyone using a computer needs an introductory CS course) to the 1990s (future cubicle-dwellers need intro CS) to the 2010s (everyone needs intro CS).

“In 2003, we switched from using the C programming language to Java, enabling students to use their own machines and deal not only with text but also with pictures, sounds, and movies,” Wayne explained. “As these changes brought more and more non-majors to our course, we pivoted the focus from computer science majors to all scientists and engineers, integrating applications from a wide range of disciplines. Pretty soon, the vast majority of scientists and engineers were taking the course.”

“We are reaching more than half of all students at Princeton with a single course,” Sedgewick said. “Half of them take a second CS course, and large numbers of students take multiple CS courses. Most institutions teach different courses to different students at the intro level, which chokes access to later courses.”                                                                    

“In the early 2000s,” Wayne said, “126 was regarded as a fine course for quantitative types; now, the advice given by many juniors and seniors is ‘you absolutely must take this course before your graduate, whatever your concentration.’"

As enrollments continue to explode, the two professors are working to open the course an even broader audience. Their new textbook Computer Science, An Interdisciplinary Approach, will appear this spring, and their book Algorithms, Fourth Edition, the latest in a series that stretches back to 1983, continues to be a best seller. The extensive websites associated with the books are popular around the world.

“We have four MOOCs on Coursera (with two more about ready to launch) that have attracted over one million enrolls,” Sedgewick said. “Our algorithms courses have attracted a bit of a reputation around the world as good preparation for job interviews. I get mail regularly from people around the world thanking me for giving them what they needed to get their job at Amazon or Microsoft or Google.”

The two aim to extend their outreach effort to high schools, where they see a great need for better understanding and teaching of computer science. “In the past, the public image of computer science was a big problem, with many negative stereotypes,” Wayne said. “Now, tech companies offer cool apps, services, and products that we consume on an hourly basis.

“As computers continue to transform our society, from how we work to how we live, students recognize that to fully participate in the digital revolution, they need to learn some computer science. Computer science education for high school students has nearly universal support in Congress, and 9 out of 10 parents want it taught to their child in school.

“With President Obama’s recent ‘Computer Science for All’ initiative, the big challenge now is creating the course materials and training enough teachers to satisfy the overwhelming demand for computer science in our schools.”

In their quest to spread the good news about computer science, the two professors have a staunch ally in Eisgruber. In his PAW column, titled “The Power and Promise of Computer Science,” Princeton’s president asserted that “computational thinking is rapidly becoming the fourth leg of knowledge, along with reading, writing, and ’rithmetic.”

Citing what he described as “extraordinary demand for computer science classes (from concentrators and non-concentrators alike) and the pathbreaking research taking place in the field,” Eisgruber announced that the administration has authorized 10 new computer science faculty positions. The new tenure-track positions will increase the total by more than 30 percent.

While he acknowledged the importance of computer science in the work world, he said, “The power and promise of computer science go far beyond job openings.

“Computer science brims with intellectual excitement, offering new insights into age-old questions and novel ways to solve major societal challenges. … Computer science is critical to the world’s future and to Princeton’s mission, and we will need to invest in it aggressively to sustain the excellence of our superb department.”                                                                         

— Doug Hulette

Photo credit Jérémie Lumbroso

Follow us: Facebook Twitter Linkedin