Computer science professor Dan Barowy and a student look at a work of art in the Object Lab.
By Greg Shook Photographs by Bradley Wakoff

Computer science professor Dan Barowy uses art to teach students programming.

Sipping a beverage inside Tunnel City Coffee one morning, computer science professor Dan Barowy takes note of the baristas serving the steady line of customers. “It’s not an accident that you have a couple of people taking orders and another pair filling them,” he says. “It’s a very efficient system that you can analyze mathematically.”

Barowy enjoys making connections between his field of study and the world around him. He sees the application of computer science not only in queues for cappuccinos but also in music, sports, art and literature. “Computer science isn’t necessarily about computers,” he says. “It’s about processes.”

That’s why, for his course Principles of Programming Languages, Barowy gathers with his students in the Object Lab, a hybrid gallery-classroom inside the Williams College Museum of Art. Faculty from across academic disciplines collaborate with museum staff to choose artworks investigating key course concepts that hang on the gallery walls. The fall semester Object Lab, on view through Dec. 17, includes 40 objects supporting eight courses in American studies, art history, art studio, computer science, history and dance.

Students doing research in computer science professor Dan Barowy's class.

The 30 juniors and seniors in Barowy’s class, most of whom are computer science majors, gain an extensive overview of the fundamentals of programming language design. They also get a hands-on opportunity to design and implement a programming language to produce art in the style of a particular artist from works selected for the course.

Barowy says he presents “a spectrum of art, some very simple and some a bit more complicated, so students can dial in the level of difficulty depending on which artwork they’re interested in.” Since many of his students are new to the art world, Barowy starts by teaching them the basic language of art that’s used to describe key elements such as lines, shapes, brushwork and colors.

“Students don’t need to talk about the work in a sophisticated way like art critics would,” Barowy says. “They just need to say what it is they’re seeing and then enter the information into a computer for it to reproduce those things from their description.”

Knowing the language of art, he says, enables students to understand the artist’s process and also to think computationally about how to fit the various elements together. “The students in this class are at a level where some of them have had this free way of thinking,” Barowy says. “They see computer science everywhere, and it’s exciting.”

One of the examples Barowy uses in the course is Josef Albers’ 1959 painting Homage to the Square: Warming. The painting features multiple inset squares of varying shades of orange that are set against a gray background. Barowy points out that the work’s simplicity is deceptive. “When you say to a computer, ‘Squares stacked on top of one another,’ how do you make it understand that accurately?” he asks. “Computers require precise instructions, but even with imprecise language, we still want the computer to be able to do something useful with it.”

A student looks at a painting in the Object Lab.

Barowy, who has been teaching at Williams since 2017, has discovered that not all of his students were excited about learning programming languages. “Some students really loved the course, and others were there because it’s required for the major,” he says. “It’s harder to teach those students, so I really wanted to find a way of connecting with them. I’ve noticed over the years that many students here love the arts, and exposing them to a whole variety of different programming languages is what the course is about.”

Tricky spots are an inevitable part of the learning process. So Barowy meets with students to help them identify and work through problems. Programming, he says, is “actually incredibly difficult for us to do. Anyone who’s ever worked with any computer program knows that there’s often a disconnect between a computer doing what you tell it and what you want.

So the question we consider in the course is, what can computers really do and how can we design new languages to do those things while avoiding misinterpretation?”