├── .gitignore
├── Gemfile
├── modules
├── hiring
│ ├── img
│ │ └── hiring.jpg
│ ├── hiring_algorithm.zip
│ ├── index.md
│ ├── stories.md
│ ├── instructions.md
│ └── code
│ │ └── hiring.py
├── input
│ ├── img
│ │ └── university.jpg
│ ├── code
│ │ └── validation.py
│ ├── stories.md
│ ├── index.md
│ └── instructions.md
├── ethicalengine1
│ ├── img
│ │ ├── people.jpg
│ │ └── moralmachine.png
│ ├── index.md
│ ├── stories.md
│ └── instructions.md
└── ethicalengine2
│ ├── img
│ ├── rescue.jpg
│ └── moralmachine.png
│ ├── code
│ ├── main.py
│ ├── docs.md
│ ├── engine.py
│ └── scenario.py
│ ├── index.md
│ └── instructions.md
├── _site
├── modules
│ ├── hiring
│ │ ├── img
│ │ │ └── hiring.jpg
│ │ ├── hiring_algorithm.zip
│ │ ├── code
│ │ │ └── hiring.py
│ │ ├── index.html
│ │ ├── stories.html
│ │ └── instructions.html
│ ├── input
│ │ ├── img
│ │ │ └── university.jpg
│ │ ├── code
│ │ │ └── validation.py
│ │ ├── stories.html
│ │ └── index.html
│ ├── ethicalengine1
│ │ ├── img
│ │ │ ├── people.jpg
│ │ │ └── moralmachine.png
│ │ ├── index.html
│ │ └── stories.html
│ └── ethicalengine2
│ │ ├── img
│ │ ├── rescue.jpg
│ │ └── moralmachine.png
│ │ ├── code
│ │ ├── main.py
│ │ ├── engine.py
│ │ └── scenario.py
│ │ └── index.html
├── README.md
├── js
│ └── common.js
├── feed.xml
├── jekyll
│ └── update
│ │ └── 2017
│ │ └── 08
│ │ └── 04
│ │ └── welcome-to-jekyll.html
├── docs
│ └── faq.html
└── assets
│ ├── main.css
│ └── minima-social-icons.svg
├── _includes
├── icon-github.html
├── icon-twitter.html
├── analytics.html
├── disqus_comments.html
├── icon-twitter.svg
├── head.html
├── icon-github.svg
├── footer.html
└── header.html
├── _layouts
├── page.html
├── default.html
├── home.html
└── post.html
├── README.md
├── js
└── common.js
├── _posts
└── 2017-08-04-welcome-to-jekyll.markdown
├── _config.yml
├── docs
└── faq.md
├── index.md
└── Gemfile.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | gem 'github-pages', group: :jekyll_plugins
3 |
--------------------------------------------------------------------------------
/modules/hiring/img/hiring.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/modules/hiring/img/hiring.jpg
--------------------------------------------------------------------------------
/modules/input/img/university.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/modules/input/img/university.jpg
--------------------------------------------------------------------------------
/_site/modules/hiring/img/hiring.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/_site/modules/hiring/img/hiring.jpg
--------------------------------------------------------------------------------
/modules/ethicalengine1/img/people.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/modules/ethicalengine1/img/people.jpg
--------------------------------------------------------------------------------
/modules/ethicalengine2/img/rescue.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/modules/ethicalengine2/img/rescue.jpg
--------------------------------------------------------------------------------
/modules/hiring/hiring_algorithm.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/modules/hiring/hiring_algorithm.zip
--------------------------------------------------------------------------------
/_site/modules/input/img/university.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/_site/modules/input/img/university.jpg
--------------------------------------------------------------------------------
/_site/modules/hiring/hiring_algorithm.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/_site/modules/hiring/hiring_algorithm.zip
--------------------------------------------------------------------------------
/_site/modules/ethicalengine1/img/people.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/_site/modules/ethicalengine1/img/people.jpg
--------------------------------------------------------------------------------
/_site/modules/ethicalengine2/img/rescue.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/_site/modules/ethicalengine2/img/rescue.jpg
--------------------------------------------------------------------------------
/modules/ethicalengine1/img/moralmachine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/modules/ethicalengine1/img/moralmachine.png
--------------------------------------------------------------------------------
/modules/ethicalengine2/img/moralmachine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/modules/ethicalengine2/img/moralmachine.png
--------------------------------------------------------------------------------
/_site/modules/ethicalengine1/img/moralmachine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/_site/modules/ethicalengine1/img/moralmachine.png
--------------------------------------------------------------------------------
/_site/modules/ethicalengine2/img/moralmachine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asg017/ethicalcs.github.io/master/_site/modules/ethicalengine2/img/moralmachine.png
--------------------------------------------------------------------------------
/_includes/icon-github.html:
--------------------------------------------------------------------------------
1 | {% include icon-github.svg %}{{ include.username }}
2 |
--------------------------------------------------------------------------------
/_includes/icon-twitter.html:
--------------------------------------------------------------------------------
1 | {% include icon-twitter.svg %}{{ include.username }}
2 |
--------------------------------------------------------------------------------
/_layouts/page.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 | {{ page.title | escape }}
11 |




