TIOBE Index for March 2018: Ruby in the TIOBE index top 10

TIOBE replaces their index content each month, so I quote:

“Ruby is back in the TIOBE index top 10 and now it seems to be for a longer time. If we take a look at the chart of Ruby it follows a very common pattern for programming languages. Ruby was invented a very long time ago and it remained in obscurity till 2006. That was when the Ruby on Rails framework was released. This framework made it easy to create web applications and because Ruby was the underlying language it skyrocketed in the TIOBE index at that time from position 40 to a top 10 position. It also was awarded the TIOBE programming language of the year in 2006. All new language gurus were in ecstasy about Ruby. The language peaked in 2008, but then all hipsters moved to a new language and Ruby dropped to one third of its popularity. It remained there for a long time but is now catching up very slowly. The fact that it is getting more popular so gradually is a good sign. This means that its increase in popularity is structurally instead of being pushed by hypes. Some other interesting moves this month are that both Julia and Kotlin entered the top 40, whereas Rust and Groovy lost their positions in the top 50.”

RubyConf 2017

Rubyconf 2017 was held this year in New Orleans.  There were nearly 60 keynotes and presentations from four tracks over three days.
Wednesday 15 November. Opening keynote from Matz, cautious of making any divisive changes to Ruby now that it is nearly 25 years old.  Significant progress this year on a register based VM rewrite that should result in ambitious performance improvements.  Unicode 10 support due this year in Ruby 2.5, but features such as frozen strings by default, tail recursion optimization, guilds and type support are still on hold pending more community feedback.
Minqi Pan with an wildly innovative approach to packaging application binaries using a custom Ruby integrated with a virtual file system.
Triptych of presentations on the future of Ruby by Justin Searls, Jason Charnes and Eric Weinstein.  First Justin with a retrospective of influential Ruby conference presentations, then Jason with a bedtime story exhorting rubyists to study other ecosystems, maintain gems and teach; finally Eric touching on Crystal, Opal, WebAssembly and Guilds.
Closing keynote by Chad Fowler as entertaining as ever, drawing on his polyglot experience at Wunderlist to suggest that to build systems that will last use cells that can easily be replaced.
Thursday. Kevin Deisz exploring the Ruby 2.3 API underpinning BootSnap compilation caching, writing his own compiler macros and a math macro language targeting YARV.  Daniel Azuma of Google demonstrating how surprisingly simple it is to build a command line Ruby debugger with the TracePoint API. Andrew Metcalfe of Stripe discussing the challenges of performing static analysis on a 1M lines of Ruby spaghetti and how to leverage Ruby autoload without Rails. Evening lightning talks including Cameron Dutro, Noah Gibbs and Akira Matsuda.
Friday. Another inspring keynote by Sandi Matz: teamwork requires being your best self.  Aaron Patterson’s ‘impossible’ compacting garbage compiler with savings unknown. Yusuke Endo demonstrating his obfuscated quines. Tekashi Kokubun trying to explain the many complexities and tradeoffs of YARV-MJIT.
In summary Ruby is a mature and constrained language: performance improvements will continue but new feature adoption will be conservative. Ruby will continue to face increased competition, but its focus on programmer productivity keeps it relevant.

TIOBE Index for May 2016: Ruby equals best position ever

TIOBE replaces their index content each month, so I quote:

“Ruby is currently at position 8 in the TIOBE index. This is equal to the highest position it reached in December 2008. This second peak is quite the opposite of the first one. In 2006 the Ruby evangelists were shouting the language to the top. There was no room for self reflection or discussion: Ruby and its programming environment Rails were about to conquer the world. And they succeeded in this to some extent. Ruby became the language for fancy start up companies with their tight time to market schedules. It was even awarded “Programming Language of 2006″ until its popularity peaked at the end of 2008. Then scalability appeared to be a problem. Performance dropped significantly if much data needed to be processed. In the beginning of 2010 one of those fancy start ups, Twitter, started to replace Ruby by Java for this same reason. The Ruby evangelists vanished to other cool new languages and Ruby seemed to be on its way out. But not really. After being out the limelight for quite some years, Ruby’s popularity started to grow again at the beginning of 2015. This time it seems to be a more sustainable growth based on actual usage of the language instead of shouting.”

Ruby Survey 2015

Rarebit (creators of Sass and Haml) recently published the 2015 results of their annual Ruby survey, now in its seventh year.

This year saw a significant shift to Ruby 2.2 (40%) following the shift to 2.1 last year (50%). Only about 15% of rubyists remain with Ruby 2.0 or below. JRuby adoption remains below 5%.

