Rubies Are A Girl’s Best Friend

Elizabeth Treahy
3 min readJun 22, 2022

Red is the color we choose to represent our most intense emotions- love and rage, passion and fury.

If you are a programmer, you know these emotions well.

In the 1990s, Yukihiro Matsumoto decided the world needed a new programming language, one that would make programmers happy. He developed a language that would be simple to use, elegant to write, but capable of building vastly complex things.

He named this language Ruby.

There is a concept in programming called abstraction. Abstraction means that, as users, we are separated from what’s happening “under the hood.” To break that down a little further: we all have cell phones. We like to use our phones to call our friends, save dates in our calendars, play games, and shop for cute outfits. It’s not important to us how our phone accomplishes these tasks, it just matters that it does.

Writing software has many levels of abstraction. Ruby is written in C (first level), which translates to Assembly language (next level), which translates to machine language (next next level), which turns into 1s and 0s that the computer understands (lowest level).

The reason Ruby is so delicious to write is because when you have tired little programmer fingers, it’s so nice for the engine to know certain things you want it do, so that you can focus on the more fun code.

Below I share four more ways Ruby serves to make your life simpler.

Ruby is a fashionista

The Ruby language has a very specific style that she follows, which makes it more streamlined for anyone who is reading and writing her code. She’s particular about things like: snake_case formatting for methods, variables, or file names, uppercase constants, CamelCase formatting for class names, and comments begin with a # at the start of their line. When each programmer has the same expectations of the code, it makes interpretation a lot easier.

Ruby wears a lot of jewelry

RubyGems (or just “gems”) are a collection of Ruby files, or library, that each perform certain tasks, with the goal of speeding up development for the programmer. A gem is a bundle of code written by someone to solve a useful problem. Because our hero programmer has already addressed this task, we are able to decrease our workload. To install a gem, simply type

gem install <gem name>

where ‘gem name’ is the name of the gem you want to install.

Ruby likes a big O{bject}

In Ruby, everything is an object. Every piece of information or code can be given its own properties and actions. Object-oriented programming calls properties by the name instance variables and actions are known as methods. So, if everything in Ruby is an object, and an object is a part of a class, and that class has a lot of really neat methods that can be called on it to perform and accomplish a lot of different things. Being so object-oriented makes Ruby really really really really powerful.

Ruby is a giver

Ruby will always return something. That something might actually be nil (which ironically means nothing), but even a nil is something. Because pretty much everything in Ruby is an expression, and expressions are evaluated, Ruby is always going to give her programmer something, even if it’s an error. While other programming languages may require a return statement, Ruby implicitly returns. Whether you ask her to or not, she is going to give you some type of response.

In ancient Sanskrit, a ruby is called ratnaraj, meaning the king of precious stones. Early cultures treasured rubies for their deep red hue, mimicking the color of blood, and believed that rubies held the power of life. Matsumoto could not have more aptly named his programming language.

--

--