Computer programming is the process of building and designing executable computer programs to accomplish certain computing tasks. Programming involves tasks such as analysis, generating algorithms, measuring algorithm accuracy and resource consumption, and application of algorithms in the 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 to solve a given problem. Such programming processes often require expertise in several different subjects, including knowledge of application domains, special algorithms, and formal logic.
Related tasks include testing, debugging, program source code maintenance, system build implementation, and derived artifact management such as computer programming machine code. This may be considered part of the programming process, but often the term software development is used for this larger process by the terms programming , implementation , or encoding is provided for the actual source code writing. Software engineering combines engineering techniques with software development practices.
Video Computer programming
Histori
Programmable devices existed at least as far as 1206 AD, when Al-Jazari's automata were programmed, through pegs and cams, to play various rhythms and drum patterns; and the jacquard 1801 looms can produce completely different weaves by changing the "program" - a series of board cards with perforated holes.
However, the first computer program was generally dated 1843, when mathematician Ada Lovelace published an algorithm to calculate the order of numbers of Bernoulli, which was intended to be performed by Analytical Engine Charles Babbage.
In the 1880s Herman Hollerith invented the concept of storing data âââ ⬠<â ⬠Machine code is the initial program language, written in a set of machine specific instructions, often in binary notation. An assembly language is immediately developed that allows the programmer to specify the instruction in text format, (eg ADD X, TOTAL), with abbreviations for each operation code and meaningful name to specify the address. However, since assembly language is little more than a different notation for machine language, two machines with different instruction sets also have different assembly languages. High-level languages ââallow programmers to write programs in more abstract terms, and are less tied to the underlying hardware. They make use of the power of computers to simplify programming by allowing programmers to determine calculations by entering the formulas directly (eg, Y = X * 2 5 * X 9 ). FORTRAN, the first high-level language widely used to have a functional implementation, came out in 1957 and many other languages ââsoon developed - in particular, COBOL devoted to commercial data processing, and Lisp for computer research. Most programs are still incorporated using cards or perforated paper ribbons. See computer programming in the era of punch cards. In the late 1960s, data storage devices and computer terminals became reasonably priced so that programs could be created by typing directly onto a computer. A text editor is developed that allows changes and corrections to be made much easier than with hollow cards. Maps Computer programming
Modern programming
Quality requirements
Whatever its development approach, the final program must meet some fundamental properties. The following properties are the most important:
- Reliability: how often the results of a program are correct. This depends on the conceptual correctness of the algorithm, and minimizes programming errors, such as errors in resource management (eg, buffer overflow and race conditions) and logic errors (such as zero or off-by-one).
- Robustness: how well a program anticipates a problem because of an error (not a bug). This includes situations such as false, inappropriate or corrupt data, unavailability of required resources such as memory, operating system services and network connections, user errors, and unexpected power outages.
- Usefulness: The ergonomics of a program: the convenience of a person can use the program for its intended purpose or in some cases even unexpected purposes. Such issues can make or break its success even without other problems. It involves a variety of textual, graphic, and sometimes hardware elements that enhance the clarity, intuitive, compactness, and completeness of the program's user interface.
- Portability: the range of computer hardware and operating system platforms where the source code of a program can be compiled/interpreted and executed. This depends on the differences in programming facilities provided by different platforms, including hardware and operating system resources, expected behavior of hardware and operating systems, and availability of platform-specific compilers (and sometimes libraries) for source code languages./li>
- Maintainability: the ease with which programs can be modified by current or future developers to make improvements or adjustments, fix bugs and security holes, or customize them with new environments. Good practice during initial development makes a difference in this regard. This quality may not be immediately visible to the end user but may greatly affect the fate of the program over the long term.
- Efficiency/performance: Measures the system resources a program consumes (processor time, memory space, slow devices like disk, network bandwidth and to some extent even user interaction): the less, the better. It also includes careful management of resources, for example cleaning up temporary files and eliminating memory leaks.
Reading the source code
In computer programming, readability refers to the ease with which the human reader can understand the purpose, flow of control, and operation of the source code. It affects these aspects of quality, including the most important portability, usability and maintenance.
Readability is important because programmers spend most of their time reading, trying to understand and modify existing source code, rather than writing new source code. Unreadable code often leads to bugs, inefficiencies, and duplicate code. A study found that some simple reading transformations shorter code and drastically reduce the time to understand it.
Following a consistent programming style often helps legibility. However, legibility is more than just a programming style. Many factors, having little or nothing to do with the ability of computers to efficiently compile and execute code, contribute to legibility. Some of these factors include:
- Different indentation styles (spaces)
- Comments
- Decomposition
- Naming conventions for objects (such as variables, classes, procedures, etc.)
This presentation aspect (such as indentation, line breaks, color highlighting, etc.) is often handled by the source code editor, but the content aspect reflects the programmer's talent and skills.
Various visual programming languages ââhave also been developed with a view to solving legibility problems by adopting a non-traditional approach to the structure and appearance of the code. The integrated development environment (IDE) aims to integrate all such assistance. Techniques such as code refactoring can improve readability.
The algorithm complexity
The field of academic and computer programming engineering practice is closely linked to the invention and application of the most efficient algorithms for a particular class of problems. For this purpose, the algorithm is classified into command using what is called the Big O notation, which states the use of resources, such as execution time or memory consumption, in terms of input size. Expert programmers are familiar with the various established algorithms and their respective complexities and use this knowledge to select the algorithm that best suits the circumstances.
Methodology
The first step in most formal software development processes is demand analysis, followed by testing to determine value modeling, implementation, and debugging. There are many different approaches to each of these tasks. One popular approach to needs analysis is the Use Case analysis. Many programmers use Agile software development forms where different stages of formal software development are more integrated together into short cycles that take weeks and not 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). Unified Modeling Language (UML) is a notation used for OOAD and MDA.
Similar techniques used for database design are Entity-Relationship Modeling (ER Modeling).
Implementation techniques include imperative languages ââ(object-oriented or procedural), functional languages, and logic languages.
Measure language use
It is very difficult to determine what modern programming languages ââare most popular. The methods of measuring the popularity of a programming language include: counting the number of job advertisements that mention the language, the number of books sold and the language teaching course (this exaggerates the importance of the new language), and the approximate number of lines of code present in the language (this underestimates the number of language users businesses like COBOL).
Some languages ââare very popular for certain types of applications, while some languages ââare regularly used to write different types 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 multiple language mixes in their construction and use. New languages ââare generally designed around the previous language syntax with added new functionality, (eg C adds object orientation to C, and Java adds memory management and bytecode to C, but as a result, loss of efficiency and ability for low-level manipulation).
Debugging
Debugging is a very important task in the software development process because having a defect in a program can have significant consequences for its users. Some languages ââare more susceptible to some types of errors because their specifications do not require compilers to check as many other languages. The use of static code analysis tools can help detect some possible problems. Usually the first step in debugging is to try to reproduce the problem. This can be a trivial task, such as with parallel processing or some unusual software bugs. In addition, the user environment and certain usage history may make it difficult to reproduce the problem.
Once the bug is reproduced, program input may need to be simplified to make it easier to debug. For example, a bug in the compiler can make it crash when parsing large source files. However, after a trial simplification, only a few lines of the original source file are sufficient to reproduce the same crash. Such simplification can be done manually, using the divide-and-conquer approach. The programmer will try to remove some parts of the original test case and check if the problem still exists. When debugging a problem in the GUI, the programmer may try to skip some user interaction from the original problem description and check if the remaining action is enough for the bug to appear.
Debug is often done with IDEs like Eclipse, Visual Studio, Xcode, Kdevelop, NetBeans, and Code :: Blocks. A stand-alone debugger like GDB is also used, and this often delivers less than the visual environment, typically using the command line. Some text editors like Emacs allow GDB to be called through them, to provide a visual environment.
Programming languages ââ
Different programming languages ââsupport different programming styles (called programming paradigms ). The choice of language used is subject to many considerations, such as company policy, suitability for tasks, availability of third-party packages, or individual preferences. Ideally, the most suitable programming language for the task in hand will be selected. The trade-off of these ideals involves finding enough programmers who know the language to build teams, the availability of compilers for that language, and efficiency with programs written in a particular language. The language forms the approximate spectrum from "low level" to "high level"; The "low level" language is usually more machine-oriented and faster to execute, while the "high-level" language is more abstract and easier to use but executes less quickly. It's usually easier to code in a "high-level" language than a "low-level" language.
Allen Downey, in his book How to Think Like a Computer Scientist , writes:
- The details look different in different languages, but some basic hints appear in almost every language:
- Input: Collect data from a keyboard, file, or other device.
- Output: Displays data on the screen or sends data to another file or device.
- Arithmetic: Perform basic arithmetic operations such as additions and multiplications.
- Conditional Execution: Check for certain conditions and run the proper statement sequence.
- Repetition: Perform multiple actions repeatedly, usually with some variation.
Many computer languages ââprovide a mechanism for calling functions provided by shared libraries. By providing the functions in the library, follow the appropriate run-time conventions (eg, the method of repeating arguments), then these functions can be written in another language.
Programmer
Computer programmers are those who write computer software. Their work usually involves:
See also
- ACCU
- Association for Computing Machines
- Computer network
- Hello world program
- Institutional Analysts and Programmers
- National Coding Week
- System programming
- Computer Programming Arts
References
Further reading
- A.K. Hartmann, Practical Guide for Computer Simulation , Singapore: World Scientific (2009)
- A. Hunt, D. Thomas, and W. Cunningham, Pragmatic Programmer. From Journeyman to Master , Amsterdam: Addison-Wesley Longman (1999)
- Brian W. Kernighan, Practice Programming , Pearson (1999)
- Weinberg, Gerald M., Computer Programming Psychology , New York: Van Nostrand Reinhold (1971)
- Edsger W. Dijkstra, Programming Discipline , Prentice-Hall (1976)
- O.-J. Dahl, E.W.Dijkstra, C.A.R. Hoare, Structured Pogramming , Academic Press (1972)
- David Gries, Science Programming , Springer-Verlag (1981)
External links
- Media related to Programming on Wikimedia Commons
- Related citations Programming in Wikiquote
- Software engineering in Curlie (based on DMOZ)
Source of the article : Wikipedia