Are you a student, who need help selecting your first programming language? This question can also be asked as:
- What programming language should I choose first?
- How should I choose a programming language?
- How do I start programming for the first time?
- What is the best programming language to learn in 2021?
- How do I start coding?
or many other variations.
Table of Contents
In the last 2 months, at least 4-5 computer science students asked me which language should they select/learn for their final year project and career. I was surprised about what should I answer. The selection of programming language is generally based on your existing knowledge or project.
The problem here is, two of the most crucial factors of selecting your first programming language are missing here which make it a very difficult question to answer.
How professionals select a programming language?
Before we answer this question, we must first understand how most programmers/architects select programming language for their next project. knowing this might help you selecting your first programming language. There are two major factors:
- Existing knowledge.
- Project requirements or client preference.
Existing knowledge is very important. Suppose you know Java and someone gives you the choice to work on either a Java project or a PHP project. Your selection is obvious; Java. Why? Is it because Java is better than PHP? No, no language is better than others. You choose Java just because you know Java or in other words, you didn’t choose PHP because don’t know it and you are scared of learning it. That’s human nature. Changes are difficult for humans and we don’t want to go out of our comfort zone. Another more valid reason is, a programming language is just a tool to fulfil business requirements and if I can do it with an existing tool, why should I purchase another tool?
Project requirements / Client preference.
The second reason is project requirements. Now assume you are a PHP programmer and you got a project to make a desktop application. Since PHP is not a good tool for desktop applications, your project requirements are forcing you to switch programming language. No matter which language you choose but you definitely will not choose PHP. Please note this is just an example when a project (or client) force you to switch language but not a practical example as an ‘only PHP’ developer will never accept desktop application project. However in the real world, you sometimes get a project that can be done in your programming language but learning and doing it in some other language is more convenient, based on multiple factors like production server availability, existing team knowledge, third party libraries availability, performance/optimization, client preference etc.
Now if you agree these two major factors of choosing a programming language, both of them do not apply to the students. They don’t already know any programming language, at least they are not expert in any, so no matter which programming language they select, they have to learn. Again their project is not yet decided so obviously they can’t select a programming language based on project requirements.
Understanding student’s requirements
Now since traditional deciding factors are out of options, we must understand students requirements before we can help you selecting your first programming language to learn. I spoke to a couple of students and get their question ‘Which programming language should I learn?’ translated into the following questions and their one-line answer.
- Which programming language is easy to learn?
If you understand the logic and concept, ready to put in some hard work and write some code, all are easy. Otherwise, none is easy.
- Which programming language has the best job security?
None. Any programming language will give you a start but you can’t simply stick to it throughout your life. Technical world change very frequently. Being in the technical world, you have to learn throughout your life. As far as you keep learning and remain synchronized with the latest technologies, your job is secure.
- (Most important) Which programming language have maximum job openings?
Well, there is no single acceptable answer to this question. Everyone has their personal view and everyone is biased towards the language they know and use most.
The answer to this last question depends on region, and quite a few different factors. So answer to this question keep on changing, let me explain through my example.
When I started my career in 2004, Java/J2EE and Dot Net had more demand in India. So I started with one of them (Java/J2EE) but at around 2007-8, I felt there PHP has more scope in future for me (well my personal view only, based on my personal/professional goals) and I switched to PHP.
So the point is, just start with any language and if needed, you can switch in the future. Still selection of initial language is crucial as you have to find a job without any experience behind you and companies prefer experienced employees. So you must be very good at the language you are applying for a job.
So my best answer, work hard during your college life and get selected on campus. If you can manage to do that, your company will train you and don’t shy to learn any language they teach. The simple reason is, learning the first language is difficult but learning second, third and further languages becomes easy. But the above answer does not fit you in two condition:
- You unfortunately do not get selected on the campus.
- You want to decide on your first programming language and not willing to let your company decide on your behalf. Exceptional case but happens.
So now, you first need to know the options. Options are:
This is a good option for those who do not have very good logical ability but good at arts. There is a very good demand for web designers as in the commercial world, web presence is a must and companies want to present them unique. A unique web design is important for that.
- Java: Java have a little steep learning curve but it also has its rewards. While learning, you first have to learn core Java. With core java knowledge, you can design desktop applications. Again you can go ahead with J2EE for web programming. Most banking websites are designed in Java/J2EE and there is a myth that the banking/financial sector offers the best salary packages. With Java, you also have the option to go towards Android programming. With the increasing use of mobiles/tablets, all companies want their mobile apps and Android can’t be neglected in this area.
- Python: Python is another easy to learn programming language for beginners and it is not limited only to the web. You can also make desktop application with it and it is extensively used in AI and Machine learning.
- Dot Net: Dot Net is not a language but a framework. It contains different language like VB.Net, ASP.Net, C#.Det etc. Visual C++ and VB.Net are a very good language for making desktop/mobile applications for MS Windows. With ASP.Net, you can also go to web applications. However be warned, this will bound you only to Windows operating system. It is still one of the most widely used operating systems but losing users to Linux/Mac.
- Ruby: Ruby become very famous due to one of the best web frameworks ‘Rails’. You must have heard about ‘Ruby on Rails’. It never came close to Java/PHP in terms of popularity but still have many job openings but it is declining in favour of Python/JS/PHP. With easy, English like syntax, it is easy to learn as compare to Java/C++ etc.
- C/C++/Objective C: C/C++ is one of the first language taught in most universities. It is still the most widely used language. The whole Linux is mostly based on C/C++. ‘C’ also has extensive use in embedded electronics so if you are an Electronics student and still planning to make a career in IT (which is common in India) you can pick that line. Objective C (Well now shift) is mostly used by Apple and power Mac, iPhone/iPad. So if you stick to C, you can easily learn Objective C and find your career as iPhone developer. Be warned, in India, most students still use the turbo C++ compiler. This is fine for initial learning but never a serious compiler. If you want to make a career in C/C++, you must use professional compiler/libraries based on your functional area.
- Perl/Go Lang/Scala/Rust/Elixir etc: These are also (arguably popular) programming language, but might not fit for you if you are just looking for a job opening, at least not in India. There are job openings in these languages but very limited as compared to above the languages.
Above is the list of some of the popular languages right now, their job openings, a basic idea about the learning curve and functional areas where they are best.
Selecting first programming language
Still, my best answer is, do it yourself. I recommend investing two to three day for each language, go through their manual/tutorial and make few basic programs. You will get an idea of which language is the best fit for you. Once you select a language, give the next 5-7 days to that language and make a small project to ensure you still love that language. Remember, this is just a starting of long a very journey. Learn the first language better, make your final year project in it. After your college, get a job first and keep learning new languages.
Conclusion (Not recommended to go with my conclusion)
Again if you don’t want any hard work and need one concluding answer, focusing only on the job, the best answer in India is:
- PHP: Learning PHP is easy compared to other languages. A lot of mid/small level companies in India are working in PHP, even in tier 2 cities. You can get easy entry there but do not expect a high salary right from the beginning. However, after 3-5 years of experience and continuous learning, you can get a handsome salary.
- Java/J2EE or DotNet: It needs a lot of initial hard work but there are many Java/DotNet jobs available in India. However, expect you have to sit idle for some time as Indian companies do not generally prefer Java/J2EE fresher. The good news is, most Indian multinational companies prefer to work in Java and DotNet. If you want to work for a big tech company in India, this could be the best choice but be warned, getting your first job in these languages, outside campus, is not very easy.
- Python: PHP is most popular among small/mid-level companies and Java/DotNet are popular among big-tech/multinational companies but python is used by both. Also, learning python may give you a change in many fields like AI, Machine learning, etc. Python has better and more libraries than any other languages for these fields, which will be very important in the future.
I understand many people might not agree with the above advice. I respect their view but the above advice is based on my personal experience in the IT industry for 15+ years. Please let me know in the comments if you agree or have different advice. Also, please let me know in the comments, which language you started learning as your first programming language.