
What programming language should you learn first? (ʇdıɹɔsɐʌɐɾ: ɯǝʚɯо ņıqнqvиʚɐdu)
- Transfer

Someone, having read the sites and blogs of major computer companies, argues like this: “In the Silicon Valley, not a word is Java. I think this is what I need. " It happens like this: “Haskell. He is at the peak of popularity. It’s scary to think what will happen next. Definitely Haskell. ” And even so: “This gopher on the Go logo is such a sweetie. I want to know Go. ”
Some, driven by the desire to learn how to program, are looking for this: "What is the first programming language to learn?"
There are questions that are asked so often that, to answer them, whole schemes are created. For example, one of them, dedicated to the choice of the first programming language, prepared by the team of this site.
Clickable: If you consider this scheme, it turns out, for example, that Ruby is suitable for those who loved to sculpt from plasticine as a child. Choosing the first programming language can be an exciting experience, like semi-serious questionnaires, like: “Who are you from the characters of Quentin Tarantino?”. But, before you go headlong into learning Ruby, and only because you couldn't live without plasticine in your childhood, let me draw your attention to the fact that the first programming language is very, very important. Too much depends on him.

In order to at least in general terms deal with the selected language, it will take hundreds of hours of practice. Therefore, cute logos and ingenious schemes should not confuse you.
Choosing the first language it is worthwhile to soberly evaluate the following factors:
- Labor market.
- Long term language perspectives.
- The difficulty of learning a language.
- What exactly can you create in the process of studying, and, showing others, support motivation.
New programming languages appear several times a year. Articles are written about them in scientific journals, comics that can be found on the Web are dedicated to them.

When it comes to choosing the first programming language, you have to face a whole avalanche of options. To narrow your search a bit, here's an analysis of Google searches over the past 12 years regarding learning about programming.

From the analysis of search queries, you can find out that Java had ups and downs. And, for example, the Python rating was gradually growing, it has become almost the most popular programming language. There is one language here, simple, but with remarkable capabilities, the graph of interest in which is slowly growing from year to year, although it is at the very bottom. This is JavaScript.
Before talking about these programming languages, let me clarify something.
- I do not presume to argue that a certain language is objectively better than any other.
- I agree that developers ultimately learn more than one language.
- I am for the fact that at the very beginning of the path, the programmer should study one language well. And, as you probably guessed, after reading the cleverly disguised tooltip in the title, I believe that this first language should be JavaScript.
We begin our discussion of the first language by looking at how people learn to program today.
Fundamentals of Information Technology and Programming Training

Universities are usually taught to program in the framework of subjects on information technology, which often look like additions to mathematical courses, or are tied to a certain major specialty, say, to electrical engineering.
Surely you are familiar with this statement by Eric Raymond: "Education in the field of computer technology will not make you an excellent programmer in the same way as studying brushes and paints will not make you a great artist."
Today, as before, most educational institutions put an equal sign between programming and information technology, and information technology is equated with mathematics.
As a result, many introductory programming courses are built around fairly low-level abstractions of languages such as C, or languages used in mathematical packages like MATLAB.
And those who make decisions about what to teach in programming courses usually follow all sorts of official sources that regularly publish reports with language ratings. Among such reports, for example, the TIOBE Index . And here is the IEEE leaderboard .

Such “leaderboards” look almost exactly the same as ten years ago. However, everything is changing, even in academia.
So, in 2014, Python bypassed Java , becoming the most popular programming language in leading courses in information technology in the United States.

And I'm sure that another change will definitely happen, but what can I say - this is already happening.
Looking at the languages used by programmers who perform real projects, we will see a completely different picture.
Here is the result of a survey conducted at Stack Overflow in 2016. 49397 developers participated in it. More than half of them use JavaScript.

Development of web interfaces is impossible without JavaScript, and recently, thanks to Node.js, the relevance of JavaScript in server code has been growing. This language is rapidly spreading to other areas, such as game development and the Internet of things.
Among programmer jobs, JavaScript is mentioned more often than other languages, if you don't take Java into account. Here are the data from the largest job aggregatorIndeed.com .

