title: Coding is not the new literacy
url: http://www.chris-granger.com/2015/01/26/coding-is-not-the-new-literacy/
hash_url: c34368bd5e4a971525c1a970f97ef61f

<p>Despite the good intentions behind the movement to get people to code, both the basic premise and approach are flawed. The movement sits on the idea that "coding is the new literacy," but that takes a narrow view of what literacy really is.</p>

<p>If you ask google to <a href="https://www.google.com/webhp?sourceid=chrome-instant&amp;ion=1&amp;espv=2&amp;es_th=1&amp;ie=UTF-8#safe=off&amp;q=define%3A%20literacy">define literacy</a> it gives a mechanical definition:</p>

<blockquote>
<p>the ability to read and write.</p>
</blockquote>

<p>This is certainly accurate, but defining literacy as interpreting and making marks on a sheet of paper is grossly inadequate. Reading and writing are the physical actions we use to employ something far more important: external, distributable storage for the mind. Being literate isn't simply a matter of being able to put words on the page, it's solidifying our thoughts such that they <em>can</em> be written. Interpreting and applying someone else's thoughts is the equivalent for reading. <strong>We call these composition and comprehension. And they are what literacy really is.</strong></p>

<h3>Coding is not the fundamental skill</h3>

<p>When we say that coding is the new literacy, we're arguing that wielding a pencil and paper is the old one. Coding, like writing, is a mechanical act. All we've done is upgrade the storage medium. Writing if statements and for loops is straightforward to teach people, but it doesn't make them any more capable. Just like writing, we have to know how to solidify our thoughts and get them out of our head. In the case of programming though, if we manage to do that in a certain way, a computer can do more than just store them. It can compute with them.</p>

<p>Reading and writing gave us external and distributable storage. Coding gives us external and distributable computation. It allows us to offload the thinking we have to do in order to execute some process. To achieve this, it seems like all we need is to show people how to give the computer instructions, but that's teaching people how to put words on the page. We need the equivalent of composition, the skill that allows us to think about how things are computed. This time, we're not recording our thoughts, but instead the models of the world that allow us to have thoughts in the first place.</p>

<p>We build mental models of everything - from how to tie our shoes to the way macro-economic systems work. With these, we make decisions, predictions, and understand our experiences. <strong>If we want computers to be able to compute for us, then we have to accurately extract these models from our heads and record them.</strong> Writing Python isn't the fundamental skill we need to teach people. Modeling systems is.</p>

<h3>Modeling is the new literacy</h3>

<p>In the same way that composition and comprehension are not tied to paper, modeling is not tied to computers. It can be both physical and mental. It takes place on paper and in Excel or with Legos and balsa wood airplanes. It is an incredibly powerful skill which we can make even greater use of by transposing our models to computers. To understand how we do that, we have to look more deeply at what it means to model.</p>

<blockquote>
<p>Modeling is creating a representation of a system (or process) that can be explored or used.</p>
</blockquote>

<p>This definition encompasses a few skills, but the most important one is specification. <strong>In order to represent a system, we have to understand what it is exactly, but our understanding is mired in assumptions.</strong> A fun illustration of this is the first time my co-founder, Robert, was trying to sort a list of names and getting frustrated with it. I asked him a simple question: "What does it <em>actually</em> mean to alphabetize something?" He had never once considered what that really meant. It was some vague concept that he had a mental model for, but he had never been forced to specify the exact result (for example, what do we do with non-English characters?).</p>

<p>Defining a system or process requires breaking it down into pieces and defining those, which can then be broken down further. It is a process that helps acknowledge and remove ambiguity and it is the most important aspect of teaching people to model. In breaking parts down we can take something overwhelmingly complex and frame it in terms that we understand and actions we know how to do. The parallel to programming here is very apparent: writing a program is breaking a system down until you arrive at ideas that a <em>computer</em> understands and actions it knows how to do. In either case, we have to specify our system and we do that through a process of iterative crafting.</p>

<h3>Creation is exploration</h3>

