Every cook praises their own broth, and every developer sings praises for their favourite programming language. However, there are certain languages whose names have reverberated so loudly from the very beginning that they continue to evoke waves of excitement, accompanied by heated debates regarding their increasing or decreasing popularity. Ruby is undoubtedly one of the most robust and sought-after languages in this regard. In this article, we delve into its current popularity, evaluate whether it is worth embarking on a journey to learn Ruby, and explore the various domains where your skills as a “Ruby developer” can be applied effectively.
What are the most popular programming languages today?
According to the TIOBE ranking, Python takes the lead as the most popular programming language in August 2022, with a 15.42% share. The top five also includes C, Java, C++, and C#. However, it’s important to note that this ranking reflects popularity but does not necessarily indicate that the majority of code is written in these languages. Interestingly, popular languages may not align with personal favourites.
In the annual StackOverflow survey, Rust has maintained its position as the “favourite” programming language for the seventh consecutive year. Among the 6,625 respondents who have used Rust, it garnered a staggering 86.73% approval rating. The top five favourites are followed by Elixir, Clojure, TypeScript, and Julia. At the other end of the spectrum, MATLAB emerged as the least “loved” language, with only 19% of users expressing sympathy for it.
But what about Ruby?
Ruby emerged in Japan in 1995. Contrary to the belief that it is an outdated language, it’s worth noting that Python itself is four years older. Immediately popular domestically, Ruby started to get global recognition in the early 2000s after the translation of its documentation into English and the publication of books on the subject.
Slowly but steadily, Ruby gained traction in Europe and the USA. Its usage in large-scale commercial projects surged after the release of Ruby 1.8.0 in 2003. The revolutionary Ruby on Rails framework, launched in 2006, further accelerated development processes. The following two years marked the pinnacle of Ruby’s popularity, with TIOBE naming it the “Language of the Year” in 2006.
In August 2022, Ruby held the 18th place in the TIOBE ranking, having slipped three places within a year. However, it remains in demand and continues to thrive as a living language. Prominent companies like GitHub, Airbnb, Ask.fm, Bloomberg, and even the initial version of Twitter were built using Ruby. Additionally, the versatile Ruby on Rails framework contributed to the creation of platforms such as SoundCloud, Kickstarter, Change.org, Zendesk, and many more.
Source: redmonk.com
RedMonk analysts have meticulously studied the language landscape, examining the dynamics of popular languages from 2012 to 2022. For those who doubted its endurance, Ruby triumphs, proudly holding the 9th place, surpassing C, Scala, and Go. A decade ago, it held a respectable 5th position.
How did this language appear?
When Yukihiro Matsumoto, a Japanese engineer and the creator of Ruby, embarked on the quest for “a truly object-oriented, user-friendly language,” he was disheartened by the absence of such options. Perl seemed like a mere “toy language,” while Python fell short in achieving full object-orientation. Determined to address these gaps, Matsumoto set out to develop his own language – Ruby, a versatile, object-oriented programming language with dynamic typing.
In his creation, Matsumoto incorporated the missing elements found in other languages, including exception handling, automatic garbage collection, and iterators. He leveraged the power of Pearl’s features by implementing them as a class library within Ruby. Additionally, Ruby borrowed and integrated various attributes from languages such as Smalltalk, Eiffel, Ada, and Lisp. Nevertheless, it is the core semantics and syntax, inspired primarily by Pearl, that define Ruby’s distinct identity.
What is special about Ruby syntax?
When creating Ruby, the author was inspired by the sci-fi novel Babylon 17 in which earthlings unravelled the language of aliens. Using it, one could express thoughts in just a few words that would require a whole paragraph in English. The book consistently explores the Sapir-Whorf hypothesis of linguistic relativity, which suggests that the structure of language influences the worldview, outlook, and cognitive processes of its speakers.
Although Ruby is not spoken as a natural language, Matsumoto aimed to make it understandable and easy to read for anyone who knows English. Writing Ruby code is akin to speaking English. The language possesses a well-thought-out syntax that facilitates easy comprehension. However, like other languages, readability also depends on the developer’s skills.
Where is Ruby used?
As a scripting language, Ruby finds applications in nearly all areas of development. However, in practice, it is predominantly used for web development. Many e-commerce applications, SaaS products, complex platforms, and services are written in Ruby.
Ruby is often referred to as the “startup language” due to its ability to rapidly create minimum viable products (MVPs) and test hypotheses. This is largely thanks to the powerful Rails framework, which follows the Model-View-Controller (MVC) application component separation scheme. Rails aids in the swift implementation of new solutions and bug fixes.
Mobile games and applications for Android and iOS can also be written in Ruby using development environments like Titanium Studio, Ruboto, or RubyMotion.
How is Ruby different from other programming languages?
Ruby employs single inheritance based on the concept of modules. Classes can mix modules by inheriting other methods, resulting in more flexibility and simpler code structure compared to multiple inheritance. Additionally, Ruby supports multiple inheritance through mixins.
In Ruby, everything is an object, including data types, numbers, and variable values. While this may seem unconventional, it grants each piece of code, no matter how basic, its own actions and properties. Consequently, the rules applicable to objects apply throughout the language, offering a distinct freedom of action in development.
Another notable distinction is that the Ruby community itself regulates non-critical rules through negotiations. For example, it has been decided that expressions can be terminated without semicolons or that iterators can be used instead of loops to address cyclic problems. Numerous such rules exist, and a separate Ruby Style Guide gem is available on GitHub.
Ruby has a promising future
The ongoing development and demand for Ruby serve as key indicators of its potential.
While Ruby initially lagged behind Python or PHP in terms of productivity, it would be a mistake to assume that this remains the case. Although Ruby may not be as hyped as before, it continues to be in demand and effective.
Both Ruby itself and the Rails framework receive regular updates. In the latest version, the language introduced the ability to rewrite type notations in separate files instead of within the code. This aligns with the author’s vision that tools will soon emerge to automatically determine types. Additionally, new features such as Ractors for parallel program execution, a typeof static type analyser, a faster JIT compiler, and syntax highlighting and auto-completion in the REPL have been added.
As mentioned earlier, the Ruby community actively contributes to the language’s development. GitHub statistics reveal that Rails has the highest number of contributors among frameworks for all other languages.
Source: eurone.com
When it comes to demand, one of the most significant factors is the high salaries offered to Ruby developers. This is because the market is not saturated with experienced Ruby professionals to the same extent as Python. In the United States, the average annual salary for a Ruby developer is USD 92,000. For senior programmers with 10 years of experience, the average salary increases to USD 120,000 per year. The demand for Ruby programmers is not only prevalent in the American market but also in Poland, as demonstrated by the performance of the international IT corporation SOFTSWISS, which has an office in Poznań.
Case study: processing EUR 6.5 billion monthly with Ruby solutions
Prominent companies utilise Ruby to develop complex, high-load platforms in areas such as e-commerce and fintech. They choose Ruby because these sophisticated products require reliability and user-friendliness, as well as the ability to quickly test and implement new features.
In many cases, fresh ideas are first implemented in the realm of online entertainment. This is a specific characteristic of the industry where uniqueness is essential to attract users, rather than merely offering account bonuses or flashy banners on websites. Here’s an example: SOFTSWISS, a leading software developer for iGaming, holds the distinction of being the first company in the world to create a solution for working with cryptocurrencies in the online entertainment sector. They develop solutions for managing online casinos, bookmakers, and more.
Every month, platforms created and maintained by the company process thousands of bets worth a total of EUR 6.5 billion. Given the scale of operations, the cost of a mistake can be substantial. Ruby is employed by the company for developing the Casino Platform, Affilka, and several internal products expected to handle high loads. In addition to Ruby, developers at SOFTSWISS also utilise Go, JavaScript, Python, and Scala, providing them with ample flexibility to tackle various tasks.