Ruby: what is interesting about this language and how to learn it effectively

Key Features and Differences of Ruby

I often hear the question: is it worth learning Ruby? As a rule, the question is based on doubts: how easy it is to find a job with this specialization, whether there will be interesting projects, and so on and so forth. Ruby is a modern, constantly evolving programming language, there are a lot of applications for it. Surely you have heard about Chef, Vagrant, Homebrew, but most often we all hear about Rails. Here is a post with a commentary by the author of the framework about why you should learn Rails.

Of course, everyone decides for himself which tool to use. And there is no point in endlessly arguing about why one technology is better than another. I chose Ruby because it is an incredibly expressive and flexible language that allows you to solve the same problem in many ways.

Ruby is an interpreted, fully object-oriented programming language with strong dynamic typing. It combines a Perl-like syntax with an object-oriented approach. Also, some features are borrowed from the programming languages ​​Python, Lisp, Dylan and CLU. The cross-platform implementation of the Ruby language interpreter is distributed under the terms of open source software. Code written in Ruby can be understood even by a person who does not understand programming. Projects such as Redmine, Twitter, Shopify, Basecamp, GitHub, Kickstarter, Airbnb and others have been created on RoR.

With the rise of Node.js, the popularity of Ruby on Rails has waned somewhat, but tech startups often use RoR due to the ease of prototyping. Ruby is the 11th most popular language in the TIOBE index.

Benefits of Ruby

  • Numerous and friendly community.
  • A rather high barrier to entry, which means that a Ruby developer is likely to have experience in at least one other programming language.
  • You only use the libraries and modules you need.
  • There are a large number of useful libraries that are ready to use (Ruby Gems).
  • There is a lot of information on Ruby on the Internet, in a structured and sifted form.
  • In the context of the discussion of Ruby, it is impossible not to mention the most popular Ruby on Rails framework.

Now let’s talk about some of the benefits of Ruby in more detail.

Development speed

One of the advantages of Ruby and the RoR framework is development speed. Personal experience and the experience of colleagues shows that solving problems on Rails is one and a half times faster compared to other similar frameworks. Ruby is very simple as a tool, and there are a huge number of ready-made solutions for various kinds of tasks.

Regular data caching tools

When developing a large-scale project, one of the most important points is caching. Ruby on Rails comes standard with native data caching tools. That is, you will immediately have tools for caching data on the project, and you can easily cache individual blocks of code or even entire pages.

First tests, then code

Often in the process of developing large projects, the question of testing arises, and it is not uncommon when there are no additional funds for a separate team of testers. Rails has a solution to this problem as well. If you compare RoR with other frameworks in the context of application testing, then you will find a lot of ready-made solutions for any kind of tests, be it integration or unit tests. All these libraries work out of the box. Ideally, in a Ruby on Rails project, code is not written until tests are written for it. RoR ideology involves the initial use of BDD (Behavior Driven Development) or TDD (Test Driven Development) methods.

Generally accepted development process standards for Ruby developers

Speaking of the benefits of Ruby, I can’t help but mention the ruby ​​community again. It is constantly growing, developing and always ready to help. There is always someone who will tell you how best to solve the problem, share experience in any matter.

Another very important point is that the Ruby community has had development process standards for many years, some community rules/agreements according to which development is carried out, which greatly simplifies the work. Due to these standards, each project is very structured, respectively, a new developer in the team will quickly get up to speed and be able to be useful from the first days of work. And even more: if the project was started by one team and finished by another, this is also not a problem at all. Since the development is carried out according to the already mentioned rules and community agreements, the new team will quickly and easily delve into the project and successfully complete it without much loss of time.

Also, Ruby on rails has a large number of different ready-made solutions in the public domain. Most of the solutions have already been implemented by someone before you, as well as tested by the community, which reduces the need to develop from scratch. These can be authentication, authorization, commenting systems, payment systems, mailing lists, and so on.

Ready-made solutions for project multilingualism

Rails comes with very powerful tools for project localization out of the box. It is possible both to provide support for several languages ​​initially, and to implement it later. The project contains special files for translating terms, tools for displaying templates in different languages, and much more.

High level of data protection

Now, articles about hacking various resources are often published on the network. The developers of the Ruby on Rails framework took the issue of data protection very seriously. RoR initially encrypts passwords, credit card data and other personal user data, SQL injections and XSS attacks are also excluded. All input parameters are escaped by default.

Learning Ruby

Now let’s talk about exactly how you can master Ruby.

Theory

You should start, of course, with literature. I recommend these sources:

  • Ruby in 20 minutes is a good resource for complete beginners. It allows you to get acquainted with the basic constructions of the language in less than half an hour and start writing your own small programs.
  • Codecademy is a platform with online courses in many areas, including pure Ruby and Rails. Here, the learning process is built quite interestingly, theoretical material is given and immediately a practical task to consolidate it. Final tasks are paid, but without them you can get the necessary skills.
  • Ruby and Rails Resources – A collection of links to various sites and books dedicated to learning Ruby and Rails.
  • Separately, I can recommend the book Flanagan D., Matsumoto Y. “The Ruby Programming Language”. It is considered one of the best, its author is the creator of the Ruby language himself.
  • Google 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *