From Paper to Notebook
A track of P42 · Automating a Manual Task.
Tally words, build a vocabulary table, find-and-replace across lines, then automate a task of your own — the discipline's graded payoff.
Take yesterday's transcript and count how often each word appears. You know this job: a tick mark under every word, an hour of careful strokes, and the quiet knowledge that one missed mark spoils the whole count — with no way of telling which total is the wrong one. The notebook does the same count, on the same text, in under a second, and can show you the ten most frequent words before your pen finds its cap. That is not the finale of this track. That is module one.
The other paper habits fall the same way, one module each. The glossary draft
where you cross out repeats and lose your alphabetical place — a set drops the
duplicates and sorted restores the order, and the interpreter's vocabulary
table builds itself. The renamed term — a client became a customer — that
must now change on every line of a document, found by scrolling and hope: one
rule, applied by a loop to every line at once, misses nothing. Each of these
is a task you have genuinely done by hand; watching the notebook do it is the
payoff the whole discipline has been saving up.
Nothing here arrives from nowhere. The notebook version of each task uses
exactly the moves you practised on the way up: a loop from P41, an if where
a decision hides, a dictionary from P40 keeping the running count, a small
function with a sensible name wrapping the whole thing. The rhythm repeats
four times — describe how you do the task on paper, name its steps in Python,
let the notebook run them over real lines, then read the result with a
professional's eye, because you remain the judge of whether the output is
right.
By the fourth module the guided part falls away, and the task on the desk is one of your own: something you actually do — a recurring report, a terminology check, a formatting pass — described in your words and then handed to the notebook. Which of your weekly chores would you feed it first? Walk in with one in mind; you will walk out without it.