How is a program compiled

Coding and Compiling

The point of programming languages ​​is to make it easier to develop programs that a computer can execute. The better a programming language is adapted to the way people think, the more efficiently you can program with it.

Table of Contents

Native compiler

The program written in a certain programming language is called source code. However, in order for a program to be executed on the computer, it must be translated into machine language. This is where the compiler comes in. It does exactly this job. The compiler receives our source code as input, which it first analyzes for errors. If the program actually contains an error, the compiler reports a so-called syntax error. If the program is correct, the corresponding machine code is generated in the form of an executable file.

Interpreted languages

Interpreted programming languages ​​such as C # or Java take a slightly different approach. In these programming languages, the source code is translated into an intermediate language. This means that C # or Java programs actually still consist of code that cannot be executed. The respective code can only be executed through the interpreter. This is why C # programs only work if the .NET Framework is installed and Java programs only work if Java is installed.

Support from an IDE

An IDE ("integrated development environment" or "integrated development environment") is a programmer's primary tool. It provides an editor for the source code and, if necessary, starts the compiler for us in the background. Efficient programming is also heavily dependent on the development environment, so you should choose it very carefully.

Coding isn't everything

The most important tool of a programmer is not the IDE but his brain. Accordingly, the main task of a programmer is not to code but to think. With smaller programs it is sufficient to think about the program structure in advance, with larger programs it is very important to work out a software design. The UML modeling language is often used as a modern aid for this purpose. The resulting diagrams serve the programmer to a certain extent as a template, which reduces the risk of getting bogged down somewhere or losing the overview. Programming is therefore only a part of the entire software development.

Was the article helpful to you? If so, help us and please share it!

Categories Practice