JavaRush /Java Blog /Random EN /Choosing a programming language

Choosing a programming language

Published in the Random EN group
I first encountered programming at school, in computer science classes. These were some tedious explanations of the principles of n-ary number systems. Well, as a test, I had to write my own website. Then it seemed to me that there was no more boring activity in the world. How wrong I was! Unfortunately, the school computer science curriculum does not provide a complete picture of the work of IT, and it is not clear how to choose a programming language. Selecting a programming language - 1Before asking the question “Which programming language to choose to learn,” a beginner should familiarize himself with what languages ​​exist and what their differences are.

Entry threshold: high, low, medium

Among programmers, you can often hear about the “threshold of entry” - a concept that reflects the amount of effort required for an individual “junior” to master a programming language at a sufficient level to write his first serious program and find a job. The “entry threshold” consists of knowledge:
  • features of syntax and nuances of language;
  • libraries;
  • algorithms and data structures.
In fact, even working in Excel can be called a kind of programming. By the way, this familiar office program is not as simple as it seems. For one, the threshold for entry will be the ability to build a table, for another - knowledge of complex formulas and macros. In any case, this threshold is small. Next come quasi-languages: for example, 1C programming. Then - the easiest languages ​​to learn: for example, PHP . Next are languages ​​with native (usually derived from English) syntax that do not require manual interaction with memory: for example, Java , JS . Then there are languages ​​that require extremely careful handling of memory, data structures and algorithms: for example, C , C++ . Young multi-paradigm languages ​​have, perhaps, the highest barrier to entry, because to master them you need to eat more than one dog in other programming languages: for example, Scala . But first of all, when choosing a language, you should decide what you want to do next: develop web, enterprise, desktop or mobile applications.

Web or not Web?

Web

Web programmers can be divided into Frontend and Backend developers . It is worth understanding what these terms mean. “Frontend” developers deal with the so-called client side - what the user will see. “Backend” is the software and hardware part of the service - what runs on the server. For a Frontend developer deciding which programming language to choose, the must-have is JavaScript and its frameworks: Angular JS, React and others. JS dialects are not as popular as their parent, but can also be useful: CoffeeScript, TypeScript. There is also flash AS, before there were JScript and VBScript, but only dinosaurs remember that =) In addition, you need to understand HTML and CSS .
Selecting a programming language - 2
Many beginners think that JavaScript and Java are almost the same thing; these languages ​​should not be confused. JS used to be called “LiveScript” and got its current name precisely due to the popularity of the word “Java”. PHP, Python, Ruby, Pearl, Java are suitable for web backend . Here I would like to draw attention to PHP - we will talk about other languages ​​later - one of the easiest languages ​​to learn, which has a low entry threshold. Ruby, judging by a survey of familiar web developers, is slowly but surely gaining popularity: it is loved for its brevity and beauty.

Non-Web (Enterprise, Desktop, Mobile)

I specifically grouped these programming languages ​​into a category with such a strange name. Most of them can be used to write enterprise, desktop, and even mobile applications. Python , an easy-to-understand OOLP, has become incredibly popular recently due to the development of Machine Learning : its adherents widely use Python. ML is a fairly young area in IT, and although the first fruits have already been received, I would not rush to dive into this industry when choosing a programming language. First, you need to be VERY good at math. Secondly, the wave of popularity may go the same way as with “blockchain” or “nanotechnology”. In addition, as you remember, Python is used in web development. C++ : classic, everything is built on the basis of the “pluses”. This language was the progenitor of all popular OOLPs, and a beginner should definitely pay attention to it. Many popular applications are based on it. But the high probability of “shooting yourself in the foot” and the difficult-to-understand syntax negate the likelihood of a beginner mastering this mastodon of programming. Kotlin - Java for hipsters - a crazy mix of OOP and functional programming. Recently popular due to the fact that an experienced developer who switches from Java to Kotlin significantly improves his productivity. An experienced developer will quickly get used to this language. By the way, the same applies to Scala, but Kotlin is popular in Android. Java is easy for a beginner to learn. Including, thanks to JavaRush : it was here that I understood how to choose a programming language =) Java syntax is clear, there is a possibility of “shooting yourself in the foot”, but not critical.

