Computer programming

This article is about the activity of creating software. For other meanings, see Programming (disambiguation).

Programming (from ancient Greek πρόγραμμα prógramma "message made public and in writing, command") refers to the activity of creating computer programs. This is a subfield of software development.

Computer programs are formulated ("coded") with the help of a programming language. The programmer 'translates' the specified requirements (e.g. in the specifications) and algorithms into a desired programming language. Sometimes code generators are used for this purpose, which automatically generate parts of the program code on the basis of models (which have been created in the design).

When programming, essential aspects for software quality have to be considered and implemented by the design of the source code. See as examples: Programming style, usability, reusability/modularity, maintainability.

Programming' in an extended sense includes numerous other activities in addition to code creation, for example testing (developer testing) of the program or creating the programming documentation. Other software development activities, such as project management, requirements analysis, or data modeling, can be distinguished from programming.

Depending on the type and application environment of software (e.g. for system software, game software, standard software, graphics software. etc.), different procedures or/and tools (such as programming languages, test procedures, etc.) can be used for development and/or executed by specialized developers.

Depending on the process model used, the programming activities take place in temporally distinct project phases, in parallel or iteratively. In practice, programming often takes place in teamwork, with modern development methods (such as agile software development) and programming tools.

Related meanings: Colloquially, configuring household or other electrical appliances is sometimes called "programming". Also organizational units of companies, in which software is developed, are or were partly called "programming".

Quality Criteria

Main article: Software quality

The quality of software is to a large extent created in the course of programming activities, especially concerning the following quality criteria:

Correctness

Main article: Program error

A program must correctly implement the specifications made in the design. To do this, it must usually be error-free, whereby two different types of errors usually occur during programming:

  1. Syntax errors: Incorrectly formulated source code - formulations or constructs are used that do not occur in the programming language used (typing errors, ignorance, ...). Syntax errors can be detected by the compiler/interpreter or parser during compilation and usually prevent program execution.
  2. Semantic errors: The program does not behave as desired, possibly because the algorithm or its implementation was faulty. Semantic errors cannot usually be detected automatically, but can only be found through conscientious testing - for example, in the form of unit tests.

The transition between these two types of errors is fluid. For example, a typo in the code (e.g., ">" instead of "<" in a compare command) will result in a valid executable, but the result is likely to be incorrect. Elsewhere, the same error might be a syntax error.

Robustness

Statistically, most source code development time is spent responding to bugs or unusual application or hardware environments. Program code that responds meaningfully to unforeseen errors or unusual environments is called robust or portable. Skilled programmers are good at assessing the possible errors and runtime environments and structure the program and its source code accordingly. The time pressure in the development of applications always places the highest demands on even experienced programmers with regard to this criterion.

Maintainability

For a software to function permanently, it must be maintainable. This means that changes such as bug fixes, adaptations and new features must be able to be incorporated without great effort. Above all, this requires that the programmer should not create too short, "cryptic" source code (or source code), which is not understandable for other developers or only with a high training period.

To avoid such problems, naming conventions often exist in which, for example, self-explanatory (or also "speaking") identifiers/names for variables etc. are recommended/prescribed for use - or the use of meaningful comments in the code. A sensible division of the code into intuitively understandable functions and classes also contributes to understanding and clarity.

See also: Programming style

Efficiency

As a rule, only limited resources (runtime, memory consumption, bandwidth) are available to a program. Good programming can help to reduce unnecessary resource consumption. For example, when using large amounts of data at several points in the program, the entire data set is not copied in each case, but only the address at which the data is stored is transferred.

Efficient programming

According to Niklaus Wirth, good programming is characterized on the one hand by the fact that the functions provided by the respective programming environment are used as efficiently as possible. In particular, it is a matter of not reinventing the wheel again and again for new tasks if certain functions are already provided (for example, by the programming environment in the form of program libraries). It is characterized thus above all by the fact that a good overview of the fundamental function range and the systematics of the functions made available by the programming environment (which can go into the tens of thousands) is possible. For a defined task, an available function can then be quickly determined in corresponding documentation, used and, if necessary, extended.


AlegsaOnline.com - 2020 / 2023 - License CC3