What’s The Best Programming Language To Learn?
This is a guest post by Kaveh Bakhtiyari, a PhD Candidate in Artificial Intelligence. Kaveh is also a data scientist. You can read more about him at Bakhtiyari.com.
Where should I start learning? Nowadays, there are so many programming languages available in the market, and if you are a beginner in computer programming, you may wonder which programming language is the best to choose and how to start learning it. These are the most frequent questions which I have been asked. Here in this article, I want to answer these questions on how to find the best programming language to start with, and where to start learning it.
Whenever I hear such question that which language is the best to learn, I reply: “Well, it depends.” Yes, there is no discrete answer to say which language is the best for all purposes. Every language has its own purposes, pros, and cons. Each programming language is good and useful for specific jobs. The right question can be rephrased as: “What is the most relevant or proper language for me to select?” Now, this question is making more sense. Before I answer this, I usually ask few more questions to get a clear understanding of what you actually want.
1. What do you want to develop?
If you want to start programming, you must know the area and type of applications/software that you wish to develop. Are you interested in game development? office automation software? scientific calculations? utility software? hardware application? and so on. The answer shows your direction towards programming.
But what if you do not know the answer, or at least you are not sure about the answer?! There are so many people that they don’t know the answer, and they simply want to start programming. So, you can think about it as what has encouraged you to decide to learn a programming language? Was it an interesting software? Probably, you want to develop a similar software. Or was it a developer? Probably, you want to be like him. Or was it news that you read? Probably, you want to develop the same thing as in the news. Therefore, it is important to know what you are going to do before picking a random language.
If you know the answer, then you should investigate the most relevant languages and technologies in that area. For example, if you are interested in:
- automating some of your daily routine tasks: scripting languages — i.e. interpreter based languages — (e.g. Python, JavaScript or VBScript) are recommended.
- developing nice looking websites: front-end technologies and languages (e.g. HTML, CSS, JavaScript, JQuery, etc.) are recommended.
- developing web-based applications: back-end technologies and languages (e.g. ASP, PHP, Node.JS, Java, Django Python, Go, etc.) are recommended.
- working with data and databases: database related languages (such as SQL) and platforms (e.g. MySQL, SQLServer, Mongo, etc.) are recommended.
- developing enterprise-level software: compiler-based languages (e.g. Java, C++, C#, etc.) are recommended.
- doing some amazing stuff in artificial intelligence or scientific calculations: Python, R, Go, Julia. Matlab, etc. are recommended.
- etc.
As you have seen, for each of these categories (which are not limited to the above list), there are many languages that can be selected from. In this stage, if you know what you want to do, you can target the similar companies and people who are actually doing the similar job as you wish to do to find the most relevant languages and technologies. So you may now have fewer options, but still, there are so many programming languages left. That’s why I ask the second question.
2. Why and Where do you want to use the language?
This question might be a bit confusing. Let me rephrase my question. Do you want to learn and use this language for fun and/or solely for your self? or do you want to have it as a skill to get hired? Who is going to use your developed software or code?
If you are looking for a language with a high demand and a high salary, probably a job search website or LinkedIn can help you much better to check the number of job positions that are available for each language in your region/country.
For example, a friend of mine, a mechanical engineer, once asked me “what’s the best language to learn?”, and when I asked him: “where do you want to use it?” He replied that he has heard that the mechanical engineers with the programming knowledge may find jobs easily with a higher salary. So, I asked him: “what are those language skills that these companies are expecting from a mechanical engineer?” He said: “Java and Python.” So, he answered himself. When his target market is looking for these two languages, what can I recommend?
3. How much time are you willing to spend?
Modern programming languages (e.g. Python) are very easy to learn and code; and they usually do a lot of things behind a scene without you noticing them. That’s a wonderful thing, however, it has some side effects. It causes a slower software with more memory consumption. A similar task in other conventional languages such as C, C++ or Java may require much more lines of code, and you may also need to understand a deeper logic behind the code that you are writing. But they are usually faster, more memory efficient, while it may take decades to master in these languages (especially C++).
If you want to learn something quick, if you want to code faster, dynamic, and less complex, you can choose Python. If you want something strong, fast and efficient, you can choose C++ or Java. However, it also takes much longer to learn and to code the same thing in C++ versus Python. This generalization is only an example, and it highly depends on your answer to the first question.
So, by having the answers to the above three questions, you may have fewer options now for your desired language. The next common question is how to learn it?
How to learn the selected language?
There are many resources to learn a new programming language or improve the programming skills, such as books, YouTube, online courses, and many more. It does not really matter how you learn it, but you should remember two things regardless of the language that you are learning:
- Algorithmic thinking (i.e. Structural thinking) is how you structure a program in your mind, then you convert your thoughts into a code. It is the most important skill for a programmer to develop. Once you master your algorithmic thinking, you can easily learn other languages and extend your programming knowledge. The key materials for Algorithmic Thinking are a good knowledge of the language structure (e.g. syntax), features, as well as mathematics.
- Learn the structure. I have seen many programmers that they simply jump over some structures and courses as they assume that they know them or they might not be important. That’s the biggest mistake. As a learner, even as a professional programmer, you should go through all the language structures and syntax details to know the power and capabilities of the new programming language. Missing a single point may cost you more lines of code and frustration in the future.
What’s the future of the selected programming language?
In the history of the computer industry, nothing is persistent. A hot and trending language today, maybe a dead and forgotten language tomorrow. So, you should be also prepared for that.
At the time of writing this article, Python is very popular and it has a high demand today. Thanks to the large community of Python programmers for providing various packages. But will it be hot in the future? That’s a different and difficult question to answer.
Conclusion
If you are willing to start the journey of being a computer programmer, you should be clear with yourself about what you are going to develop, where you are going to use it, who is going to use it, and why you are developing it. Then you can easily find resources and people to recommend you the suitable language that meets your needs. There is no discrete and absolute best programming language. Every language is made for a purpose, and it is important to identify yours before choosing the language.
Programming is not an easy task, it requires patience, lots of practice, thinking, and continuous learning. Good luck for your journey.
This article was original published on Medium.com and republished here with permission from the author.
Kaveh Bakhtiyari was born in Tehran, Iran. He’s a data scientist, an artificial intelligence (AI) researcher on high-tech systems, a full-stack developer and founder of Musingway Ltd. He’s currently doing research in AI, Cognitive Science & System Engineering at The National University of Malaysia and University of Duisburg-Essen, Germany as a part of his PhD studies. You can read other Kaveh’s articles on Medium by visiting https://medium.com/@bakhtiyari/