What is Ruby?
What Ruby is, the philosophy behind its design, and why it reads more like English than most languages.
2 min read
Ruby is a dynamic, object-oriented programming language created by Yukihiro "Matz" Matsumoto in the mid-1990s, with a stated goal of making programmers happy. That sounds like marketing copy, but it shows up in real design decisions: Ruby consistently favors readability and expressiveness over verbosity or ceremony.
5.times { |n| puts "Hello, world! (#{n})" }That one line loops five times, printing a greeting each time with the loop counter interpolated into the string. There's no for (int i = 0; ...) boilerplate — the intent is right there on the surface.
Everything is an object
Ruby takes "object-oriented" further than most languages. Numbers, strings, nil, even classes themselves are objects that respond to methods.
puts 5.class # Integer
puts (-5).abs # 5
puts "ruby".upcase # RUBY
puts nil.to_s # ""There's no separate "primitive type" system bolted on for performance reasons the way there is in Java or C#. This consistency is part of why Ruby code reads uniformly, once you know a handful of core methods.
Dynamically typed and interpreted
You don't declare types in Ruby — a variable just holds whatever you assign to it, and can hold something else later.
value = 42
value = "now I'm a string"
value = [1, 2, 3]The Ruby interpreter (most commonly MRI, "Matz's Ruby Interpreter," also called CRI) parses and runs your code directly, no separate compile step required. That makes the feedback loop fast: write a line, run it, see what happens.
What Ruby is known for
Ruby's biggest claim to fame is Ruby on Rails, the web framework that popularized "convention over configuration" and made it realistic to build a working web app in a weekend. Rails is covered later in this course, but it's worth knowing up front that a large share of Ruby's popularity — and job postings — comes from Rails specifically, even though Ruby itself is a general-purpose language used for scripting, automation, and command-line tools too.
Ruby also popularized ideas that later showed up elsewhere: blocks and iterators influenced how other languages think about closures, and its testing culture (RSpec, and originally Rails' own testing conventions) shaped how a lot of the industry thinks about test-driven development.
Who should learn Ruby
If you value code that reads clearly and want a gentle on-ramp into serious object-oriented programming, Ruby is one of the friendliest languages to start with. It won't be the fastest language for CPU-bound work, but for web applications, scripts, and tools where developer time matters more than raw execution speed, it remains a strong, pragmatic choice — this course builds up from the basics to real object-oriented Ruby and a look at Rails itself.
Test what you just learned
4 quick questions. Get all of them right to unlock the next lesson.
You can take the quiz without an account — logging in just lets your result count toward your progress.