HOME

TheInfoList




Computer programming is the process of designing and building an
executable In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and ...
computer program In imperative programming, a computer program is a sequence of instructions in a programming language that a computer can execute or interpret. In declarative programming, a ''computer program'' is a Set (mathematics), set of instructions. A comp ...
to accomplish a specific
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and software. It has sci ...

computing
result or to perform a particular task. Programming involves tasks such as analysis, generating
algorithm In and , an algorithm () is a finite sequence of , computer-implementable instructions, typically to solve a class of problems or to perform a computation. Algorithms are always and are used as specifications for performing s, , , and other ...

algorithm
s, profiling algorithms' accuracy and resource consumption, and the implementation of algorithms in a chosen
programming language A programming language is a formal language In logic, mathematics, computer science, and linguistics, a formal language consists of string (computer science), words whose symbol (formal), letters are taken from an alphabet (computer science) ...

programming language
(commonly referred to as coding). The
source code In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and ...

source code
of a program is written in one or more languages that are intelligible to
programmer A computer programmer, sometimes called a software developer, a programmer or more recently a coder (especially in more informal contexts), is a person who creates computer software Software is a collection of Instruction (computer science ...

programmer
s, rather than
machine code In computer programming Computer programming is the process of designing and building an executable computer program to accomplish a specific computing result or to perform a particular task. Programming involves tasks such as analysis, ge ...
, which is directly executed by the
central processing unit A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuit 200px, A circuit built on a printed circuit board (PCB). An electronic circuit is composed of individual electroni ...

central processing unit
. The purpose of programming is to find a sequence of instructions that will automate the performance of a task (which can be as complex as an
operating system An operating system (OS) is system software System software is software designed to provide a platform for other software. Examples of system software include operating systems (OS) like macOS, Linux, Android (operating system), Android and Mi ...

operating system
) on a
computer A computer is a machine that can be programmed to Execution (computing), carry out sequences of arithmetic or logical operations automatically. Modern computers can perform generic sets of operations known as Computer program, programs. These ...

computer
, often for solving a given problem. Proficient programming thus usually requires expertise in several different subjects, including knowledge of the
application domain An application domain is a mechanism (similar to a process in an operating system An operating system (OS) is system software that manages computer hardware, computer software, software resources, and provides common daemon (computing), service ...
, specialized algorithms, and formal
logic Logic is an interdisciplinary field which studies truth and reasoning. Informal logic seeks to characterize Validity (logic), valid arguments informally, for instance by listing varieties of fallacies. Formal logic represents statements and ar ...

logic
. Tasks accompanying and related to programming include testing,
debugging In computer programming Computer programming is the process of designing and building an executable In computing, executable code, an executable file, or an executable program, sometimes simply referred to as an executable or binary, caus ...

debugging
,
source code In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and ...

source code
maintenance, implementation of build systems, and management of derived artifacts, such as the
machine code In computer programming Computer programming is the process of designing and building an executable computer program to accomplish a specific computing result or to perform a particular task. Programming involves tasks such as analysis, ge ...
of computer programs. These might be considered part of the programming process, but often the term ''
software development Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications Application may refer to: Mathematics and computing * Application ...
'' is used for this larger process with the term ''programming'', ''implementation'', or ''coding'' reserved for the actual writing of code. ''
Software engineering Software engineering is the systematic application of engineering Engineering is the use of scientific principles to design and build machines, structures, and other items, including bridges, tunnels, roads, vehicles, and buildings. The d ...
'' combines
engineering Engineering is the use of scientific principles to design and build machines, structures, and other items, including bridges, tunnels, roads, vehicles, and buildings. The discipline of engineering encompasses a broad range of more speciali ...

engineering
techniques with software development practices. ''
Reverse engineering Reverse engineering (also known as backwards engineering or back engineering) is a process or method through the application of which one attempts to understand through deductive reasoning Deductive reasoning, also deductive logic, is the process ...

Reverse engineering
'' is a related process used by designers, analysts, and programmers to understand and re-create/re-implement.


History

Programmable devices have existed for centuries. As early as the 9th century, a programmable
music sequencer A music sequencer (or audio sequencer or simply sequencer) is a device or application software that can record, edit, or play back music, by handling Musical note, note and performance information in several forms, typically CV/Gate, MIDI, or O ...
was invented by the Persian
Banu Musa Banu may refer to: * Banu (name) Banu ( fa, بانو ''bânu''), is a Persian name for girls popular in Iran Iran ( fa, ایران ), also called Persia and officially the Islamic Republic of Iran ( fa, جمهوری اسلامی ایر ...
brothers, who described an automated mechanical
flute The flute is a family of musical instrument A musical instrument is a device created or adapted to make musical sounds. In principle, any object that produces sound can be considered a musical instrument—it is through purpose that the objec ...

flute
player in the ''
Book of Ingenious Devices The ''Book of Ingenious Devices'' (Arabic Arabic (, ' or , ' or ) is a Semitic language The Semitic languages are a branch of the Afroasiatic language family originating in the Middle East The Middle East is a list of transcont ...
''. In 1206, the Arab engineer
Al-Jazari Badīʿ az-Zaman Abu l-ʿIzz ibn Ismāʿīl ibn ar-Razāz al-Jazarī (1136–1206, ar, بديع الزمان أَبُ اَلْعِزِ إبْنُ إسْماعِيلِ إبْنُ الرِّزاز الجزري,), ) was a Muslim polymath ...
invented a programmable
drum machine A drum machine is an electronic musical instrument An electronic musical instrument or electrophone is a musical instrument A musical instrument is a device created or adapted to make Music, musical sounds. In principle, any object that pro ...
where a musical mechanical
automaton An automaton (; plural: automata or automatons) is a relatively self-operating machine A machine is any physical system with ordered structural and functional properties. It may represent human-made or naturally occurring device molecu ...

automaton
could be made to play different rhythms and drum patterns, via pegs and
cam A cam is a rotating or sliding piece in a mechanical linkage A mechanical linkage is an assembly of bodies connected to manage forces and movement. The movement of a body, or link, is studied using geometry so the link is considered to be r ...

cam
s.
Noel Sharkey Noel Sharkey (born 14 December 1948) is a computer scientist A computer scientist is a person who has acquired the knowledge of computer science Computer science deals with the theoretical foundations of information, algorithms and the ...
(2007)
A 13th Century Programmable Robot
University of Sheffield , mottoeng = To discover the causes of things , established = – University of SheffieldPredecessor institutions: – Sheffield Medical School , mottoeng = Art is long, life is short , established = 1828 – Sheffield School ...
In 1801, the
Jacquard loom The Jacquard machine () is a device fitted to a loom A loom is a device used to weave cloth and tapestry. The basic purpose of any loom is to hold the warp threads under tension Tension may refer to: Science * Psychological stress * Tensi ...

Jacquard loom
could produce entirely different weaves by changing the "program" – a series of pasteboard cards with holes punched in them.
Code-breaking cipher machine Cryptanalysis (from the Greek language, Greek ''kryptós'', "hidden", and ''analýein'', "to analyze") is the study of analyzing information systems in order to study the hidden aspects of the systems. Cryptanalysis is used to bre ...
algorithms have also existed for centuries. In the 9th century, the Arab mathematician
Al-Kindi Abu Yūsuf Yaʻqūb ibn ʼIsḥāq aṣ-Ṣabbāḥ al-Kindī (; ar, أبو يوسف يعقوب بن إسحاق الصبّاح الكندي; la, Alkindus; c. 801–873 AD) was an Arab The Arabs (singular Arab ; singular ar, عَرَب ...
described a
cryptographic Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or '' -logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of third ...
algorithm for deciphering encrypted code, in ''A Manuscript on Deciphering Cryptographic Messages''. He gave the first description of
cryptanalysis Cryptanalysis (from the Greek#REDIRECT Greek Greek may refer to: Greece Anything of, from, or related to Greece Greece ( el, Ελλάδα, , ), officially the Hellenic Republic, is a country located in Southeast Europe. Its population is ...
by
frequency analysis In cryptanalysis, frequency analysis (also known as counting letters) is the study of the letter frequencies, frequency of letters or groups of letters in a ciphertext. The method is used as an aid to breaking classical ciphers. Frequency analy ...
, the earliest code-breaking algorithm. The first
computer program In imperative programming, a computer program is a sequence of instructions in a programming language that a computer can execute or interpret. In declarative programming, a ''computer program'' is a Set (mathematics), set of instructions. A comp ...
is generally dated to 1843, when mathematician
Ada Lovelace Augusta Ada King, Countess of Lovelace (''née__NOTOC__ A birth name is the name of the person given upon their birth. The term may be applied to the surname In some cultures, a surname, family name, or last name is the portion of one's ...

Ada Lovelace
published an
algorithm In and , an algorithm () is a finite sequence of , computer-implementable instructions, typically to solve a class of problems or to perform a computation. Algorithms are always and are used as specifications for performing s, , , and other ...

algorithm
to calculate a sequence of
Bernoulli numbers In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). ...
, intended to be carried out by
Charles Babbage Charles Babbage (; 26 December 1791 – 18 October 1871) was an English polymath A polymath ( el, πολυμαθής, , "having learned much"; la, homo universalis, "universal human") is an individual whose knowledge spans a subs ...

Charles Babbage
's
Analytical Engine The Analytical Engine was a proposed mechanical general-purpose computer designed by English mathematician and computer pioneer Charles Babbage. It was first described in 1837 as the successor to Babbage's difference engine, which was a des ...
. In the 1880s
Herman Hollerith Herman Hollerith (February 29, 1860 – November 17, 1929) was an American businessman, inventor, and statistician who developed an electromechanical tabulating machine The tabulating machine was an electromechanical In engineering ...
invented the concept of storing ''data'' in machine-readable form. Later a control panel (plug board) added to his 1906 Type I Tabulator allowed it to be programmed for different jobs, and by the late 1940s,
unit record equipment Starting at the end of the nineteenth century, well before the advent of electronic , data processing was performed using machines collectively referred to as unit record equipment, electric accounting machines (EAM) or s. Unit record machines c ...
such as the
IBM 602The IBM 602 Calculating Punch, introduced in 1946, was an electromechanical calculator An electronic calculator is typically a portable electronic device used to perform calculations, ranging from basic arithmetic to complex mathematics ...
and
IBM 604 The IBM 604 Electronic Calculating Punch was the world's first mass-produced electronic calculator along with its predecessor the IBM 603.
, were programmed by control panels in a similar way, as were the first
electronic computer Electronic may refer to: *Electronics, the science of how to control electric energy in semiconductor *Electronics (magazine), ''Electronics'' (magazine), a defunct American trade journal *Electronic storage, the storage of data using an electronic ...
s. However, with the concept of the
stored-program computer A stored-program computer is a computer A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern computers can perform generic sets of operations known as Computer pro ...
introduced in 1949, both programs and data were stored and manipulated in the same way in
computer memory In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and soft ...
.


Machine language

Machine code In computer programming Computer programming is the process of designing and building an executable computer program to accomplish a specific computing result or to perform a particular task. Programming involves tasks such as analysis, ge ...
was the language of early programs, written in the
instruction set In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application. Computer science is the study of co ...
of the particular machine, often in
binary Binary may refer to: Science and technology Mathematics * Binary number In mathematics and digital electronics, a binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols: ty ...
notation.
Assembly language In computer programming Computer programming is the process of designing and building an executable computer program to accomplish a specific computing result or to perform a particular task. Programming involves tasks such as analysis, gene ...
s were soon developed that let the programmer specify instruction in a text format (e.g., ADD X, TOTAL), with abbreviations for each operation code and meaningful names for specifying addresses. However, because an assembly language is little more than a different notation for a machine language, two machines with different instruction sets also have different assembly languages.


Compiler languages

High-level language In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application. Computer science is the study of Algori ...
s made the process of developing a program simpler and more understandable, and less bound to the underlying hardware. The first compiler related tool, the
A-0 System The A-0 system (''Arithmetic Language version 0''), written by Grace Hopper, Grace Murray Hopper in 1951 and 1952 for the UNIVAC I, was an early compiler related tool developed for electronic computers. The A-0 functioned more as a Loader (computin ...
, was developed in 1952 by
Grace Hopper Grace Brewster Murray Hopper ( December 9, 1906 – January 1, 1992) was an American computer scientist and United States Navy ), (unofficial)."''Non sibi sed patriae''" ( en, "Not for self but for country") (unofficial). , colors ...

Grace Hopper
, who also coined the term 'compiler'. Maurice V. Wilkes. 1968. Computers Then and Now. Journal of the Association for Computing Machinery, 15(1):1–7, January. p. 3 (a comment in brackets added by editor), "(I do not think that the term compiler was then 953in general use, although it had in fact been introduced by Grace Hopper.)"
The World's First COBOL Compilers
FORTRAN Fortran (; formerly FORTRAN) is a general-purpose, compiled language, compiled imperative programming, imperative programming language that is especially suited to numerical analysis, numeric computation and computational science, scientific com ...

FORTRAN
, the first widely used high-level language to have a functional implementation, came out in 1957, and many other languages were soon developed—in particular,
COBOL COBOL (; an acronym An acronym is a word In linguistics, a word of a spoken language can be defined as the smallest sequence of phonemes that can be uttered in isolation with semantic, objective or pragmatics, practical meaning (lingui ...

COBOL
aimed at commercial data processing, and
Lisp Lisp (historically LISP) is a family of programming language A programming language is a formal language In logic, mathematics, computer science, and linguistics, a formal language consists of string (computer science), words whose symbo ...
for computer research. These compiled languages allow the programmer to write programs in terms that are syntactically richer, and more capable of abstracting the code, making it easy to target for varying machine instruction sets via compilation declarations and heuristics. Compilers harnessed the power of computers to make programming easier by allowing programmers to specify calculations by entering a formula using
infix notation Infix notation is the notation commonly used in arithmetical and logic Logic (from Ancient Greek, Greek: grc, wikt:λογική, λογική, label=none, lit=possessed of reason, intellectual, dialectical, argumentative, translit=logikḗ) ...
.


Source code entry

Programs were mostly still entered using punched cards or
paper tape Five- and eight-hole punched paper tape file:Harwell-dekatron-witch-10.jpg, Paper tape reader on the Harwell computer with a small piece of five-hole tape connected in a circle – creating a physical program loop Punched tape or perforated pape ...

paper tape
. By the late 1960s,
data storage device Data storage is the recording (storing) of information (data) in a storage medium. Handwriting, Phonograph record, phonographic recording, magnetic tape, and optical discs are all examples of storage media. Some authors even propose that DNA ...
s and
computer terminal A computer terminal is an electronic or electromechanical In engineering Engineering is the use of scientific principles to design and build machines, structures, and other items, including bridges, tunnels, roads, vehicles, and b ...
s became inexpensive enough that programs could be created by typing directly into the computers.
Text editor A text editor is a type of computer program In imperative programming, a computer program is a sequence of instructions in a programming language that a computer can execute or interpret. In declarative programming, a ''computer program'' is ...

Text editor
s were also developed that allowed changes and corrections to be made much more easily than with punched cards.


Modern programming


Quality requirements

Whatever the approach to development may be, the final program must satisfy some fundamental properties. The following properties are among the most important: *
Reliability Reliability, reliable, or unreliable may refer to: Science, technology, and mathematics Computing * Data reliability (disambiguation), Data reliability, a property of some disk arrays in computer storage * High availability * Reliability (computer ...
: how often the results of a program are correct. This depends on conceptual correctness of algorithms and minimization of programming mistakes, such as mistakes in resource management (e.g.,
buffer overflow In information security #REDIRECT Information security Information security, sometimes shortened to infosec, is the practice of protecting information by mitigating information risks. It is part of Risk management information systems, information ...
s and
race condition A race condition or race hazard is the condition of an electronics, software, or other system where the system's substantive behavior is Sequential logic, dependent on the sequence or timing of other uncontrollable events. It becomes a software ...

race condition
s) and logic errors (such as division by zero or
off-by-one error An off-by-one error or off-by-one bug (known by acronyms OBOE, OBO, OB1 and OBOB) is a logic error involving the discrete equivalent of a boundary condition Boundary or Boundaries may refer to: * Border, in political geography Entertainment * ...
s). *
RobustnessRobustness is the property of being strong and healthy in constitution. When it is transposed into a system, it refers to the ability of tolerating perturbations that might affect the system’s functional body. In the same line ''robustness'' can be ...
: how well a program anticipates problems due to errors (not bugs). This includes situations such as incorrect, inappropriate or corrupt data, unavailability of needed resources such as memory, operating system services, and network connections, user error, and unexpected power outages. *
Usability Usability can be described as the capacity of a system to provide a condition for its users to perform the tasks safely, effectively, and efficiently while enjoying the experience. In software engineering, usability is the degree to which a sof ...

Usability
: the
ergonomics Human factors and ergonomics (commonly referred to as human factors) is the application of psychological and physiological principles to the engineering and design of products, processes, and systems. The goal of human factors is to reduce human ...
of a program: the ease with which a person can use the program for its intended purpose or in some cases even unanticipated purposes. Such issues can make or break its success even regardless of other issues. This involves a wide range of textual, graphical, and sometimes hardware elements that improve the clarity, intuitiveness, cohesiveness and completeness of a program's user interface. * Portability: the range of
computer hardware Computer hardware includes the physical parts of a computer, such as the computer case, case, central processing unit (CPU), Computer monitor, monitor, Computer mouse, mouse, Computer keyboard, keyboard, computer data storage, graphics card, so ...

computer hardware
and
operating system An operating system (OS) is system software System software is software designed to provide a platform for other software. Examples of system software include operating systems (OS) like macOS, Linux, Android (operating system), Android and Mi ...

operating system
platforms on which the source code of a program can be
compiled In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily ...
/ interpreted and run. This depends on differences in the programming facilities provided by the different platforms, including hardware and operating system resources, expected behavior of the hardware and operating system, and availability of platform-specific compilers (and sometimes libraries) for the language of the source code. *
Maintainability In engineering, maintainability is the ease with which a product can be maintained in order to: * correct defects or their cause, * Repair or replace faulty or worn-out components without having to replace still working parts, * prevent unexpected ...
: the ease with which a program can be modified by its present or future developers in order to make improvements or to customize, fix bugs and security holes, or adapt it to new environments. Good practices during initial development make the difference in this regard. This quality may not be directly apparent to the end user but it can significantly affect the fate of a program over the long term. *
Efficiency Efficiency is the (often measurable) ability to avoid wasting materials, energy, efforts, money, and time in doing something or in producing a desired result. In a more general sense, it is the ability to do things well, successfully, and withou ...
/
performance A performance is an act of staging or presenting a play, concert, or other form of entertainment. It is also defined as the action or process of carrying out or accomplishing an action, task, or function. Management science In the work place ...

performance
: Measure of system resources a program consumes (processor time, memory space, slow devices such as disks, network bandwidth and to some extent even user interaction): the less, the better. This also includes careful management of resources, for example cleaning up
temporary file A temporary file is a file created to store information temporarily, either for a program's intermediate use or for transfer to a permanent file when complete. It may be created by computer program In imperative programming, a computer program is ...
s and eliminating
memory leak In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application. Computer science is the study of , , ...
s. This is often discussed under the shadow of a chosen programming language. Although the language certainly affects performance, even slower languages, such as
Python PYTHON was a Cold War contingency plan of the Government of the United Kingdom, British Government for the continuity of government in the event of Nuclear warfare, nuclear war. Background Following the report of the Strath Committee in 1955, the ...
, can execute programs instantly from a human perspective. Speed, resource usage, and performance are important for programs that bottleneck the system, but efficient use of programmer time is also important and is related to cost: more hardware may be cheaper.


Readability of source code

In computer programming,
readability Readability is the ease with which a reader can understand a written text. In natural language, the readability of text depends on its content (the complexity of its vocabulary A vocabulary, also known as a wordstock or word-stock, is a ...

readability
refers to the ease with which a human reader can comprehend the purpose,
control flow In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application. Computer science is the study of Algor ...
, and operation of source code. It affects the aspects of quality above, including portability, usability and most importantly maintainability. Readability is important because programmers spend the majority of their time reading, trying to understand and modifying existing source code, rather than writing new source code. Unreadable code often leads to bugs, inefficiencies, and duplicated code. A study found that a few simple readability transformations made code shorter and drastically reduced the time to understand it. Following a consistent
programming style Programming style, also known as code style, is a set of rules or guidelines used when writing the source code In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes th ...
often helps readability. However, readability is more than just programming style. Many factors, having little or nothing to do with the ability of the computer to efficiently compile and execute the code, contribute to readability. Some of these factors include: *Different
indent style In computer programming Computer programming is the process of designing and building an executable computer program to accomplish a specific computing result or to perform a specific task. Programming involves tasks such as: analysis, generati ...
s (whitespace) * Comments *
Decomposition Decomposition is the process by which dead organic substance , CH4; is among the simplest organic compounds. In chemistry Chemistry is the scientific discipline involved with Chemical element, elements and chemical compound, compounds co ...
*
Naming conventions A naming convention is a convention (norm), convention (generally agreed scheme) for naming things. Conventions differ in their intents, which may include to: * Allow useful information to be deduced from the names based on regularities. For ins ...
for objects (such as variables, classes, functions, procedures, etc.) The
presentation A presentation conveys information from a speaker to an audience An audience is a group of people who participate in a show or encounter a work of art A work of art, artwork, art piece, piece of art or art object is an a ...
aspects of this (such as indents, line breaks, color highlighting, and so on) are often handled by the
source code editor A source-code editor is a text editor A text editor is a type of computer program In imperative programming, a computer program is a sequence of instructions in a programming language that a computer can execute or interpret. In declarati ...
, but the content aspects reflect the programmer's talent and skills. Various
visual programming language In computing, a visual programming language (VPL) is any programming language that lets users create computer program, programs by manipulating program elements ''graphically'' rather than by specifying them ''textually''. A VPL allows programmin ...
s have also been developed with the intent to resolve readability concerns by adopting non-traditional approaches to code structure and display.
Integrated development environment An integrated development environment (IDE) is a software application Application software (app for short) is computing software designed to carry out a specific task other than one relating to the operation of the computer itself, typically ...
s (I.D.Es) aim to integrate all such help. Techniques like
Code refactoring In computer programming Computer programming is the process of designing and building an executable computer program to accomplish a specific computing result or to perform a particular task. Programming involves tasks such as analysis, gen ...
can enhance readability.


Algorithmic complexity

The academic field and the engineering practice of computer programming are both largely concerned with discovering and implementing the most efficient algorithms for a given class of problems. For this purpose, algorithms are classified into ''orders'' using so-called
Big O notation Big O notation is a mathematical notation that describes the limiting behavior of a function Function or functionality may refer to: Computing * Function key A function key is a key on a computer A computer is a machine that can be p ...
, which expresses resource use, such as execution time or memory consumption, in terms of the size of an input. Expert programmers are familiar with a variety of well-established algorithms and their respective complexities and use this knowledge to choose algorithms that are best suited to the circumstances.


Chess algorithms as an example

"Programming a Computer for Playing Chess" was a 1950 paper that evaluated a "minimax"
algorithm In and , an algorithm () is a finite sequence of , computer-implementable instructions, typically to solve a class of problems or to perform a computation. Algorithms are always and are used as specifications for performing s, , , and other ...

algorithm
that is part of the history of algorithmic complexity; a course on IBM's
Deep Blue (chess computer) Deep Blue was a chess-playing expert system In artificial intelligence Artificial intelligence (AI) is intelligence Intelligence has been defined in many ways: the capacity for logic Logic (from Ancient Greek, Greek: grc, ...
is part of the computer science curriculum at
Stanford University Stanford University, officially Leland Stanford Junior University, is a private Private or privates may refer to: Music * "In Private "In Private" was the third single in a row to be a charting success for United Kingdom, British singer Du ...

Stanford University
.


Methodologies

The first step in most formal software development processes is
requirements analysis In systems engineering and software engineering, requirements analysis focuses on the tasks that determine the needs or conditions to meet the new or altered product or project, taking account of the possibly conflicting requirements of the v ...
, followed by testing to determine value modeling, implementation, and failure elimination (debugging). There exist a lot of different approaches for each of those tasks. One approach popular for requirements analysis is
Use Case In software engineering, software and systems engineering, the phrase use case is a Polysemy, polyseme with two Word sense, senses: # A usage scenario for a piece of software; often used in the plural to suggest situations where a piece of soft ...

Use Case
analysis. Many programmers use forms of
Agile software development In software development Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications Application may refer to: Mathematics a ...
where the various stages of formal software development are more integrated together into short cycles that take a few weeks rather than years. There are many approaches to the Software development process. Popular modeling techniques include Object-Oriented Analysis and Design ( OOAD) and Model-Driven Architecture (
MDA MDA, mda, or ''variation'', may refer to: Places * Moldova, a country in Europe with the ISO 3166-1 country code MDA People * A. P. Mda (1916-1993) South African political activist * Zakes Mda (born 1948) South African author Companies, organiz ...
). The Unified Modeling Language (
UML UML may refer to: * Unified Modeling Language, a software modeling language * University of Massachusetts Lowell, a research university * User-mode Linux, virtual machine software See also

* Unified Medical Language System (UMLS), a medical in ...
) is a notation used for both the OOAD and MDA. A similar technique used for database design is Entity-Relationship Modeling ( ER Modeling). Implementation techniques include imperative languages (
object-oriented Object-oriented programming (OOP) is a programming paradigm Program, programme, programmer, or programming may refer to: Business and management * Program management, the process of managing several related projects * Time management * P ...
or procedural),
functional languages In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application. Computer science is the study of Alg ...
, and logic languages.


Measuring language usage

It is very difficult to determine what are the most popular modern programming languages. Methods of measuring programming language popularity include: counting the number of job advertisements that mention the language, the number of books sold and courses teaching the language (this overestimates the importance of newer languages), and estimates of the number of existing lines of code written in the language (this underestimates the number of users of business languages such as COBOL). Some languages are very popular for particular kinds of applications, while some languages are regularly used to write many different kinds of applications. For example,
COBOL COBOL (; an acronym An acronym is a word In linguistics, a word of a spoken language can be defined as the smallest sequence of phonemes that can be uttered in isolation with semantic, objective or pragmatics, practical meaning (lingui ...

COBOL
is still strong in corporate data centers often on large
mainframe computer A mainframe computer, informally called a mainframe or big iron, is a computer A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern computers can perform gener ...
s,
Fortran Fortran (; formerly FORTRAN) is a general-purpose, compiled language, compiled imperative programming, imperative programming language that is especially suited to numerical analysis, numeric computation and computational science, scientific com ...

Fortran
in engineering applications,
scripting language A scripting language or script language is a programming language A programming language is a formal language In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathe ...
s in
Web Web most often refers to: * Spider web A spider web, spiderweb, spider's web, or cobweb (from the archaic word '' coppe'', meaning "spider") is a structure created by a spider Spiders ( order Araneae) are air-breathing arthropod An ar ...
development, and C in
embedded softwareEmbedded software is computer software Software is a collection of Instruction (computer science), instructions and data (computing), data that tell a computer how to work. This is in contrast to Computer hardware, physical hardware, from which ...
. Many applications use a mix of several languages in their construction and use. New languages are generally designed around the syntax of a prior language with new functionality added, (for example
C++ C++ () is a general-purpose programming language In computer software, a general-purpose programming language is a programming language dedicated to a general-purpose, designed to be used for writing software in a wide variety of application ...

C++
adds object-orientation to C, and
Java Java ( id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 147.7 million people, Java is the world's List of ...
adds memory management and
bytecode Bytecode, also termed portable code or p-code, is a form of instruction set In computer science, an instruction set architecture (ISA), also called computer architecture, is an abstract model of a computer. A device that executes instructions ...
to C++, but as a result, loses efficiency and the ability for low-level manipulation).


Debugging

Debugging is a very important task in the software development process since having defects in a program can have significant consequences for its users. Some languages are more prone to some kinds of faults because their specification does not require compilers to perform as much checking as other languages. Use of a static code analysis tool can help detect some possible problems. Normally the first step in debugging is to attempt to reproduce the problem. This can be a non-trivial task, for example as with parallel processes or some unusual software bugs. Also, specific user environment and usage history can make it difficult to reproduce the problem. After the bug is reproduced, the input of the program may need to be simplified to make it easier to debug. For example, when a bug in a compiler can make it crash when parsing some large source file, a simplification of the test case that results in only few lines from the original source file can be sufficient to reproduce the same crash. Trial-and-error/divide-and-conquer is needed: the programmer will try to remove some parts of the original test case and check if the problem still exists. When debugging the problem in a GUI, the programmer can try to skip some user interaction from the original problem description and check if remaining actions are sufficient for bugs to appear. Scripting and breakpointing is also part of this process. Debugging is often done with Integrated development environment, IDEs. Standalone debuggers like GDB are also used, and these often provide less of a visual environment, usually using a command line. Some text editors such as Emacs allow GDB to be invoked through them, to provide a visual environment.


Programming languages

Different programming languages support different styles of programming (called ''programming paradigms''). The choice of language used is subject to many considerations, such as company policy, suitability to task, availability of third-party packages, or individual preference. Ideally, the programming language best suited for the task at hand will be selected. Trade-offs from this ideal involve finding enough programmers who know the language to build a team, the availability of compilers for that language, and the efficiency with which programs written in a given language execute. Languages form an approximate spectrum from "low-level" to "high-level"; "low-level" languages are typically more machine-oriented and faster to execute, whereas "high-level" languages are more abstract and easier to use but execute less quickly. It is usually easier to code in "high-level" languages than in "low-level" ones. Allen Downey, in his book ''How To Think Like A Computer Scientist'', writes: :The details look different in different languages, but a few basic instructions appear in just about every language: :*Input: Gather data from the keyboard, a file, or some other device. :*Output: Display data on the screen or send data to a file or other device. :*Arithmetic: Perform basic arithmetical operations like addition and multiplication. :*Conditional Execution: Check for certain conditions and execute the appropriate sequence of statements. :*Repetition: Perform some action repeatedly, usually with some variation. Many computer languages provide a mechanism to call functions provided by shared library, shared libraries. Provided the functions in a library follow the appropriate run-time conventions (e.g., method of passing argument (computer science), arguments), then these functions may be written in any other language.


Programmers

Computer programmers are those who write computer software. Their jobs usually involve: *Prototyping *Coding *Debugging *Documentation *System integration, Integration *Software maintenance, Maintenance *Requirements analysis *Software architecture *Software testing *Specification Although programming has been presented in the media as a somewhat mathematical subject, some research shows that good programmers have strong skills in natural human languages, and that learning to code is similar to learning a foreign language.


See also

*ACCU (organisation), ACCU *Association for Computing Machinery *Computer networking *Hello world program *Institution of Analysts and Programmers *National Coding Week *Object hierarchy *System programming *Computer programming in the punched card era *''The Art of Computer Programming'' *Women in computing *Timeline of women in computing


References


Sources

* * * *


Further reading

* A.K. Hartmann,
Practical Guide to Computer Simulations
', Singapore: World Scientific (2009) * A. Hunt, D. Thomas, and W. Cunningham, ''The Pragmatic Programmer. From Journeyman to Master'', Amsterdam: Addison-Wesley Longman (1999) * Brian W. Kernighan, ''The Practice of Programming'', Pearson (1999) * Gerald Weinberg, Weinberg, Gerald M., ''The Psychology of Computer Programming'', New York: Van Nostrand Reinhold (1971) * Edsger W. Dijkstra, ''A Discipline of Programming'', Prentice-Hall (1976) * O.-J. Dahl, Edsger W. Dijkstra, E.W.Dijkstra, C.A.R. Hoare, ''Structured Programming'', Academic Press (1972) * David Gries, ''The Science of Programming'', Springer-Verlag (1981)


External links

* * * {{DEFAULTSORT:Computer Programming Computer programming, Computers, Programming