by Nick Such
While the Learn To Code movement has certainly picked up steam in the past year, I think it’s interesting to realize that “code” is not something new. What’s new is that we have a strong incentive to learn a particular type of code: billions of people now have Internet-connected computing devices, which we carry around with us wherever we go, and we spend an increasing amount of time using these devices. If we want to interact with these people and influence these people, then we have to communicate with the code (in this case, computer code) that gets their attention. But the notion that coding is something new is a fallacy.
When I’m teaching people to code for the first time, I usually look for metaphors that relate to their prior experiences. One of my go-to examples is music. While both music and software have near universal prevalence today, it seems that more people have experience creating music than software. However, learning to develop software is no more difficult than learning to play and create music. Music provides a great example of another type of code, a programming language, if you will. The building blocks of musical code are things like time signatures, half-notes, and the G clef on a staff. This code can then be executed by any musician wielding an appropriate instrument. In its simplest form, the output is a series of acoustical vibrations at a variety of audible frequencies. Yet, for reasons we don’t fully understand, music’s simple components can be chained together to express pain and sorrow, joy and elation, all without the presence of words. Musical code is indeed a powerful language.
Personally, l have a strong mental association between football and code. Perhaps it’s because my first web development gig was as the webmaster for my high school football team. Or maybe it’s because my high school football coach was also my AP Physics teacher, leaving my brain tangled in a mesh of free-body diagrams and student body right X-and-O sketches. But either way, a football playbook is nothing short of software documentation. The pages are lined with diagrams that would seem peculiar and complex to any uninformed onlooker. Its series of play calls might as well be method calls. And, if sufficiently well-described, these plays could be executed by any other football team, young or old. This code is also constantly vulnerable to security breaches. You may have seen a sideline head coach covering his mouth, or a backup quarterback making a peculiar set of (possibly decoy) gestures. If an opposing team was to discover your playbook, or reverse-engineer your strategies by analyzing your football code’s output (e.g. game film), then they may be able to thwart your intended operations.
It can be really frustrating when you’re a beginning programmer, and you can’t figure out why your For Loop isn’t doing what you expected. You think you have all the parts there, but maybe you swapped a semicolon for a comma, or forgot to increment your iterator. The syntax of a programming language can seem alien at first. You may think that you’ve explained to the computer exactly what it needs to do, but for some reason, it seems to choose a different path. But consider the languages we use to communicate with other human beings. In college, I spent a semester in Budapest, and got to learn the basics of the Hungarian language. It’s much different from the neighboring Germanic, Slavic, and Romance languages. One of the most noticeable changes was the switch to Subject-Object-Verb from English’s Subject-Verb-Object orientation. It was easy to explain this difference as “Yoda-speak”. A classic Yoda phrase, “Hard to see the Dark Side is,” would be “The Dark Side is hard to see,” using the English norm. This simple change in the order of these seven words yields incorrect, yet parseable, English. This also illustrates the differing strengths of humans and computers. While computers can use millions of transistors to make billions of calculations per second, they’re notoriously rigid and intolerant of faults. As humans, we’re not quite as fast at number-crunching, but we can find meaning in all sorts of malformed inputs.
I always laugh when someone refers to a company that develops a physical product, such as a novel kitchen appliance, as being a “non-tech” startup. The work of mechanical, electrical, and civil engineers is no less technical than that of Facebook app developers. I’ll admit my bias, as a degreed mechanical engineer, but if you’ve ever seen the process through which an idea becomes an automobile, you’ll know it’s nothing short of magic. And in our post-Houdini world, much of what we think is magic is actually code. Annotated CAD drawings, terminology like B-Pillar, strict adherence to NTSB standards, and relentless focus on quality are all part of the code that becomes a car. The true accomplishment is that any two cars that roll off an assembly line are remotely similar, much less nearly identical. Those cars are made of thousands of parts sourced from a global supply chain, contain design elements with a legacy older than Henry Ford and younger than Chris Bangle, are assembled by the hands of hundreds of people who (Heaven-forbid) might not have a college degree, and still hold tolerances measured in the thousandths of an inch. Did I mention that these cars operate not in a pristine world of silicon, but in a variety of harsh outdoor environments, and are expected to run consistently on the order of decades with minimal maintenance? Cars are definitely made of code.
What is powerful about our new type of code is the level of expressiveness that it affords us. I can’t manufacture automobiles using football code. While the “Battle Hymn of the Republic” may seem to the contrary, I can’t devise military plans using a Treble Clef. But we can use software code to build time-wasting mobile game apps, and to guide an Earthly vessel to a safe (and spectacular) landing on the planet Mars. Its power lies not in itself, but in us. Code is only as powerful as the human imagination. So my friends, think of all who preceded you in history, who held great ideas yet lacked a truly powerful way to express them globally, instantly. You have a chance, unique to this time in history, to wield a particularly awesome power. So dream big, and use it for good.