Dumb - that's the only word to describe computers, because they know only two things: zero and one. But they manipulate those bits so quickly, they can accomplish useful tasks. In fact, some early computers were programmed by setting sequences of ones and zeros on front-panel switches.
That's clearly the low point in user-friendliness and inefficiency. Programming languages were created to give us humans a chance to understand what it was we were telling the computer to do.
Programming languages incorporate several important ideas. They abstract operations into a form that's more like the way people think, which makes programming easier. To divide one number by another is a simple concept that we express in a couple of symbols, but to a computer, that same task takes dozens of small operations.
In addition, programming languages let us give meaningful names to things like variables and constants, which makes programs easier to create, understand and troubleshoot.
At the lowest level, the zeros and ones of machine code aren't really a language at all. The earliest true language was assembler, and it was different for each type of computer. Assembler used abbreviations for common operations (such as ADD, MOV, JMP), with each followed by the address of one or more parameters. Recognizable names replaced numerical addresses, and the resulting programs were far easier to work with. Assembler is called a low-level language because it gives complete access to a computer's basic instructions. It's still used for some routines when it can produce more efficient code than other languages.
But how could you make a program run on two different computers? You would have to reprogram it for the second machine's instructions. The answer was a higher-level language that could be adapted to different computers by processing the application code through another program, known as a compiler, which translated the application into machine code and stored it as a file. Or it could be done through an interpreter, which did the same job as a compiler on the fly and then ran the program without storing it. The compiler or interpreter was specific to each computer type, but it needed to be created only once and could then process many programs written in the high-level language. The first important language like this was Fortran (short for "Formula Translation"), which is still used by scientists and engineers.
Thousands of programming languages have been devised, but only a few are in common use. Various organizing principles underlie these languages:
• To simplify and streamline the handling of specific types of information, such as strings of characters (Snobol), matrices (APL), logical expressions (ProLog) or databases (SQL).
• To facilitate certain styles of programming, including programs that nonprogrammers could hopefully understand (Cobol, Basic), very large programs (Ada), object-oriented programming (Eiffel, C++, Java, SmallTalk) and visual programming, where the user relates icons to one another and uses property sheets to describe their interaction (Salsa, Visual Basic, Visual C++).
• To simulate a theoretical or real-world situation involving random events (Simula, GPSS).
In addition, languages can be described as procedural (executing in a given order, depending on the data), event-driven (they sit there until something happens and then respond) or cyclical (repeatedly executing a fixed cycle of operations).
Many programming languages are now historical footnotes (Algol). Others are strongly identified with specific areas: business (Cobol, RPG), computer science and artificial intelligence (Lisp, ProLog), teaching how to program (Basic, Pascal), systems software (C, C++), the Web (HTML, Perl, Tcl) and publishing (SGML, PostScript).
Programs aren't necessarily restricted to a single language. Most large programs incorporate routines, libraries, functions and other types of program segments that have been created using different languages. In fact, it isn't necessary to know what that original language was.
Finally, the Web has sparked a whole new spectrum of programming languages. HTML and Java are the universal languages of the Web. Tcl is the underlying language for www.computerworld.com. Java was developed for the Internet, and Microsoft has announced its newest language, C#.