OOP or POP?

Procedural approach

The procedure-oriented approach involves writing a program consisting of sequential statements that can be assembled into a single whole to effectively solve a specific range of problems. These languages ​​include: C , PureBasic and Pascal . The same ones that bring despondency to high school and junior students. There is also a relatively young GO . However, familiarity with procedural languages ​​is very useful for a potential developer. For me, immersion in procedural languages ​​is associated with the Mathematica system (Wolfram) and university research activities. Thanks to the right algorithmic approaches and simple procedures, moving linearly from the beginning of the program to its end, I was able to calculate values ​​​​that are relevant to modern theoretical physics. It is thanks to these “sequential” languages ​​that you begin to understand that sometimes it is easier to write code than to count on your own. Studying PPP provides good algorithmic training, which an employer almost always wants to see in a candidate when hiring. The foundations of everything and everyone in IT are built on procedural languages, so do not underestimate them. By the way, beginners who decide which programming language to choose to learn often think that multithreading is the exclusive prerogative of OOP. This is wrong. Procedural programming languages ​​also allow you to perform parallel calculations.
Selecting a programming language - 3

Object-oriented approach

Those who started with procedural languages ​​most often have a good knowledge of mathematics, algorithms and data structures (this is due to the emphasis on these areas of knowledge in technical universities). However, in modern realities, successful programmers are often those who have well mastered another approach to programming - object-oriented. The OOP ideology makes it possible to build truly global systems. The peculiarity of this approach is its similarity to the real world:
  • various objects interact with each other and exist independently of each other.
  • objects have a hierarchy and are capable of adopting or changing the behavior of their ancestors.
  • You can operate with abstract concepts, but only really existing objects can interact.

Example

Procedural-oriented languages ​​are tools for solving specific problems. And if your task has undergone a change, even a minor one, you will most likely have to spend time and effort rewriting all the algorithms.

Представим программу, описывающую автосалон, который продает легковые и грузовые автомобor, How новые, так и подержанные. В proceduresном языке для каждого an object нужно описать функции, обрабатывающие ввод or вывод данных для нового легкового, нового грузового, б/у легкового и б/у грузового автомобилей. А что предлагает ООП? При an objectно-ориентированном подходе нужно просто описать базовый класс ТРАНСПОРТ, который будет хранить в себе характеристики, присущие и тому, и другому типу автомобилей:

  • Марка
  • Объем двигателя
  • Мощность
  • Год выпуска
  • Новый or б/у
  • Цена

И методы для ввода-вывода информации. Затем создадим an objectы, наследующие характеристики класса ТРАНСПОРТ: ЛЕГКОВУШКА и ГРУЗОВИК. Они содержат уточнённую информацию, присущую именно таким видам транспорта, а также методы ввода-вывода.

Внезапно руководство салона решило расширить ассортимент и продавать еще и мотоциклы. Процедурный подход предложит переписать всю логику для новых и б/у мотоциклов с самого начала, в то время How ООП-язык позволит просто создать новый an object МОТОЦИКЛ, наследующий все характеристики суперкласса ТРАНСПОРТ и содержащий уточнения.

А что будет, если добавлять разные транспортные средства? Процедурная реализация будет требовать больших трудозатрат, чем ООП. Причем чем больше ассортимент, тем меньше нужно будет делать манипуляций с an objectми.

