How to choose a programming language?
By different estimations, the number of production-ready programming languages in the world varies from 400 to 600. And at least two orders of magnitude more experimental projects. How to make a good choice, having so many options? How to choose a language, which not only will turn out to be commercially in demand but also will bring joy in everyday practice? How will this choice show itself in the long-term?
The criteria of choosing the first and the N-th language differ radically. This article describes the process of choosing the first language. What is meant by "the first" language? The one in which you can fulfill commercial orders! That means, if you have read something about a dozen of languages, but can't make it to the Junior in every of them, – this article can be useful for you.
The illusion of choice
The first thing you have to understand is that you don't have much of a choice. It's not hard to pick out the TOP-10 of leaders from all the variety of languages. 80% of all that's happening is happening there. Precisely by Pareto. TOP-20 of "known" languages defines the boundaries of the reasonable choice (of the first language). One more ten of "small stuff" is for adventurers. "Fear and Loathing in Las Vegas" – next on the list.
In alphabetical order:
- Delphi / Pascal
- Visual Basic
Also, there is a separate group of specialized titles unrelated to the programming languages of general purpose:
The difference in relevance, amount of available information, opportunity to change the company etc. is huge for the leading languages and the lagging ones. It's enough to say that for comparing quantity indicators of the TOP-40 languages (like the Number of Repositories) logarithmic scales are always used.
The conclusion: if you don't know what language to choose – choose one of the popular ones. The inertness of the industry is huge. Radical changes happen very rarely (and more rarely, with time), but the leaders in the list hold their positions stably. The change of the leader(-s) in this or that field, almost always, happens through the change of the platform itself but not through the loss in a "fair" competition. Perl, Cobol, Pascal – are the rare counter-examples. Want a new language? Wait for the change of the platform (or the paradigm).
What do we choose?
One more unpleasant truth – we don't choose the language. We choose the field, which is accompanied by one, two or three languages. They are already "chosen" for us. By whom? By the industry, market, historical accident, after all.
It is characteristic for beginners to concentrate on the language. The syntax, the grammar... – they seem so important, so unfamiliar that draw all our attention. But it turns out that this is just the tip of the iceberg. What's beneath the water?
- The environment (and the way) of executing: The Compiler / The Virtual Machine.
- Vendors and the Platform
- Ecosystem and Community.
- The demand and industry trends.
- Connections with other languages and ecosystems.
- The vision of the language.
- – Which language is the best? – is an example of the wrong statement of the question.
- – Which language suits the most for ... – worth a theoretical question.
- – Which languages are used for ... – closer to the point.
1. The environment and the way of executing
The quality of the language doesn't play the crucial role. Java wasn't a good language even at the moment of its creation. It was just more convenient than the competitors. However, its virtual machine turned out to be a real breakthrough for its time. Except for the quantity indicators, this machine was giving a "perk" to Cross-platform, which had no alternatives. That's why, Java becoming the industry leader was absolutely justified (and, probably, inevitable) historically.
Do these arguments still work? No. Most of Java VM practices are "put on notice". Cross-platform, as it turned out, can be achieved through Web-applications even better. That's why, now Java is holding on thanks to inertia. And the lack of strong direct competitors. Inertia in industry is a very powerful force, though.
Go was positioned as "bad", primitive and simple language in the beginning. The result? It has reached the TOP-20 in a several years – a unique case. Can the same thing repeat again? It's very unlikely. There was a place - the place is occupied. Wait for another opportunity.
Coming back to the main question – think about the following:
- How are you going to "choose a language" for development on iPhone, if there are only two of them?
- How are you going to "choose a language" for development on Android, if there is only "one of them"?
(Kotlin and other
freakyness of the TOP-100 don't count).
There is still some kind of a choice in Web-development: Java, JS, PHP, Ruby, Python, Perl. But it disappears gradually, too: all except for JS drop out of the "game".
– Why? Perl audience switched to Ruby as the newer and more convenient language. Ruby and Python are getting absorbed by JS.
– Why? GIL used in "canonical" Ruby and Python versions deprives them of the real multithreading. And IO-level multithreading loses in competition to architectures based on asynchronous behavior.
IT corporations have understood it long ago and invest crazy money in JS (in V8). It's kind of shameful to compare a toy CPython to the latter.
Doesn't matter. Mozilla liquidates Java support in browsers. And what is a modern Web-development without the fullstack?
The conclusion: starting to think in terms of the Platform, not the Language.
2. Vendors and the Platform
Languages are divided into the "corporate" and the "independent" ones. Almost all the IT corporations you know promote their own languages. And, so to say, anti-promote the languages of the competitors (if the corporate agreement is not reached).
- Apple – Swift and Objective C.
- Google: Golang, Dart, JS (V8), Java (Android)
- Microsoft: C#, F#, TypeScript
- Mozilla: JS, Rust
- Oracle: * Java
- Facebook: JS, PHP
"Independent" languages are created either by under-corporations (Python, Clojure) or groups of scientists (Haskell). In the first case, all kinds of FooBar Foundation act as a cover for the authoritarian reality. In the second – intellectual barrier is the only filter "from fools". The point is that there are no languages that belong to no one.
Which category is better? There is no absolute answer. The support of the language by a large corporation means a significant financial influence. Golang created by You would be of no interest to anyone except for your acquaintances. Golang created and promoted by Google is a whole different story. Still, this very support means binding with the corporation success:
- Apple goes bankrupt – Swift and Objective-C developers turn to bag and wallet.
- Google decides that Google Plus is "no longer needed" – dozens of thousands of SEO-persons cry over split business-model.
The conclusion: inquire – who owns the language and how they are doing (lately).
3. Ecosystem and community
Just look at the statistics and make conclusions.
A great graph based on clear and unambiguous data from StackOverflow and GitHub.
One more strange but reliable rating, based on the number of searches for the tutorial.
An exclusive statistics from the platform of competitive programming. In the top: Python, Java, C#, C++, C, JS, Ruby.
As we see, the leadership of one or another language is defined by the ranking method. Titles are the same everywhere – except that the order is different. It is also worth noting that the popularity of GitHub itself continues to grow rapidly, which increases the importance of ratings based on this platform.
The conclusion: choose one of the popular languages as the first one. A language without video tutorials, articles, examples of real applications, opportunity to ask community a question will be very slow and hard to learn.
4. The demand and industry trends
And again, look at the statistics.
Click all time. Check all the boxes. Brighten up.
Quite a good tool having a series of restrictions. For some languages (PHP) you can pick a category Programming Language. For others (Python) – you can't. However, it gives some extra information (mostly, about the time dynamics), that's why we mention it.
An exclusive statistics presenting mostly the acceptance of the technology by the enterprise. Java leads predictably. NodeJS and Go are growing. PHP is losing.
Extra information: by the statistics of the aforementioned RedMonk, the biggest rate of growth demonstrate: Go, PowerShell, Rust, Swift, TypeScript.
The conclusion: if the libraries number graph of the language you are interested in is not headed for a bright future (the top right corner) – its future will be dark and sad. As Perl's. The number of vacancies and the demand for a certain technology better look for yourself, in the context of your country / town. Don't rely on any "summaries", look at the facts. The local situation can be very different from the global.
5. Connections with other languages and ecosystems
For a new language, one of the working ways to break the cycle "No one uses it, because no one uses it!" is to attach it to an existing ecosystem. Clojure and Scala – "parasitize" Java. TypeScript and ClojureScript – JS. Elixir – Erlang. However, there were no cases of destroying the host by such a "parasite".
What's your interest in this? There's no use in learning the parasite language before learning the host. Clojure-followers will tell you that you "don't need" to know Java. But then you will see that the significant percentage of their documentation refer right to Java. A lie?! Marketing! When you get them cornered, with threats of physical altercation, they start to make excuses:
– We meant that you don't need for the Hello World level!
The conclusion: very simple. Satellite languages are not suitable for the first. Learning two languages and two infrastructures at once can't be too much fun. With experience, you will understand yourself that it's time to enter a new orbit.
6. The vision of the language
Some languages are customary to curse. Even if in the next version of PHP there are immutability, the names are cleaned up, OOP put aside... it, by inertia, will continue to be considered as a very bad language. Why? People don't like to change their opinions and pinned labels.
Some languages are not customary to curse. Look into Python sources, or the very Clojure sources. You will find only a hellstorm here (in comparison with the competitors). Still, everybody considers these languages to be Magical Unicorns, and casual counter-arguments are met only with puzzlement. To form an adequate vision, these people need to be educated and re-educated. And who will do this?
The conclusion: form your own opinion. Let's assume that you can't evaluate the technical characteristics due to the lack of experience. Ok. But what's stopping you from watching the speeches of the language developer(-s)? They don't make public speeches? That's a bad sign. Very bad. They do? Then just listen. How do they behave? What do they say? What do they criticize? What do they promote? Is that familiar to you? Is there a resonance?
When the choice is made that it's more proper to choose the Platform, not the Language, the same questions, it seems, appear. The difference is that now we can answer them objectively.
In order to choose the platform (and then, if we have a choice, the language), we should determine the criteria. For most of the people the basic criteria are the following.
Demand on the market
Determined by the total number of vacancies divided by the total number of resumes. The high demand produces the high supply. "Windows of opportunity" will remain for several years. Do you have time?
The conclusion: when calculating the "number of vacancies", don't forget to look at the competition and damping. Pay attention to trends. A new "hot" framework can "get cool" while you learn it.
The total number of vacancies
The competition on the market determines the difficulty of getting a job. However, you need to take into account also the difficulty of the potential change of the company. You have gotten a rare and high-paid job of a consultant on programming robots-badgers. What happens if your company decides to reduce the staff? The market is very little – your ex-company has only one rival. Which, at this very moment, doesn't need new consultants. Will you wait for the suitable vacancy for several years? Will you change the profession? And you have put the best years of your life into this Theme...
The conclusion: avoid unpopular fields, if you don't know what exactly you want to do.
The format of the work
You have decided that you want to work in Enterprise. Remotely. Good luck to you, because there's no such combination in the world. Well, I mean, you can read a motivational article to your potential employer. Show the "statistics" from the newspaper. Swear in loyalty. The question is – will it help?
The reality is that enterprise doesn't like remote work.
- – Designer Remote? – This way, please.
- – Java Remote? – Stop. Who the hell are you?
Why so – can be discussed separately. But does it make sense? The conventional formats of work and management change very slowly. The manager of enterprise development wants to see your back of the head. All the long eight working hours.
- – Java Part-Time? – No, haven't heard of.
The conclusion: the desirable format of work should correspond to reality. If you are not ready to "struggle against the stream" all your career and cry on forums about the "iniquity of fortune".
The age of the market
The older the market is, the less it is interested in beginners. All the threads on recruiting are full of beginners who have learned Java Junior pro forma and found out that they couldn't find a job. You need to have experience in order to get the job. And you need to get a job in order to have experience. A never-ending circle.
While talented Junior JS are selling like the hotcakes. It won't last forever, though...
The conclusion: avoid established markets, if you don't understand how exactly you are going to look for a job.
- – Your dad is a Java-programmer ready to give you a hint? – You're welcome. Go.
- – Have read in a newspaper(!) that Java programmers are needed? – I have bad news for you.
How to know the age of the market? And Wikipedia for what? For IT, the scenario is pretty much like that:
- Less than 5 years – an emerging market
- From 5 to 10 – a market becoming established
- More than 10 years – an established market
Then think for yourself.
The difference between the fields is not that huge. Yes – the salary ceiling in some fields is lower than in another. But there's always an opportunity of repositioning. A layout designer → An expert in animations. And the ceiling has increased by another 100%...
The conclusion: I would not dwell on this factor. All the beginners are paid not very much. All the professionals are paid a lot. This is all you have to know for now.
The opportunity for self-improvement
For the first language, it all doesn't matter. "Blankly follow the public opinion" would be the most proper decision. However, if the fate favors you and you have come to this question...
Almost all the mainstream languages have their flaws. Community just works up its own answers to them. With experience, the assessment factors unavoidably change. The language itself means less and less. The ecosystem – more and more. It's a shame to confess, but there was a time when I considered Python a good language...
My current (relevant) languages quality rating:
- the good ones: Haskell
- not bad ones: F#, Lua, Rust, Swift
- middling: C#, Clojure, Go, JS, Erlang, Ruby, Scala
- bad: C, Java, Objective-C, Python
- horrible: PHP, Markdown (the latter – for the lulz, but in the right place)
- a special circle of hell: Bash, C++
- out of the classification: assemblers
Of course, the opportunity for self-improvement shouldn't be associated with the language quality. But still, they are connected. A bad language dulls the "speaker". A good one – makes smarter, forcing to develop or quit the profession. Both options are good for the mankind.
The quality of language, in the long term, is determined by its flexibility. Watch the hands:
- The absence of a standard library
- Leads to appearing lots of alternatives
- Which compete with each other
- Not connected to the language updates
- The more adapted (and not the "first") solutions survive by Darwin
- Big standard library ("Batteries included!")
- Including historically the first (and therefore – bad) decisions
- Leads to the absence of a constant competition (no one needs a second logger)
- Library updates are connected to language releases
- Leads to the degradation of all the ecosystem
The conclusion: if, in your opinion, there is choice, – choose languages with alive, diverse community, where there's no: * "standard framework" (approved and sealed by Google) * "dictators for life" * list of "the right decisions" * and other rubbish
A short guide on choosing
Make up your mind about the important criteria and Choose.
I want to work remotely!
I want to create desktop applications!
I want to create web-applications!
JS, PHP, Ruby
I want to support the legacy ^_^!
I want to be in Enterprise (big business)!
Java, Scala, F#
I want a lot of money!
I want to use the language in my own business!
JS, Haskell, PureScript
I want lots of freedom!
I want to be in the financial field!
Scala, Haskell, F#
I want to be in science!
Scientists choose the proper tool themselves. This is the case when you are able to choose.
I want to be in Machine Learning!
I want to be a sysadmin!
I want to be in the system programming!
C, Go, Rust
I want to create distributed systems!
Java, Scala, Erlang, JS
I want to create interfaces!
JS, Java, C#
I want to create AAA games!
I want to create indie-games!
C#, JS, PureScript 1.0 ^_^
I want to create mobile applications!
Swift, Java, JS (there no sense in Objective-C already)
I want to work with data!
I want to work with BIG data!
Java, Python, R, Scala
I want to work!
The TOP-10 is above.
So at last you decided to start a self-education?
Then start with our free guide to the world of web development. You will find tons of useful advices and materials to learn inside the book.Get the book