computer programming if the white bishop at b3 moves to a2 capturing the black knight then the black pawn at b1 is programmed to capture the bishop back indicated by purple color at a2 black has just moved yellow example from a chess game notation if bn then b1b computer programming is the process of designing and building an executable computer program for accomplishing a specific computing task programming involves tasks such as analysis generating algorithms profiling algorithms accuracy and resource consumption and the implementation of algorithms in a chosen programming language commonly referred to as coding the source code of a program is written in one or more programming languages the purpose of programming is to find a sequence of instructions that will automate the performance of a task for solving a given problem the process of programming thus often requires expertise in several different subjects including knowledge of the application domain specialized algorithms and formal logic related tasks include testing debugging maintaining a programs source code implementation of build systems 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 history ada lovelace whose notes added to the end of luigi menabreas paper included the first algorithm designed for processing by an analytical engine she is often recognized as historys first computer programmer see also history of programming languages programmable devices have existed at least as far back as 1206 ad when the automata of aljazari were programmable via pegs and cams to play various rhythms and drum patterns and the 1801 jacquard loom could produce entirely different weaves by changing the program a series of pasteboard cards with holes punched in them however the first computer program is generally dated to 1843 when mathematician ada lovelace published an algorithm to calculate a sequence of bernoulli numbers intended to be carried out by charles babbages analytical engine data and instructions were once stored on external punched cards which were kept in order and arranged in program decks in the 1880s herman hollerith invented the concept of storing data in machinereadable form later a control panel plugboard added to his 1906 type i tabulator allowed it to be programmed for different jobs and by the late 1940s unit record equipment such as the ibm 602 and ibm 604 were programmed by control panels in a similar way as were the first electronic computers however with the concept of the storedprogram computers introduced in 1949 both programs and data were stored and manipulated in the same way in computer memory machine code was the language of early programs written in the instruction set of the particular machine often in binary notation assembly languages were soon developed that let the programmer specify instruction in a text format eg 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 any two machines with different instruction sets also have different assembly languages wired control panel for an ibm 402 accounting machine highlevel languages allow the programmer to write programs in terms that are syntactically richer and more capable of abstracting the code making it targetable to varying machine instruction sets via compilation declarations and heuristics the first compiler for a programming language was developed by grace hopper programs 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 frances holberton created a code to allow keyboard inputs while she worked at univac modern programming quality requirements software development core activities processes requirements design engineering construction testing debugging deployment maintenance paradigms and models agile cleanroom incremental prototyping spiral v model waterfall methodologies and frameworks asd devops dad dsdm fdd iid kanban lean sd less mdd msf psp rad rup safe scrum semat tsp up xp supporting disciplines configuration management documentation software quality assurance sqa project management user experience practices atdd bdd cco ci cd ddd pp standup tdd tools compiler debugger profiler gui designer modeling ide build automation release automation infrastructure as code testing standards and bodies of knowledge babok cmmi ieee standards iso 9001 isoiec standards pmbok swebok itil glossaries artificial intelligence computer science electrical and electronics engineering vte 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 eg 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 programs user interface portability the range of computer hardware and operating system platforms on which the source code of a program can be compiledinterpreted 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 efficiencyperformance 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 files and eliminating memory leaks readability of source code 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 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 some of these factors include different indent styles whitespace comments decomposition naming conventions for objects such as variables classes procedures etc the presentation aspects of this such as indents line breaks color highlighting and so on are often handled by the source code editor but the content aspects reflect the programmers talent and skills various visual programming languages have also been developed with the intent to resolve readability concerns by adopting nontraditional approaches to code structure and display integrated development environments ides aim to integrate all such help 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 chess algorithms as an example programming a computer for playing chess was a 1950 paper that evaluated a minimax algorithm that is part of the history of algorithmic complexity a course on ibms deep blue chess computer is part of the computer science curriculum at stanford univeristy methodologies 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 implementation techniques include imperative languages objectoriented or procedural functional languages and logic languages measuring language usage measuring programming language popularity 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 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 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 the bug from 1947 which is at the origin of a popular but incorrect etymology for the common term for a software defect 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 nontrivial 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 a bug in a compiler can make it crash when parsing some large source file however after simplification of the test case only few lines from the original source file can be sufficient to reproduce the same crash such simplification can be done manually using a divideandconquer approach the programmer will try to remove some parts of 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 debugging is often done with ides like eclipse visual studio xcode kdevelop netbeans and codeblocks 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 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 considerations such as company policy suitability to task availability of thirdparty packages or individual preference ideally the programming language best suited for the task at hand will be selected tradeoffs 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 lowlevel to highlevel lowlevel languages are typically more machineoriented and faster to execute whereas highlevel languages are more abstract and easier to use but execute less quickly it is usually easier to code in highlevel languages than in lowlevel 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 libraries provided the functions in a library follow the appropriate runtime conventions eg method of passing arguments then these functions may be written in any other language programmers 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 specification computer science portal computing portal computer networking portal computer programming portal outline of computer programming accu association for computing machinery computer networking hello world program institution of analysts and programmers national coding week system programming computer programming in the punched card era the art of computer programming ceruzzi paul e 1998 history of computing cambridge massachusetts mit press isbn9780262032551 via ebscohost subscription required help evans claire l 2018 broad band the untold story of the women who made the internet new york portfoliopenguin isbn9780735211759 grer denise 1995 pioneering women in computer science pdf communications of the acm 38 1 4554 smith erika e 2013 recognizing a collective inheritance through the history of women in computing clcweb comparative literature culture a wwweb journal 15 1 19 via ebscohost subscription required help ak 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 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 1971 edsger w dijkstra a discipline of programming prenticehall 1976 oj dahl ewdijkstra car hoare structured pogramming academic press 1972 david gries the science of programming springerverlag 1981 wikibooks has a book on the topic of computer programming wikibooks has a book on the topic of windows programming wikiversity has learning resources about computer 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 software engineering at curlie vtemajor fields of computer sciencenote this template roughly follows the 2012 acm computing classification systemhardware printed circuit board peripheral integrated circuit very large scale integration systems on chip socs energy consumption green computing electronic design automation hardware acceleration computer systemsorganization computer architecture embedded system realtime computing dependability networks network architecture network protocol network components network scheduler network performance evaluation network service software organization interpreter middleware virtual machine operating system software quality software notationsand tools programming paradigm programming language compiler domainspecific language modeling language software framework integrated development environment software configuration management software library software repository software development software development process requirements analysis software design software construction software deployment software maintenance programming team opensource model theory of computation model of computation formal language automata theory computational complexity theory logic semantics algorithms algorithm design analysis of algorithms algorithmic efficiency randomized algorithm computational geometry mathematicsof computing discrete mathematics probability statistics mathematical software information theory mathematical analysis numerical analysis informationsystems database management system information storage systems enterprise information system social information systems geographic information system decision support system process control system multimedia information system data mining digital library computing platform digital marketing world wide web information retrieval security cryptography formal methods security services intrusion detection system hardware security network security information security application security humancomputerinteraction interaction design social computing ubiquitous computing visualization accessibility concurrency concurrent computing parallel computing distributed computing multithreading multiprocessing artificialintelligence natural language processing knowledge representation and reasoning computer vision automated planning and scheduling search methodology control method philosophy of artificial intelligence distributed artificial intelligence machine learning supervised learning unsupervised learning reinforcement learning multitask learning crossvalidation graphics animation rendering image manipulation graphics processing unit mixed reality virtual reality image compression solid modeling appliedcomputing ecommerce enterprise software computational mathematics computational physics computational chemistry computational biology computational social science computational engineering computational healthcare digital art electronic publishing cyberwarfare electronic voting video games word processing operations research educational technology document management book category portal wikiproject commons vtesoftware engineeringfields computer programming requirements engineering software deployment software design software maintenance software testing systems analysis formal methods concepts data modeling enterprise architecture functional specification modeling language orthogonality programming paradigm software software archaeology software architecture software configuration management software development methodology software development process software quality software quality assurance software verification and validation structured analysis orientations agile aspectoriented object orientation ontology service orientation sdlc modelsdevelopmental agile eup executable uml incremental model iterative model prototype model rad up scrum spiral model vmodel waterfall model xp other spice cmmi data model er model function model information model metamodeling object model systems model view model languages idef uml usl sysml softwareengineers victor basili kent beck grady booch fred brooks barry boehm peter chen danese cooper ward cunningham tom demarco edsger w dijkstra delores m etter martin fowler adele goldstine margaret hamilton c a r hoare lois haibt mary jean harrold grace hopper watts humphrey michael a jackson ivar jacobson alan kay nancy leveson stephen j mellor bertrand meyer david parnas trygve reenskaug winston w royce james rumbaugh mary shaw peri tarr elaine weyuker niklaus wirth edward yourdon related fields computer science computer engineering project management risk management systems engineering category commons authority control bnf cb11932648m data gnd 40763705 lccn sh85107310 ndl 00569223 