tecosystems

What Ruby Needs

Share via Twitter Share via Facebook Share via Linkedin Share via Reddit

Of all of the questions we receive at RedMonk, one of the most common concerns programming languages. Specifically, what is a given language’s trajectory? Is it going up or down? The answer to which is met, typically, by two follow up questions: first, what are the reasons for that direction, and second, can it be meaningfully changed?

Recently, we’ve received several such inquiries around Ruby. For those with an interest in the language, then, the following is a quick public summary of the answers we’ve been providing privately.

The backstory of Ruby is generally well known at this point. Created by “Matz” Matsumoto and first released publicly in 1995, it was a distinct language because of its emphasis on the developer. It was syntactically clean, so well designed in fact that you could guess the structure and be right the majority of the time. Speed was not a strength, but Moore’s law was making that less of a concern every day.

Ten years after the release of Ruby came the first drop of Ruby on Rails, an MVC web framework extracted from the product Basecamp. Rails revolutionized web development by making the generation of aesthetically attractive website scaffolds essentially a push button activity requiring minimal effort.

Rails proved to be a dramatic engine for growth, spiking interest in and adoption of Ruby, pulling the language into mainstream popularity, popularity that continues to this day. In our last rankings, Ruby placed seventh, behind languages like JavaScript, Python and PHP but ahead of C, Swift and Go. Ruby remains at the core of products like Engine Yard and Heroku, and is the language behind projects such as Discourse, Homebrew and Vagrant.

While its current static placement is enviable, however, Ruby’s trajectory is less encouraging. Seventh represents Ruby’s worst performance on our list in the time that we’ve been doing the rankings. Since 2012, the language has placed higher than 5th once, but generally been a middle of the pack performer behind higher profile runtimes such as JavaScript (#1), Java (#2), Python (#3) or PHP (#4).

If we compare Python and Ruby, for example, the relative differences in performance are startling.

Here’s Ruby vs Python in the percentage of Stack Overflow questions per month.

And here’s Ruby vs Python over the last two years in Wikipedia traffic.

Nor is this an artifact of Python’s recent surge in popularity. Ruby performs worse against JavaScript, for example.

Rails, the original engine behind Ruby’s growth, is experiencing a similar trajectory. Here are Ruby and Rails measured against Node.js, the popular JavaScript framework.

The good news for Ruby is that the rate of decline is slow; assuming no acceleration to its current trajectory, the language will sustain mainstream relevance for years to come. But the fact that the language is in decline is difficult to argue with. The question is why?

There is no single answer. In some cases, performance is the issue. Many Ruby shops, which in most cases meant web shops, experienced growing pains associated with the runtime and eventually transitioned to Java – Twitter is perhaps the best known example of this. Some non-web Ruby projects have also been rewritten in languages such as Go for scale reasons (e.g. Cloud Foundry). In other cases, the transition was partially performance related but also related to ecosystem and skills questions; the JavaScript and Node.js ecosystem certainly impacted Ruby in this regard. And lastly, fair or not, Ruby is not widely perceived to have the same versatility of languages like Python, which have robust ecosystems outside of web development in areas such as data science.

Taken in the aggregate, however, the picture painted is one of a popular, well designed language that lacks clear engines and avenues for new growth. What Ruby needs, therefore, if the goal is to reverse its current trajectory, is projects that inspire new adoption. Focus on performance and scale are important, of course, but altering a reputation is difficult and time consuming. The more likely short term impact would come from a Ruby project or projects experiencing explosive growth. Programming language adoption is rarely a function of the language itself, remember: it’s more typically led by frameworks or other similar projects. Finding the next Rails or Node.js is easier said than done, of course, but it’s the clearest pathway Ruby has towards becoming a contender for the top spots on our rankings again.

If that doesn’t happen, however, Ruby fans can take comfort in the fact that they’ve already achieved levels of popularity that very few languages have or ever will.

Disclosure: Engine Yard and Heroku are RedMonk customers.

4 comments

  1. […] Redmonk 近日针对 Ruby 的发展做了一些总结,在其最近的排名中,Ruby 位居第八,落后于 JavaScript、Python 和 PHP 等语言,但领先于 C、Swift 和 Go 。尽管排名不低,但第八名其实是 Ruby 在 redmonk 排名中排名最差的一次。自2012年以来,该语言的排名曾一度进入前五,仅低于 JavaScript、Java、Python 、PHP 等语言 。 […]

  2. I’ve found Crystal has done a good job of creating something similar to ruby but filling in missing pieces where ruby falls short (concurrency, compile to single binary, inferred typing, speed) – https://crystal-lang.org/

    1. But Crystal is not where near ready yet, from compiler, tools, documentation, its whole ecosystem, frameworks, etc. It has the potential, I guess at the moment it is limited by resources.

      I really wish Crystal take off.

  3. After programming in Ruby in 2011 and programming in Java since then the language caught my interest again. Main reason is that I need a script language in addition to Java and to replace shell scripts (bash).

    I found that Ruby has two interesting features:

    A. It looks like a best of shell script and Java. While working with strings and complex logic is easier in Ruby than with the bash (for me) the concepts of object orientation (e.g. how to define a class) are very similar to Java. This makes it easy for me to switch from bash or Java to Ruby and back.

    B. Ruby has a almost up-to-date Java runtime AND a command-line interpreter. Grovvy has a Java runtime but no command-line interpreter. Python has a command-line interpreter but no Java runtime for Python 3.

    Python seems to have the advantage of a bigger community over ruby. But Ruby seems to be nicer as language over Python TO ME. (Both languages are great.)
    From that point I I don’t understand – but am willing to learn – why Ruby is not so popular. Does someone know why?

Leave a Reply

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