A Love Letter to Ruby

There are a lot of different programming languages out there, but I firmly believe Ruby is the greatest one around. I might be biased, since Ruby was the first language I was really introduced to, and I fell in love with it at the same time that I fell in love with programming more generally. But I’ve also tried a lot of others out—Python, JavaScript, Java, C, C++, and Apex—and I always find myself coming back to Ruby.

Ruby isn’t a typical favorite amongst the technically minded. It’s too slow, they cry! It’s inefficient! Putting aside the fact that these things are less true of modern Ruby than earlier versions, I’d say that’s actually exactly why I love it. Ruby isn’t a language made to impress the compiler gods or squeeze every cycle from a processor. It’s a language—in the words of its creator—“optimized for developer happiness.” It’s a programming language designed for programmers, not for the computer.

It’s a philosophy that makes even more sense now than it did when the language was first released in 1995. Back then, computing power was still pretty expensive. Today, it’s pretty cheap, and it’s developers that are expensive. So it makes a whole lot of sense to optimize for them rather than the machine.

For those who haven’t encountered Ruby, here’s an example of its ease and simplicity. Imagine a class User, which has two attributes, name and email. You want to be able to create instances of this class and set the name and email. Pretty basic. Here’s what that looks like in Java:

public class User {
  private String name;
  private String email;

  public User(String name, String email) {
    this.name = name;
    this.email = email;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }
}


And here’s what it looks like in Ruby:


class User
  attr_accessor :name, :email

  def initialize(name, email)
    @name = name
    @email = email
  end
end



That’s 27 lines in Java vs. 5 in Ruby. And the Ruby version just shimmers in clarity by default.

But it’s not just Ruby itself I love so much as the other ecosystems that have grown beside it, notably the web development framework Ruby on Rails. In a world where development trends increasingly towards an explosion of microservices and complexity, Rails is committed to going in the opposite direction. David Heinemeier Hansson, original creator and still leader of Rails, has made clear his goal of making it the “one person framework,” a set of tools so powerful as to allow a single developer to build and maintain fully-functioning applications on their own.

And not just on the web! The latest versions of Rails support Progressive Web Apps out-of-the-box, and Hotwire Native is there for special cases where you truly need to access native iOS or Android features. This means that the majority—if not all—of the code required to launch an app can be developed in a single codebase, which then works whether the user wants to access it in a browser, on iOS, on Android, Mac OS, Windows, Linux…you name it. It’s an amazingly powerful framework.

More than just being a joy to work in, I believe Ruby is the correct choice of programming language for those who want to build a better web. Why? More complex frameworks require more people. More people means politics. It means needing more money to get things going, often from investors whose incentives are at odds with the values of Software As If People Mattered.

Ruby and Rails shine in environments where one person or a small team can build and ship entire apps. So many of the popular frameworks and architectural choices these days are driven by the needs of big tech: massive applications catering to millions or billions of users and petabytes of data. Bigness is the default. But Rails takes the opposite approach. Small is the default. Simple is the default. And though there are some great companies that can have proved Rails can go big (e.g. Shopify, Github), most will never need to. And that’s a good thing! Small by default is key, I think, to creating a smaller web, where individuals create value without the need for a huge org chart.

And I don’t see it as purely a matter of practicality. In fact, I think the principles of it are even more important. Building calmer tech isn’t just about creating less distracting user interfaces. It starts with changing the environment in which developers are creating applications and growing their businesses. Calmer teams write calmer code to make calmer products. Ruby’s simplicity, expressiveness, and readability enable this calm.

We need a web that’s more attractive and more generous. A web built not for massive scale but for human scale. Ruby helps build that kind of web. One where beauty, clarity, and care aren’t afterthoughts or nice to haves—they’re the foundation.