(Music) Roughly 43,000 years ago, a young cave bear died in the rolling hills on the northwest border of modern day Slovenia. A thousand years later, a mammoth died in southern Germany. A few centuries after that, a griffon vulture also died in the same vicinity. And we know almost nothing about how these animals met their deaths, but these different creatures dispersed across both time and space did share one remarkable fate. After their deaths, a bone from each of their skeletons was crafted by human hands into a flute. Think about that for a second. Imagine you're a caveman, 40,000 years ago. You've mastered fire. You've built simple tools for hunting. You've learned how to craft garments from animal skins to keep yourself warm in the winter. What would you choose to invent next? It seems preposterous that you would invent the flute, a tool that created useless vibrations in air molecules. But that is exactly what our ancestors did. Now this turns out to be surprisingly common in the history of innovation. Sometimes people invent things because they want to stay alive or feed their children or conquer the village next door. But just as often, new ideas come into the world simply because they're fun. And here's the really strange thing: many of those playful but seemingly frivolous inventions ended up sparking momentous transformations in science, in politics and society. Take what may be the most important invention of modern times: programmable computers. Now, the standard story is that computers descend from military technology, since many of the early computers were designed specifically to crack wartime codes or calculate rocket trajectories. But in fact, the origins of the modern computer are much more playful, even musical, than you might imagine. The idea behind the flute, of just pushing air through tubes to make a sound, was eventually modified to create the first organ more than 2,000 years ago. Someone came up with the brilliant idea of triggering sounds by pressing small levers with our fingers, inventing the first musical keyboard. Now, keyboards evolved from organs to clavichords to harpsichords to the piano, until the middle of the 19th century, when a bunch of inventors finally hit on the idea of using a keyboard to trigger not sounds but letters. In fact, the very first typewriter was originally called "the writing harpsichord." Flutes and music led to even more powerful breakthroughs. About a thousand years ago, at the height of the Islamic Renaissance, three brothers in Baghdad designed a device that was an automated organ. They called it "the instrument that plays itself." Now, the instrument was basically a giant music box. The organ could be trained to play various songs by using instructions encoded by placing pins on a rotating cylinder. And if you wanted the machine to play a different song, you just swapped a new cylinder in with a different code on it. This instrument was the first of its kind. It was programmable. Now, conceptually, this was a massive leap forward. The whole idea of hardware and software becomes thinkable for the first time with this invention. And that incredibly powerful concept didn't come to us as an instrument of war or of conquest, or necessity at all. It came from the strange delight of watching a machine play music. In fact, the idea of programmable machines was exclusively kept alive by music for about 700 years. In the 1700s, music-making machines became the playthings of the Parisian elite. Showmen used the same coded cylinders to control the physical movements of what were called automata, an early kind of robot. One of the most famous of those robots was, you guessed it, an automated flute player designed by a brilliant French inventor named Jacques de Vaucanson. And as de Vaucanson was designing his robot musician, he had another idea. If you could program a machine to make pleasing sounds, why not program it to weave delightful patterns of color out of cloth? Instead of using the pins of the cylinder to represent musical notes, they would represent threads with different colors. If you wanted a new pattern for your fabric, you just programmed a new cylinder. This was the first programmable loom. Now, the cylinders were too expensive and time-consuming to make, but a half century later, another French inventor named Jacquard hit upon the brilliant idea of using paper-punched cards instead of metal cylinders. Paper turned out to be much cheaper and more flexible as a way of programming the device. That punch card system inspired Victorian inventor Charles Babbage to create his analytical engine, the first true programmable computer ever designed. And punch cards were used by computer programmers as late as the 1970s. So ask yourself this question: what really made the modern computer possible? Yes, the military involvement is an important part of the story, but inventing a computer also required other building blocks: music boxes, toy robot flute players, harpsichord keyboards, colorful patterns woven into fabric, and that's just a small part of the story. There's a long list of world-changing ideas and technologies that came out of play: public museums, rubber, probability theory, the insurance business and many more. Necessity isn't always the mother of invention. The playful state of mind is fundamentally exploratory, seeking out new possibilities in the world around us. And that seeking is why so many experiences that started with simple delight and amusement eventually led us to profound breakthroughs. Now, I think this has implications for how we teach kids in school and how we encourage innovation in our workspaces, but thinking about play and delight this way also helps us detect what's coming next. Think about it: if you were sitting there in 1750 trying to figure out the big changes coming to society in the 19th, the 20th centuries, automated machines, computers, artificial intelligence, a programmable flute entertaining the Parisian elite would have been as powerful a clue as anything else at the time. It seemed like an amusement at best, not useful in any serious way, but it turned out to be the beginning of a tech revolution that would change the world. You'll find the future wherever people are having the most fun.