Assign3: Computer Science and Ethical Responsibility
Embedded Ethics in CS106B
You are now halfway through CS106B – congratulations! Being aware of your ethical responsibilities as a computer scientist and practicing evaluating your work in the social context of its use is a critical skill to have as you move on from CS106B. For this reason, the final part of this week's assignment will prompt a discussion of gerrymandering, disenfranchisement, and civic responsibility. Our hope is that by introducing ethical reflection early in computer science education, we can help the next generation of software developers and computer science researchers—which includes you!—to make choices based on an understanding of the potential social implications of their work, and to help everyone who takes CS106B to be an informed citizen and advocate for others.
A Brief Introduction to Gerrymandering
The electoral system in the United States relies on the concept of districting, which involves splitting states into smaller, geographically contiguous districts of equal population. Each district elects representatives to the national legislative body. Accurate and fair districting is critical to ensure that voters are represented by their representatives.
Historically, a simple districting process – divide a map into equally sized and reasonably shaped chunks, perhaps based on existing counties – typically led to district maps that correctly captured the distribution of voters within the state and thus reflected their preferences. In most other countries and some US states this is still the case, thanks to maps drawn by non-partisan election officials. (Note: It is important to remember that for much of the US's history many people were excluded from voting, and thus “fair districting” of voters often did not reflect the preferences of all adults who lived within the state.)
However, in the last 30 years, the practice of gerrymandering district maps has proliferated. Gerrymandering is the practice of defining electoral districts in careful and contrived ways so that election outcomes favor a certain political party, and in particular so that the party can win a majority of seats without having a majority of votes. Perhaps the easiest way to visualize gerrymandering trends over time is to witness the evolution of the 7th district in Pennsylvania as shown below.
The following graphic, created by the Washington Post, shows the dramatic differences in election outcomes that can happen when gerrymandering is applied to election district generation.
Image source: What 60 years of political gerrymandering looks like
The following graphic, created by the Washington Post, shows the dramatic differences in election outcomes that can happen when gerrymandering is applied to election district generation.
Image source: How to steal an election
While some kinds of gerrymandering are legal – the Supreme Court has upheld decisions that state gerrymandering is legal if done on the basis of factors like party voting preference but not legal if done on the basis of race, income, or other socioeconomic factors – the negative consequences of gerrymandering are immense. Heavily gerrymandered districts often result in disenfranchisement (loss of voting impact) of large swaths of a state's population, and often disproportionately disenfranchise people of color, economically disadvantaged people, and others whose voting voices are often suppressed. On top of this all, in recent years, computational tools built on concepts that are not far from what you learn in CS106B have been used to gerrymander district maps to an extent that has never been seen before.
In the questions below, you will reflect on a programmer's responsibility in developing sofware tools that interface so closely with such an important social issue. Note: While the technical terminology and examples used in this handout are specific to politics and democratic conventions in the United States, we hope the analysis sparks broader conversations about democratic representation that go beyond the specific cases. No prior knowledge of the US political system is expected or required. Credit for the inspiration for this gerrymandering assignment goes to Allison Obourn, formerly of the University of Arizona, and currently a lecturer at the University of Washington, and to Katie Creel and Nick Bowman here at Stanford Computer Science. After reading the following passage, please answer the following questions in your short_answer.txt file.
Identifying Maps Susceptible to Gerrymandering
The proliferation of gerrymandering has been aided by computational tools for generating "optimally" gerrymandered maps that most severely tilt the benefit of an election in the favor of one party or another. Such techniques often eschew notions of geographical compactness that used to define common sense maps, and eventually produce such districts as shown below:
Image source: Most gerrymandered districts
These algorithms explore many possible assignments of voters to districts and look for assignments that fit a certain criteria. Framed this way, the problem sounds just like the kind of problem that we've been learning how to solve with recursive backtracking!
-
Q20: A person in your hometown learns you just took CS106B. You are asked by a political party to work on cutting-edge software that applies algorithms to optimize gerrymandering during the process of district remapping. What questions might you ask before agreeing to do this job? What might be the benefits? What might be the drawbacks? Please write your list of 3-5 questions and be sure to include ethical considerations.
-
Q21. Let’s assume you accepted the job and you’ve now written the code that identifies maps that can be gerrymandered. An ethicist at the local university learns you did this and asks you to create a paragraph to accompany the code that explains when it should and should not be used – similar to a label on over-the-counter medicine. Write the usage paragraph. You may reference quantitative thresholds or limitations as well as social impacts. We are not expecting an overly-technical answer; we just want to see you bring multiple factors into consideration.
-
Q22. Through your job you've also written a Boolean function that can sift through data and identify historical evidence of gerrymandering. After your job ends, you decide to start an educational campaign at your college about gerrymandering. How could you use your experience and the software tools you created to advocate on behalf of people disenfranchised by gerrymandering? Consider grassroots outreach, traditional and social media, voter registration drives, and lobbying. Please list the specific actions you might take.