Why Should We Learn Ruby?
Learn the importance of programming using Ruby.
Ruby vs. Ybur
The language Ybur is Ruby in reverse. It is an exotic programming language that no one knows except us. We’ve only just thought it up, and we don’t know what it does.
Let’s compare Ybur and Ruby using the three parameters described in the previous lesson.
Finding work quickly
Ruby is a very popular language, and it’s easy to find work where it’s used. As for Ybur, no one’s ever heard of it and it is impossible to find work while using it. There’s no need to compare how these two stand with regards to the other two parameters. In other words, if what is important to us is not programming itself , but the possibility of earning money in the foreseeable future, then Ruby is not a bad choice to opt for. It is a fairly-popular language. Of course, other popular programming languages exist too. We might say that JavaScript is the most popular, so let’s compare the two.
Learning something simple and interesting
Of course, other popular programming languages exist too. We might say that JavaScript is the most popular, so let’s compare it to Ruby. Ruby incorporates the Principle of Least Surprise, but JavaScript was not created with this principle in mind. JavaScript is more complicated than Ruby, because it is completely asynchronous.
We can see that JavaScript is not as simple as it looks at first glance. Let us consider a Ruby program for sorting numbers:
[11, 3, 2, 1].sort()
The above program needs to sort the numbers 11, 3, 2, and 1 into rising order. It’s not important if we don’t understand this syntax yet. We’ll deal with that subject later. The result of the Ruby program’s work is 1, 2, 3, 11. No surprise there!
Now, let’s write the same program in JavaScript:
[11, 3, 2, 1].sort();
In this case, the syntax is very similar and differs only in the semicolon at the end. But what will the result be? Even experienced JavaScript programmers cannot always give the correct answer. The program’s results are quite unexpected: 1, 11, 2, 3. Why the program yields this result is an enduring question. To sort numbers in JavaScript, we need to write:
[11, 3, 2, 1].sort((a, b) => a - b);
Once we understand this, we realize that using JavaScript isn’t difficult. However, with JavaScript, we are faced with the question: Do we want to waste time on such fine calibrations during our initial programming? JavaScript is in high demand, and every Ruby programmer must know it at a minimal level.
Future relevance
JavaScript is developing very dynamically. Concepts we learned years ago are not always up-to-date (in this case, I am speaking of popular frameworks —sets of tools). In Ruby’s case, the Rails framework has existed for more than ten years. So, the information that we attained ten years ago is still applicable to Ruby programming today.
Incidentally, it is worthwhile to comment on the applicability of previously learned knowledge. Knowledge of shell-scripting languages is still relevant, because little has changed in the last 30 years. Knowledge of the basics of computer science is still applicable in interviews and at work . So, programming languages are definitely something we should aim to learn at some point in time.
No one can make precise predictions about the applicability of a particular programming language in the future. However, we may look at the statistics for recent years to make some safe assumptions. Rubye is in fine form today and is widely used. Updates are issued, and the speed and syntax are also being improved. Additionally, the number of available libraries ensures that there is a quick solution to be found for virtually any possible problem within the field of web programming).
Ruby Is for Fun
A programming language should be able to solve certain business problems and be easy enough to use every day without issue.
For example, Java is a fine tool for solving business problems, but it needs to be treated with respect. The language is statically-typed, and the type of data on which different operations are carried out must be specified. This takes time and is fully justified in the business field, where it is better to spend longer periods of time on development rather than be forced to pay for mistakes later.
In the case of Ruby, the program can be written quickly and simply. It is not very reliable, which can be a problem sometimes. Still, many companies, particularly start-ups, conclude that it is reliable enough, and the relatively-slow program execution speed is not a problem either. After all, in today’s world, we are often required to do something quickly to get speedy investments, attract the first customers, and take advantage of the momentum while competitors are still trying to find their way.
Ruby is a good tool for when we need to work on a personal project. For example, we can use Ruby to work on a program that can attract attention, be shared with others, or help us earn money.
In other words, Ruby is an efficient and interesting language in and of itself, and also due to the utility it provides at work.