July 05, 2021

How to learn C/C++ as fast as possible

 Sometimes it was mentioned, that C and especially C++ are complicated languages which are hard to learn. The reason is, that C++ allows to write low level code which includes pointers. In addition the amount of possible C++ commands is high and the chance is high that the newbie won't understanding anything.

So the logical choice is to avoid the C++ language at all and take a look for a programming language which works better. Potential candidates are Python (very beginner friendly) and Java (works great for writing productive code).

Sure the Python language works great for creating a prototype. But it fails for creating a productive application. So the question which language would combine the strength of python with a fast runtime performance?

The main problem with potential alternatives to C/C++ is that all these languages are seen as a second choice. Sure it is possible to write code in freepascal, C#, swift or ruby. But the default compiler on all the operating system remains c/c++ and most programs in the world were realized in C/C++. It seems, that from a technical perspective the language is great and the bottleneck is the programmer who doesn't understand it?

The interesting situation with C/C++ is, that the perceived complexity depends greatly on the manual. This is a contradiction to the Python universe in which the language is described in most manuals the same way. There are two sorts of C/C++ manuals available. Older one which are focussed on the language itself and are some sort of reference book. These sort of manuals have created the perception that C/C++ is hard to understand. And there are more recent tutorials available which are describing how to use C/C++ for writing games and apps.

A prominent example for a recent handbook is “SFML Game Development By Example”. The interesting thing is, that this book explains more things than only the language itself and at the same time it is easy to read. The difficulty is not harder than a python book about the pygame envirionment. The newbie learns how to write a small game in under 500 lines of code with the usage of a graphics library and some self defined classes.

The interesting point is, that according to this (and many similar books) C++ is some sort of python like programming language, but it runs much faster.

Let me summarize the situation a bit. First thing to mention is, that C/C++ remains technically the best programming language in the world and secondly it depends largely on the tutorial if the newbie is able to master the language.