It is no coincidence that we, at freecodecamp.com , have assembled a community of developers engaged in open source JavaScript projects. Over the past two years, more than 5,000 people have used Free Code Camp to find their first job as a programmer.
By the way, I do not advocate JavaScript just because I teach him how to program. Everything is exactly the opposite. I teach this language precisely because knowledge of JavaScript is the right way to the first work of a programmer.
But is JavaScript right for you? Should he become your first programming language? Let us consider in more detail those language selection factors that I spoke about above.
Factor No. 1: the labor market
If you are learning to program out of sheer curiosity and a love of intellectual entertainment, you can skip this section. But if you, like a huge number of other people, study programming in order to find work with the help of acquired knowledge and skills, you should pay attention to what will be discussed here.
As I said before, job postings most often mention Java. In second place is JavaScript.
But in the case of JavaScript, one important thing to consider. Although the language has existed for two decades, only relatively recently it has become a serious tool with which giants like Netflix, Walmart and PayPal create full-fledged applications.
As a result, many companies hire JavaScript developers, but there are not many developers.
Here is the data from Indeed.com , showing the ratio of vacancies to job seekers.

So what we see. There are 2.7 programmers in one place for a Java developer. In the field of vacancies, where knowledge of PHP is required, as well as in the iOS development environment, a similar situation is developing.
If you look at the data in JavaScript, it turns out that there are only 0.6 programmers per vacancy. For JavaScript developers, this is definitely a seller’s market.
Factor No. 2: long-term prospects
JavaScript projects on GitHub receive, on average, twice as many pull requests as Java, Python, or Ruby projects. And besides this, JavaScript is growing faster than any other popular language.
Here are the relevant GitHub Octoverse data : The JavaScript ecosystem is also benefited by serious investments, both financial and human capital, from talented engineers from companies such as Google, Microsoft, Facebook and Netflix. For example, more than 100 developers contributed to the open source programming language TypeScript (an extended version of JavaScript with static typing). Many of them are Microsoft and Google employees who get paid for this work.

This form of collaboration between companies in the Java environment is more difficult to find. For example, Oracle, which actually owns Java by absorbing Sun Microsystems, often sues companies that try to work on this language.
Factor 3: the difficulty of learning a language
Here's a caricature of the complexity of programming languages from XKCD .

Most programmers would agree that high-level scripting languages are relatively easy to learn. JavaScript falls into this category, along with Python and Ruby.
And even though in educational institutions the languages with which they begin to learn how to program are still such as Java and C ++, it is much more difficult to understand them.
Factor 4: projects that can be created using the knowledge gained
This is where JavaScript is second to none. It can work on any device that has a browser. Yes, at least right here where you read it. Basically, using JavaScript you can create almost anything and distribute it around the world with the confidence that it will work on almost anything that resembles a computer or mobile phone.
The ubiquity of JavaScript has led to such a famous saying by Jeff Atwood, co-founder of Stack Overflow: "Any application that can be written in JavaScript will eventually be written in JavaScript."
Over time, this statement, which is also called the "Law of Atwood," does not lose relevance .
Among other languages, one can observe slightly different trends. For example, they once promised that Java would work literally everywhere. Remember Java applets ? At the beginning of this year, Oracle officially abandoned them.
Python suffers from similar issues. Here's what James Hag wrote about this in an article stating that it was time to abandon Python as the primary language used in teaching programming. The student asks: “How can I give this game that I wrote to my friends? Or, it will be even better, can I somehow record it on my phone so that I can show it to everyone at school, but they would not have to install it? ” Teacher, if it comes to Python, can only grunt. In a nutshell, you won’t answer here.
If we talk about JavaScript, then here are live answers to the above question. These are applications that members of the Free Code Camp community wrote in CodePen using a browser.
Here is a Simon game created in the style of the 1970s.

Here is the implementation of John Conway 's mathematical game , Life .

Here is the search page for Wikipedia , styled Star Wars.

And here is a bagel game with a traditional dungeon.

