The Origins of Ruby: A Language Designed for Programmer Happiness

Fractional CTO · Founder of Injuria.ai
When you read about why a programming language was created, the reasons are usually technical. It needed to be faster, or safer, or better at some specific job. Ruby's reason was different and a little radical. Its creator wanted a language that was a pleasure to use, that felt natural to write, and that treated the happiness of the programmer as a design goal worth optimizing for. That sounds soft until you see what it produced: a language so enjoyable to work in that it powered a wave of startups and changed how the whole industry builds web applications.
A language for the programmer, not the computer
Ruby was created by Yukihiro Matsumoto, known universally as Matz, in Japan.[7] He began work in 1993 and released the first public version in 1995.[2] Matz was a language enthusiast who had studied many languages and found that each made him choose between power and comfort. He wanted one that gave him both.
His guiding idea is usually quoted as the principle of least surprise, and it is usually quoted wrong. People take it to mean Ruby will never surprise a newcomer arriving from another language. Matz has been clear that he meant the opposite kind of claim: least surprise for him, and by extension for someone who has actually learned Ruby well.[1] That distinction matters, because it explains why Ruby makes choices that do surprise beginners and delight experts.[8] The language was tuned to one person's taste first, and that coherence of taste is part of why it feels designed rather than assembled. He pulled the object model and purity from Smalltalk, the text-processing convenience from Perl, and the functional touches from Lisp, and filtered all of it through the single question of whether it made the language nicer to use.
Everything is an object, and you can change all of it
Ruby is thoroughly object-oriented in a way few mainstream languages are.[9] There are no primitive values sitting outside the object system. A number is an object with methods, which is why Ruby expressions read almost like description.[10]
3.times { puts "hello" }
[1, 2, 3].map { |n| n * 2 }
Those curly-brace sections are blocks, one of Ruby's signature features. A block is a chunk of behavior you hand to a method, and the method runs it by calling yield. That one keyword is the hinge Ruby's famously readable iterators turn on. Just as important, and more dangerous, is that Ruby classes are open: you can reopen any class, including the built-in ones, and add or change methods at runtime. This is metaprogramming, and the informal name for its riskier uses is monkey patching. It is exactly this ability to reshape the language from inside itself that lets a framework like Rails feel like magic, defining behavior that looks built-in but is generated on the fly. The power and the footguns are the same feature, which is the most Ruby thing about Ruby.
The framework that made it famous
For its first decade Ruby was admired by a small group, mostly outside the English-speaking world. What changed everything was Ruby on Rails.
In 2004, David Heinemeier Hansson, often called DHH, extracted a web framework from the code behind Basecamp, a product built by the company 37signals (the company reverted its name back to 37signals in 2022). He released it as Ruby on Rails, and it landed like a thunderclap.[3][4][11] A famous 2005 screencast showed him building a working blog application in about fifteen minutes, far faster than the prevailing approaches of the time. Developers who had never heard of Ruby went looking for it because of Rails.[12] It is worth being honest about the causation here: Ruby did not win on its merits as a language so much as it was carried to prominence by one spectacularly well-timed framework. The language was the vehicle, Rails was the engine.
Convention over configuration
Rails popularized an idea that sounds mundane and was in fact transformative: convention over configuration. Instead of making you specify every detail of how your application wired together, Rails assumed sensible defaults. Name your things according to the conventions and the framework connected your database tables, your code, and your web routes automatically, with almost no configuration files.
The effect was a dramatic reduction in ceremony. Small teams moved at a speed that larger teams using heavier tools could not match, and that productivity edge is a big reason Rails became the default stack for startups through the mid-2000s and 2010s. Twitter, GitHub, Shopify, and Airbnb all started on Rails, and convention over configuration spread into frameworks in nearly every other language. The flip side, which the Rails world learned the hard way, is that conventions are wonderful until you want to do something the convention did not anticipate, and then the magic you did not write becomes the magic you cannot find.
The honest trade-offs
Ruby's focus on expressiveness came at a cost in raw speed, and for years it was noticeably slower than its peers. The community took the criticism seriously. Ruby 3.0, released at the end of 2020, was the headline of an initiative called Ruby 3x3, whose explicit goal was to make the language roughly three times faster than Ruby 2.0.[5] The just-in-time work matured a year later: YJIT, a new compiler built and open-sourced by Shopify, shipped in Ruby 3.1 at the end of 2021 and delivered real gains on production workloads.[6] That detail is a small story in itself. The company running Ruby at the largest scale in the world did not abandon it when it got expensive, it put its own engineers on making the language faster for everyone, which is the kind of thing that only happens to a language people genuinely want to keep using.
Why the quiet years are not a decline
Ruby is no longer the loud new thing, and treating that as failure misreads it. It still runs some of the largest commerce and collaboration platforms on the web, Shopify and GitHub among them, and Rails remains one of the fastest ways in existence for a small team to turn an idea into a running product. Developer surveys still show that the people who write Ruby tend to like it, which is the exact result Matz was aiming for in 1993. The bet that programmer happiness was worth optimizing for looked sentimental at the time. Three decades later, after watching teams pick tools they enjoy and quietly abandon ones they tolerate, it looks less like sentiment and more like one of the shrewdest design decisions in the language's history.
Sources (12)
- Ruby: About Ruby
- Ruby (programming language), Wikipedia
- Ruby on Rails (official site)
- Ruby on Rails, Wikipedia
- Ruby 3.0.0 released (ruby-lang.org, December 2020)
- Ruby 3.1.0 released, including YJIT (ruby-lang.org, December 2021)
- Kent D. Lee, Programming Languages (Springer Science & Business Media, 2008)
- Jeremy Evans, Polished Ruby Programming (Packt Publishing Ltd, 2021)
- Kenneth Cooper, Beginning Ruby (Apress, 2007)
- David Flanagan, Yukihiro Matsumoto, The Ruby Programming Language ("O'Reilly Media, Inc.", 2008)
- Justin Williams, Rails Solutions (Apress, 2007)
- Timothy Fisher, Ruby on Rails Bible (John Wiley & Sons, 2009)