Classroom photo
February 11, 2020

the ethi{CS} project: Teaching Ethics in the Computer Science Classroom

Software developers face many ethical dilemmas. Shouldn’t their training reflect ethical reasoning as well as coding?
by Kiran Bhardwaj

We’ve known for a while that algorithms, if trained on bad data, can result in unjust outcomes. Developers might not seek to create a racist photo filter or encode sexist assumptions into a database, but the technologies, products, and redesigns that we create are, ultimately, a product of human choices. Computer science (CS) has a toolset that can produce elegant solutions to a number of tasks, but it isn’t an ethically neutral discipline. The work done by developers can reflect implicit and explicit biases, is performed within institutional structures that can be inequitable, exploitative, or otherwise unjust, and can fail to be considerate of the rich array of human experiences.

Because of the impact of developers’ choices in their work, we need to teach ethics in CS classrooms. Our students have big questions that aren’t easy for anyone to answer (e.g., “Why should I bother to be moral at all?” “Isn’t ethics just relative?” “How should I choose between these two options, both of which seem ‘right’?”). Many adults have at least some uncertainty about their own answers to big ethical questions, or, in some cases, might have firm views that are worth further inspection. Others might not be comfortable in expressing their ethical views or know how to hold the conversation with their students.

Some high schools, and even more universities, are beginning to include ethics as a part of their CS training. Many are using modules in which students focus on applied ethical questions. (There are several good resources for those who wish to do so.)

The limitation of module-style learning is that students are practicing their ethics skills and their coding skills at different times. Yet ordinary life doesn’t cue us that “it is now time for ethical deliberation.” When we’re solely focused on achieving a goal (“I’ve got to finish writing this code!”), we can be distracted from recognizing that our choices have an impact or from working to figure out how the assumptions we make might cause us to err. If we want students to be vigilant about the ethical implications of what they’re making, their training should constantly demand they be so.

Another way to teach ethics in CS classrooms is to introduce students to philosophy. Not only does this discipline provide methods for thinking through big questions, it also has ways to put students in charge of doing the thinking themselves (rather than accepting their adults’ answers). Philosophy’s classroom norms require charitable takes on what others have to say, allow students to see their answers as ‘first drafts’ of stances, and require them to test their intuitions with intellectual honesty.

To help CS teachers incorporate ethics into their classroom lessons, my colleague Nicholas Zufelt [instructor in mathematics, statistics, and computer science at Phillips Academy] and I have created the ethi{CS} project, a Tang Institute project that ensures CS teachers have tools on hand so that doing ethics while coding is built-in—students must think about the ethical implications of their choices in order to do their work as coders.

For example, Nick designed a quiz in his app development course that gave students code which, as he said, “worked but was nonetheless bad.” The quiz was a salutations generator, in which the only salutation it could deliver was of the form “Mr. and Mrs. John Smith.” The students quickly realized that the code was neither inclusive nor clean. This patriarchal form worked only for straight, married couples. Merely changing the names of the terms (“husband” → “partner1”) was an insufficient fix, as the code still wouldn’t work for non-partnered individuals. Students had to have the coding capacities to redesign the structure itself, while doing some good critical thinking about how to do well by their users.

Knowing that teachers are busy, the ethi{CS} project will offer teachers easy-to-use and efficient resources, projects, and classroom techniques that won’t take classroom time away from learning the technical skills. We will also teach computer science teachers the pedagogical practices they may wish to borrow from ethics education. Not every student we teach will end up being a programmer. Yet if we’re committed to having our students become conscientious adults, they need to practice doing what we hope they’ll do in the world.

If you’d like to contribute or learn more, please feel free to reach out to us.

Dr. Kiran Bhardwaj is a Tang Fellow and an instructor in philosophy and religious studies at Phillips Academy.

Dr. Nicholas Zufelt is a Tang Fellow and an instructor in mathematics, statistics, and computer science at Phillips Academy.

Categories: Projects, Featured

Other Posts