Computer Programming - Wikipedia, The Free Encyclopedia
Computer Programming - Wikipedia, The Free Encyclopedia
Computer programming
From Wikipedia, the free encyclopedia
Computer programming (often shortened to programming) is a process that leads from an original
formulation of a computing problem to executable computer programs. Programming involves activities
such as analysis, developing understanding, generating algorithms, verification of requirements of
algorithms including their correctness and resources consumption, and implementation (commonly referred
to as coding[1][2]) of algorithms in a target programming language. Source code is written in one or more
programming languages. The purpose of programming is to find a sequence of instructions that will
automate performing a specific task or solving a given problem. The process of programming thus often
requires expertise in many different subjects, including knowledge of the application domain, specialized
algorithms and formal logic.
Related tasks include testing, debugging, and maintaining the source code, implementation of the build
system, and management of derived artifacts such as machine code of computer programs. These might be
considered part of the programming process, but often the term "software development" is used for this
larger process with the term "programming", "implementation", or "coding" reserved for the actual writing
of source code. Software engineering combines engineering techniques with software development
practices.
Contents
1 Overview
2 History
3 Modern programming
3.1 Quality requirements
3.2 Readability of source code
3.3 Algorithmic complexity
3.4 Methodologies
3.5 Measuring language usage
3.6 Debugging
4 Programming languages
5 Programmers
6 See also
7 References
8 Further reading
9 External links
Overview
Within software engineering, programming (the implementation) is regarded as one phase in a software
development process.
https://en.wikipedia.org/wiki/Computer_programming 1/9
10/31/2015 Computer programming Wikipedia, the free encyclopedia
There is an ongoing debate on the extent to which the writing of programs is an art form, a craft, or an
engineering discipline.[3] In general, good programming is considered to be the measured application of all
three, with the goal of producing an efficient and evolvable software solution (the criteria for "efficient" and
"evolvable" vary considerably). The discipline differs from many other technical professions in that
programmers, in general, do not need to be licensed or pass any standardized (or governmentally regulated)
certification tests in order to call themselves "programmers" or even "software engineers." Because the
discipline covers many areas, which may or may not include critical applications, it is debatable whether
licensing is required for the profession as a whole. In most cases, the discipline is selfgoverned by the
entities which require the programming, and sometimes very strict environments are defined (e.g. United
States Air Force use of AdaCore and security clearance). However, representing oneself as a "professional
software engineer" without a license from an accredited institution is illegal in many parts of the world.
Another ongoing debate is the extent to which the programming language used in writing computer
programs affects the form that the final program takes. This debate is analogous to that surrounding the
Sapir–Whorf hypothesis[4] in linguistics and cognitive science, which postulates that a particular spoken
language's nature influences the habitual thought of its speakers. Different language patterns yield different
patterns of thought. This idea challenges the possibility of representing the world perfectly with language,
because it acknowledges that the mechanisms of any language condition the thoughts of its speaker
community.
History
See also: History of programming languages
Charles Babbage adopted the use of punched cards around 1830 to control his Analytical Engine.
Mathematician Ada Lovelace theorized beyond the original intent of the Analytical Engine and how it
could compute symbols as well as numbers, building the foundation of modern programming: “That [the
engine] might act upon other things besides number, were objects found whose mutual fundamental
relations could be expressed by those of the abstract science of operations, and which should be also
susceptible of adaptations to the action of the operating notation and mechanism of the engine.”[8] She
wrote a program for the engine to calculate a sequence of Bernoulli numbers, becoming the world’s first
programmer.[9]
The synthesis of numerical calculation, predetermined operation and output, along with a way to organize
and input instructions in a manner relatively easy for humans to conceive and produce, led to the modern
development of computer programming. In 1954, FORTRAN was invented; it was the first widelyused
high level programming language to have a functional implementation, as opposed to just a design on
paper.[12][13] (A highlevel language is, in very general terms, any programming language that allows the
programmer to write programs in terms that are more abstract than assembly language instructions, i.e. at a
level of abstraction "higher" than that of an assembly language.) It allowed programmers to specify
calculations by entering a formula directly (e.g. Y = X*2 + 5*X + 9). The program text, or source, is
converted into machine instructions using a special program called a compiler, which translates the
FORTRAN program into machine language. In fact, the name FORTRAN stands for "Formula
https://en.wikipedia.org/wiki/Computer_programming 3/9
10/31/2015 Computer programming Wikipedia, the free encyclopedia
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: 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 overflows and race conditions) and logic errors (such as division by zero or offbyone
errors).
Robustness: 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: the ergonomics 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.
https://en.wikipedia.org/wiki/Computer_programming 4/9
10/31/2015 Computer programming Wikipedia, the free encyclopedia
Portability: the range of computer hardware and operating system platforms on which the source code
of a program can be compiled/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: the ease with which a program can be modified by its present or future developers in
order to make improvements or customizations, 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/performance: the amount 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 files and eliminating memory leaks.
In computer programming, readability refers to the ease with which a human reader can comprehend the
purpose, control flow, 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[15] found that a few simple readability
transformations made code shorter and drastically reduced the time to understand it.
Following a consistent programming style 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.[16] Some of these factors include:
Various visual programming languages have also been developed with the intent to resolve readability
concerns by adopting nontraditional approaches to code structure and display. Techniques like Code
refactoring 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 problem. For this purpose,
algorithms are classified into orders using socalled Big O notation, 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 wellestablished algorithms and their respective complexities and use this knowledge to
choose algorithms that are best suited to the circumstances.
Methodologies
https://en.wikipedia.org/wiki/Computer_programming 5/9
10/31/2015 Computer programming Wikipedia, the free encyclopedia
The first step in most formal software development processes is requirements analysis, followed by testing
to determine value modeling, implementation, and failure elimination (debugging). There exist a lot of
differing approaches for each of those tasks. One approach popular for requirements analysis is Use Case
analysis. Many programmers use forms of Agile software development 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 ObjectOriented Analysis and Design (OOAD) and ModelDriven
Architecture (MDA). The Unified Modeling Language (UML) is a notation used for both the OOAD and
MDA.
A similar technique used for database design is EntityRelationship Modeling (ER Modeling).
It is very difficult to determine what are the most popular of modern programming languages. Methods of
measuring programming language popularity include: counting the number of job advertisements that
mention the language,[17] 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 is still strong in corporate data
centers[18] often on large mainframe computers, Fortran in engineering applications, scripting languages in
Web development, and C in embedded software. 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++ adds objectorientation to C, and Java adds memory management
and bytecode to C++, but as a result, loses efficiency and the ability for lowlevel 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.
Debugging is often done with IDEs like Eclipse, Visual Studio, Kdevelop, NetBeans and Code::Blocks.
Standalone debuggers like gdb are also used, and these often provide less of a visual environment, usually
using a command line.
Programming languages
https://en.wikipedia.org/wiki/Computer_programming 6/9
10/31/2015 Computer programming Wikipedia, the free encyclopedia
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 libraries. Provided the
functions in a library follow the appropriate run time conventions (e.g., method of passing arguments), then
these functions may be written in any other language.
Programmers
Main article: Programmer
See also: Software developer and Software engineer
Computer programmers are those who write computer software. Their jobs usually involve:
Coding
Debugging
Documentation
Integration
Maintenance
Requirements analysis
Software architecture
Software testing
https://en.wikipedia.org/wiki/Computer_programming 7/9
10/31/2015 Computer programming Wikipedia, the free encyclopedia
Specification
See also
Main article: Outline of computer programming
ACCU
Association for Computing Machinery
Computer networking
Hello world program
Institution of Analysts and Programmers
System programming
The Art of Computer Programming
References
1. Shaun Bebbington (2014). "What is coding". Retrieved 20140303.
2. Shaun Bebbington (2014). "What is programming". Retrieved 20140303.
3. Paul Graham (2003). "Hackers and Painters". Retrieved 20060822.
4. Kenneth E. Iverson, the originator of the APL programming language, believed that the Sapir–Whorf hypothesis
applied to computer languages (without actually mentioning the hypothesis by name). His Turing award lecture,
"Notation as a tool of thought", was devoted to this theme, arguing that more powerful notations aided thinking
about computer algorithms. Iverson K.E.,"[[[Category:All articles with dead external links]]", Communications
of the ACM, 23: 444465 (August 1980).
5. "Ancient Greek Computer's Inner Workings Deciphered
(http://news.nationalgeographic.com/news/2006/11/061129ancientgreece.html)". National Geographic News.
November 29, 2006.
6. Freeth, Tony; Jones, Alexander; Steele, John M.; Bitsakis, Yanis (July 31, 2008). "Calendars with Olympiad
display and eclipse prediction on the Antikythera Mechanism". Nature 454 (7204): 614–617.
doi:10.1038/nature07130. PMID 18668103.
7. Fowler, Charles B. (October 1967). "The Museum of Music: A History of Mechanical Instruments". Music
Educators Journal (Music Educators Journal, Vol. 54, No. 2) 54 (2): 45–49. doi:10.2307/3391092.
JSTOR 3391092.
8. "Sketch of The Analytical Engine, with notes upon the Memoir by the Translator". Switzerland: fourmilab.ch.
Retrieved 28 March 2014.
9. Fuegi, J.; Francis, J. (2003). "Lovelace & babbage and the creation of the 1843 'notes' ". IEEE Annals of the
History of Computing 25 (4): 16. doi:10.1109/MAHC.2003.1253887.
10. "Columbia University Computing History Herman Hollerith". Columbia.edu. Retrieved 20100425.
11. U.S. Census Bureau: The Hollerith Machine
(http://www.census.gov/history/www/innovations/technology/the_hollerith_tabulator.html)
12. "Fortran creator John Backus dies Tech and gadgets msnbc.com". MSNBC. 20070320. Retrieved
20100425.
13. "CSC302 99S : Class 02: A Brief History of Programming Languages". Math.grin.edu. Retrieved 20100425.
14. Ritchie S. King. "The Top 10 Programming Languages". Retrieved 20121126.
15. James L. Elshoff, Michael Marcotty, Improving computer program readability to aid modification
(http://doi.acm.org/10.1145/358589.358596), Communications of the ACM, v.25 n.8, p.512521, Aug 1982.
16. Multiple (wiki). "Readability". Docforge. Retrieved 20100130.
17. Survey of Job advertisements mentioning a given language
(http://www.computerweekly.com/Articles/2007/09/11/226631/sslcomputerweeklyitsalarysurveyfinance
boomdrivesitjob.htm)
18. Mitchell, Robert. "The Cobol Brain Drain". Computer World. Retrieved 9 May 2015.
https://en.wikipedia.org/wiki/Computer_programming 8/9
10/31/2015 Computer programming Wikipedia, the free encyclopedia
Further reading
A.K. Hartmann, Practical Guide to Computer Simulations
(http://www.worldscibooks.com/physics/6988.html), Singapore: World Scientific (2009)
A. Hunt, D. Thomas, and W. Cunningham, The Pragmatic Programmer. From Journeyman to
Master, Amsterdam: AddisonWesley Longman (1999)
Brian W. Kernighan, The Practice of Programming, Pearson (1999)
Weinberg, Gerald M., The Psychology of Computer Programming, New York: Van Nostrand
Reinhold
External links
Media related to Programming at Wikimedia Commons
Wikibooks has a book on
Quotations related to Programming at Wikiquote the topic of: Computer
Learning materials related to programming at Wikiversity Programming
Software engineering
Wikibooks has a book on
the topic of: Windows
Programming
(https://www.dmoz.org/Computers/Software/Software_Engineering/) at DMOZ
Computer programming (https://www.khanacademy.org/computing/cs) – Khan Academy
https://en.wikipedia.org/wiki/Computer_programming 9/9