Rails remains the dominant web framework (85%) over Sinatra (10%). RSpec still retains 70% preference while many Test::Unit users have switched to Minitest (15%). 60% of rubyists still prefer JQuery, though there has been a 10% shift to other frameworks in the past year. Interestingly the utilization of Javascript remains around the same: 25% use it heavily, 25% rarely and the rest somewhere in-between. Amongst respondents to this survey Node.js utilization has remained around 20% the last couple of years. On the front end CoffeeScript is used more often than not (55%), Haml remains preferred by 45% and Sass by 80%.

For production the preferred web server remains Unicorn (40%) over Passenger (30%) though Puma adoption has reached 15% in its first year now that Rails 4 has better concurrency support.

If you are a full time Ruby developer I encourage you to participate at http://www.askr.me/ruby

Installing Nokogiri on Ubuntu

Worked for me with Nokogiri 1.4.4 on Ubuntu 10.04 LTS:

# ruby developer packages
sudo apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8
sudo apt-get install libreadline-ruby1.8 libruby1.8 libopenssl-ruby 

# nokogiri requirements
sudo apt-get install libxslt-dev libxml2-dev
sudo gem install nokogiri

Getting started with Ruby on Windows

To get started my preference is to use RubyInstaller for Windows.  Both 1.8.x and 1.9.x variants are available. I group together my Ruby variants under \Programs\rubies.

Having installed multiple variants you can register and manage them using Pik.  I recommend not changing the installation path from the default C:\pik.  It is in fact possible to install Ruby using Pik (by default Pik installs rubies in %HOMEPATH%\.pik\rubies), but I prefer not to do so.

pik add d:\programs\rubies\ruby-1.8.7-p334\bin
pik add d:\programs\rubies\ruby-1.9.2-p180\bin

To access code repositories you will need to download and install msysGit for Windows.  I also strongly recommend TortoiseGit instead of Git GUI.

To build native extension gems like Nokogiri you will need DevKit.  I tried

pik package devkit install

but this did not work for me (got HTTP 404) so I had to manually download and extract the DevKit.  DevKit also includes MSYS/MinGW.

For an IDE I use Aptana Studio 3.  Studio looks for an existing Git installation or installs its own private copy of portable Git.  Studio then leverages the msysGit bash shell.

RubyInstaller includes gem, which can then be used to install bundler to complete the setup of the environment.

Using Ruby with Postgres on Ubuntu 10.04 LTS

Installation of PostgreSQL on Ubuntu is straightforward, see http://library.linode.com/databases/postgresql/ubuntu-10.04-lucid

To create a simple database with its own user use the command line:

psql <<EOF
  create user ${appenv} createdb password '*****';
createdb --username=postgres --owner ${appenv} ${appenv}

To access the database from Rails use pg

gem install pg

Entries in database.yml should look like

  adapter: postgresql
  username: myappstst
  password: mypwd
  database: myapptst

Ruby, Python & ODBC

I recently tried extracting data from an Access database using Ruby and ODBC.  The first challenge is that Windows ODBC drivers can be either 32 or 64-bit.  On a 64-bit host only the 64-bit configuration panel is present in the control panel, and the 32-bit panel must be accessed directly by invoking C:WindowsSysWOW64odbcad32.exe.  More seriously, however, the ruby-odbc home page only lists Win32 binaries compiled using Microsoft Visual C, but the popular RubyInstaller for Windows distribution is compiled with MinGW making the two effectively incompatible.

Contrast this with Python which has pyodbc downloads compatible with the canonical distribution from python.org, even if trailing the latest release.  For enterprise applications there is even a commercial ODBC driver supported by egenix.

Both Ruby and Python also have DBI interfaces, but Python DBI has been deprecated, and for Ruby the DBD-ODBC implementation relies on the same underlying ruby-odbc package.  For now it looks like I’ll be sticking with Python for ODBC.

Google Trends – Databases & Languages

Google Trends is a great tool for graphing search term popularity over time. Here is a comparison of searches for several makes of database.


Perhaps it’s a quirk of the phrases I used, but I was surprised to see Oracle so dominant, and even MySQL more popular than SQL Server.  PostgreSQL languishes in obscurity compared to MySQL, and Ingres barely registers at all.

Here’s some languages that I’m interested in.  Java is hugely dominant.


Let’s take out Java and zoom in.  I was surprised to see Ruby’s recent decline relative to Python.  Books on Scala have come out only recently.


Looking more specifically at JVM language dialects I’m surprised to see Jython competing so strongly with JRuby.  I’m not sure if I picked the right phrase for Groovy.


Choosing tools solely on the basis of popularity is obviously not a great idea, but I do feel better now about continuing to use Oracle, Java and Python.

P.S. See also the TIOBE Programming Community Index