Loading…

5 Programming Languages ​​to Learn First

The background of demand for a modern programmer.

Today, anyone, who tends to get into IT sphere, wonders what programming language to learn? Everyone wants to get a universal answer that predetermines a dizzying career. Yes, before the invention of the Internet and the appearance of mobile platforms, it was possible to master one language, write a program on it and be a developer in demand. Today, the reality is that even a junior is presented with a huge list of requirements, among which is knowledge of several languages.

Judge for yourself: for web development, it would be nice to master PHP, JavaScript, Python, Ruby, and also HTML and CSS; in the mobile sphere – Swift, Objective-C, Java, C #. Saying about the languages ​​for creating desktop applications, it is not necessary to list them. In fact, all will be useful. That is why we took the responsibility to name 5 programming languages ​​that need to be learnt at least briefly in order to be called a programmer today.

Python

Python is probably the easiest programming language from our list. There is a minimum of service symbols, dynamic typing, and the most understandable syntax. And if you have understood a little from the past sentence, this is a reason to start learning exactly with Python.

Despite its visual simplicity, this language is one of the most powerful. With its help, you can work with text and build neural networks with equal ease. Take a look:

if i > 1:

     	 return fib_recursion(i-1) + fib_recursion(i-2)

     	return i

        	 	

for i in range(10):

   	print i, fib_recursion(i)

In this code, we created our own function to calculate the Fibonacci sequence, and then brought it to the screen. Only 6 lines were required to describe a rather complex mathematical operation.

It is worth mentioning that at the moment two versions are relevant: Python 2 and Python 3. You better take the latter as a basis, since the support for Python 2 and consequently the active development on it will stop very soon.

Javascript

The next must have among the languages ​​is JavaScript. You need only a browser to work with it. The syntax here is more complicated: service symbols and constructions with motley brackets appear, function names do not always reveal the essence of the action, and even the simplest code has a structured view. Take a look at the rewritten code with the Fibonacci function:

function fib_recursion(n) {

   return n < 1 ? 0

	 	: n <= 2 ? 1

	 	: fib_recursion(n - 1) + fib_recursion(n - 2);

}

console.log(fib_recursion(10));

The amount of code has virtually not changed, but readability has decreased. After learning Python, you can easily figure out how the return structure works, and appreciate the convenience of just such a write method.

In addition, the JavaScript ecosystem is richer than Python one. It offers an abundance of development environments, code editors, frameworks, libraries. This is another step towards understanding how “adult” programming works.

In general, JavaScript is slightly inferior to Python in the range of the tasks to be solved, but its capabilities are “deeper”. Knowledge of this language is useful when developing programs on any platforms.

C #

If you have not decided on the language, it means that you have not yet decided what attracts you: the web, mobile or desktop applications. Then your solution is C#, a universal tool for all directions of development. To create desktop applications, you need Visual Studio (Community version is free). For the world of mobile devices you should install Xamarian, and ASP.NET is useful for the web.

Take a look at our C# code:

static void Main(string[] args)

{

     	int number = 10;

     	fib_recursion(number);

}

static void fib_recursion(int n, int a = 0, int b = 1)

{

     	if (n == 0) return;

     	Console.WriteLine(a);

 

fib_recursion(--n, b, b+a);

}

The code has slightly complicated again. This is due to the use of the static keyword. At this stage, you will learn about the proper use of memory, visibility scopes of data, and fully immerse yourself in OOP. Well, if you did not have time when meeting with JavaScript.

Swift

We approach the most interesting – languages, impeccable knowledge of which will help you get into the field of mobile development. Swift is not quite universal: it has not completely supplanted Objective-C from applications for Apple, but its prospects are brilliant.

The fourth version of Swift was released in 2017: it contains many improvements for working with strings, collections; increased reliability and more. This is no longer a “raw” language, but a classic representative of the top of the TIOBE rating with a systematic development. With Swift, you can create applications for all Apple products: macOS, watchOS, iOS and any new system, if it appears.

Look at the Fibonacci sequence code:

func fib_recursion(num1: Int, num2: Int, steps: Int) {

     	if steps > 0 {

	 	let newNum = num1 + num2

	 	fib_recursion(num2, num2: newNum, steps: steps-1)

     	}

     	else {

	 	print("result = \(num2)")

     	}

}

fib_recursion(0, num2: 1, steps: 10)

Java

For more than two decades, this language has been on the list of the most sought-after, and this already means something. Today, it is mainly associated with the development of applications for Android – but this is only a small part of its capabilities. Using Java, you can create graphical widgets for the web or write desktop applications. The principle of platform and device independence in Java lives and thrives.

In addition, Java is an excellent language to fully understand programming: here all the principles of OOP are implemented, the work with memory and peripherals is organized. So you can practice with functional programming.

And here is the Java code of our sequence in the simplest imperative case:

public class MainClass {

  public static long fib_recursion(long number) {

     	if ((number == 0) || (number == 1))

     	return number;

     	else

     	return fib_recursion(number - 1) + fib_recursion(number - 2);

  }

  public static void main(String[] args) {

     	for (int counter = 0; counter <= 10; counter++)

     	System.out.printf("Fibonacci of %d is: %d\n", counter, fib_recursion(counter));

  }

}

The volume may seem excessive, but in reality it is nothing more than basic constructs that ensure the comprehensibility of the code and its reliability.

Conclusion

A number of useful languages ​​like PHP, C ++ or Ruby could be added to the list. Or more functional for general development: Lisp, Haskell, Clojure. However, you will definitely get to this. But first choose a specialization, sign up for GeekBrains courses and learn the five described must know languages.


Leave a Comment