/writing
Why Learn To Code
essay
Every kid should learn to code for the same reason every kid should learn to read. The claim that any adult can pick it up understates how much theory-building the craft takes.
I originally wrote this in 2015 for my computer science education school, so there may be some unaccounted cultural shifts in here.
Learning to write computer programs teaches structural thinking and builds useful problem-solving skills. However, there is a growing movement insisting that everyone should learn coding, which I don't entirely agree with.
What is coding?#
Coding is the popular vernacular for software development or simply programming, which is the applied side of computer science. Computer science is the study of algorithms - step-by-step processes - while programming is a more fuzzy art of producing algorithms that exist in a machine-readable format. For example, the program below is an algorithm to print all the factors of a given number n:
n = 7438
for factor in 2 ... n - 1 {
if n % factor == 0 {
print(factor)
}
}
Algorithms are often referred to as "code" because to an outsider, since they appear indecipherable like a coded message might seem. To one who understands computer science, understanding code is more than simply understanding the combinations of text and punctuation. Code is the means by which a sequence of steps can be precisely expressed.
Programming as theory building#
Computer science is a theory, in the sense of Gilbert Ryle's "Concept of Mind". Ryle's notion of theory is that a person who possesses a theory knows not only how to perform certain applications of the theory, but also how to support those applications with explanations and justifications. In my actual experience of software programming, it is certainly an activity which rewards those who can explain and justify the code they write.
Ryle's notion of intelligent behavior is the ability to do certain things, like catching a fish or understanding a joke. The level of intelligence is determined by a subjective analysis of how effective one's performance is in accomplishing that thing, and by how well one can identify errors in the performance and learn from the examples of others.
Ryle goes on to characterize intellectual activity as that where the individual builds a theory: the underlying knowledge to do something, to explain it, to answer questions about it, and to form cohesive arguments about its effectiveness. Writing the code is the visible part, while the theory is what lets you defend it.
Every kid should learn to code#
This claim I do agree with, and my reasoning is the same as the reasoning behind "every kid should be literate". Kids who can read and think critically about what they read are more likely to positively contribute to society. Kids who are "coding literate" can understand how technology is used to solve modern-day problems, which gives them the opportunity to be producers rather than merely consumers of it.
Not every coding-literate kid will become a professional programmer, just like every literate kid doesn't grow up to become a professional writer. Being coding literate from an early age simply opens that door, since it wires their brain from a young age to think critically and break problems into step-by-step algorithms.
Every adult has the ability to learn coding#
This is the same as saying "every adult has the ability to learn brain surgery". Any person willing to put seven years into learning the intricacies of the human brain and the medical knowledge required to operate on it will become a brain surgeon. But most adults are not willing to put in the substantially lower time requirement to learn programming thoroughly. Most adults scratch the surface of computer science without exploring its depths, and call themselves programmers. It is akin to someone who reads Wikipedia articles on brain surgery calling themselves a neurosurgeon.
The honest reality is that learning programming as an adult is really hard. I'm sure there are some Will-Hunting-esque savants out there who pick up coding in a month, but for everyone else it takes years of sustained practice to build the theory Ryle describes. Anyone can start, and starting is worth it. Just don't confuse starting with arriving.
cd /writingMost adults scratch the surface of computer science without exploring its depths, and call themselves programmers. It is akin to someone who reads Wikipedia articles on brain surgery calling themselves a neurosurgeon.