#24 On forcing kids to learn to code
Teaching kids to write code has been a topic of intense debate for the past decade or so. So much so, that some countries have made it a part of the middle school curriculum. After a blockbuster acquisition of a seemingly dubious startup in the space, there is a gold rush in India with people leaving their jobs to create companies to teach kids to code. Parents do not want their kids to miss on the learning to code bandwagon. Even Japanese snack companies are trying to use a teaching code hook.
Why even bother
Coding for some might seem like a natural extension of non-technical jobs that use Excel, SQL, or some form of automation. Automation in Excel can get out of hand and sometimes need a full-fledged programming language. SQL queries by analysts can become so complex and time-consuming to maintain over time that you would wish if only there was a better way to deal with the data task at hand.
Some people argue that teaching kids to code has an ulterior motive of training them for a new digital work-life from such a young age. It is strange since this drives most decisions that parents make on the behalf of their kids. The reason that most liberal art departments in colleges are dying is not that suddenly no one wants to learn literature, music, and arts and everyone wants to study STEM. The problem lies in a struggle to get high-paying jobs with such education. Every job description, CV, certification is being repackaged as something that involves tech or requires at least analytical tech skills like Excel programming, Tableau, and SQL. In such a scenario, I guess parents are right in introducing their kids to this new experience of coding, comparable to an introduction to music, books, math, etc. Though it is bad to force it on them once they realize that there is zero interest even after spending some time. No hobby or job is for everyone, after all.
The perils of standardization
With every passing decade, the world is getting more homogeneous. Everyone can be described with the same set of words. Everyone is a traveler, reads the same books discovered via the same sources like Goodreads, watches the same stuff online, listens to the same recommended music. And yet we all pretend to ourselves that we are offbeat. School-level programming education is another such standardization.
Coding is not a survival skill. Compare it with speaking, reasoning, common sense, finding food and you realize you cannot put it in the same bucket. Yet most kids that are privileged enough will get to learn the basics of programming even if they do not like it. It will be like school-level math.
What to teach?
What does coding actually teach? Apart from the syntactical sugar and the app/game dev stuff, coding teaches breaking down of complex problems into simpler stuff, the power of abstractions after one has been doing it for some time, a lot of persistence with debugging stuff when things do not go as we expect and problem-solving in general with a vague idea of how to proceed and with limited tools at our disposal. Most of these skills are transferable and can be used in real life. Sadly, a lot of present-day teaching to code is focused on jargon and language constructs, even with visual programming languages out there.
One of the important problems with coding curriculum design is the amount of emphasis on computer science-y stuff like algorithms. I remember back when I was a 17-year-old kid in college, I along with a friend participated in a competition where we had to train robots that would fight in a simulated environment. Everyone would code their robots, upload, and then the system would match robots and then update scores based on the result. The coolest part was there was a visualizer where you could actually see video representation of the fight and what went wrong so that you could improve and upload again. We started with basic hard-coded robots, adding in our own heuristics over time. When all these did not work, we were forced to find and read existing AI research and came to know about various algorithms. It came naturally, with nobody forcing us to read anything. I sometimes joke that an arena-style competition with standardized physical programmable robots is the ultimate solution that can determine if a kid is interested in coding. Parents would just need to invest in buying the robot from Amazon and getting the kid started with deployment and let them figure out if this interests them.
Would coding be a relevant skill 20 years from now?
The primary assumption with teaching a 7-year-old kid to code is that coding in its present form would be an essential thing 20 years down the line. We are betting a lot on this assumption. Coding would still be a huge thing but at a higher level of abstraction for most common tasks. Mobile apps, common business process automation applications would benefit the most from the no/low code solutions that are expected to be much more refined in the future. Automated code generation using deep learning would be more pleasant two decades from now.
The how to teach debate
Another point of contention among people is the best way to introduce kids to programming. It is almost universal that a graphical, interactive way is the best for the majority of kids - with suggestions ranging from visual programming languages like Scratch to teaching interactive web development with HTML and Javascript, to creating (and modding) 2D games which can be of interest to kids who love playing computer games.
Back when I was a kid in the 3rd grade or so, I found Logo and BASIC to be quite boring, to be honest. Once I was in 6th grade, I got hooked on Javascript and HTML, making gaudy websites. It was not until I discovered a C programming book of a sibling that I started to write serious programs. I learned Python because I needed to find an easy way to automate a lot of HTTP requests in a short amount of time (I was stupid) and I found the C way quite tedious. For a considerable amount of time, I also dabbled in competitive programming, where you used algorithmic skills to solve problems with automated grading of your solution. I particularly liked the longer format contests where you had a week or more to research and try out coding solutions evaluating tradeoffs like time complexity versus solution accuracy and more.
A self-motivated kid today has an order of magnitude more options than what I had back then. Starting from Scratch to Freecodecamp to Youtube, Code.org, and more. Parents need to be driven enough to spend a couple of hours researching these options and introducing them to their kids, free of cost.