Computer programming
From DocForge
Computer programming (often shortened to programming or coding) is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language. The code may be a modification of an existing source or something completely new. The purpose of programming is to create a program that exhibits a certain desired behavior (customization).
Said another way, programming is the craft of transforming requirements into something that a computer can execute.
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, a craft or an engineering discipline. Good programming is generally considered to be the measured application of all three, with the goal of producing an efficient and maintainable software solution (the criteria for "efficient" and "maintainable" vary considerably). The discipline differs from many other technical professions in that programmers generally 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".
Contents |
[edit] Programmers
The process of writing source code requires expertise in many different subjects:
- Formal logic
- Specialized algorithms
- Knowledge of the application domain
Computer programmers are those who write computer software. Their job usually involves:
- Requirements analysis
- Specification
- Software architecture
- Coding
- Compilation
- Software testing
- Documentation
- Integration
- Maintenance
[edit] 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.
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: Get 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. math: Perform basic mathematical 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 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.
[edit] Modern Programming
[edit] Quality Requirements
Whatever the approach to software development may be, the final program must satisfy some fundamental properties. The following five properties are among the most relevant:
- Efficiency: the amount of system resources a program consumes (processor time, memory space, slow devices, network bandwidth and to some extent even user interaction), the less the better.
- Reliability: how often the results of a program are correct. This depends on prevention of error propagation resulting from data conversion and prevention of errors resulting from buffer overflows, underflows and zero division.
- Robustness: how well a program anticipates situations of data type conflict and other incompatibilities that result in run time errors and program halts. The focus is mainly on user interaction and the handling of exceptions.
- Usability: the clearity and intuitiveness of a programs output can make or break it's success. This involves a wide range of textual and graphical elements that makes a program easy and comfortable to use.
- Portability: the range of hardware and OS platforms on which the source code of a program can be compiled and run. This depends mainly on the range of platform specific compilers for the language of the source code rather than anything having to do with the program directly.
[edit] 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 so-called Big O notation, O(n), 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.
[edit] Methodologies
The first step in most formal software development projects is requirements analysis, followed by 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.
Popular modeling techniques include Object-Oriented Analysis and Design (OOAD) and Model-Driven Architecture (MDA). The Unified Modeling Language (UML) is a notation used for both OOAD and MDA.
A similar technique used for database design is Entity-Relationship Modeling (ER Modeling).
Implementation techniques include imperative languages (object-oriented or procedural), functional languages, and logic languages.
Debugging is most often done with IDEs like Visual Studio, NetBeans, and Eclipse. Separate debuggers like gdb are also used.
[edit] Debugging
Debugging is a very important task in the software development process, because an erroneous 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 analysis tool can help detect some possible problems.

