<<

Programming

Computer programming is the iterative process of writing or editing . Editing source code involves testing, analyzing, and refining, and sometimes coordinating with other programmers on a jointly developed program. A person who practices this skill is referred to as a programmer, developer or coder. The sometimes lengthy process of is usually referred to as . The term is becoming popular as the process is seen as an engineering discipline. Paradigms

Computer programs can be categorized by the paradigm used to produce them. Two of the main paradigms are imperative and declarative.

Programs written using an imperative language specify an using declarations, expressions, and statements. A declaration couples a variable name to a datatype. For example: var x: integer; . An expression yields a value. For example: 2 + 2 yields 4. Finally, a statement might assign an expression to a variable or use the value of a variable to alter the program's . For example: x := 2 + 2; if x = 4 then do_something(); One criticism of imperative languages is the side effect of an assignment statement on a class of variables called non-local variables.

Programs written using a declarative language specify the properties that have to be met by the output. They do not specify details expressed in terms of the control flow of the executing machine but of the mathematical relations between the declared objects and their properties. Two broad categories of declarative languages are functional languages and logical languages. The principle behind functional languages (like Haskell) is to not allow side effects, which makes it easier to reason about programs like mathematical functions. The principle behind logical languages (like ) is to define the problem to be solved ² the goal ² and leave the detailed solution to the Prolog system itself. The goal is defined by providing a list of subgoals. Then each subgoal is defined by further providing a list of its subgoals, etc. If a path of subgoals fails to find a solution, then that subgoal is backtracked and another path is systematically attempted.

The in which a program is created may be textual or visual. In a visual language program, elements are graphically manipulated rather than textually specified. Compilation or interpretation

A in the form of a human-readable, computer programming language is called source code. Source code may be converted into an image by a or executed immediately with the aid of an . Either compiled or interpreted programs might be executed in a batch process without human interaction, but interpreted programs allow a user to type commands in an interactive session. In this case the programs are the separate commands, whose is chained together. When a language is used to give commands to a software application (such as a shell) it is called a .

Compiled computer programs are commonly referred to as , binary images, or simply as binaries ² a reference to the binary used to store the executable code. are used to translate source code from a programming language into either or . Object code needs further processing to become machine code, and machine code is the 's native code, ready for execution.

Interpreted computer programs -in a batch or interactive session- are either decoded and then immediately executed or are decoded into some efficient intermediate representation for future execution. BASIC, , and Python are examples of immediately executed computer programs. Alternatively, computer programs are compiled ahead of time and stored as a machine independent code called . Bytecode is then executed upon request by an interpreter called a .

The main disadvantage of interpreters is computer programs run slower than if compiled. Interpreting code is slower than running the compiled version because the interpreter must decode each statement each time it is loaded and then perform the desired action. On the other hand, software development may be quicker using an interpreter because testing is immediate when the compilation step is omitted. Another disadvantage of interpreters is the interpreter must be present on the computer at the time the computer program is executed. By contrast, compiled computer programs need not have the compiler present at the time of execution.

No properties of a programming language require it to be exclusively compiled or exclusively interpreted. The categorization usually reflects the most popular method of language execution. For example, BASIC is thought of as an interpreted language and a , despite the existence of BASIC compilers and C interpreters. Some systems use Just-in-time compilation (JIT) whereby sections of the source are compiled 'on the fly' and stored for subsequent executions. Self-modifying programs

A computer program in execution is normally treated as being different from the the program operates on. However, in some cases this distinction is blurred when a computer program modifies itself. The modified computer program is subsequently executed as part of the same program. Self-modifying code is possible for programs written in Machine code, , Lisp, C, COBOL, PL/1, Prolog and (the feature) among others.

Computer software

Computer software, or just software, is the collection of computer programs and related data that provide the instructions telling a computer what to do. The term was coined to contrast to the old term hardware (meaning physical devices). In contrast to hardware, software is intangible, meaning it "cannot be touched". Software is also sometimes used in a more narrow sense, meaning application software only. Sometimes the term includes data that has not traditionally been associated with , such as film, tapes and records.

