← Back to course
5/6
Week 03 Β· Making Decisions

Friday

Impact Friday: Fair rules
// Booleans, conditions and alert rules
⏱ about 20 min

Friday: Impact Friday: Fair Rules

Lena comes in with a puzzled look. "Beacon has never once warned me about the lettuce. But the lettuce wilted twice this week."

Comet checks the rule. "Every plant gets an alert below 30. That is fair, right? Same rule for everyone."

Tomas shakes his head. "In this greenhouse, lettuce starts wilting below 50. Your rule was written for tomatoes."

Then Lena adds, "And I work at the far end of the rows. I can never see the screen from there."

Wren writes both problems down. "What do you notice? We assumed every plant and every user is like the ones we pictured."

Nova dims her lights thoughtfully. "Interesting," she says. "Let's ask more people before we change the rules."

Bias can be written into rules

Computing innovations can reflect existing human biases. The bias can be written into the algorithms or hidden in the data.

Biases can be built in at every level of software development.

One kind of bias is a wrong assumption developers make about their users.

Programmers should take action to reduce bias in the algorithms they write.

Beacon problemThe hidden assumptionA fairer fix
Lettuce never gets an alert.Every plant needs water at the same level as tomatoes.Use a separate threshold for each kind of plant.
Lena misses alerts at the far end.Every user stands near the screen.Add an audio output, such as a soft chime.
IF (plantType = "lettuce")
{
   IF (waterLevel < 50)
   {
      DISPLAY("The lettuce needs water")
   }
}
ELSE
{
   IF (waterLevel < 30)
   {
      DISPLAY("The tomatoes need water")
   }
}
FIND THE FIX
  • Read the question.
  • Tap your answer.
Lettuce reads 40. What does the new rule show?
Why add a soft chime as well as a message on the screen?
What helps a team avoid bias in the first place?

Developers can also check their work against professionally accepted accessibility standards.

Testing and refining a computational artifact can reduce bias and gaps in equity.

Week review

Week reviewTrue or false?
A Boolean value is either true or false.?
OR is true when at least one of its conditions is true.?
An IF with an ELSE runs exactly one of its two paths.?
Using the same rule for every plant guarantees the rule is fair.?
Bias can only enter software through its data.?
WHY THIS EXERCISECorrect, clear and fair rules are all part of a good decision.
OUR WEEK, IN ORDER
  • ?We found and fixed bias in Beacon's alert rule.
  • ?We turned questions into true or false comparisons.
  • ?We nested decisions and compared two versions.
  • ?We wrote IF, ELSE, AND and OR rules.
  • ?We found a gap at 30 with a decision table.
WHY THIS EXERCISEEach day added a tool for making decisions that are correct and fair.
An unfair slant built into an algorithm or its data is called ____.
Lena missed alerts because she could not see the ____.
Which plant never got an alert under Comet's first rule? Type one word.
WHY THIS EXERCISEA rule written for one kind of plant left another out. That is a bias in the algorithm.
Try it
Think of a rule at home or school that is the same for everyone.
On paper, write who it works well for and who it might leave out.
On paper, sketch Beacon's Alerts screen again. Add one change that helps a user who is far from the screen.

What a week, developer. Tomorrow's Mission Quest is a family game of rule cards.

← Thursday