We went to see the printer at Colonial Williamsburg.
The printer was working away at his 18th century press, working on a book by one of Thomas Jefforson’s friends. In another corner, under the window of the basement shop, stood two benches for the typesetters.
“You know how we talk about uppercase and lowercase letters?” he asked. “Do you know why we call them uppercase and lowercase? Just look at how the typesetters’ letter cases are arranged over there. Look at where the capital letters are. They’re in the upper case of letters on each bench. The small letters are in the lower case.
“Now, why do you think they arranged their letter cases that way?” he went on. “Because you want the letters you use more often closer to hand.”
“Remember when you were little, and the toys you played with most often were always out all over the floor, but the ones you hardly ever played with were on their shelves? Your parents were always making you put your things away, but they were going against the natural way we arrange our things — the most often used are out close to hand, not mixed in with the less used things that are out of the way.”
As it turns out, the printer’s lesson is one of the algorithms of life we see nearly everywhere. The kitchen drawer with the gadgets we use most is closest to where we do most of the kitchen work, and within the jumble of that drawer, the most often used of the most often used are naturally in the front of the drawer. Or think of the tool bench in your garage. If it’s like mine, it’s a jumble of tools most of the time, but the hammer and screw driver and the drill are on the end within closest reach.
In computer science, we call it caching. The most often used bits of data stored in more accessible, faster memory, the less used relegated to slower memory, then to “disk”, then perhaps to other resources farther out on the network. It’s one of the most common and most difficult problems. Resetting caches, cleaning out kitchen drawers, is like the parent’s insistence that we need to clean up. And yet, when you clean out the kitchen drawer, for a while it takes longer to find and grab what you need when you’re making dinner.
Every now and then, for one reason or another, you need to clear a cache. But for a while, the whole system works slower.
Remember the printer. Upper case. Lower case. Keep the most often used, close to hand.