What is code?
FROM lifts to cars to airliners to smartphones, modern civilisation is powered by software, the digital instructions that allow computers, and the devices they control, to perform calculations and respond to their surroundings. How did that software get there? Someone had to write it. But code, the sequences of symbols painstakingly created by programmers, is not quite the same as software, the sequences of instructions that computers execute. So what exactly is it?
Coding, or programming, is a way of writing instructions for computers that bridges the gap between how humans like to express themselves and how computers actually work. Programming languages, of which there are hundreds, cannot generally be executed by computers directly. Instead, programs written in a particular “high level” language such as C++, Python or Java are translated by a special piece of software (a compiler or an interpreter) into low-level instructions which a computer can actually run. In some cases programmers write software in low-level instructions directly, but this is fiddly. It is usually much easier to use a high-level programming language, because such languages make it easier to express complex, abstract ideas or commands efficiently and accurately; they also absolve programmers from having to worry about tedious details relating to the innards of the particular computer on which the program will eventually run. A program written in a high-level language can therefore be made to run on all sorts of different computers.
写代码也叫编程，它是一种为计算机编写指令的方式，它为人们喜欢表达自己的方式与计算机实际运行方式之间的鸿沟搭建了一座桥梁。编程语言有上百种之多，它们通常是不能够被计算机直接执行的。相反，用某种特殊的“高等级”语言，如C⁺⁺, Python或者是Java 写出来的程序，能够被软件的某一特殊部分（一种编译器或者一种解释器）转化成计算机能够实际运行的低等级指令。有时，程序员会直接使用低等级指令编写软件。但是，这太难了。通常来说，使用一种高等级编程语言要容易得多。因为，这样的语言能够让表达复杂、抽象的思想或高效准确地指令变得更容易；它们还能够让程序员从不得不为涉及程序最终要在其上运行的某些特殊类型计算机的内部结构的繁琐细节而操心中解脱出来。因而，一个用某种高等级语言写出来的程序能够在所有不同类型的计算机上运行。
Programming languages exist in many families and styles, rather like human languages. There are many dialects of C, for example; there are families of “functional” programming languages; and there are languages optimised for “parallel processing” (where several programs run alongside each other to accomplish a particular task, such as image processing or weather forecasting). As with human languages, these programming languages are all capable of expressing the same ideas, and in theory any program can be written in any language. But in practice some languages are better suited to some uses than others, just as French is traditionally used for diplomacy and English is the international language of business. And just as knowing a few different spoken languages makes it easier to learn another one, the same is true of programming languages. Once you understand common features (loops, recursion, conditionals, regular expressions and so on) you can usually pick up a new language quickly, particularly if it's reasonably close to another language you already know.
Writing a program and then running it is magic, in a way. The numbers, letters and symbols of code are transmuted into instructions executed by microscopic circuits to achieve the desired results. Pixels appear on the screen; lifts move; airline tickets are ordered; lists are sorted; e-mails are delivered. But just because the results seem magical does not mean that coding is mysterious and inaccessible. Indeed, one of the joys of coding is that computers are the opposite of mysterious: they operate in an unforgivingly predictable, consistent and deterministic manner. Most people do not need to be able to write code to do their jobs, any more than they need to be able to speak foreign languages or do algebra. But it is useful to have some basic experience in coding, and not just to demystify how computers work. As Marc Andreessen, the co-creator of the Netscape web browser, likes to say, in future there will be two kinds of jobs: those that involve telling computers what to do, and those that involve being told what to do by computers. Worried that your job is in danger of being automated away by software? Learning to code could be a useful insurance policy. Even if you're not, it can also be fun.