From Wikipedia, the free encyclopedia
A computer program is a collection of instructions that describe a task, or set of tasks, to be carried out by a computer.
The term computer program may refer to source code, written in a programming language, or to the executable form of this code. Computer programs are also known as software, applications programs, system software or simply programs.
The source code of most computer programs consists of a list of instructions that explicitly implement an algorithm (known as an imperative programming style); in another form (known as declarative programming) the characteristics of the required information are specified and the method used to obtain the results, if any, is left to the platform.
Computer programs are often written by people known as computer programmers, but may also be generated by other programs.
Commercial computer programs aimed at end-users are commonly referred to as application software by the computer industry, as these programs are focused on the functionality of what the computer is being used for (its application), as opposed to being focused on system-level functinality (for example, as the Windows operating system software is). In practice, colloquially, both application software and system software may correctly be referred to as programs, as may be the more esoteric firmwaresoftware firmly built into an embedded system. Programs that execute on the hardware are a set of instructions in a format understandable by the instruction set of the computer's main processor, which cause specific other instructions to execute or perform a simple computation like addition. But computers process millions of such per second and that is the program, the sequence of instructions strung together such that when executed, they do something useful, and usually repeatable and reliable.
For differences in the usage of the spellings program and programme, see American and British English spelling differences.
A computer program is loaded into memory (usually by the operating system) and then executed ("run"), instruction by instruction, until termination, either with success or through software or hardware error.
Before a computer can execute any sort of program (including the operating system, itself a program) the computer hardware must be initialized. This initialization is done in modern PCs by a piece of software stored on programmable memory chips installed by the manufacturer, called the BIOS. The BIOS will attempt to initialize the boot sequence, making the computer ready for higher-level program execution.
Programs vs. data
The executable form of a program (that is, usually object code) is often treated as being different from the data the program operates on. In some cases this distinction is blurred with programs creating, or modifying, data, which is subsequently executed as part of the same program (this is a common occurrence for programs written in Lisp), see self-modifying code.
A program is likely to contain a variety of data structures and a variety of different algorithms to operate on them.
Creating a computer program is the iterative process of writing new source code or modifying existing source code, followed by testing, analyzing and refining this code. A person who practices this skill is referred to as a computer programmer or software developer. The sometimes lengthy process of computer programming is now referred to as "software development" or software engineering. The latter becoming more popular due to the increasing maturity of the discipline. (see Debate over who is a software engineer)
Two other forms of modern day approaches are team programming where each member of the group has equal say in the development process except for one person who guides the group through discrepancies. These groups tend to be around 10 people to keep the group manageable. The second form is referred to as "peer programming" or pair programming.
See Process and methodology for the different aspects of modern day computer programming.
The world's shortest useful program is usually agreed upon to be the utility cont/rerun used on the old operating system CP/M. It was 2 bytes long (JMP 100), jumping to the start position of the program that had previously been run and so restarting the program, in memory, without loading it from the much slower disks of the 1980's.
According to the International Obfuscated C Code Contest, the world's smallest "program" consisted of a file containing zero bytes, which when run output zero bytes to the screen (also making it the world's smallest self-replicating program). This "program" was qualified as such only due to a flaw in the language of the contest rules, which were soon after modified to require the program to be greater than zero bytes.
Ada Lovelace wrote a set of notes specifying in complete detail a method for calculating Bernoulli numbers with the Analytical Engine described by Charles Babbage. This is recognized as the world's first computer program and she is recognised as the world's first computer programmer by historians.
- Definition of Program @ Webopedia
- Definition of Computer program @ Agtivity
- Definition of Software @ FOLDOC