Ruby is an interpreted, open-source programming language with a focus on simplicity and productivity. Ruby is already 30 years old, and it has become one of the most used programming languages.
Some claim Ruby is dead; others use it widely in their companies. Join me in this blog post as we learn about Ruby's history and where it stands today.
How It Started
Ruby was born on Feb. 24th, 1993. This was the day when Yukihiro Matsumoto, also known as Matz and creator of Ruby, decided along with his colleague Keiju Ishitsuka what the name of the language was going to be during a chat conversation:
matz> Let us decide the codename now
matz> tentative one.
keiju> Ok.
matz> What is your best up to now?
keiju> I'm content with coral.
matz> I thought ruby is cool as a codename, isn't it
keiju> Well. Ruby is also good.
matz> But, coral is also good
matz> arrr
They knew they wanted to name the programming language after jewels, so they were considering Ruby and Coral. As Matz explains in his talk Ruby After 25 Years, Coral was longer by one character making it more annoying to write multiple times. Ruby was shorter and more beautiful.
Matz created Ruby because he wanted a simple object-oriented, easy-to-use scripting language. He added the features he loved the most, such as iterators, exception handling, and garbage collection.
Ruby is a clean, simple, and powerful object-oriented programming language. There are no curly braces; scopes are clearly defined by blocks, and overall makes you happy to use it. This was, in fact, one of Matz's goals when creating the language:
"I hope to see Ruby help every programmer in the world to be productive, enjoy programming, and be happy. That is the primary purpose of Ruby language." — Matz on Ruby 1.9, Google TechTalks 2008
I mean, look at this thing:
class Numeric
def plus(x)
self.+(x)
end
end
y = 5.plus 6
# y is now equal to 11
I can't imagine a more beautiful thing 🤩.
This code creates a new class, Numeric
, with a plus
method. Because everything is an object in Ruby, you can call this method with anything, even a number! We do this in the example y = 5.plus 6
. The Numeric
class is just a small example of what Ruby can do, but I'm sure it gives you an idea of its power.
But Ruby has come a long way from the first version to the current one. After naming the language in 1993, ruby-0.95
was released to the Japanese domestic newsgroups on Dec. 21st, 1995. In 1996 ruby-1.0
was released, and in July 1997, Matz announced that he had been hired by netlab.jp, a Japanese open source company, to be a full-time Ruby developer. This only helped accelerate the implementation of Ruby, so on Aug. 13th, ruby-1.1
was released, and on Sept. 22nd, 1997, the first article about Ruby was published. I did my best to find it, but it is not available anymore 😭.
The popularity of Ruby was growing every day in Japan, and as more and more developers started to use Ruby, the first Ruby books were published to support the community's continued learning. The first was "The Object-Oriented Scripting Language Ruby" by Matz himself.
In 2000 Ruby was more popular than Python in Japan, and the acceptance and growth of the language were starting. In 2004, a new server-side web application framework was born: Ruby on Rails. The launch of Rails, together with the fact that Apple announced that it would ship Ruby on Rails with Mac OS X v10.5 "Leopard" helped Ruby to become the Language of the Year in 2006 and to be used mainly for web development.
Fast-forward to 2016, Ruby reaches the highest position (since 2001) in the TIOBE index at number 8, and its usage is peaking. Between 2013 and 2020, we went from ruby2.0.0
to ruby3.0.0
, and the community and the language were more and more mature.
But where is Ruby now?
How It's Going
Ruby is at version ruby3.2.1
as of the date of publishing this article, and by the end of 2022, there were 2.4 million Ruby developers out there.
At the beginning of this article, I mentioned that some people say Ruby is dying, and I'm afraid I have to disagree with this statement. Ruby, as technology, still creates value nowadays, which is essential to remember. When technology creates value, it also creates jobs, opportunities, and money.
Now let me tell you why Ruby is still creating value:
Ruby lives to its purpose: programmer happiness
You can take it from me, or you can take it from other people in the industry. The reality is programming in Ruby is truly joyful, and if you still need to do it, I highly recommend you try it.
Ruby is widely used in big companies 🧑💻
Ruby is widely used in the tech industry by some of the biggest companies like Airbnb, Shopify, Coinbase, and Gitlab. Some are significant contributors to Ruby's source code and Ruby on Rails.
Ruby makes money 🤑
In 2022, Ruby and Ruby on Rails are still listed as the top-paying technologies for developers, with a median yearly salary of about $90,000.
Also, because big publicly-traded companies are using Ruby, the total market cap of only 46 (!) of them is currently at about $284 Billion.
Ruby has a great community
The Ruby community is highly active, and many projects contribute to it. One of them is the Rails Foundation which aims to improve the documentation, education, marketing, and events to benefit all new and existing Rails developers.
Also, Ruby is open source, and everyone can contribute to its development; this also means it can quickly evolve to fit developers' needs in the future.
What’s Next?
Ruby 3.0 was released in 2020 with many improvements and new features, so the plan to keep improvement remains.
Some of the improvements, ambitions, and features that Ruby will be working on are the following:
- Ruby 3x3:
- It started as "Make Ruby 3.0 run 3 times faster than Ruby 2.0", but it has been revisited in 2021 and changed to "Ruby 3.x will be 3 times faster than Ruby 3.0 " so we will see more and more performance improvements!
- Performance:
- Ruby 3.2 adds a lot of performance improvements, such as re-implementing the MJIT compiler in Ruby and executing it under a forked process instead of using a native thread.
- YJIT is now production-ready, and there will be more performance improvements coming as shown by Alan Wu in RubyKiagi 2022.
- Concurrency / Parallelism:
- Ruby 3.0 introduced Ractors, an actor-model abstraction that provides a parallel execution feature without thread-safety concerns. Ractors have improved since they were first released and will continue their development to ensure Ruby is more thread-safe than ever.
- Static Analysis with RBS and Typeprof: both of these tools were released with Ruby 3.0 are still being improved in new versions.
- RBS allows you to add type annotations to your Ruby code in files with a new extension called
.rbs
. - Typeprof is a type analysis tool that reads plain (non-type-annotated) Ruby code, analyzes what methods are defined and how they are used and generates a prototype of type signature in RBS format.
- RBS allows you to add type annotations to your Ruby code in files with a new extension called
Conclusion
Ruby is an object-oriented and interpreted programming language created by Yukihiro Matsumoto in 1993. Ruby was quickly adopted in Japan and then expanded to the rest of the world; it gained popularity when the Ruby on Rails framework was released. Ruby has peaked in popularity over the years and remained relatively stable.
Ruby is still widely used in big companies like Shopify, AirBnb, and Github, which also contribute to the source code and investment and language development.
Programming languages' popularity and the features that developers seek come and go. A few years ago, developers didn't want to deal with static typing; now, they do, for example. It is hard to predict whether Ruby will become extremely popular, but surely Ruby is still alive, and it will live as long it continues to create value for the community and companies but also while it makes developers happy.