<p>We create models by crafting them out of material. Sometimes our material is wood, metal, or plastic. Other times it's data or information from our senses. Either way, we start our models with a medium that we mold. This helps us escape the trap of the blank page - by starting with a hunk of clay (or data, or some physical motion, or Legos...) we don't have to imagine the leap from nothingness to something. Instead, we can get to work by manipulating what's in front of us. We can hone, and whittle, and bend, and pull apart, and glue. We can shape it as we see fit.</p>

<p><strong>The process of creating a model is an act of discovery - we find out what pieces we need as we shape our material.</strong> This means we needn't fully specify a system to get started, we can simply craft new pieces as we go. We end up exploring the system as we create it and don't have to get a "complete" model to gain value. We can simply tinker. We can shave a little off or glue a some on to see what happens. And along the way, we bolster our intuition of how systems behave.</p>

<h3>Exploration is understanding</h3>

<p>Physical modeling teaches us the value of being able to take things apart, whether that's removing every single screw and laying the whole engine block out on the garage floor or just removing the alternator and having a look. By pulling something apart we can directly explore what makes it up. This is why interfaces in movies like Iron Man are so compelling - they allow us to just dive in.</p>

<div class="expanded"><img src="http://www.chris-granger.com/images/ironman.jpg"/></div>

<p><strong>Imagine what we could learn if we had the ability to break anything down, to reach inside it, and see what that little bit there does. The more ways we find to represent systems such that we retain that ability, the more power we will have to understand complex things.</strong></p>

<p>We gain understanding through exploration, through fiddling with models and "playing them out" to see what happens. We can make our wheels bigger or plug in a different number for the interest rate and simulate the result. Through this process, we experience and imagine things we might not otherwise be able to, and the more experiences we have, the more we understand how the world works.</p>

<h3>Digital freedom</h3>

<p>While properties of physical modeling are useful to us as guiding principles, the digital world offers us an opportunity to step out of their limitations. We can freely create copies of parts or craft many different versions of them. We can make changes to individual pieces and the system will adapt to them. We can simulate our models in different contexts, while sophisticated tools verify our expectations. <strong>By transposing our models to a computer, we can offload the work necessary to change, simulate, and verify.</strong> We can even have our models suggest actions and let other systems perform them for us. As such, we free ourselves to explore without every change requiring us to hit the metaphorical machine shop.</p>

<p>There are a number of tools that already help us do this - from <a href="http://www.mathworks.com/products/matlab/">Matlab</a> to <a href="http://en.wikipedia.org/wiki/Quartz_Composer">Quartz Composer</a> - but Excel is unquestionably the king. Through Excel we can model any system that we can represent as numbers on a grid, which it turns out, is a lot of them. We have modeled everything from entire businesses to markets to family vacations. Millions of people are able to use spreadsheets to model aspects of their lives and it could be argued that, outside of the Internet, it's the single most important tool available to us on a computer. It gains this power by providing a simple and intuitive set of tools for shaping just one material: a grid of numbers. If we want to work with more than that, however, we have to code.</p>

<h3>A fundamental disconnect</h3>

<p>Coding requires us to break our systems down into actions that the computer understands, which represents a fundamental disconnect in intent. Most programs are not trying to specify how things are distributed across cores or how objects should be laid out in memory. <strong>We are not trying to model how a computer does something. Instead, we are modeling human interaction, the weather, or spacecraft.</strong> From that angle, it's like trying to paint using a welder's torch. We are employing a set of tools designed to model how <em>computers</em> work, but we're representing systems that are nothing like them.</p>

<p>Even in the case where we are talking specifically about how machines should behave, our tools aren't really designed with the notion of modeling in mind. Our editors and debuggers, for example, make it difficult to pick out pieces at different depths of abstraction. Instead, we have to look at the system laid out in its entirety and try to make sense of where all the screws came from. Most mainstream languages also make exploratory creation difficult. Exploring a system as we're building it gives us a greater intuition for both what we have and what we need. This is why languages that <em>were</em> designed with exploration in mind (LISP, Smalltalk, etc) seem magical and have cult followings. But even these suffer from forcing us to model every material with a single tool. Despite having different tools for various physical materials, in programming we try to build nearly everything with just one: the general purpose programming language.</p>

