A talk on teaching, learning, and code

How to Teach Love

Why learning to love matters, and how stories, context, and abstraction can teach it. A talk on what actually makes people fall for the things they learn.

You cannot build a ship by handing out orders

Every curriculum starts with a plan: the frames, the stations, the pine board patterns. None of it explains why anyone would want to go to sea.

Half-hull model and lofting plans, drawn by Jean Belliveau Half-model lofting drawings. Drawn by Jean Belliveau.
The Little Prince carried by a flock of birds

“If you want to build a ship, don’t drum up the men to gather wood, divide the work, and give orders. Instead, teach them to yearn for the vast and endless sea.”

Antoine de Saint-Exupéry

The more we learn to love, the more we can do.

How I fell in love with an ad-targeting problem

Designer Pages, 2009

“The best minds of my generation are thinking about how to make people click ads.”

Jeffrey Hammerbacher, Facebook

I ran a search engine for interior designers. It listed 9,533 brands and 200,000+ products, and it had a problem no one wanted to love: only the popular searches could be sold. Everything else sat in the long tail.

Designer Pages homepage: helping designers find and manage product information The long tail chart: the hits versus niche content

Monetizing 4% of our searches wasn’t going to work. How could we serve relevant ads on every search without having an advertiser bid on specific keywords?

The keyword model assumes advertisers can predict what people will type. In a catalog of two hundred thousand products, they can’t. The only way in was to stop thinking about words.

“If there is no struggle, there is no progress. Those who profess to favor freedom, and yet depreciate agitation, are men who want crops without plowing up the ground. They want rain without thunder and lightning. They want the ocean without the awful roar of its many waters. This struggle may be a moral one; or it may be a physical one; or it may be both moral and physical; but it must be a struggle.”

Frederick Douglass

Bid on search results instead of keywords.

Patent figure 6: campaigns as overlapping sets intersecting a result set Fig. 6, US 20100257049 A1. Campaigns are sets of documents. An ad wins when its set overlaps the results.
Jaccard index: intersection over union

Score every campaign against every result set with the Jaccard index, the size of the intersection divided by the size of the union. It became System and method for identifying and retrieving targeted advertisements, a patent filed in 2009. A boring problem turned into the most interesting thing I had ever worked on.

The things we love in life are abstract.

Mobilize your love by finding what to love.

Part two

How to teach love.

First principle: people love meaning.

“In an extreme view, the world can be seen as only connections, nothing else. We think of a dictionary as the repository of meaning, but it defines words only in terms of other words. I liked the idea that a piece of information is really defined only by what it's related to, and how it's related. There really is little else to meaning. The structure is everything.”

“There are billions of neurons in our brains, but what are neurons? Just cells. The brain has no knowledge until connections are made between neurons. All that we know, all that we are, comes from the way our neurons are connected.

Tim Berners-Lee
Neurons and their connections, black and white micrograph

Meaning == Connection

Ken Thompson and Dennis Ritchie

“This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.”

Douglas McIlroy

“Although that philosophy can't be written down in a single sentence, at its heart is the idea that the power of a system comes more from the relationships among programs than from the programs themselves. Many UNIX programs do quite trivial things in isolation, but, combined with other programs, become meaningful and useful tools.”

The Unix Programming Environment
A map of the internet, nodes and connections

The web made connection itself the product.

PageRank diagram: nodes weighted by inbound links PageRank: a page matters because of what points at it

Every lesson needs an inciting incident

Setup, conflict, resolution. The shape of a story is the shape of attention, and a curriculum can borrow it wholesale.

Three act structure: setup, conflict, resolution Act 1: Setup. Act 2: Conflict. Act 3: Resolution.
Tension over time in Star Wars, from Rebels captured to Use the Force Tension over time. Rising peaks, each higher than the last.

Story: Tic Tac Toe

One game, eight labs, told in order. Welcome. Board. Display the board. Move. Position taken. Valid move. Turn. Each lab ends on the cliff the next one resolves.

  1. ttt-1-welcome-rbRuby · 6 forks
  2. ttt-2-board-rbRuby · 5 forks
  3. ttt-3-display_board-exampleRuby · 9 forks
  4. ttt-4-display-board-rbRuby · 7 forks
  5. ttt-5-move-rbRuby · 16 forks
  6. ttt-6-position-taken-rbRuby · 17 forks
  7. ttt-7-valid-moveRuby · 9 forks
  8. ttt-8-turnRuby · 16 forks
05 / Context

Nothing exists in a vacuum.

Capital A Atom, and an instance of one

A class is the idea of a thing. An instance is a particular one. Chemistry already taught everyone this; programming just needs to point at it.

The atom symbol: a nucleus with three orbits Atoms in general: a Class.
class Atom
  attr_accessor :protons
  TABLE = {
    1 => "Hydrogen",
    6 => "Carbon",
    8 => "Oxygen"
  }

  def name
    TABLE[@protons]
  end
end
h = Atom.new
h.protons = 1
h.name #=> "Hydrogen"
An instance of an atom.

How the internet works, starting in 1908

Before HTTP, before packets, Tesla told the New York Times that the world would carry an instrument no bigger than a watch and hear anything, anywhere. History gives a lesson somewhere to stand.

Nikola Tesla, seated portrait
Wireless of the Future, Nikola Tesla in the New York Times “Wireless of the Future.” Nikola Tesla in the New York Times.
Picasso's bull lithographs, from realistic to a few lines

Remove details. Hide information. Encapsulate.

Abstraction is a process by which concepts are derived from the usage and classification of literal concepts. It reduces the information content of a thing to only what is relevant for a particular purpose.

“The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.”

Edsger Dijkstra

Once students learn abstraction, we can increase the density of our communication.

Abstraction accelerates the speed at which we can forge connections through stories and context.

Abstraction provides a precision to teaching.

Fred Rogers, smiling, black and white portrait

“The thing I remember best about successful people I’ve met all through the years is their obvious delight in what they’re doing and it seems to have very little to do with worldly success. They just love what they’re doing, and they love it in front of others.”

Fred Rogers

Thank you.

More at avi.nyc