Tell Me a Story
Modern physics teaches us that there is more to truth than meets the eye; or than meets the all too limited human mind, evolved as it was to cope with medium-sized objects moving at medium speeds through medium distances in Africa.Richard Dawkins, “What is True?”
As a product of evolution, we humans are cognitively endowed with the ability to make sense of nature. We have an intuitive grasp on shapes and how objects can be manipulated in space. We can track animals and determine patterns in the weather and the seasons. We possess an innate notion of fairness and how to mitigate social interactions.
While these kinds of skills were useful for our ancestors in navigating the world for the last million generations, a lot has changed in the last 10,000 years, and almost as much has changed in the last century alone. We’ve gone from the savanna to the concrete jungle. From loin cloths and wooden clubs to business suits and ballpoint pen. From hunting to channel surfing. (You get the idea)
We are a pre-historic being in a post-modern world. So how do we make sense of everything? Well, among other things, we tell stories.
An atom wants to be at its lowest energy level, and does so by filling its electron shells in a particular order. Autophagy is a process by which cells eating their own internal components and invading microbial invaders. Genes are selfish, and do everything in their interest of self-replication, even at the expense of their organism.
Or, to illustrate the point even further:
Translating the complexities of chemical or biological systems into a story about actors playing different roles is a tradition as old as civilization itself. Going back to the earliest creation myths across all cultures, humans have told stories of trickster gods stealing the sun, or the sparks that created the planets and the stars to make sense of the universe.
Science, like mythology, creates an abstraction from the mechanistic underpinnings of the reality it describes. This tradition extends to computer science as well, in how we understand computational systems.
Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.Donald Knuth, Literate Programming
So, with apologies to Alan Kay, Object-Oriented Programming wasn’t so much invented as discovered.
Why does OOP work so well as a paradigm? How can programmers identify and debug problems without thinking about the underlying 1’s and 0’s? It’s no coincidence—in fact, it all goes back to our evolutionary heritage.
Seeing as how our ancestors had a lot of practice thinking in terms of people with intentions who act on the world using tools, it comes as no surprised that we have become quite adapt at thinking about other things in that way, too. By contrast, our ancestors never had to deal with transistors, logic gates, bits, or bytes, so it takes some mental acrobatics for us to understand that even on its most basic level.
What I’m trying to get at is that, although we often fancy ourselves scientists, mathematicians, or architects, we should be reminded that at the end of the day, programming is about telling stories. Why? Because that’s the only chance we have at understanding computers.
As storytellers, programmers are tasked with constructing a comprehensive narrative about the way a system works. Using a language elegant enough, we can succeed in telling our story without “breaking the spell”. We can refer to libraries to incorporate common functionality in the same way a writer might summon devices from the greek tragedies. A penchant for pedantic linguistic frivolity can be just as annoying as overly-clever meta-programming hacks.
If we are to become better story tellers, perhaps we should head to the fiction section to find our next programming book.
Photo Credit: Francesc Gelonch