Skip to main content

Basics of programming

​​​​​​​“At the beginning of a programming course you may ask yourself the question: “Why do you need programming?” or “What does my subject have to do with programming – that’s not a computer science course.”

“At the beginning of a programming course, you may ask yourself the question: “Why do you need programming?” or “What does my subject have to do with programming – that’s not a computer science course.”

Steve Jobs - the founder of Apple - answered the question in an interview like this:

"I think everyone in this country should learn how to program a computer because it teaches you how to think."

Computers have become a central part of our lives - both privately and professionally. Keywords such as smart home, smart production, smart factory, smart farming, smart patient and Industry 4.0, to name just a few, impressively describe the penetration of computers in almost all areas of our lives. It has really become difficult to find an area of life in which computers do not play a role and support us in everyday life. Regardless of whether you are involved in creating the corresponding solutions yourself, knowledge of the basic functionality of digital systems is part of general knowledge - i.e. the knowledge that every person needs in order to be able to orientate themselves in the world. Learning to program is a good hobby that is a lot of fun and useful. It trains your analytical thinking skills. You learn to break down complex issues into small, solvable individual problems and to develop the corresponding solutions. Programming is always done in a programming language. With a programming language you “tell” the computer what to do. At the beginning, you may find it difficult to formulate your solutions in such a way that the computer "understands" what you mean and actually delivers the expected solution to a given problem. On the one hand, this is because the rules of the language take some getting used to and, on the other hand, because formulating the solution to a task is difficult at first. We are used to communicating with people. A computer has no prior knowledge, it knows no context, it cannot draw conclusions itself and it cannot recognize and deal with inaccuracies. The computer can only do what we teach it. Therefore, you have to tell the computer very precisely and in detail everything it needs for the solution.

There are many different programming languages... Learning a new programming language is similar to learning a foreign language. You have to learn lots of new words and new grammar. Just like learning a foreign language, you have to actively use the new language. At first you can express simple things with great difficulty using the newly learned language. Over time, you will master the new language better and better and will be able to formulate complex sentences. As you actively use the programming language, you will also develop other skills that are useful for more than just programming. Once you've learned your first programming language, you'll notice that just knowing how to formulate solutions in one programming language has influenced the way you approach problem solving in other areas.

Programming begins with a detailed examination of the problem to be solved. In order to formulate the appropriate solution, you must first have a thorough understanding of the problem. Questions like: “What do I expect from the solution?” and “What should the solution achieve?” are in the foreground. These questions sound self-evident, but despite this or precisely because of this, answering them is one of the most difficult tasks in programming. Once you have understood the problem and know what the solution has to achieve, you start to think about how the problem can be solved in principle - you analyze the problem and model the corresponding solution or the corresponding solution (algorithm). . For smaller tasks, you may be able to imagine the algorithm well in your head and keep it in your head. For more complicated algorithms, it is advisable to write this down. After you have developed the algorithm, you can start writing it down as a program, i.e. H. to program. This is where the programming language comes into play. When implementing the algorithm, you use the language elements or instructions that the programming language provides. C is an imperative programming language. In imperative programming, a program is a sequence of statements or commands that are executed one after the other in the specified order by the computer. As a programmer, your job is to reformulate the previously developed algorithm as a sequence of instructions so that the computer can execute it.” [6]

[6] Programming I, vfhprog.oncampus.de, as of September 7th, 2017 10:34