By Evan Peck (evan.peck -at- bucknell.edu)
CS 1 students practice python conditionals by developing a command-line interface. They design a program that assigns housing priority on campus by asking students a sequence of questions and assigning points based on their answers. This ~2-hour assignment assignment includes technical components (conditionals), development processes (testing and human-centered design), and reflection (ethical decision-making).
When we say the word algorithm, we tend to ascribe agency to the computer. It is deciding things for us. But the reality is that there is no magic. There are software developers like you and me who design and create sets of rules that the computer carries out for us.
These algorithms are all around us, and they are constantly making decisions.
The decisions we make in code impact the lives of real people. For example, the Silicon Valley Triage Tool is an algorithm that identifies homeless people for whom giving them housing would cost the public less than keeping them homeless. So even as we learn the simple structures of code, we need to think about how can we make good decisions?
We are going to explore this idea in a more familiar context to you - university housing lotteries. Universities select methods that determine the order in which students can choose their housing. You might not think of it as one, but this method is an algorithm.
In this studio, you will have the opportunity to design your own algorithm. We're also going to begin dabbling with a human-centered design process to make sure that the decisions we make are never untethered from the people we impact.
What is so great about this assignment?
What niche/student is it suited for?: CS 1 students. This targets beginning programmers. It is run just 1 week into our course. It is suitable for K-12 contexts.
What does it teach?
if/elif/elsein python), basic data types (
How hard is it?: Easy. But we also run it 1 week into class, so the challenge is suitable for where they are in their programming development.
How long does it take?: We run it in a 2 hour lab setting. Nearly all students finished comfortably within that time-frame.
What does it depend on?: Our instructions assume that students are submitting Google Colaboratory documents (we've attached). But because it's so simple, it is very easily transferrable to other contexts.
What are its strengths and weaknesses?
Strength: It directly pairs with technical content, allowing instructors to embed ethical decision-making directly into their CS 1 course (in an applied setting!) without clearing out days or weeks. It tends to spark lively discussion among students and assigns value to the diverse voices of students who may come from a more non-technical background.
Weaknesses: It was specifically designed for a collaborative, lab setting. As a result, it would need to be altered (less flexibility and freedom) for scale and auto-grading. The reflection scaffolding could use another revision.
Are there any lessons on assignment craft in general that can be drawn from the assignment? You can embed sociotechnical problems and ethical decision-making directly into core curriculum. Students don't need to wait to engage with interesting problems. We can build reflective habits alongside their programming habits.