Embedded EthiCSTM @ Harvard Bringing ethical reasoning into the computer science curriculum

We Value Your Feedback! Help us improve by sharing your thoughts in a brief survey. Your input makes a difference—thank you!

Compilers (CS 153) – Fall 2023

First time reviewing a module? Click here.

Click  to access marginalia information, such as reflections from the module designer, pedagogical decisions, and additional sources.

Click “Download full module write-up” to download a copy of this module and all marginalia information available.

Module Topic: Open-Source Compilers: Freedoms and Responsibilities
Module Author: Dasha Pruss

Course Level: Upper-level undergraduate
AY: 2023-2024

Course Description: “This course introduces students to the design and implementation of compilers for programming languages. Specifically, students will learn how to systematically translate modern, high-level, programming languages into efficient, executable machine code.
The course introduces a number of important concepts, such as parsing and program analysis that are useful in many other contexts beyond compilers, such as software engineering and security. Perhaps the most useful outcome of the course is that students will deeply understand the capabilities and limitations of modern compilers, and how they can be used most effectively. This knowledge is important for aspiring language designers and implementors, but also for debugging and optimizing just about any application.
This course is extremely programming intensive, as most of the understanding comes from constructing (small) compilers.” (CS 153 course website)

Semesters Taught: Fall 2021, Fall 2023

Tags

  • open-source software [CS]
  • tragedy of the commons [phil]
  • corporate capture [phil]
  • freedoms and responsibilities [phil]

Module Overview

This module introduces the micro- and macro-ethical issues raised by open-source software. Using the tragedy of the commons thought experiment, the first part of the module asks students to reflect on the freedoms and responsibilities that come with the use of open-source software. Potential tragedies include overuse and dependency of open-source software, security vulnerabilities such as the OpenSSL Heartbleed vulnerability, and long-term maintenance issues, resulting from insufficient contribution of developer time for maintaining the open-source ‘commons’. Students practice coming up with solutions to avoid these potential pitfalls of open-source software.
The second part of the module complicates the initial thought experiment setup by providing real-world context on corporate capture of open-source software, inviting students to reflect on the potential benefits and drawbacks of big tech companies’ disproportionate contribution to the open-source software ecosystem. Here, students are introduced to the tragedy of ‘sort-of’ commons, in which the commons are technically open-source but are in practice controlled and maintained by big tech companies, which forces the public to engage with those companies’ products and limits the influence of non-corporate contributors to open-source software. A small-group discussion prompt invites students to consider ways to mitigate the sort-of commons, as well as potential unanticipated drawbacks of these interventions.

    Connection to Course Technical Material

The topic chosen for this iteration of the module takes inspiration from and builds substantially on the version developed by Trystan S. Goetze (Fall 2021-2022). Parts of the earlier version omitted from the present version include the primer on free- and open-source software licenses, the emphasis on the four freedoms of free software, and the case study in which a developer must decide whether to make newly developed compilers open-source against her boss’ wishes.

The decision to add the component on corporate capture is intended to make the module reflect the current reality of open-source software, in which big tech companies are the principal funders of and contributors to open-source software and in which individual workers are unlikely to be discouraged from contributing to open-source. This focus also allows discussion of macro-ethical rather than merely micro-ethical concerns. The decision to shift the focus away from Richard Stallman’s four freedoms of free software came from the module TA’s concerns about troubling comments made by Stallman

Compilers are essential to modern computing, and many popular compilers are open-source. During the lecture, students are asked to list the open-source compilers they have used, as well as any they have contributed to. The lecture also raises the question of whether anyone should be allowed to own something as fundamental to computing infrastructure as a compiler.

Goals

    Module Goals

Finding ethical issues connected to compilers isn’t easy! We decided to go via the ethics of open-source software, since (1) open-source software is an important topic that isn’t discussed in other modules, and (2) many popular compilers are open-source.

  1. Understand the origins and motivations of open-source software.
  2. Understand the idea of a ‘tragedy of the commons’ and how it applies to open-source software.
  3. Understand the role big tech companies play in the maintenance and shaping of open-source software.
  4. Practice reasoning through the ethical responsibilities that come with the freedoms of open-source software (e.g., the responsibility to contribute resources to those projects).
  5. Practice arguing for ways to resolve two ‘tragedy of the commons’ situations in open-source software.

    Key Philosophical Questions

These questions follow from a more general philosophical reflection on freedoms and responsibilities in society through the tragedy of the commons thought experiment. The third question arose through discussion of corporate contribution to and co-option of open-source software.

  1. Are there ethical obligations that you might acquire from using open-source software?
  2. On whom does the responsibility of maintaining shared community resources fall?
  3. How do we weigh the tradeoffs between goods that are fully public and goods that, while publicly accessible, depend on corporate sponsorship?

Materials

    Key Philosophical Concepts

Open-source software licenses preserve several freedoms of software developers and users to use the software as they please. Distinctive responsibilities arise from these particular freedoms – that is, we arguably have responsibilities to contribute to maintaining open-source software that we have availed ourselves of. The lecture explores this line of thought through a version of the tragedy of the commons thought experiment, in which the tragedies include overuse and dependency, security vulnerabilities, and long-term maintenance issues.
Corporate capture is a phenomenon in which private industry takes control of state or public entities, molding them to fit their business interests. In the context of open-source software, big tech companies disproportionately donate money and resources to open-source initiatives because they can exert market influence through control of open-source software and stand to benefit in other ways from a robust open-source code base. On the other hand, there are clear benefits to everyone from corporate sponsorship of open-source software.
In the homework assignment, students practice agreeing or disagreeing with the conclusion of a thought experiment by criticizing or defending components of its underlying argument by analogy.

  • Freedoms and responsibilities
  • Tragedy of the commons
  • Thought experiment
  • Argument by analogy
  • Corporate capture

    Assigned Readings

