Programming: Var X: Integer 2 + 2 X: 2 + 2 If X 4 Then Do - Something
Programming: Var X: Integer 2 + 2 X: 2 + 2 If X 4 Then Do - Something
Computer programming is the iterative process of writing or editing source code. 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
computer programmer, software developer or coder. The sometimes lengthy process of computer
programming is usually referred to as software development. The term software engineering is
becoming popular as the process is seen as an engineering discipline.
Paradigms
Computer programs can be categorized by the programming language paradigm used to produce
them. Two of the main paradigms are imperative and declarative.
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 Prolog) 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 form 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 computer program in the form of a human-readable, computer programming language is
called source code. Source code may be converted into an executable image by a compiler or
executed immediately with the aid of an interpreter.
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 execution is chained together. When a
language is used to give commands to a software application (such as a shell) it is called a
scripting language.
Compiled computer programs are commonly referred to as executables, binary images, or simply
as binaries — a reference to the binary file format used to store the executable code. Compilers
are used to translate source code from a programming language into either object code or
machine code. Object code needs further processing to become machine code, and machine code
is the Central Processing Unit'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, Perl, and Python are examples of immediately executed computer programs.
Alternatively, Java computer programs are compiled ahead of time and stored as a machine
independent code called bytecode. Bytecode is then executed upon request by an interpreter
called a virtual machine.
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.
Self-modifying programs
A computer program in execution is normally treated as being different from the data 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, assembly
language, Lisp, C, COBOL, PL/1, Prolog and javascript (the eval 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 computers, such as film, tapes and records.
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 computer science and software
engineering.
The history of computer software is most often traced back to the first software bug 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 Printed
circuit board 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. Computer
hardware 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 operating system 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.