Examples of computer software include:

y Application software includes end-user applications of computers such as word processors or Video games, and ERP software for groups of users. y controls and co-ordinates distributed systems. y Programming languages define the syntax and sematics of computer programs. For example, many mature banking applications were written in the COBOL language, originally invented in 1959. Newer applications are often written in more modern programming languages. y System software includes operating systems, which govern resources. Today large applications running on remote machines such as Websites are considered to be system software, because the end- is generally through a Graphical user interface (GUI), such as a browser. y Testware is software for testing hardware or a software package. y Firmware is low-level software often stored on electrically programmable memory devices. Firmware is given its name because it is treated like hardware and run ("executed") by other software programs. y Shrinkware is the older name given to consumer bought software, because it was often sold in reatail stores in a shrinkwrapped box. y Device drivers control parts of computers such as disk drives, printers, CD drives, or computer monitors. y Programming tools help conduct computing tasks in any category listed above. For programmers, these could be tools for debugging, or reverse engineering older legacy systems in order to check source code compatibility. History

The first theory about software was proposed by Alan Turing in his 1935 essay Computable numbers with an application to the Entscheidungsproblem (Decision problem). Paul Niquette claims to have coined the term "software" in this sense in 1953, and first used in print by John W. Tukey in 1958. The academic fields studying software are and software engineering.

The history of computer software is most often traced back to the first in 1946. As more and more programs enter the realm of firmware, and the hardware itself becomes smaller, cheaper and faster due to Moore's law, elements of computing first considered to be software, join the ranks of hardware. Most hardware companies today have more software programmers on the payroll than hardware designers, since software tools have automated many tasks of engineers. Just like the Auto industry, the Software industry has grown from a few visionaries operating out of their garage with prototypes. Steve Jobs and Bill Gates were the Henry Ford and Louis Chevrolet of their times, who capitalized on ideas already commonly known before they started in the business. In the case of Software development, this moment is generally agreed to be the publication in the 1980s of the specifications for the IBM Personal Computer published by IBM employee Philip Don Estridge. Today his move would be seen as a type of crowd-sourcing.

Until that time, software was bundled with the hardware by Original equipment manufacturers (OEMs) such as Data General, Digital Equipment and IBM. When a customer bought a minicomputer, at that time the smallest computer on the market, the computer did not come with Pre-installed software, but needed to be installed by engineers employed by the OEM. companies not only bundled their software, they also placed demands on the location of the hardware in a refrigerated space called a computer room. Most companies had their software on the books for 0 dollars, unable to claim it as an asset (this is similar to financing of popular music in those days). When Data General introduced the Data General Nova, a company called Digidyne wanted to use its RDOS on its own hardware clone. Data General refused to license their software (which was hard to do, since it was on the books as a free asset), and claimed their "bundling rights". The Supreme Court set a precedent called Digidyne v. Data General in 1985. The Supreme Court let a 9th circuit decision stand, and Data General was eventually forced into licensing the Operating System software because it was ruled that restricting the license to only DG hardware was an illegal tying arrangement. Soon after, IBM 'published' its DOS source for free, and Microsoft was born. Unable to sustain the loss from lawyer's fees, Data General ended up being taken over by EMC Corporation. The Supreme Court decision made it possible to value software, and also purchase Software patents. The move by IBM was almost a protest at the time. Few in the industry believed that anyone would profit from it other than IBM (through free publicity). Microsoft and Apple were able to thus cash in on 'soft' products. It is hard to imagine today that people once felt that software was worthless without a machine. There are many successful companies today that sell only software products, though there are still many common software licensing problems due to the complexity of designs and poor documentation, leading to patent trolls.

With open software specifications and the possibility of software licensing, new opportunities arose for software tools that then became the de facto standard, such as DOS for operating systems, but also various proprietary word processing and spreadsheet programs. In a similar growth pattern, proprietary development methods became standard Software development methodology.