Sei sulla pagina 1di 10

SOURCE - WIKIPEDIA.

ORG
Hide
This November is the Wikipedia Asian Month. Come join us.
Computer programming
From Wikipedia, the free encyclopedia
Software development process
Core activities
Requirements Design Construction Testing Debugging Deployment Maintenance
Paradigms and models
Software engineering Waterfall Prototyping Incremental V-Model Dual Vee Model Sp
iral IID Agile Lean DevOps
Methodologies and frameworks
Cleanroom TSP PSP RAD DSDM MSF Scrum Kanban UP XP TDD ATDD BDD FDD DDD MDD
Supporting disciplines
Configuration management Infrastructure as Code Documentation Software Quality a
ssurance (SQA) Project management User experience
Tools
Compiler Debugger Profiler GUI designer Modeling IDE Build automation Release au
tomation Testing
Standards and BOKs
CMMI IEEE standards ISO 9001 ISO/IEC standards SWEBOK PMBOK BABOK
v t e
Computer programming (often shortened to programming) is a process that leads fr
om an original formulation of a computing problem to executable computer program
s. Programming involves activities such as analysis, developing understanding, g
enerating 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 experti
se in many different subjects, including knowledge of the application domain, sp
ecialized algorithms and formal logic.
Related tasks include testing, debugging, and maintaining the source code, imple
mentation of the build system, and management of derived artifacts such as machi
ne 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 wr
iting of source code. Software engineering combines engineering techniques with
software development practices.
Contents [hide]
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[edit]
Within software engineering, programming (the implementation) is regarded as one
phase in a software development process.

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 pro
ducing an efficient and evolvable software solution (the criteria for "efficient
" and "evolvable" vary considerably). The discipline differs from many other tec
hnical professions in that programmers, in general, do not need to be licensed o
r pass any standardized (or governmentally regulated) certification tests in ord
er to call themselves "programmers" or even "software engineers." Because the di
scipline 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 self-governed by the entities which require the pr
ogramming, and sometimes very strict environments are defined (e.g. United State
s Air Force use of AdaCore and security clearance). However, representing onesel
f as a "professional software engineer" without a license from an accredited ins
titution is illegal in many parts of the world.
Another ongoing debate is the extent to which the programming language used in w
riting computer programs affects the form that the final program takes.[citation
needed] This debate is analogous to that surrounding the Sapir Whorf hypothesis[4
] in linguistics and cognitive science, which postulates that a particular spoke
n language's nature influences the habitual thought of its speakers. Different l
anguage patterns yield different patterns of thought. This idea challenges the p
ossibility of representing the world perfectly with language, because it acknowl
edges that the mechanisms of any language condition the thoughts of its speaker
community.
History[edit]
See also: History of programming languages
Ada Lovelace commenting on the work of Luigi Menabrea, created the first algorit
hm designed for processing by an Analytical Engine and is often recognized as hi
story's first computer programmer.
Ancient cultures seemed to have no conception of computing beyond arithmetic, al
gebra, and geometry, occasionally devising computational systems with elements o
f calculus (e.g. the method of exhaustion). The only mechanical device that exis
ted for numerical computation at the beginning of human history was the abacus,
invented in Sumeria circa 2500 BC. Later, the Antikythera mechanism, invented so
me time around 100 BC in ancient Greece, is the first known mechanical calculato
r utilizing gears of various sizes and configuration to perform calculations,[5]
which tracked the metonic cycle still used in lunar-to-solar calendars, and whi
ch is consistent for calculating the dates of the Olympiads.[6]
The medieval scientist Al-Jazari built programmable automata in 1206 AD. One sys
tem employed in these devices was the use of pegs and cams placed into a wooden
drum at specific locations, which would sequentially trigger levers that in turn
operated percussion instruments. The output of this device was a small drummer
playing various rhythms and drum patterns.[7] The Jacquard loom, which Joseph Ma
rie Jacquard developed in 1801, uses a series of pasteboard cards with holes pun
ched in them. The hole pattern represented the pattern that the loom had to foll
ow in weaving cloth. The loom could produce entirely different weaves using diff
erent sets of cards.
Charles Babbage adopted the use of punched cards around 1830 to control his Anal
ytical Engine. Mathematician Ada Lovelace, a friend of Babbage, between 1842 and
1843 translated an article by Italian military engineer Luigi Menabrea on the e
ngine,[8] which she supplemented with a set of notes, simply called Notes. These
notes include an algorithm to calculate a sequence of Bernoulli numbers,[9] int
ended to be carried out by a machine. Despite controversy over scope of her cont
ribution, many consider this algorithm to be the first computer program.[8]
Data and instructions were once stored on external punched cards, which were kep
t in order and arranged in program decks.
In the 1880s, Herman Hollerith invented the recording of data on a medium that c
ould then be read by a machine. Prior uses of machine readable media, above, had

been for lists of instructions (not data) to drive programmed machines such as
Jacquard looms and mechanized musical instruments. "After some initial trials wi
th paper tape, he settled on punched cards..."[10] To process these punched card
s, first known as "Hollerith cards" he invented the keypunch, sorter, and tabula
tor unit record machines.[11] These inventions were the foundation of the data p
rocessing industry. In 1896 he founded the Tabulating Machine Company (which lat
er became the core of IBM). The addition of a control panel (plugboard) to his 1
906 Type I Tabulator allowed it to do different jobs without having to be physic
ally rebuilt. By the late 1940s, there were several unit record calculators, suc
h as the IBM 602 and IBM 604, whose control panels specified a sequence (list) o
f operations and thus were programmable machines.
The invention of the von Neumann architecture allowed computer programs to be st
ored in computer memory. Early programs had to be painstakingly crafted using th
e instructions (elementary operations) of the particular machine, often in binar
y notation. Every model of computer would likely use different instructions (mac
hine language) to do the same task. Later, assembly languages were developed tha
t let the programmer specify each instruction in a text format, entering abbrevi
ations for each operation code instead of a number and specifying addresses in s
ymbolic form (e.g., ADD X, TOTAL). Entering a program in assembly language is us
ually more convenient, faster, and less prone to human error than using machine
language, but because an assembly language is little more than a different notat
ion for a machine language, any two machines with different instruction sets als
o have different assembly languages.
Wired control panel for an IBM 402 Accounting Machine
The synthesis of numerical calculation, predetermined operation and output, alon
g 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 progra
mming. In 1954, FORTRAN was invented; it was the first widely used high level pr
ogramming language to have a functional implementation, as opposed to just a des
ign on paper.[12][13] (A high-level language is, in very general terms, any prog
ramming language that allows the programmer to write programs in terms that are
more abstract than assembly language instructions, i.e. at a level of abstractio
n "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 progr
am text, or source, is converted into machine instructions using a special progr
am called a compiler, which translates the FORTRAN program into machine language
. In fact, the name FORTRAN stands for "Formula Translation". Many other languag
es were developed, including some for commercial programming, such as COBOL. Pro
grams were mostly still entered using punched cards or paper tape. (See computer
programming in the punch card era). By the late 1960s, data storage devices and
computer terminals became inexpensive enough that programs could be created by
typing directly into the computers. Text editors were developed that allowed cha
nges and corrections to be made much more easily than with punched cards. (Usual
ly, an error in punching a card meant that the card had to be discarded and a ne
w one punched to replace it.)
As time has progressed, computers have made giant leaps in processing power, whi
ch have allowed the development of programming languages that are more abstracte
d from the underlying hardware. Popular programming languages of the modern era
include ActionScript, C, C++, C#, Haskell, Java, JavaScript, Objective-C, Perl,
PHP, Python, Ruby, Smalltalk, SQL, Visual Basic, and dozens more.[14] Although t
hese high-level languages usually incur greater overhead, the increase in speed
of modern computers has made the use of these languages much more practical than
in the past. These increasingly abstracted languages are typically easier to le
arn and allow the programmer to develop applications much more efficiently and w
ith less source code. However, high-level languages are still impractical for a
few programs, such as those where low-level hardware control is necessary or whe
re maximum processing speed is vital. Computer programming has become a popular
career in the developed world, particularly in the United States, Europe, and Ja
pan. Due to the high labor cost of programmers in these countries, some forms of

programming have been increasingly subject to outsourcing (importing software a


nd services from other countries, usually at a lower wage), making programming c
areer decisions in developed countries more complicated, while increasing econom
ic opportunities for programmers in less developed areas, particularly China and
India.
Modern programming[edit]
Question book-new.svg
This section relies largely or entirely upon a single source. Relevant discussio
n may be found on the talk page. Please help improve this article by introducing
citations to additional sources. (August 2010)
Quality requirements[edit]
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 con
ceptual correctness of algorithms, and minimization of programming mistakes, suc
h as mistakes in resource management (e.g., buffer overflows and race conditions
) and logic errors (such as division by zero or off-by-one errors).
Robustness: how well a program anticipates problems due to errors (not bugs). Th
is includes situations such as incorrect, inappropriate or corrupt data, unavail
ability of needed resources such as memory, operating system services and networ
k 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.
Portability: the range of computer hardware and operating system platforms on wh
ich the source code of a program can be compiled/interpreted and run. This depen
ds on differences in the programming facilities provided by the different platfo
rms, 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[15] during init
ial development make the difference in this regard. This quality may not be dire
ctly apparent to the end user but it can significantly affect the fate of a prog
ram over the long term.
Efficiency/performance: Measure of system resources a program consumes (processo
r 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.
Readability of source code[edit]
In computer programming, readability refers to the ease with which a human reade
r can comprehend the purpose, control flow, and operation of source code. It aff
ects the aspects of quality above, including portability, usability and most imp
ortantly maintainability.
Readability is important because programmers spend the majority of their time re
ading, trying to understand and modifying existing source code, rather than writ
ing new source code. Unreadable code often leads to bugs, inefficiencies, and du
plicated code. A study[16] found that a few simple readability transformations m
ade code shorter and drastically reduced the time to understand it.
Following a consistent programming style often helps readability. However, reada
bility is more than just programming style. Many factors, having little or nothi
ng to do with the ability of the computer to efficiently compile and execute the
code, contribute to readability.[17] Some of these factors include:
Different indentation styles (whitespace)
Comments

Decomposition
Naming conventions for objects (such as variables, classes, procedures, etc.)
Various visual programming languages have also been developed with the intent to
resolve readability concerns by adopting non-traditional approaches to code str
ucture and display. Techniques like Code refactoring can enhance readability.
Algorithmic complexity[edit]
The academic field and the engineering practice of computer programming are both
largely concerned with discovering and implementing the most efficient algorith
ms for a given class of problem. For this purpose, algorithms are classified int
o orders using so-called Big O notation, which expresses resource use, such as e
xecution time or memory consumption, in terms of the size of an input. Expert pr
ogrammers are familiar with a variety of well-established algorithms and their r
espective complexities and use this knowledge to choose algorithms that are best
suited to the circumstances.
Methodologies[edit]
The first step in most formal software development processes is requirements ana
lysis, followed by testing to determine value modeling, implementation, and fail
ure elimination (debugging). There exist a lot of differing approaches for each
of those tasks. One approach popular for requirements analysis is Use Case analy
sis. Many programmers use forms of Agile software development where the various
stages of formal software development are more integrated together into short cy
cles that take a few weeks rather than years. There are many approaches to the S
oftware development process.
Popular modeling techniques include Object-Oriented Analysis and Design (OOAD) a
nd Model-Driven Architecture (MDA). The Unified Modeling Language (UML) is a not
ation 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 or proce
dural), functional languages, and logic languages.
Measuring language usage[edit]
Main article: Measuring programming language popularity
It is very difficult to determine what are the most popular of modern programmin
g languages. Methods of measuring programming language popularity include: count
ing the number of job advertisements that mention the language,[18] the number o
f books sold and courses teaching the language (this overestimates the importanc
e of newer languages), and estimates of the number of existing lines of code wri
tten in the language (this underestimates the number of users of business langua
ges 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[19] often on large mai
nframe computers, Fortran in engineering applications, scripting languages in We
b development, and C in embedded software. Many applications use a mix of severa
l 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 object-orientation to C, and Java adds memory management and bytecode
to C++, but as a result, loses efficiency and the ability for low-level manipula
tion).
Debugging[edit]
The bug from 1947 which is at the origin of a popular (but incorrect) etymology
for the common term for a software defect.
Main article: Debugging
Debugging is a very important task in the software development process since hav
ing defects in a program can have significant consequences for its users. Some l
anguages 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, NetBean

s 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[edit]
Main articles: Programming language and List of programming languages
Different programming languages support different styles of programming (called
programming paradigms). The choice of language used is subject to many considera
tions, such as company policy, suitability to task, availability of third-party
packages, or individual preference. Ideally, the programming language best suite
d for the task at hand will be selected. Trade-offs from this ideal involve find
ing enough programmers who know the language to build a team, the availability o
f compilers for that language, and the efficiency with which programs written in
a given language execute. Languages form an approximate spectrum from "low-leve
l" to "high-level"; "low-level" languages are typically more machine-oriented an
d 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" l
anguages 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 multiplicati
on.
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 wri
tten in any other language.
Programmers[edit]
Main article: Programmer
See also: Software developer and Software engineer
Computer programmers are those who write computer software. Their jobs usually i
nvolve:
Coding
Debugging
Documentation
Integration
Maintenance
Requirements analysis
Software architecture
Software testing
Specification
See also[edit]
Book icon
Book: Programming
icon
Computer Science portal
Computing portal
Computer networking portal
icon
Computer programming portal
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[edit]

Jump up ^ Shaun Bebbington (2014). "What is coding". Retrieved 2014-03-03.


Jump up ^ Shaun Bebbington (2014). "What is programming". Retrieved 2014-03-03.
Jump up ^ Paul Graham (2003). "Hackers and Painters". Retrieved 2006-08-22.
Jump up ^ Kenneth E. Iverson, the originator of the APL programming language, be
lieved that the Sapir Whorf hypothesis applied to computer languages (without actu
ally mentioning the hypothesis by name). His Turing award lecture, "Notation as
a tool of thought", was devoted to this theme, arguing that more powerful notati
ons aided thinking about computer algorithms. Iverson K.E.,"[dead link]", Commun
ications of the ACM, 23: 444-465 (August 1980).
Jump up ^ "Ancient Greek Computer's Inner Workings Deciphered". National Geograp
hic News. November 29, 2006.
Jump up ^ Freeth, Tony; Jones, Alexander; Steele, John M.; Bitsakis, Yanis (July
31, 2008). "Calendars with Olympiad display and eclipse prediction on the Antik
ythera Mechanism". Nature. 454 (7204): 614 617. doi:10.1038/nature07130. PMID 1866
8103.
Jump up ^ 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.
^ Jump up to: a b "Sketch of The Analytical Engine, with notes upon the Memoir b
y the Translator". Switzerland: fourmilab.ch. Retrieved 28 March 2014.
Jump up ^ 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.
Jump up ^ "Columbia University Computing History - Herman Hollerith". Columbia.e
du. Retrieved 2010-04-25.
Jump up ^ U.S. Census Bureau: The Hollerith Machine
Jump up ^ "Fortran creator John Backus dies - Tech and gadgets- msnbc.com". MSNB
C. 2007-03-20. Retrieved 2010-04-25.
Jump up ^ "CSC-302 99S : Class 02: A Brief History of Programming Languages". Ma
th.grin.edu. Retrieved 2010-04-25.
Jump up ^ Ritchie S. King. "The Top 10 Programming Languages". Retrieved 2012-11
-26.
Jump up ^ "Programming 101: Tips to become a good programmer - Wisdom Geek". Wis
dom Geek. 2016-05-19. Retrieved 2016-05-23.
Jump up ^ James L. Elshoff, Michael Marcotty, Improving computer program readabi
lity to aid modification, Communications of the ACM, v.25 n.8, p.512-521, Aug 19
82.
Jump up ^ Multiple (wiki). "Readability". Docforge. Retrieved 2010-01-30.
Jump up ^ Survey of Job advertisements mentioning a given language
Jump up ^ Mitchell, Robert. "The Cobol Brain Drain". Computer World. Retrieved 9
May 2015.
Further reading[edit]
A.K. Hartmann, Practical Guide to Computer Simulations, Singapore: World Scienti
fic (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)
Weinberg, Gerald M., The Psychology of Computer Programming, New York: Van Nostr
and Reinhold (1971)
Edsger W. Dijkstra, A Discipline of Programming, Prentice-Hall (1976)
O.-J. Dahl, E.W.Dijkstra, C.A.R. Hoare, Structured Pogramming, Academic Press (1
972)
David Gries, The Science of Programming, Springer-Verlag (1981)
External links[edit]
Wikibooks has a book on the topic of: Computer Programming
Wikibooks has a book on the topic of: Windows Programming
Library resources about
Computer programming
Online books
Resources in your library

Resources in other libraries


Media related to Programming at Wikimedia Commons
Quotations related to Programming at Wikiquote
Learning materials related to programming at Wikiversity
Software engineering at DMOZ
[show] v t e
Major fields of computer science
[show] v t e
Software engineering
Authority control
LCCN: sh85107310 GND: 4076370-5 BNF: cb11932648m (data) NDL: 00569223
Categories: Computer programmingComputers
Navigation menu
Not logged inTalkContributionsCreate accountLog inArticleTalkReadEditView histor
ySearch
Search Wikipedia
Go
Main page
Contents
Featured content
Current events
Random article
Donate to Wikipedia
Wikipedia store
Interaction
Help
About Wikipedia
Community portal
Recent changes
Contact page
Tools
What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Wikidata item
Cite this page
Print/export
Create a book
Download as PDF
Printable version
In other projects
Wikimedia Commons
Wikibooks
Wikiquote
Wikiversity
Languages
Afrikaans
???????
Aragons
Asturianu
Az?rbaycanca
?????
??????????
?????????? (???????????)?
?????????
Bosanski

Catal
Ce tina
Dansk
Deutsch
Eesti
????????
Espaol
Esperanto
Euskara
?????
Franais
Galego
???
???????
??????
Hrvatski
Bahasa Indonesia
Italiano
?????
?????
???????
Latina
Latvie u
Lietuviu
La .lojban.
Magyar
??????????
??????
????
Bahasa Melayu
??????
Nederlands
???
Norsk bokml
Norsk nynorsk
Occitan
???? ?????
O?zbekcha/???????
??????
?????????
Polski
Portugus
Romna
???????
Scots
Shqip
Simple English
Slovencina
Sloven cina
?????? / srpski
Srpskohrvatski / ??????????????
Suomi
Svenska
?????
???
Trke
Trkmene
?? ????
??????????
????

Ti?ng Vi?t
??????
Zazaki
??
Edit links
This page was last modified on 21 October 2016, at 19:13.
Text is available under the Creative Commons Attribution-ShareAlike License; add
itional terms may apply. By using this site, you agree to the Terms of Use and P
rivacy Policy. Wikipedia is a registered trademark of the Wikimedia Foundation, I
nc., a non-profit organization.
Privacy policyAbout WikipediaDisclaimersContact WikipediaDevelopersCookie statem
entMobile viewWikimedia Foundation Powered by MediaWiki

Potrebbero piacerti anche