Published
- 6 min read
Ranking Programming Languages
A recent article on InfoWorld titled Breakthrough: Python reaches Tiobe index Top 3 - Yey Python - But wait, what is being ranked?
The TIOBE Index uses search engine data to extract which languages are popular.
That is a questionable way of figuring out if a language is popular. It only means people are searching for a language. Does the search data separate between Java and JavaScript (two very different languages)? Are the searches for things that are difficult in the language and unclear. Basically if a language is badly documented = more searches => higher on the index. The more issues and frustrations you have with the language will rank you higher.
If we take a look at the 2017 results unsurprisingly Java takes the Number 1 spot. As many companies use Java and many universities teach Java. Thus a lot of people are searching for Java. - However programmers are actually starting to dislike Java, as there is currently so much poorly crafted Java-code in the world that desperately needs to be rewritten. In addition the Java community is facing a lot of problems with rapid unwanted changes from Oracle. (*Note: Java is a great language that strongly promoted object oriented programming and is a great tool - it is just in a wierd phase right now.)
Interestingly on position 11 we have Delphi / Pascal. A programming language I have used the last time over 17 years ago. I doubt any company is still using Pascal applications. However as a part of programming language history it is quite interesting. And there was of course a spike last year as a new version of the compiler was released. (https://www.freepascal.org/) Also schools with outdated curriculums still teach Pascal…
I am not sure what information I can gain from this type of ranking. It could mean that Java is a mess because so many people are googling their problems with the language and an old language Pascal is now suddenly on the rise and will become the next big thing?
How would I rank programming languages?
First we need to figure out who needs rankings of programming languages. My guess is people that want to start learning a programming language, people who want to see trends in the industry and managers who need to make project decisions.
Before we can even begin with ranking the languages the first stumbling block. Depending on your project you may be already locked in with a specific language. In many cases you want to start building on things somebody else is providing you, a Web Browser (JavaScript), a mobile device (iOS: Swift/Objective-C, Android: Kotlin/Java) a game engine (Unity - C#, Unreal - C++), etc.
Simply put if you have a defined project, just start working on the project. The language might be already defined and you do not need a ranking.
A person who wants to learn programming
This list should take multiple things into consideration. The person learning has practically no knowledge. The person has to learn everything from scratch. The important thing is to start learning programming concepts. It should be easy to learn, ideally avoiding advanced stuff like compilers and static typing (and preferably a language also used by the industry and not university only).
This leaves a rather short list:
- Python
- JavaScript
These two languages are dynamically typed and at the beginning still very forgiving for mistakes. Both have tons of documentation.
Starting with JavaScript is really easy, just press F12 in your browser and you can get going, no installation needed. It also simultaneously teaches you concepts about HTML and Networking. Concepts of Object Oriented Programing as well as functional programming can be learned. And variants of the language like TypeScript can explain the value of static typing and what a compiler does.
Starting with Python is a little more difficult. As you first have to install python etc. The other thing is of course the meaningful whitespace, which is wierd for a beginner but at the same time the best way to get a beginner used to the idea that code should be beautiful and readable.
There is no real ranking - just choose one of the two. Both are equally well suited as a starting language.
See Language trends / popularity
I would take a look at how many new projects are being created in which language. Statistics from Github from their Octoverse Survey
- JavaScript (2.8Mio)
- Python (1 Mio)
- Java (0.9 Mio)
Of course this is only from one source and you would have to add multiple sources to get a better picture. (In this case we only see values from OpenSource projects). If you want to see trends you can observe these values over the last couple of years.
For business people
Here we need to take the money aspect into account. Just because “Java” appears at every top list of backend enterprise web development - that does not mean it is currently the best business choice.
One of the key indicators could be how verbose a language is. As research has shown that a Java Developer and a Python developer take the same amount of time to write the same lines of code. - However a Python program can need in some case 30% less lines of code to do the same function.
From the http://helloworldcollection.de/
Python Hello World:
print("Hello, World")
Java Hello World:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
You would have to take a look at long term maintainability of the language. Basically: who is maintaining the language - will it still exist in 10 years?
- Java is supported by Oracle, that is messing around with the business model surrounding Java, so maybe not.
- TypeScript supported by Microsoft, and Open Source (worst case you are going to need to maintain it yourself)
Another important factor is tooling and ecosystem. If the ecosystem is dying then it may be a good time to switch languages.
And of course the last factor would be how many programmers are currently listing the language as one of their skills. (there are programmers on the market that you potentially could hire to work on your system)
Depending on your project you may need to take hardware costs into account.
Unfortunately there is no universal approach to this multifaceted problem. Depending on which factors are important for your project you will get a different ranking of possible languages for your project.
Conclusion
There is no singular good way to rank programming languages. However whenever you encounter a list or ranking of programming languages just be aware of what techniques they used to create the list.
Title Image Credit: Evaluation System Designed by Makyzz / Freepik