Computer programming (often simply programming) is the craft of implementing one or more interrelated abstract algorithms using a particular programming language to produce a concrete computer program. Programming has elements of art, science, mathematics, and engineering.
Main article: programming language
The program written in a particular programming language is then translated into the specific machine language executable by the target computer: programs written in any programming language can be translated into machine language. In some languages, an interpretable p-code binary is generated, rather than machine language. It is also possible for the programmer to write directly in machine code, but this is hardly ever done anymore: instead, when complete low-level control of the target computer is required, programmers resort to assembly language, whose instructions are mnemonic one-to-one transriptions of the corresponding machine language instructions.
Different programming languages support different styles of programming (called programming paradigms), some of which are better suited for a particular task than others. They also require different levels of detail to be handled by the programmer when implementing algorithms, often resulting in a compromise between ease of use and performance.
Main article: software engineering
Creating software involves:
- Recognizing the need for a program to solve a problem.
- Planning the program and selecting the tools (including hardware platforms, languages, databases, browsers, development kits) to solve the problem.
- Writing the program in the programming language of choice.
- Translation: translating the human-readable source code into either machine-readable executable code, which is done by compilers, assemblers or other tools, such as interpreters, which directly execute source languages (such as SQL, and scripting languages) at a higher level than libraries of machine code. In metaprogramming, programs are created which can generate the source code for other programs.
- Testing the program to make sure it works; if not, return to step 3 (see code and fix).
- Documentation, deployment and delivery
These steps are collectively known as software development. The skills required to be an effective programmer include the ability to mentally translate the concepts of the first step into expressions in the target programming language(s).
A revision control system for source code is a valuable resource for a programmer. It facilitates the reversion of changes, and the comparison of different methods used in the code.
Hero of Alexandria in the first century invented automated theatres that used analogue programming to control the puppets, doors, lights, and sound effects.
Ada Lovelace, daughter of Anabella and Lord Byron (the poet), was the first recognised computer programmer. Anabella gave her love of mathematics to Ada, who after meeting Charles Babbage, translated and expanded a description of his analytical engine. Even though Babbage never completed construction of any of his machines, the work that he and Ada did earned her the title of the world's first computer programmer, see Ada Byron's notes on the analytical engine. The Ada programming language is named for her.
One early programmer known to have completed all the steps for unaided computation, including compiling and testing, is Wallace J. Eckert. This man's work predated the rise of computer languages, because he used the language of mathematics to solve astronomical problems. However, all the ingredients were there: he operated a computing laboratory for Columbia University with equipment provided by IBM, complete with a customer service division, and special purpose engineering consultants, in New York City, in the 1930s, using punch cards to hold the intermediate results of his calculations, and then formatting the punch cards to control the printout of the answers, just as in the work for the census decades earlier. He even had debugging techniques such as color coding, cross-footing, verifying and duplicating. One difference between Eckert and today's programmers is that the example of his work influenced the Manhattan project. His work was recognized by astronomers from Yale University Observatory, Princeton University Observatory, U.S. Naval Observatory, Harvard College Observatory, Student's Observatory of the University of California, Ladd Observatory of Brown University and Sproul Observatory of Swarthmore College.
Alan Turing is often considered the father of computer science and, by proxy, of the craft of programming. He was responsible for helping design and program a computer to break the German ENIGMA code during World War II.
- Computer software
- Software engineering
- Software testing
- Software documentation
- Computer science
- List of computer programming terms
- How to Think Like A Computer Scientist by Allen Downey, Ph.D
- Histories of computer programming languages
- Timeline of computer programming language history
- Computer programming humor
- Power Programming methods
- Open Directory catalog for computer programming
- Historic Documents in Computer Science collected by Karl Kleine