<p>On the surface, it seems desirable to have "one tool to rule them all," but the reality is that we end up trying to hammer metal with a chef's knife. Excel, by contrast, constrains us to the single material that it was intentionally designed to work with. Through that constraint we gain a tool with a very intuitive and powerful interface for working with grids. The problem of course is that Excel is terrible for doing anything else, but that doesn't mean we should try to generalize a chef's knife into a hammer. Instead, we should use the right tools for the job and look for a glue that allows us to bring different materials together.</p>

<p>Programming as it exists now forces us to model, but it does so in an unnatural way. And while teaching ourselves how to program will help us learn how to break systems down, it does so at the risk of focusing on the wrong things. <strong>We don't want a generation of people forced to care about Unicode and UI toolkits. We want a generation of writers, biologists, and accountants that can leverage computers.</strong></p>

<h3>How we teach children</h3>

<p>We are natural-born modelers and we learn by creating representations that we validate against the world. Our models often start out too simplistic or even obviously wrong, but that's perfectly acceptable (and arguably necessary), as we can continue to update them as we go. Any parent could give you examples of how this plays out in their children, though they may not have fully internalized that this is what's happening. A great example is that infants initially have a model of existence that relies on seeing objects. This is why not being able to see their parents is so distressing - it means that they no longer exist. The notion of object permanence is something that children only fully develop after a couple years of honing their model for how physical objects behave.</p>

<p>So if we do this naturally, what do we have to teach children? The magic of instinct is that we don't have to be aware of how it actually happens. We understand the world through models, but that doesn't mean we know how we create them in the first place. As such, we have to teach children how modeling happens, which we can break down into four distinct processes:</p>

<p><strong>Specification</strong>: How to break down parts until you get to ideas and actions you understand.</p>

<p><strong>Validation</strong>: How to test the model against the real world or against the expectations inside our heads.</p>

<p><strong>Debugging</strong>: How to break down bugs in a model. A very important lesson is that an invalid model is not failure, it just shows that some part of the system behaves differently than what we modeled.</p>

<p><strong>Exploration</strong>: How to then play with the model to better understand possible outcomes and to see how it could be used to predict or automate some system.</p>

<p>Focusing on these four areas captures the basic process by which we create, hone, and use models and it allows children to become active participants in the process by which they learn. <strong>Perhaps even more importantly, focusing on modeling pushes education towards the idea that pedagogy is really guiding children to deliberately create and explore the world around them.</strong></p>

<h3>How we should teach adults</h3>

<p>Realistically, we should be teaching ourselves the same things, but unfortunately adult education rarely allows for undirected exploration (we're just trying to get something done). Instead, we could frame modeling in terms of how we might use models in context. For example, if you're an accountant that goes through the same process every day to create a report, you could break it down to see how you might automate portions of it. What are the fundamental actions necessary to create that report?  Are there tools that can do those actions for you?</p>

<p><strong>If we assume that at some point better tools for modeling come into existence, then being able to model some system or process may be all you need to automate it.</strong> Once that is the case, a targeted exploration of how you go about modeling specific domains has obvious value as it frees us up to do other tasks. An extreme example of this might be modeling your entire business, from the interactions with customers to fulfillment. At that point you could automate large portions of it and focus on how to grow the business, which itself likely involves exploratory models.</p>

<h3>"The computer revolution hasn't happened yet"</h3>

<p>Alan Kay did a <a href="https://www.youtube.com/watch?v=oKg1hTOQXoY">talk</a> at OOPSLA in 1997 titled "The computer revolution hasn't happened yet," in which he argued that we haven't realized the potential that computers can provide for us. Eighteen years later, I still agree with him - it hasn't happened yet. And teaching people how to loop over a list won't make it happen either. To realize the potential of computers, we have to focus on the fundamental skills that allow us to harness external computation. We have to create a new generation of tools that allow us to express our models without switching professions and a new generation of modelers who wield them.</p>

<blockquote>
<p><strong>To put it simply, the next great advance in human ability comes from being able to externalize the mental models we spend our entire lives creating.</strong></p>
</blockquote>

<p>That is the new literacy. And it's the revolution we've all been waiting for.</p>