The video provides some real-world context about open-source software, including big tech companies’ sponsorship and acquisition of open-source software.
Sharma’s article argues that open-source software is a critical infrastructure that is facing a tragedy of the commons, using case studies of security vulnerabilities to illustrate the ‘tragedy’. The article is a law review article so it is lengthy; the assigned section is 21 pages, but a lot of space is taken up by footnotes, so it’s closer to 10 pages of reading.

Implementation

Class Agenda

  1. Reading response (before class)
  2. Introduction and tie-in to compilers
  3. Poll on who has used and contributed to open-source software
  4. Background on the origins of open-source software and responsibilities 
  5. Tragedy of the commons in open-source software
  6. Discussion of how to avoid a tragedy of the commons with open-source software
  7. Corporate capture and the tragedy of the ‘sort-of’ commons 
  8. Discussion of how to avoid a tragedy of the ‘sort-of’ commons with open-source software
  9. Wrap-up and assignment instructions

Sample Class Activity

Students are introduced to the following scenario: suppose Barbie and Oppenheimer both have a sheep that they bring to graze in the Boston Commons. Each of the two helps maintain the commons to make sure that it does not become overgrazed and depleted. One day, Barbie realizes that she can bring more sheep to graze in the commons without contributing extra to maintain the commons, so long as Oppenheimer keeps doing his part. Oppenheimer, too, brings in more of his sheep to graze in the commons and stops contributing to its maintenance. Before long, the grass in the commons is eaten up completely, and Barbie and Oppenheimer’s sheep both perish from hunger. This story is an example of the tragedy of the commons, which occurs when common goods are overused and unmaintained.

The TA draws an analogy between this example and open-source software, in which the commons are the open-source code base and the tragedy (e.g., overuse and dependency, security vulnerabilities, and long-term maintenance issues) results when too many people use open-source software without contributing to its maintenance.

In small groups, students are asked to address the following prompt:

  1. How do we avoid a tragedy of the commons with open-source software? Come up with three possible strategies to help us solve this problem.

After discussing in small groups, the TA calls on groups to share what they talked about and collects a list of possible strategies on the board. The drawbacks of each potential solution are discussed.

    Module Assignment

“Blog post style” is to set students at ease – i.e., it’s not a formal essay.
Providing options for written assignments is always good practice.
Students were told to refer to the Stallman reading, and were encouraged to search for other sources as well.
A rubric was provided to help students understand how they would be evaluated.
Students had one week to complete the assignment.
Grading was done by students of their peers’ submissions. Students had 2 weeks to complete the peer review.

“In the style of a blog post (250–300 words), write an answer to the following prompt:

To prevent a tragedy of the commons in public lands, governments sometimes limit individuals’ access to common resources. For example, to prevent overfishing from a lake in a National Forest, the US Forest Service may require the purchase of fishing permits to limit how much fish an individual is allowed to catch.

If we make an argument by analogy to open-source software, we might conclude that the government ought to put limits on how much individuals or large companies can use (or contribute) to open-source software.

  • Do you think this is a good analogy? Explain your reasoning.
  • Do you agree with the conclusion? Why or why not?”

A question about the module was also included on the final exam for the course:

“Why do open source compilers face a potential ‘tragedy of the commons’?

  1. Open source compilers could be forked into a proprietary project at any time.
  2. Open source compilers are free to use but might not get maintained.
  3. Anyone can contribute to open source compilers, regardless of their intentions.
  4. Open source compilers can be used for unethical purposes.”

(The correct answer is 2.)

Lessons Learned

Students listened attentively to the lecture segment. They were engaged during the discussion, and raised many issues that hadn’t been explicitly discussed in the lecture (e.g., examples of open-source acquisitions at companies they had worked at, and real-world experimental compensation systems for open-source contributors). No one group was unanimous in thinking that the tragedies of the commons in open-source software were easy to solve.

  • The poll at the beginning of the class warmed up students to talking in a low-stakes setting, which can be valuable in a class that is normally lecture-based.
  • Using a humorous case study with corresponding visuals in the slides increased students’ attentiveness and engagement with the module material. The absurdity of the imagined case study seemed to make it easier for students to notice important disanalogies between the open-source software and the Barbie-Oppenheimer scenario, which provided an excellent segue to discussing strategies to dispute a thought experiment.
  • Students had mixed reactions to the second portion of the module; some students did not share the intuition that there was anything wrong with corporate capture of open-source software. Future iterations of the module could focus on one specific case study of corporate capture in which there are tangible harms.
  • Students assumed the TA to be knowledgeable about specific technical details and case studies of open-source software. Signaling areas of expertise is important upfront.
  • Responses to the assignment were thoughtful and well-written. Students were quite divided on whether issuing fishing permits was a good analogy/strategy or not. A weak majority were critical of the analogy and rejected the idea of government limits, but there was a lot of nuance. There was also a wide variety and creativity in the kinds of issues and strengths students identified with the analogy.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 4.0 International License.

Embedded EthiCS is a trademark of President and Fellows of Harvard College | Contact us