Teluta - an autonomous vehicle company - has made extraordinary strides in self-driving cars and is ready to go to market. But there is a corner case that needs to be addressed. In the rare instances in which Teluta vehicles can sense an impending crash, they need a mechanism to quickly assess and value human life. Your job is to create the code for Teluta that models a person.
132 | 133 |You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.
To add new posts, simply add a file in the _posts directory that follows the convention YYYY-MM-DD-name-of-post.ext and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
Jekyll also offers powerful support for code snippets:
130 | 131 |def print_hi(name)
132 | puts "Hi, #{name}"
133 | end
134 | print_hi('Tom')
135 | #=> prints 'Hi, Tom' to STDOUT.Check out the Jekyll docs for more info on how to get the most out of Jekyll. File all bugs/feature requests at Jekyll’s GitHub repo. If you have questions, you can ask them on Jekyll Talk.
138 | 139 | 140 |
In part 1 of your work, we situated you as a worker of a hypothetical company called Teluta. But real-world companies constantly collect and represent our personal characteristics - at times, with terrible consequences. Read the stories below about instances about real companies…
125 | 126 |What are the potential consequences of including characteristics in code?
127 |What are the possible challenges of inferring characteristics?
133 | 136 | 137 |Imagine that Teluta cars tried to infer your characteristics on-the-fly using a suite of state-of-the-art sensors. Do you think that any of your characteristics could be misclassified? What would the implications of that misclassification be?
142 |While you currently trust the leadership at Teluta, what if more morally dubious (or oblivious?) leaders took over the company after you had left. Do you think that any of your design decisions could be abused by the company? How?
145 |Given this reflection, which characteristics would you remove from your code? Why?
148 |Are there any tradeoffs to removing too many characteristics from Teluta’s code? What are they?
151 |
for loops, conditionals, listsImagine you are working for Moogle, a well-known tech company that receives tens of thousands of job applications from graduating seniors every year.
132 | 133 |Since the company receives too many job applications for HR to individually assess in a reasonable amount of time, you are asked to create a program that algorithmically analyzes applications and selects the ones most worth passing onto HR.
134 | 135 |Students are presented Part 1 without any ethical framing or knowledge of Part 2.
137 |
This scenario was developed by Evan Peck (Bucknell University). Parts of the instructions and exercise were created by Vinesh Kannan (Mimir HQ
124 | 125 |You are working for an emerging robotics company, Robotoni, that is taking the admiral stance of developing robots to aid in life-threatening events. Their current objective is to build a fleet of autonomous robots that will rescue people in who are caught in two natural disasters: wildfires and floods.
134 | 135 |Robotoni has already built a robot that can navigate unknown terrain and successfully rescue people who are in need of help. However, for Robotoni robots to act autonomously and maximize their impact, they must also make hard decisions. In effect, the Robotoni robot must prioritize who to save.
136 | 137 |Your job is to write a comparison algorithm for the Robotoni Disaster-Relief Robot in which it compares two groups of people and decides which group to prioritize for relief.
138 | 139 |Note: This assignment can either follow Ethical Engine 1 or act as a standalone assignment.
141 |
Now that you feel good about your form, consider the two vignettes below:
124 | 125 |Vignette 1:
126 |127 |129 | 130 |Chun Ying Tsang (20) is an exchange student from Birmingham, West Midlands, England. He is here as an exchange student and only just moved into his dorm yesterday. Although Chun Ying has an email address (Terrif.Ying@yahoo.com), he only has his UK cell phone +44 075 9921 9264.
128 |
Vignette 2:
131 |132 |134 | 135 |Ash O’Connell-Chapman Jr. (33) has been invited to speak at an event co-hosted by CODE and Project SAFE. Drawing on personal experience growing up in Portage, MI, Ash will be talking about the discrimination faced by the transgender community, and how allies can support those who are transitioning. Due to previous harassment, Ash refused to give out a phone number or an email, instead directing you to the National Center for Transgender Equality website.
133 |
Before continuing, try to encode the information from these visitors with your program. What happens? Does your program work? Where does it fail?
136 | 137 |Read through the following webpages:
139 | 140 |Would your program work for the visitors at the beginning of Part 2? If not, why not? What assumptions did you make about the personal information of the visitors? What assumptions did you make about how this information would be entered?
151 |How would you change your program so that it wouldn’t fail? What are the advantages and disadvantages of doing this? You do not have to actually make the changes, only describe what you would do.
154 |Look through the links above. Why might programmers care about these things? How might you approach these problems differently in the future?
157 |
This exercise was developed by Justin Li (Occidental College). It was adapted by Evan Peck (Bucknell)
124 | 125 |You are working for the prestigious Harwall university to meet the joint needs of Admissions, Alumni Relations, and Communications. People are constantly visiting campus - to see someone they know, to check out the school as a prospective, to give a talk, to interview, to come back to the school (alumni!), or for a variety of reasons.
134 | 135 |It would be valuable to know who is on a campus throughout the year, so you are asked to write a standard form that Harwall can give visitors to collect their information. Harwall intends to use the information from this form later on to communicate with potential donors or reach out to prospective students.
136 | 137 |Since Harwall wants to make sure that this data is useful, they have also asked you to validate whatever information is entered into the form. That is your job.
138 | 139 |Students are presented Part 1 without any ethical framing or knowledge of Part 2.
141 |Instructor Notes: Our sequencing of CS 1 (based off Harvey Mudd’s CS for All) teaches recursion before for and while loops. As a result, you’ll see that the template code uses recursion to repeat a function - feel free to change this based on the sequence in your course (most likely to a while loop).
Sure! If you take a look at some of my modules in the repository, you’ll see that they have a similar structure. I write everything up in markdown and then use Jekyll to create the nice website you see here. Currently, I’m looking for modules that fit the following criteria:
124 | 125 |for loops)You can either email me at evan.peck@bucknell.edu or submit a pull request in the repository.
Many, many ways.
136 | 137 |I see these modules more as conversation-starters than polished, finished assignments. I hope they are enough to encourage other educators to use them, but I also hope that people make them better!
147 | 148 |Anecdotally, I have had fantastic responses from my students - both during lectures themselves and afterwards in teaching evaluations. BUT..
151 | 152 |Anecdotally is the key word here. There is no research behind their effectiveness, and I don’t pretend to be a CS ed researcher. Personally, I believe that learning ethical reflection habits alongside programming habits will be more effective than standalone ethics courses… but I have no evidence to back this up. While it’s in my longterm plan to quantify the impact of these modules, the bottom line here is that you should listen to CS education researchers over me.
153 | 154 |The intention of these modules is that they pair directly with your existing curriculum. For example, I often set aside lecture or two for students to practice for loops on tiny functions. I still take that time, but instead of situating it on abstract functions, I situate that practice in an ethical reflection scenario.
I don’t want to claim that these modules take NO more time, but I’ve found the impact to be minimal in my course.
159 | 160 | 167 | 168 |
Now that you feel good about your algorithm, let’s highlight some of those applicant and reveal the stories between them. For each of the following, reflect on whether you think that your algorithm does the right thing. If not, how could you change it?
124 | 125 |What if an excellent applicant thinks they should put in letter grades?
127 | 128 |[‘A’, ‘A’, ‘A’, ‘A’, ‘A’, ‘A’, ‘A’]
… or how about their grades on 4-point scale?
131 | 132 |[4, 3.9, 4, 4, 3.95, 4, 3.9]
What if one of your applicants skipped Intro to Computer Science? When they saw your form, they froze, and decided that putting -1 in the input field would make it obvious…
[-1, 95, 99, 94, 96, 98, 95]
What if one of your applicants accidentally put in a number > 100?
141 | 142 |[681, 68, 73, 70, 81, 91, 59]
That might seem easy enough for a program to catch, but what if they accidentally dropped a 0?
[100, 100, 100, 100, 100, 100, 10]
A person would catch that mistake easily, does your algorithm?
149 | 150 |What if your applicant had a medical emergency one semester? Or a personal tragedy?
152 | 153 |[95, 93, 50, 91, 98, 90, 90]
What if one of your applicants came from an underprivileged background and really struggled at the beginning of college… but showed extraordinary growth by the end?
157 | 158 |[65, 75, 85, 95, 100, 100, 80]
What if one of your applicants came to college with extraordinary potential? They easily aced their first few classes and then gradually grew apathetic about their education - getting nothing but barely-passing grades by the time they were a senior?
161 | 162 |[100, 100, 95, 85, 75, 65, 80]
Does your algorithm treat them equally?
165 | 166 |There are often no easy answers to these questions… but we need to reflect on the tradeoffs of our decisions.
168 | 169 |
Imagine you are working for Moogle, a well-known tech company that receives tens of thousands of job applications from graduating seniors every year.
125 | 126 |Since the company receives too many job applications for HR to individually assess in a reasonable amount of time, you are asked to create a program that algorithmically analyzes applications and selects the ones most worth passing onto HR.
127 | 128 |It’s difficult to create these first-pass cuts, so Moogle designs their application forms to get some numerical data about their applicants’ education. Job applications must enter the grades they received in 6 core CS courses, as well as their overall GPA. For your convenience, this will be stored in a python list that you can access. For example, a student who received the following scores…
… would result in the following list: [100, 95, 80, 89, 91, 75, 83]. You can assume that index 0 is always Intro to CS, 1 is always Data Structures, and so on.
Because you are processing many applications, your program will receive a list of lists. For example, this would be the information for 3 applicants:
144 | 145 |[ [100, 95, 80, 89, 91, 75, 83], [75, 80, 85, 90, 85, 88, 90], [85, 70, 99, 100, 81, 82, 91] ]
Your job is to:
149 |To get you started, we’re provided some template code:
156 | 157 |hiring.py a template where you will write your applicant-selection algorithm based on a small set of dummy data.lottaApps.py a module that contains a list of ten-thousand randomly generated applicants you can try once you have completed your code.In hiring.py, you will be writing a series of predefined analyze_applicant methods which apply different criteria to applicants. Through this process, you will not only get a sense of the tradeoffs of different criteria, but also get practice writing various for loops. (Note: this is meant to give you practice with for loops, so don’t use python’s built in functions such as sum() or min())
Complete the following methods:
165 |analyze_applicant1 accepts applicants that have an overall GPA above 80. (Does not need a for loop)analyze_applicant2 accepts applicants that have no grade below 65.analyze_applicant3 accepts applicants that have at least 4 grades above 85.analyze_applicant4 accepts applicants that have an average above 85.After writing, testing, and considering the tradeoffs of these four methods, write your own criteria in your_analysis.
What criteria did you choose to select finalists? How did you choose that criteria?
179 |Roughly what percentage of applicants does your algorithm pass on as finalists? Is that enough? If Moogle asked you to take a more aggressive approach with your algorithm, are there any tradeoffs?
182 |