Computers have one big problem—they do not comprehend English, nor in fact any other human language. Strictly speaking, the central processing unit (CPU) of a computer only understands its own machine language, the vocabulary of which is given by its instruction set. The machine language of a CPU is extremely rudimentary, of perhaps the same level of sophistication as the limited language of commands used to order a trained dog to perform certain actions like bark, run, fetch, etc. Such a language is simply incapable of expressing the vast majority of concepts, ideas, and abstractions that the human mind in all its ingenuity comes up with.
Therefore, it is not difficult to see why it is necessary for there to be some way in which the concepts and procedures created in the human mind and expressed in human language can be reduced in level to the extremely limited vocabulary of the CPU, so that a machine may carry out the actions the human wishes it to. However, the gulf between human language and machine language is so great that there is no sensible way of bridging it in just one step--it is far more reasonable to try to bridge it in two (or more).
Thus, for the first step, the humans who wish the computer to carry out some task specify, in a clearly phrased and well-defined subset of the human language, what it is exactly that they want it to do. The description thus created should be completely free of ambiguities, errors, and inaccuracies. The description of the task should also state, in a step-wise fashion, a sequence of actions, each of which the computer is capable of performing. Such a well-specified procedure by which the computer is to carry out the desired task is called an algorithm. The word "algorithm' is given in honor of the name of the ancient Arab mathematician Al-Khowarezmi, who, around the year 825 CE, wrote a treatise in Arabic titled Hisab al-jabr w'al muqa-balah, or "The Science of the Union and the Opposition."
This specification in simplified and clear human language of the task to be performed is an important first step. After an algorithm is thus created, it is used by humans (perhaps the same ones, perhaps not) to create a translation into a weaker language called a programming language. There are literally hundreds of programming languages; some that are well known and in current use would be C, C++, Java, Fortran, COBOL, and Pascal. The process of translating an algorithm into programming language is called programming. A programming language is much weaker in its expressive power than mature human language, and has the sophistication of the language used by a very young child. Just as it is not always easy for adults to communicate their ideas clearly to young children, it is not always easy for programmers to translate algorithms into programs. This often makes for many anxious moments and frustrations for programmers and their clients, who may be facing deadlines and other difficulties, or may be be facing competition to bring their software to market ahead of rival products.
After the program is created, it is then necessary to take the final step and convert from the programming language code to the machine langauge code that the computer can directly understand. This final step is typically (in modern programming languages) carried out by specialized software programs called compilers. There are special compilers that convert code from a certain language to machine code for a particular CPU. Compilers are thus specific to the CPU they produce the code for, and it is important for a compiler to be available for a certain CPU, before one can use any programs on it.
Of course, the previous discussion is to some extent an oversimplification, because a programmer does not produce final working code and then compile it all at once: what happens almost always is that some code is produced, then compiled to see if it has any errors (called bugs), and then those bugs are fixed and the code is compiled again--programming is very much a process of incremental improvement rather than huge leaps. Compilers thus also have the role of helping the programmer produce bug-free code; this they do by issuing error messages during compilation that announce that the code has syntactical errors in it (for example, a missed semicolon after an executable statement is an error in the C language); they may also issue warnings, which may mean that while the code may be correct, it may not function exactly the way it was intended to. While it is desirable that the compiler's error and warning messages convey in exact detail what the problem is with the code, in practice it often takes some skill and ingenuity on the part of the programmer to find the exact nature of the problem that is causing a particular error to be returned. For example, a compiler may complain of an error at a certain location in the program while the real problem is elsewhere, hundreds of lines away.
For serious programming, there are other specialized software packages called debuggers, whose sole function is to help the programmer trace errors in the code. Sometimes, such debugging and constant revisions can also help the programmer find and rectify any logic errors in the code as well. A logic error is a statement in programming language that is correct syntactically but conveys an incorrect meaning, or else does not fit in with the purpose it is meant for.
A good programmer should also document the code carefully, i.e., should add suitable comments and explanations throughout the program to clarify for human readers what is being done and why--it is likely as not that the program will have to be updated, corrected, or otherwise modified by others in times to come. Even if the author of the code comes back to it after some months or years, the ideas that were clear in the beginning will no longer be so, and programming language code is typically very hard to read and understand if one doesn't already have a good idea of what's in it. Other than documenting, other concepts like structured programming are often mentioned as good programming practices. The great computer scientist Donald Knuth, Professor Emeritus of The Art of Computer Programming at Stanford University, wrote a famous book called The Art of Computer Programming in three volumes totaling over 2,000 pages; he is presently working on more volumes and revising existing ones.
This is the complete article, containing 1,081 words
(approx. 4 pages at 300 words per page).