He doesn’t seem to understand programmers must learn English — Quartz
Tim Cook, the CEO of Apple, thinks kids around the world should learn to code instead of studying English as a second language. That is a mistake, because it’s very difficult to become a good or even decent programmer without working knowledge of English.
“If I were a French student and I were 10 years old, I think it would be more important to learn coding than English,” Cook told French news outlet Konbini. By making that statement, the CEO of the world’s largest tech company is expressing a common misconception about programming: that it is about speaking to computers in some obscure machine language a la The Matrix, and has nothing to do with humans. It is not at all the case.
As any good programmer knows, coding is about human language just as much, if not more, than computer language. And in the world of code, no human language is even remotely close to English in importance.
The art of naming things in code
Why are human languages important when we are just talking to computers? One example is the subtle art of naming variables.
In a computer program, you usually need to store some value in a way that is memorable and easily accessible. So instead of typing
3.14159265 every time you need to use pi, you can just say
pi = 3.14159265, and from then on refer to it simply as
pi. Great. Easy. But usually the appropriate name is not nearly so obvious—google “how to name variables” and you will find that programmers have spent a tremendous amount of time thinking about this seemingly basic task.
Novice programmers tend to use variable names that are mysterious and unhelpful. Let’s say we are making a simple quiz, and we want to give people some feedback on their score. We need to figure out what percentage of questions they got right, and give them a letter grade (A, B, C, etc.) based on that percentage. A bad programmer might write a function to do all of these calculations and call it
process_quiz_score. But “process” could mean just about anything. If somebody else looks at this function, or if the original author comes back to it after a few months, it will be a total mystery what
process_quiz_score does. Is it saving the score somewhere? Manipulating it? Checking the answers? Who knows.
A good programmer would write three functions: one called
generate_score_results that then uses the sub-functions
pct_to_letter. Based only on the names, we know that
generate_score_results will return some results—with “process” this was unclear—and our other two helper functions have clear roles in doing that.
Of course, none of this matters if the programmer in question doesn’t know the difference between the English words “process” and “generate,” or why the first example is vague. That goes for both writing code and reading other people’s code. Plus, while naming is important, it is in fact one of the least (human) language-intensive tasks a programmer does. Nearly all code benefits from documentation that lays out in plain language how it works and what it does, and from comments within the actual codebase to explain a complicated section or an unconventional choice that the author made.
English is the programming language
If programming requires knowledge of human languages, then the main language to know is, without question, English. The codebases for nearly every major programming language, library and API are written with variable names, comments, and documentation in English. If a coder is stuck on a tricky problem, the best way to get help is to search in English or post questions in English. Then there is the fact that big tech companies, Apple included, have employees from all over the world, who usually communicate in the lingua franca of English. The best way to become is a good programmer is to read good code, and to read the best code in the world, you have to know English.
Great programmers are not cyborgs who have uploaded their brains to the cloud or unlocked the language of computers. They are just clear thinkers who write code that is easily understood by other humans, and by their future selves. That is what makes for a program that is stable and easily maintained into the future. And the best way to do that is to first learn, well, English.