Ethics
activities in Computer Science Courses
Robert Riser & Don Gotterbarn
INTRODUCTION
In our workshop at CQL 96 we argued that one of the most effective ways to introduce ethics to computer science students is by the use of a variety of ethics activities in technical computer science courses taught by the regular computer science faculty. Following this method demonstrates to students that ethical/professional content is a fundamental component of Computer Science. Ethical/professional issues are seen in the context of computing professionals practicing their profession. The integration of ethical/professional issues into existing computer science curriculum helps to dispel the perception that ethical, social, and professional issues less important or neatly separable from computer science. It firmly establishes a link between ethical/social issues and technical content, methods, and practices of profession.
The knowledge that policies and/or standards (e.g. guidelines, codes of ethics and conduct) exist does positively influence behavior. The primary goal of these ethics activities should be proactive, giving the students experiences and exercises in preventing ethical problems from arising rather than merely cataloging previous ethical disasters. Some basic requirements of preventative ethics are: an understanding professional responsibility, an understanding of the importance of standards, an ability to anticipate and avoid some problematic situations, and a familiarity with circumstances in engineering practice that call for ethical sensitivity and reflection.
Our approach avoids several things that we consider counterproductive. We do not rely exclusively on catastrophes; while students find these interesting, they do not see them as applicable to their own circumstances. We want them to consider ethics in everyday situations. We do not rely exclusively on dilemmas; issues for which there is no solution. Doing this leads to a "why bother" attitude; that there are no answers in ethics. We do not assume students are "morally challenged; most are not. The activities are addressed to students who are interested in being honest, responsible professionals.
Below are some examples of ethics activities we have used and found effective.
The first set of sample of activities were used in the required lower-division sequence: CS-1 (introduction to software development life cycle; introduction of first programming language; emphasis on implementation); and CS-2/Data Structures (emphasis on design; algorithms; data structures). The second activity was used in an upper-division Software Engineering course and is applicable to any "project-oriented" systems analysis and design course.
AN EXAMPLE FROM CS-1, CS-2
CS-1 and CS-2 generally have a significant programming component so one can seamlessly introduce ethics into these courses by using programming/design assignments as vehicles for revealing and discussing ethical/social/professional issues.
Students' (and professionals') tendency to narrowly focus on problem resolution and technical issues leads to many ethical problems. This activity is design to introduce the importance of considering more than the technical elements of a specification and to consider developers responsibility to other stakeholders in software projects.
This can be a homework assignment related to the CASE (SWITCH) statement or IF statements. Upon completion of the homework the assignment is discussed in class. Students are asked to write a pseudo-code solution to the problem of moving an X-ray machine up and down its vertical support to several fixed positions. The X-ray device is so heavy that the code will actually control hydraulic actuators. During the discussion of IF statements or the case statement, distribute and read the X-ray machine moving program specification(below). Do not discuss the assignment at this point. Tell the students that the assignment will be collected and discussed at the next class meeting. At the next class discuss whether their proposed solutions really satisfy the specifications Most students' algorithms will simply use a case statement, e.g., if the dial is set to 14 move the machine to the top of the pole, if the dial is set to 0 move the machine to the table top to protect the lens when the machine will not be in use for a while, etc. A pseudo-code solution might look like this.
DO CASE DIALSET OF
14 : move machine to position 14,
13 : move machine to position 13,
12 : move machine to position 12,
11 : move machine to position 11,
0 : move machine to position 0
ENDCASE
When the students are satisfied with their solutions, relate to them how a patient was crushed to death by this machine following implementation of a program just like theirs. The X-ray technician, after asking the last patient of the day to get off the table, set the dial to 0 and went down the hall to talk to the nurses. When the technician returned she found the patient still on the table, crushed to death by the hydraulic presses of the X-ray machine.
It is important not to let the discussion become a hunt for the guilty. The discussion should focus on a computing professional's responsibility which goes beyond the simplistic solution of the problem specified. A life could have been saved if the programmer had thought about the environment. Ask the students what the programmer could have done to prevent this disaster. Students are familiar with interrupting processes for a confirmation before completion of the process. For example, DOS interrupts the "delete all files" process to ask "Are you Sure". Could they have designed the X-ray system so that a similar confirmation would be required when the dial was set to "0"? Student responses are likely to include:
I. I just did what I was told, I am not responsible!
2. The operator should have checked the table, I am not
responsible!
These responses open the door to a good discussion of the responsibility of computing professionals for a higher standard of care and the responsibility to prevent harm.
In addition to using algorithms to bring ethics into the class, one can use programming exercises to raise ethical issues, as the next example illustrates.
The goal of this exercise is to get students to consider how thinking about ethical issues during system design would change their designs. This is a standard programming assignment distributed to the class. After the assignments are returned we distribute a copy of the ACM Code of Ethics and guidelines and ask students to write a one page essay on ethical problems with their solution to the programming exercise. During the next class we discuss the ethical issues with the program and ask them how they could change the solution to avoid these problems. This is a good place to emphasize that they can solve some of the ethical issues technically.
This program is basically an array exercise involving the implementation of a specific solution to a campus parking problem. People who want to park on campus drive up to a kiosk which has a computer. The parker then enters his/her name and status (student, faculty, administrator, visitor) into the computer which dispenses a ticket assigning them to a unique parking stall.
This program raises several problems with privacy since people are asked to enter their names. It also discriminates against those who are handicapped and cannot use a computer keyboard. It is not a very good solution to the problem because once a parking spot is allocated it is not returned to the availability list when it is vacated and the congestions waiting while people key in their names is very dangerous.
The specific assignment statement is:
The Student Government Association at Enormous Technical State University have solved the parking problem. They need you to write the program to implement their solution. The plan will eliminate hunting for parking spots. The computer will allocate all parking spaces. Parking spaces resemble cattle stalls with an entry gate. The gate is opened and access to the parking place is gained using a card printed by the computer. The gate on the parking stall will open only when a computer printed card with that stall number is inserted into the slot on the stall gate. Parking spots will still be assigned on the basis of the parker's function at the university. There is one lot for each parker's function. There are: Student, Administrator, Faculty and Staff, and Visitor. Each lot has consecutively numbered stalls. The program should gather information on each vehicle and driver entering the campus and print out the appropriate parking stall entry card. After the card is used to open the gate, the card will be returned to the driver. This will help parkers remember where their cars are parked.
DESIGN:
required formulas: assigned spot in a lot = the last assigned spot + 1
LOT FULL = (the last assigned spot =
the number of spots in the lot)
The program should print out stall entry forms for each vehicle entering the campus. When a lot is full, the system should print out a stall entry form with a message saying that the lot is full.
DATA REQUIREMENTS
Problem Inputs:
type of parker, student, visitor, administrator, faculty/staff
name of parker, identify parker to inform them of car problems should they occur
visiting name name of person visiting on the campus
Problem Outputs:
stall entry forms indicating the type and number of stall,
the date they are allowed to park, the name of the parker,
and who they are visiting if they are a visitor.
Initial Algorithm
1. Enter the type of parker and other required information.
2. Determine the next available parking spot number in the appropriate lot.
3. Print a stall entry form showing the current date, parking lot, assigned stall number in that lot, parker's name, and if the type is visitor, then include the name of the person being visited.
Algorithm Refinements
Expand 1 using: Appropriate prompts to get the input data, separate procedures for each type of parker. The procedure should have variable parameters.
Expand 2 using constants indicating the capacity of each parking lot: 10 faculty spots, 2 visitor spots, 30 administrator spots, and 3 student spots. The individual procedures should keep track of the available spots and spot numbers should be allocated by the individual procedures.
Expand 3 using a single procedure which prints out each type of stall entry form for the different lots and also prints out the "lot full" form.
SAMPLE STALL ENTRY FORMS
(The parentheses indicate information that changes from form to
form. Dashes are used here to separate the sample forms.)
------------------------------------------------------------
ETSU VISITOR PARKING
(Fred Fredson) , welcome to ETSU.
We hope you enjoy your visit with (Fredda Fredson).
Please park in parking lot (V).
Your assigned parking stall is (2).
This form is valid for (02/01/94)
------------------------------------------------------------
ETSU VISITOR PARKING
(Fred Fredson) , welcome to ETSU.
We are sorry, but ETSU is so popular that all of our visitor spaces are
full today.
------------------------------------------------------------
5. If the students are not already familiar with the ACM Code of
Ethics and Professional Conduct, assign it as outside reading,
along with the article "Using the New ACM Code of Ethics in
Decision Making" by Anderson, Johnson, Gotterbarn, and
Perrolle.
CONCLUSION
These exercises are presented as examples of how ethical social and professional issues can be integrated into existing courses rather than being relegated to separate courses in computer ethics. While this approach does not preclude stand-alone courses (in fact we encourage them), unless we treat these issues as integral to the profession, we can't expect the students to.
It is important that ethics activities fit seamlessly into the technical content of a course and relate directly to the course topics. The direction should primarily be proactive--How might one anticipate this kind of ethical difficulty under discussion? What could have been done technically or morally to lessen the severity or avoid the negative ethical consequences of a particular situation. The examples we have given can be easily modified to fit into other courses.
If you have similar examples which you have used in your classes,
please submit them to the education editor at gotterba@etsu.edu so
that they might be included in future issues of the newsletter.