Closely related to my last post, I’ve been thinking a lot about the subtle differences between coding, programming, and computer science. Are these not interchangeable, you say? Well, yes, to some extent: their functions definitely overlap and colloquially they are often used as loose synonyms. I am not trying to be a stickler about definitions, but I do think that treating them as interchangeable belies the subtle differences among them– and that is quite significant in how we think about what to teach and what to learn with regards to programming. I would argue that despite the fact that it seems like everybody is talking about learning programming these days, many are really talking about coding– only a select few, those that are actually developers or CS educators, are truly talking about programming and or CS.
The point of the post though, is that we should aim to teach all three components. Programming logic is, perhaps, even more valuable than knowing the right coding syntax.
Strictly speaking, coding is only the latter part of programming, it is “the step that expresses an algorithm as a computer program in a programming language ,” after the algorithm has been designed. Obviously, I do believe that coding is inseparable to the heart of programming, but it seems that most of the hype around ‘programming’ is in fact somewhat misunderstood– and the people talking about ‘learning to code’ seem to believe that learning the syntax of a programming language is synonymous to learning to program.
More often than not, they only see the language element of coding, i.e. the part about translating content into text. For them, learning to code is likened to learning another language– they see the difficulties primarily in the syntax. This is why journalists often bundle CSS/HTML/Wordpress themes together with languages ranging from Python to Objective-C, even though CSS/HTML are descriptive and not focused on algorithm design. CSS/HTML in fact do qualify as coding– but they really are not programming.
Codecademy, for example, is supremely frustrating because its execution is so reliant on syntax, and only teaches you the logic/concepts behind them in a very truncated fashion.
Of course, you cannot teach coding without teaching some programming too, but what I mean is that the emphasis of this hype tends to be weighted more in favor of understanding syntax than understanding what you can build with a program and how to best achieve that. There are some geniuses that get it intuitively just by learning syntax and structure, but most do not, and teaching people to code without teaching them to program will result in a lot !@#$%^.
The problem with likening learning to code or program to learning a (verbal) language is that it belies how unfamiliar most of us are with the style of logic and thinking that is required in programming. Most people in fact do speak a language, of some sort, when they start to learn a foreign language– so really they are not starting from scratch in terms of the cognitive style and functions that are involved in expressing yourself through language. Yes, there are differences in grammar and usage– but let’s face it, it’s still a language! And you have been speaking and writing your whole life!
Learning to program is different: it is venturing into a different realm of thinking, and if you truly try to build something meaningful, you quickly realize both how powerful and dumb computer programs can be. They are only as powerful as you design them– and they are powerful in a way that is mechanical and predictable. They can do everything that you tell it to do with ridiculous speed, but you must be the one that tell them what to do– the successful design of which is often the most challenging part of the job. Even though the structure can get very complex, that particular quality about programming is the same. With programming, you can never assume the leap of logic as you could with a human, you must be the one to tell it in discrete steps and logical sequence, what you want it to do.
I think the reason why so many people lose interest in coding as a self-learning initiative is that it really takes a good CS teacher or education source to get at that part of the picture (or if you are just so good yourself to begin with). It is okay to do syntax for a while– but if you don’t really understand what you can do with it meaningfully, why would you bother?
Again,I am not trying to enforce a strict categorization here. If you are near the heart of programming, you are probably also not that far away from some good hearty computer science. I don’t think I am nearly experienced enough in the topic to pretend to know deep truths about CS beyond programming. But to throw a cheap metaphor around (extending my painting theme last time), if a program were a single painting, I guess CS would be the wider world of art. Really, it’s just all about being meta– whether in the technical sense or in your thinking. I am a strong believer in the fact that CS trains your logic in a way that is different from most of the disciplines that we are in touch with.
How can you call yourself a scientist of anything, if you don’t think like one, right?