Computer programming

Programming (from Greek programma, regulation " ) refers to the activity to produce computer programs. This includes in particular the implementation ( implementation) of the software design into source code, and - depending on the programming language - translating the source code into machine language, usually using a compiler.

Programs are formulated using programming languages ​​( " encoded "). In such a language "translated " the programmer (eg specifications) specified requirements and algorithms. Increasingly, he is supported by code generators that at least parts of the program code on basis of models ( which have arisen in the design ) for you automatically. Other tasks of programmers include, for example, testing (developers test) its program, creating software documentation, etc.

In many, especially in smaller software projects and use Agile processes, the design and creation of a program run in parallel, the program develops in these cases, in close interaction with the design and vice versa. In larger projects, the design and programming ( then often referred to as implementation) machined in succession; the programmer relies to the specifications of the design into program code. Nevertheless, the program is also in this case a creative activity; because of the design, while providing a functional framework, but can be implemented in different ways.

Similar meanings: Colloquially referred occasionally to configure household or other electrical devices as " programming". Also organizational units of companies in which software is developed, or were in part called " programming".

Quality criteria

The quality of software is created largely through the activities of the programming, especially the following quality criteria relating to:

Correctness

A program needs to implement the specifications laid down in the draft correctly. There must be error- free, as a rule, with programming usually two different types of errors can occur:

The transition between these two types of errors is fluid. For example, a typo in the code (eg, " > " instead of " <" ) lead to a valid executable program, the result is, however, likely to be wrong. Elsewhere again the same error could be a syntax error.

Syntax errors are usually recognized and named by the compiler or interpreter as such. Semantic errors in the program can not automatically detected normally but are found only by conscientious testing - for example in the form of unit tests.

Robustness

Most of the time for the development of source code is statistically needed to respond to errors or unusual application or hardware environments. A program text, which reacts also useful for unforeseen errors or unusual environments is referred to as robust and portable. Experienced programmers can the possible errors and runtime environments to assess good and restructure accordingly, the program and its source code. The time pressure in the development of applications is even for experienced programmers always the highest demands with regard to this criterion.

Maintainability

This software works constantly, it must be maintainable. That is, changes such as bug fixes, changes and new features need to be entered without much effort. This requires in particular that the programmer should not generate too short, " cryptic " code that is understandable by other developers, or only with high training time.

To avoid such problems, there are a number of conventions such as the use of self-explanatory variable names and the use of comments in the code. Also, a sensible division of the code in intuitive functions and classes contributes to the understanding and clarity.

See also programming style

Efficiency

Typically, a program has only limited resources ( runtime, memory usage, bandwidth ) are available. Good programming can help to reduce unnecessary resource consumption. For example, this is done by not each of the entire data is copied in the program for the use of large amounts of data in several places, but only the address is transferred, the data is stored.

Efficient programming

According Niklaus Wirth is good programming on the one characterized by the fact that the functions that provides the programming environment used in each case, be used as efficiently as possible. It is particularly important to invent new tasks for the wheel does not always new when certain functions are already provided (for example, through the programming environment in the form of program libraries ). So distinguished primarily by the fact that a good overview of the basic functions and the classification of provided by the programming environment functions (which can go into the thousands ) is possible. For a defined task can then quickly determine an available function in the corresponding documentation are used and possibly extended.

Work equipment

Theoretically, sufficient for programming from a simple text editor and a compiler / interpreter for the particular programming language. In practice, however, resorted in addition to a number of tools that are designed to simplify typical programming tasks. These include, for example, text editors with special features such as syntax highlighting, autocomplete and refactoring - the transition to the Integrated Development Environment ( IDE) is fluid.

There are also various tools for debugging, so-called debugger, as well as programs for the implementation of static and dynamic tests. For the performance analysis, a profiler can be used in addition.

If several developers have the same software, most versioning systems are used which store the code including previous versions on a central server, to which all the programers access.

73766
de