Day 3 · the through-line

Classification Logic

Whose categories? Sorting as judgment

A road forking like an if/else branch, a gate at the split sorting a line of people left or right
A road forking like an if/else branch, a gate at the split sorting a line of people left or right

Today you learn if, else, and the booleans that drive them — True and False, greater-than and equals. Most of the ifs you'll ever write are plumbing: is the file empty, is this value a number. But the same basic logic sits at the end of the systems that decide who gets the loan, the match, the apartment, the interview, the flag.

This lecture is the humanities frame for the syntax you're about to practice. Because when an if decides something about a person, it is sorting people — and sorting is never neutral. Someone drew the line.

To classify is to judge

A category is a decision: this counts as the same; that counts as different. Drawing the box is an act of judgment before it is ever an act of code.

Try it on three real comments from our file. Is "the bill of right says freedom of religion, not freedom from religion" positive, negative, or neutral? What about "Anyone who thinks teaching kids about morality is a bad idea should have zero input on raising children!" Where a room of careful readers disagrees, a category has to pick one answer anyway.

There is no neutral box. Every classification system encodes values — about what matters, what counts, and who belongs where. The Connotations lecture said code is not neutral; classification is where you will feel it most directly.

Status has long gated access

Long before computers, a status decided which doors opened: noble or commoner, citizen or foreigner, insider or outsider. The variable was social, and it often worked like a boolean — one bit, and the gate swung open or stayed shut.

The software era didn't invent the gate. It automated it, and renamed the variables:

credit_score · criminal_background · employment_status · immigration_status

The same logic, renamed: a value about a person, checked at a threshold, deciding what they get to reach. What changed is scale and speed — and that the judgment now hides inside a function that looks like math.

The threshold problem

A hand turning a brass dial on a gate; people just above the mark pass into light, those just below are turned away
A hand turning a brass dial on a gate; people just above the mark pass into light, those just below are turned away

Here is a simplified loan rule, written in the syntax you'll learn this week:

credit_score = 649
income = 72000
if credit_score > 650 and income > 50000:
    decision = "approve"
else:
    decision = "review"
print(decision)    # review

Read it line by line. credit_score > 650 is a comparison: it asks a yes-or-no question, and the answer comes back as a Boolean, True or False. and means both comparisons must be True. If they are, if runs the line under it; if not, else catches everything else. Here the score is 649, one point short, so the answer is "review." The 650 is a threshold: a cutoff that turns a continuous number into a category.

A number line from 646 to 654 with a dashed line between 650 and 651: 646 through 650 are marked "review," 651 through 654 "approve"; a note says 650 itself is turned away because the code uses > rather than >=
A number line from 646 to 654 with a dashed line between 650 and 651: 646 through 650 are marked "review," 651 through 654 "approve"; a note says 650 itself is turned away because the code uses > rather than >=

Now ask the humanist's questions. Who chose 650? Is the person at 649 truly different from the person at 651, or did a round number just decide their year? And what about the person at exactly 650? The code says >, so they're sent to review; >= would have approved them. Someone chose that symbol, too. Why income and credit, and not rent history, or the reason the score dipped in the first place?

Two bars of the same 123 rows: with VADER's standard cutoffs of plus or minus 0.05, 34 negative, 38 neutral, 51 positive; with stricter cutoffs of plus or minus 0.5, 17 negative, 76 neutral, 30 positive
Two bars of the same 123 rows: with VADER's standard cutoffs of plus or minus 0.05, 34 negative, 38 neutral, 51 positive; with stricter cutoffs of plus or minus 0.5, 17 negative, 76 neutral, 30 positive

A threshold is the most ordinary line in programming and one of the most consequential: an act of judgment that looks like arithmetic. You'll meet your own soon. On Day 13 you'll use VADER, a tool that gives each comment an overall compound score from −1 (most negative) to +1 (most positive). In HW3, two cutoffs sort every row: a score of at least 0.05 is positive, at most −0.05 is negative, and anything between is neutral. On our 123 rows, those lines give 51 positive, 34 negative, and 38 neutral. Move them to ±0.5 and neutral jumps to 76.

The rows nearest the line show what is at stake. "Considering the behavior and moral (?) actions of some prominent politicians I suspect they really don't follow their own philosophy" scores +0.03 and counts as neutral: prominent and suspect nearly cancel out. "A schoolchild could tell you this outcome… Waste of time and resources" scores −0.05 and only just counts as negative. Two skeptical comments, a few hundredths apart, land in different boxes. Those cutoffs came from VADER's authors. Keeping them is still a choice, and it will be yours.

The tyranny of the tidy box

Varied human figures pressed into identical pigeonhole drawers, the parts that don't fit spilling over and fading
Varied human figures pressed into identical pigeonhole drawers, the parts that don't fit spilling over and fading

Code needs clean categories, and people don't come clean. So the system forces the fit — and whatever won't fit the schema simply disappears.

A schematic of two form fields: one with only Female and Male radio buttons, stored as 0 or 1; one with a free-text box reading "In your own words"
A schematic of two form fields: one with only Female and Male radio buttons, stored as 0 or 1; one with a free-text box reading "In your own words"

Until 2014, Facebook asked every new user to choose one of two genders, male or female; that year it added dozens of custom options. A two-option field is, in effect, a single bit: 0 or 1. It is cheap to store and easy to sort, and it says nothing about everyone it doesn't fit. The schema, not reality, decided who was legible. (That's a central point of Catherine D'Ignazio and Lauren Klein's Data Feminism: a "default" binary, chosen for computational convenience, quietly encodes a whole worldview — and erases everyone who doesn't fit it.)

Remember the missing voices from the Connotations lecture: absence from the data isn't absence from reality. Here is one of the mechanisms. People go missing not only because they never posted, but because the categories had no drawer for them.

Classified by, or reading the sort

Everyone is sorted by systems like these, coders included. What coding literacy changes is whether you can see the sort.

Most code really is plumbing. But the key choices about people — the variables, the categories, the cutoffs — encode values and land on real lives.

Your turn at the line

In the weeks ahead you will be the one drawing lines: which words are "stopwords" worth deleting, which comment is "positive," where one "topic" ends and the next begins. Each is a classification, and each is a judgment you are making for someone else.

The course's one demand holds here exactly as in the opening lecture: make the cut visible. Leave the #comment that says where you drew the line, and why. The honest classifier isn't the one who found the neutral categories — there are no neutral ones. It's the one who shows you where they stood when they drew the box.

Going deeper (optional): Safiya Noble, Algorithms of Oppression; Ruha Benjamin, Race After Technology; Cathy O'Neil, Weapons of Math Destruction; Catherine D'Ignazio and Lauren Klein, Data Feminism.