Before Computers, People Programmed Looms

Just punch out 2,000 or so cards, string them together, and start weaving.

Before IBM, before punch-card computers, before Charles Babbage's Analytical Engine, one of the very first machines that could run something like what we now call a "program" was used to make fabric. This machine—a loom—could process so much information that the fabric it produced could display pictures detailed enough that they might be mistaken for engravings.
Like, for instance, the image above: a woven piece of fabric that depicts Joseph-Marie Jacquard, the inventor of the weaving technology that made its creation possible. As James Essinger recounts in Jacquard's Web, in the early 1840s Charles Babbage kept a copy at home and would ask guests to guess how it was made. They were usually wrong.
Weaving a pattern that detailed was, before the early 1800s, if not outright impossible, impossibly tedious. At its simplest, weaving means taking a series of parallel strings (the warp) lifting a selection of them up, and running another string (the weft) between the two layers, creating a crosshatch. Making more complicated patterns means choosing more carefully which of the warp strings lie on top of the weft each time it passes through. In the years before Jacquard invented his loom head, the best way to do this was by hand.
The Jacquard loom, though, could process information about which of those strings should be lifted up and in what order. That information was stored in punch cards—often 2,000 or more strung together. The holes in the punch cards would let through only a selection of the rods that lifted the warp strings. In other words, the machine could replace the role of a person manually selecting which strings would appear on top. Once the punch cards were created, Jacquard looms could quickly make pictures with subtle curves and details that earlier would have take months to complete. And the loom could replicate those designs, over and over again.
This was exactly the sort of system that Babbage envisioned for his Analytical Engine—except instead of printing patterns, his machine would have performed mathematical operations. As Ada Lovelace wrote him: "We may say most aptly that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves."
Sarah Laskow is a senior editor at The Atlantic, where she oversees the Science section.