Cornell CIS
Notebooks in front of a computer monitor, which shows computer code. // Photo by Kevin Canlas courtesy of Unsplash

Story

How We Teach Python to English Majors

s

At first go, learning a computer programming language like Python or Javascript can seem daunting and intimidating to students just starting out, particularly those arriving from non-technical backgrounds. 

Understanding these challenges, scholars in Cornell Information Science are revamping how programming languages are taught.

Case in point: “Introduction to Cultural Analytics: Data, Computation, and Culture,” or INFO 1350, where lecturer Melanie Walsh has thrown out the conventional textbook and designed her own interactive, cloud-based version, along with equally inventive course materials.

“I think a lot of the intimidation comes from the fact that classes and educational resources are geared toward people with math and science backgrounds, which is great, but it makes people from other backgrounds feel intimidated or not smart enough to code,” said Walsh, a postdoctoral associate and visiting lecturer in Information Science. “The emotional dimensions of learning to program are important and shouldn’t be underestimated.”

“Introduction to Cultural Analytics: Data, Computation, and Culture” is an introductory, undergraduate course covering both Python – a powerful and widely used computer programming language – and, broadly, the digital humanities, a field where scholars apply computational analysis to study culture, including literary and social history. 

In INFO 1350, students learn how to use Python to mine a wide swath of texts and online content – song lyrics, tweets, classic American literature, and Game of Thrones, among others. Students also discuss the complexities of reducing human life to data — as covered in separate assignments on the Bellevue Almshouse dataset and the Trans-Atlantic Slave Trade database — and weigh the ethical challenges related to data collection.

Walsh’s textbook, publicly available on her website, introduces the concepts that underlie data analysis and is filled with video screengrabs and walkthroughs that ease students into Python. 

Born out of Walsh’s own frustrating experience as an English major learning the open-source programming language, her book has clear, step-by-step instructions, and supplemental data visualizations. It’s easy to navigate, is comprehensive and well organized, and perhaps most importantly, it signals to beginning students that learning Python doesn’t have to be intimidating. It can actually be fun.

“Instilling in students that they are smart enough to code is really big,” she said. “Interactive elements help show students how to read and write code and to understand the concepts in ways that make learning fun, which helps keep students going.”

Interactive textbooks and online course resources are nothing new, but Walsh’s interpretation – the culmination of her two-year, postdoctoral work in Cornell Information Science – is. Built with Jupyter Book, an open-source resource, her interactive textbook includes text, images, links, code, responsive data visualizations, and much more. All of it — including other code-based course materials — is housed in the cloud. This cloud-based feature is an important element, Walsh said, since varying makes and models of student computers can render code differently, which can hinder student learning.

“Sometimes things don’t work, and it can be complicated to troubleshoot that live in class,” she said. With cloud-based course materials, “you don’t have to install anything; the environment is already set up in the cloud, so students are able to all view and work off the same code during class, and then resolve specific technical issues after class.”

Walsh’s inventive approach to teaching Python received serious traction on Twitter earlier this month from people across disciplines. A tweet from Walsh introducing her interactive course materials and accompanying explainer blog post was retweeted nearly 650 times. After that initial tweet, her website saw 2,500 visitors, she said. 

“This incorporation of data science and computing is one of the most promising paths forward for the humanities,” Walsh said, adding that the Twitter response to her online materials seems like “a testament to the fact that people are interested in this kind of work.”

Indeed, her INFO 1350 course this spring semester has hit its 30-student max and is full, though anyone — Cornell students or otherwise — is welcome to follow along with the course material on her website.

Louis DiPietro is the communications coordinator for Information Science.