First language: walk up the hill, or dig a little deeper?
Learn one language first. Then get down to the next.
If you jump from one language to another, without really stopping anywhere, you will not get far . In order to move much further “Hello World”, you need to learn your first language properly. After that, it will be much easier to deal with the second and subsequent languages.
Having mastered the first language well, you can expand your knowledge by learning other languages and developing as a programmer. Here are a few words about languages that should be considered after a decent mastery of JavaScript.
- Learning C is a great way to understand how computers actually work, particularly in terms of memory management. C is especially good at high performance computing.
- C ++ is great for game development.
- Python has no equal in scientific and statistical calculations.
- Java is useful to those who see themselves as a programmer in a large company.
But first, again, it's worth learning JavaScript.
So, now I want to do the impossible. I'm going to try to imagine the objections of some readers, criticism of JavaScript and my ideas, which may appear in the comments, and respond to this criticism.
Objection No. 1. JavaScript - slow language
JavaScript, for most practical purposes, is as fast as languages that are traditionally considered high-performance.
JavaScript (we are talking about Node.js) is orders of magnitude faster than Python, Ruby, and PHP. Its performance is close to C ++, Java and Go. Here are the results of one very serious performance test for various programming languages.

Objection No. 2. JavaScript does not have static typing
Like Python and Ruby, JavaScript is a dynamic typing language. And this, on the one hand, is convenient, and on the other, it can lead a developer into a maze of errors. For example, here I want the exampleArray variable to be an array. I write the values to the array, check its length, that is, the number of elements contained in the array. It looks like this:
exampleArray = [1, 2]
-> [1, 2]
exampleArray.length
-> 2
Then I accidentally write a string to a variable, and even worse, due to the features of the string data type in JavaScript, I can easily get the length of what I consider to be an array by accessing the length property :
exampleArray = "text"
-> "text"
exampleArray.length
-> 4
Error on error, in a word. Similar things constantly arise in languages with dynamic typing. Most developers deal with them by performing checks in dangerous places and creating tests for their code.
If you, in the first programming language, absolutely need static typing, I still recommend starting with JavaScript. After that, you can quickly learn TypeScript. Here's what Alex Everlof says on this subject: “It takes time to learn TypeScript, but if you already know JavaScript, it will be much faster and easier.”
Objection No. 3. I really want to create mobile applications, so JavaScript is not for me
Even so, I still recommend learning JavaScript first. And by the way, it is quite suitable for the development of mobile applications, moreover, both their client and server parts. Namely:
- The JavaScript ecosystem has several tools for developing full-fledged mobile applications. For example, these are Angular Cordova and React Native .
- In order for your mobile application to do something truly interesting, it will probably need a server part built on some suitable platform, such as Node.js + Express.js.
In addition, it is worth noting that the golden age of mobile applications is leaving.
To begin with, although literally everyone uses mobile applications, according to the Stack Overflow survey , which was attended by 49525 programmers, almost half of them are engaged in web development. And only a little more than eight percent are engaged in mobile applications.

Dreams that mobile users will be willing to work with a great many specialized applications have not come true. Instead, smartphone owners have stopped downloading new applications .
Of course, they use the programs. These are mainly Facebook, Google Maps and some others. There are not so many of them. As a result, the main demand for mobile application developers is concentrated in several large companies.
It is difficult to predict the prospects of job development for mobile programmers. However, many tasks related to the development, support and distribution of applications for smartphones and tablets are most easily solved using JavaScript. As a result, companies like Facebook and Google provide powerful support for the best JavaScript tools for mobile development.
As of 2016, almost all the work of programmers is focused on web projects. Everything is somehow connected with this huge platform, with the World Wide Web. And the upcoming generation of household appliances with which you can talk, and cars that will pick up children from school themselves - all this will also be part of the web.
From the above, a simple conclusion follows: learn JavaScript.
Objection # 4: Isn't JavaScript a toy language that was created in ten days?
When I hear this, this tweet immediately comes to mind . In general, JavaScript, of course, has an unusual story . It provokes. Surely you have read and heard someone making jokes about this language.
By the way, some people like to criticize C ++ incredibly. But, like JavaScript, C ++ succeeded no matter what. Now he, in the same way, is almost everywhere.
JavaScript is never a toy.
Have a good study!
In the end, I want to say this. If someone starts to get you just because you learn JavaScript, and not the “hit of the season”, just remember the famous words of Björn Straustrup, the person who created C ++: “There are only two types of programming languages: those that constantly scold, and those that no one uses. ”
Good luck learning your first programming language!