June 06, 2018

Which programming language should i learn?


The question itself is a bit outdated. It was relevant in a time in which sourcecode was not available public so the only way to get new software was to program it by own. Nowadays the typical user isn't programming anymore instead he selects an app from the Android/ios app store, he buys a box in a computerstore or he installs new open source software with the dnf package manager in Fedora.
But sometimes there is a need for programming software from scratch, in most cases for educational purposes. And here has the user the problem that it is unclear which programming language is the best. The most important information is, that between the different types of language the differences are very small. That means all the language are based on textfiles which are stored in the memory and the files containing commands, classes and variables. A second important information is, that in reality nobody really programs in a certain programming language. What the Stackoverflow and github users are doing is to program with a certain library, purpose and operating system.
For example, the goal is to program a pacman clone. The question is not, if Javascript, C++ or C# is the best choice. Instead the programmer will ask if the software should run in Android, on a desktop PC. And he will ask if the graphic contains only Ascii or 2d or 3D. That means, the choice for a certain programming language is mostly a random choice and has to do with software already there.
Let us make a more simpler example. Suppose the goal is to program a prime number generator. The interesting fact is, that in every language the result will look equal. In most cases, the correct answer will look like the sourcecode in rosettacode.org/ and there is no real difference between Python, C++ and Java. The only choice available is between procedural and object-oriented programming. And indeed, this is a question which has to be mastered individual. That means, a procedural primenumber generator looks different from his OOP-counterpart.
At the end, I want to explain who a programmer is able to master a language. Instead of spoken language like English, it is not possible to speak a programming language fluently in a sense, that somebody can learn the language and use it for real problems. The workflow in reality works differently. It is grouped around the edit-compile-run cycle. That means, the programming is taken a codesnippet from the last week, for example his “hello world” example in C++ and is trying to extend the code into a prime number generator. On the way, he recognizes that he gets problem with the int-datatype. Now he has a clean problem which can be solved by asking an expert or asking google. After he has mastered the subproblem he writes down the sourcecode.
To make the point more precise. The programmer is not able to solve the problem before he gets started, instead he is trying out always things he doesn't know. That means, he is interested in his personal inability to handle a programming language or a mathematical problem, because this gives him the opportunity to interact with a higher instance, for example with a programming expert, with Stackoverflow or with the Google Search box. That is the reason, why programming is often called a social activity, because the programmer imagine in the workflow what a certain person will say about his code. For example, the student imagines what the professor will say, if he see his prime-number-generator in C++. Is he fascinated, will he understand it?
In reality, programming is not grouped around languages, but around programming groups. It is bit like a role-playing game. The student is part of a certain group, or he hopes to become part of it, and now is trying to anticipate the group behavior to get a higher position.