Selecting first programming language.

Share this note with your friends.

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.

Background

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.

Problem

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

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.

Student’s situation

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.

  1. 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.
  2. 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.
  3. (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.

Job opportunities

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.

After that Python/ Ruby become famous. I learned their basics but I stick to PHP. In around 2014, JavaScript got very popular, mainly the MEAN (MySQL, Entity Framework, Angular 1, Nginx) stack. In the next 2-3 years, frontend JS frameworks like Angular, React, VueJS etc got very popular. I did few projects in NodeJS, Angular and Vue (Mostly with Laravel) but PHP remained my major technology.

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.

Best option

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:

  1. You unfortunately do not get selected on the campus.
  2. You want to decide on your first programming language and not willing to let your company decide on your behalf. Exceptional case but happens.

Available Options

So now, you first need to know the options. Options are:

  1. Web design: Although I will not call it a true programming area but if you are good at arts, this may be your piece of cake. For this, you must be an expert at HTML (5), CSS (3) and average to good knowledge of JavaScript. Along with that, some knowledge of design tools like Photoshop, Gimp, etc also needed.
    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.
  2. 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.
  3. PHP: PHP initially means ‘Personal Home Page’ (Now recursive acronym PHP: Hypertext Preprocessor). It was intended to make simple dynamic web pages initially. Lot has changed since then. PHP now is a very good and acceptable programming language but PHP is a programming language for the web. So with PHP, you must also have average knowledge of HTML, CSS and JavaScript. Still, they are easy to learn technologies as compared to Java.
  4. 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.
  5. JavaScript: JavaScript might not be the easiest and best language to start with, you will need it if you plan to work on web applications. It is useful in the backend (Node JS) as well as the frontend (Angular, React, Vue etc). Also, it can be used for desktop applications (Using Electron)
  6. 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.
  7. 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.
  8. 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.
  9. 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:

  1. 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.
  2. 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.
  3. 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.
  4. JavaScript/TypeScript: No matter which of the above three languages you start with, sooner or later, you will have to learn JavaScript (or TypeScript), especially if you work in web application development. It is the only language that browsers understand. JavaScript may not only give you an option in the front-end (JQuery, Angular, React, Vue, etc) but you may take it ahead on the back-end (Node JS) and even desktop application development (Electron). It also has very good libraries support and the V8 engine, which executes JavaScript, is getting optimized and faster.

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.

Leave a Comment