Coding is NOT the new literacy
Coding is the new literacy. Every time I hear this my fallacy sense tingles. I wasn’t sure why until it became clear that this was a job for reasoning from First Principles. I’ve realized this is another faulty reasoning by analogy which can be resolved with some first principles reasoning. Coding is the new literacy is a disguised metaphor. While coding reminds us of reading, the fundamental properties are very different. Let’s look at the differences.
Learning to read is relatively easy to master.
Assuming you want to become literate in your native tongue, learning to read and write is fairly quick and straightforward. Of course you can always improve beyond primary school education but those improvements are refinements. What’s more, the grammar of your language doesn’t change that quickly. Occasionally, you might notice evolutionary pressure on your language such as how Americans are systematically dropping -ly from their adverbs to the point where future generations might not notice the problem with phrases like “think different” but these changes take very long to propagate. On the contrary, I’m still learning the subtleties of Javascript after years of working with it and it feels like every year new features are added. There’s even a popular book series titled You Don’t Know JS dedicated to tackling the pervasive confusion over what should be a simple scripting language.
2. Coding is very hard and taxing on the soul. People who are passionate about it are willing to put up with that tax.
Learning to program is excruciatingly frustrating and difficult. The first battle is setting up your environment. Here you have to make many choices on operating system, IDE, build tools. Each presents its own difficulties and may even shape which programming language you choose to minimize setup fatigue.
Assuming you find a good tutorial in the language you want to start with (big assumption), you begin to find that nothing you write works. Or worse, it runs but produces output you didn’t expect. For instance, after successfully compiling and running a snippet of tutorial code, you change it slightly to experiment and everything breaks. Days later you learn from a vague stackoverflow page that your problem has something to do with closures (whatever those are). Fortified with new knowledge and a willingness to slay your code demon, you take to the internet to research closures like a wizard going into the archives to seek more powerful spells:
A closure is an inner function that has access to the outer (enclosing) function’s variables — scope chain. The closure has three scope chains: it has access to its own scope (variables defined between its curly brackets), it has access to the outer function’s variables, and it has access to the global variables.
After reading that, you give up and cry.
Learning to code is a journey in personal failure. There are lots of cliches flying around about how failure is the best teacher. Programmers live these cliches 10 times a day. In fact, the way I’d define a programmer is:
Programmer /ˈprəʊɡramə/ (n): a person who produces digital complexity by leveraging personal failure.
Only irrational passion can get you through all that failure with a desire to write yet another app. Only a special kind of stoicism can allow you to make peace with words like debugging which embody the fact that most of the code you write is probably garbage.
3. Being multilingual is a starting point in programming.
No one ever just learns one programming language. At least not if you’re interested in pursuing coding as something serious. You can get by in life quite well if you only ever become literate in one human language (especially if it’s a major one like English). Software employers always seem to expect you to know a dizzying array of technologies.
Besides the demands in the workplace, learning multiple programming languages and dipping into different programming paradigms makes you better in the languages you already know by enabling you to borrow concepts. Not only must you learn these languages, you must learn when they’re appropriate and when they’re not. Interested in performance? Probably C. Want an Android app? Java. Want an iOS app? Objective C or Swift. What if you want your app to be both Android and iOS? Well then you have to choose between a wrapped javascript app in ionic or something that targets multiple platforms such as C# with Xamarin. What if your app needs a database? Well if data integrity is important, I’d recommend a relational database such as MySql. Oh, you already use a .Net stack? Then you better use SqlServer and Entity Framework. Oh you want to be able to dump amorphous blobs of data? Then you’re best off with Mongo (you can write Mongo queries right?). Oh it’s actually mobile? Then try Sqlite. Remember to manage deadlocks in Sqlite because it doesn’t automatically handle concurrent connections. Don’t know what deadlocks are? Remember locks and mutexes from computer science? You should definitely know some computer science if you want to code. Did nobody warn you?
4. Coding isn’t like reading. It’s a tool of production.
Consumer sovereignty means that pressure is always being put onto programmers to make software more accessible to the public. Hence the rise of UX and HCI as disciplines in and of themselves. What’s more, if you have to design a new programming tool or language, it better be more appealing than the previous tool people were using. Going from Java to C#, from C# to F#, from Javascript to Typescript, these are the advances that broaden and excite the coding audience. I feel as though this sudden urge to get more programmers is putting the cart before the horse. What’s needed is what is already happening: making coding more appealing to more people so that more workers are able to use the tools of software production.
5. Imagine writing a novel that both your work colleague and your dog can understand.
Writing code isn’t about writing instructions that a machine can understand. It’s about writing instructions that both a machine understands whilst communicating ideas to other people. Your code must explain itself to anyone else who reads it (including a future version of you). This can be quite the juggling act and often you’re forced to weigh up performance vs readability. Consider these 2 (very contrived) equivalent blocks of code:
//version 1: inline and obtuseint getKey(name){
return name=="fred"?2335:(name=="dorothy"?1356:(name=="alice"?5555:0));
}//version 2: multiline and transparent
int getKey(string name){
switch(name)
{
case "fred": return 2335;
case "dorothy": return 1356;
case "alice": return 5555;
default: return 0;
}
}
I’m willing to bet you won’t need to run your finger over the screen to get a clear sense for what version 2 is doing because you won’t be maintaining a mental stack of parentheses.
Why you SHOULD learn to code
If you love the idea of coding but you fear the mountain ahead or perhaps fear all the things I just outlined, then you should still go ahead and learn to code. The one thing that should not stop you is fear of failure, fear of sucking compared to other people, fear of being too old, fear of being too young or imposter syndrome.
Imposter syndrome doesn’t go away. Coding enlightenment is realizing that we’re all imposters. If you go into a professional software company and watch the developers, you won’t find people smashing keyboards at dizzying speeds while green writing flows down their screen like in the Matrix. You’ll mostly find a bunch of people looking intently at their screens and comparing their code to 5 open tabs of stackoverflow and occasionally copying and pasting some text from one screen to another. Sometimes they may even type something. On closer inspection, one of the open tabs is 9gag (or so I’ve heard from a friend).
So stop comparing yourself to anyone else. The only question you have to ask yourself is “Does this excite me? Does it make me come alive?” I remember when I was 4 and my older brother and his friend were allowing me to hang out with them. We were at the friend’s house and he turned on a computer to play some DOS game from the late 80s. I was spellbound. I was transfixed. I can still remember that surge, that awe at technology before me. It was like I was just given a dose of crack, psilocybin and meth. I knew these thoughts only: I wanted to play this game, I wanted to make this game and I wanted to know everything about this magical machine before me. When I was finally given the opportunity to learn to program I let it consume me like the symbiote from Spiderman. I have many passions but there’s no other way I’d want to make a living than through programming. If you can relate to this experience in some way then it doesn’t matter if you suck at coding or know nothing about it. If you’re a coding crack addict then no obstacle, ego or disappointment will stop you from getting your next fix.
If your driving force to learn to code is because “coding pays well” or “I want to be like Mark Zuckerberg” then you have to realize that you’ll be competing in the job market with those coding crack addicts I just mentioned. Good luck with that.
Conclusion: coding is nothing less than a passion
Don’t ask yourself what the world needs. Ask yourself what makes you come alive and then go do that. Because what the world needs is more people who have come alive. — Howard Thurman
So if you read statements like “everyone should learn to code” and your heart sinks at the idea of participating in the weird world of programming, listen to that feeling. There are more than enough people in the world who are passionate about programming that it doesn’t need people who feel like they’ve been compelled. You’re not a luddite if you don’t learn to code; you’re an individual with your own desires. Remember, the job of the professional coder isn’t to make the world harder for non-coders until everyone has to learn a programming language. It’s precisely the opposite. So enjoy your life in whatever vocation makes you happy and appreciate the increasingly accessible software that coding crack addicts are working tirelessly to produce for you.
Programming makes me and many others like me come alive. Go find something that makes you come alive and do that. And the next time you come across a clickbait headline about coding being literacy for the 21st century, keep scrolling.