Итак, ООП — это стиль программирования, позволяющий объединять данные и методы одной сущности и работать с ними How с цельным an objectом. Сущности могут выстраиваться в иерархии и взаимодействовать между собой, не вдаваясь в подробности внутренней реализации друг друга. Для себя я выделяю три причины, по которым ООП — более прогрессивный подход:
  1. ООП предполагает независимую разработку отдельных модулей, предоставляя программисту or команде выбирать способ и границы соприкосновений и обмена информацией.

  2. Разбиение на небольшие модули намного проще для восприятия, чем монолитные proceduresы. Благодаря этому сторонний разработчик быстро разберется в твоем codeе, а ты при необходимости войдешь в новый проект.

  3. Изменение одного an object может ниHow не отразиться на взаимодействии с другим, но способно повлиять на иерархию дочерних an objectов. Освоив такой подход, расширение и доработка программы становится тривиальной задачей.
Нужно помнить о том, что один подход не противоречит другому, но иерархически ООП всё же находится выше. Собственно, почему я рекомендую именно Java? Я бы выделил следующие причины:
  1. Кроссплатформенность.

    Java работает везде благодаря JVM —виртуальной машине Java. Один из главных плюсов этого языка — кроссплатформенность: не нужно думать о том, Howую библиотеку подключить, Howова архитектура у конкретного процессора. «Написано однажды —работает всегда».

  2. Документация.

    The widest documentation base: official Oracle documentation, training portals, constantly developing community. Answers to most questions that arise during development can be found in a few minutes, the main thing is to understand what to type into the search engine =)

  3. Popularity.

    Java is the most popular programming language in the world: in addition to the above-mentioned Android and web developers, almost every first-time enterprise developer writes in Java. Enterprise is an in-house development necessary for the needs of large corporations.

    Every year, haters predict the “death of Java”, they say: “ Oracle will stop supporting it, and in general you are doing nonsense .” This is wrong! New versions of Java are promised to be released every six months. The most important innovations and features of the latest version can be read here .

    For me, lambdas in Java 8 were a revolution and a discovery, not to mention the new versions! Now I’m working on a “retrograde” project, so I don’t delve into innovations, but the fact that Java lives on is a fact.

    Selecting a programming language - 4
  4. Android.

    Android has confidently occupied more than 80% of the mobile phone market for the last 4 years; TVs, media players and even media systems in cars operate under this operating system. And development for this OS is carried out mainly in Java. Just imagine what prospects are opening up. When I got a job as an Android developer, I became interested: how much does the product I am developing cost? It turned out that the price per year is approximately $5. A reasonable question arose: where did the funds come from for this office, for salaries, cookies, a tennis table, robots and other “nice things”? It's a matter of quantity: our application has 20 million users.

  5. Salaries.

    And for dessert: the salary of a Java developer is one of the highest in the industry. You are going to learn programming for a specific purpose: to get a good job.

Popularity of a programming language

When choosing a programming language, you need to think about the ultimate goal of learning - getting your first job. To assess the popularity of different languages, I went to a popular recruiting portal and began to look at the number of vacancies for various requests for Moscow. You can see the results below.
Java: 277
python: 227
php: 188
c#: 147
c++: 131
ruby: 40
scala: 24
kotlin: 20
Even the recently popular Python could not get ahead of Java. But these are subjective data: a specific city, a specific day. There are official sources, let’s turn to them. As of October 2018, according to TIOBE, Java ranks first. In the PYPL ranking , Java takes second place, far ahead of JS and competing with the “fashionable” Python.

RESULTS

Here's what a beginner should pay attention to when choosing a programming language:
  • Popularity (Java consistently occupies a leading position);
  • Entry threshold (For Java - average: the range of competencies required by the employer is quite wide);
  • Available materials (there are no portals similar to JavaRush in Russian, therefore, the palm goes to guess who =));
  • Areas of application: the more industries in which a programming language can be used, the more specialists are required in the market. I already talked about cross-platform, but I won’t get tired of repeating it.
Of course, there are pitfalls everywhere, but the one who walks will master the road: only you can decide which programming language to choose . Good luck in your studies!
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION