Why I Love Ruby

If you’re looking for a comprehensive comparison of 15 programming languages based on decades of experience, this isn’t it. I’m a hobbiest programmer. Most of my “programs” are either in bash or Python, fit on one page, and are based firmly in laziness. But I do know beauty when I see it, and Ruby is beautiful.

In this post I’m going to show you, using just a points from the beginning of a Ruby book, why I love this language more than any other. I write this post because I’m always given “the look” by people when I tell them I’m learning Ruby. Most either think it’s:

  1. not a “real” programming language (those are the C and Java people)

  2. a lame replacement for Perl (Perl people)

  3. a slightly different Python (people who don’t know either Python or Ruby)

This post is designed to counter that look.

Intuitiveness

To me, programming should be intuitive before anything else. You should be able to think about problems, start writing, and realize that you’ve solved some. Ruby isn’t there yet, but it’s the closest thing I’ve found. Check out this syntax:

string.length
string.count('m')
string.length.next
string.upcase
string.upcase!
string.empty?
string.include('test')
3.times

Related posts: