Day 3 · the through-line

Classification Logic

Whose categories? Sorting as judgment

Today you learn if, else, and the booleans that drive them.

Most ifs are plumbing: is the file empty? is this a number? But the same basic logic decides who gets the loan, the match, the apartment, the interview, the flag.

When an if decides something about a person, it is sorting people — and sorting is never neutral. Someone drew the line.

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

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.

To classify is to judge

Sort these yourself.

Positive, negative, or neutral? Hands up.

"the bill of right says freedom of religion, not freedom from religion"

"Seems pretty clear cut. If schools are government funded = keep your religion at home"

"Anyone who thinks teaching kids about morality is a bad idea should have zero input on raising children!"

Where did the room disagree? That disagreement is what a category hides.

To classify is to judge

There is no neutral box.

Every classification system encodes values — about what matters, what counts, and who belongs where.

The last 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 — but it often worked like a boolean. One bit, and the gate swung open or stayed shut.

Status has long gated access

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, speed — and that the judgment now hides inside a function that looks like math.

The threshold problem

A simplified loan rule, in the syntax you'll write this week:

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

Who chose 650? Is the person at 649 really different from the person at 651?

And the person at exactly 650? > says review. >= would say approve. Someone chose that symbol, too.

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 >=

The threshold problem

A threshold is the most ordinary line in programming, and one of the most consequential.

It is an act of judgment that looks like arithmetic.

In HW3 you'll sort our comments with two cutoffs on VADER's score (−1 to +1): ≥ 0.05 is positive, ≤ −0.05 is negative, everything between is neutral.

Move those lines to ±0.5 and "neutral" doubles — same rows, same scores.

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

The threshold problem

Two real rows from our file, a hair apart:

"Considering the behavior and moral (?) actions of some prominent politicians I suspect they really don't follow their own philosophy." — +0.03, neutral

"A schoolchild could tell you this outcome… Waste of time and resources" — −0.05, negative

Those cutoffs came from VADER's authors. Keeping them is still a choice — and it will be yours.

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

The tyranny of the tidy box

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.

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

The tyranny of the tidy box

Until 2014, Facebook asked every new user to choose one of two genders. That year it added dozens of custom options.

A two-option field is, in effect, a single bit: 0 or 1. Cheap to store, easy to sort — and silent about everyone it doesn't fit.

The schema, not reality, decided who was legible.

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"

The tyranny of the tidy box

Remember the missing voices from the last 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.

Classified by, or reading the sort

You don't have to become an engineer.

You only have to become unwilling to be sorted silently.

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 a few weeks 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.

Your turn at the line

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.

↤ Lectures·Full text
← → navigate · click to advance