Shine bright like a ruby(-ist)

Brian Li
4 min readDec 15, 2020

--

It’s been 25 years since Ruby first launched back in December 21, 1995 by Yukihiro Matsumoto. Since then, several programming languages have helped revolutionize how we perceive the internet. Today, majority of websites we see are designed with a back-end language like Java, C++, Python, etc. So does that necessarily mean Ruby is dead? Not at all. In fact, big companies like Airbnb and Twitter still use Ruby to this day.

While it’s true that Ruby doesn’t get as much love as Javascript or Python, Ruby is still getting updates on a yearly-basis. There’s so much to love about Ruby so don’t feel deterred at all from learning Ruby!

So why Ruby???

When Matsumoto created Ruby, he created with a certain purpose “to be productive, and to enjoy programming, and to be happy.” Matsumoto had several principles during his creation. He believed that programming should be easy for us and that we should be in control of what we type, not the computers.

The legend himself

He also followed the principle of least astonishment (POLA), meaning he wanted to minimize confusion as much as possible for the programmers’ enjoyment.

Ruby is also great due to it’s extensiveness on object-orientation. Every value you write in Ruby is an object so it’s easy to hold references to these values.

There been some direct comparisons on how similar Ruby is with Python, so changing to popular language may not be so hard after all. Lastly, Ruby on Rails is a must if you are ever going to use Ruby.

“We are the masters. They are the slaves.” -Matsumoto

Ruby on Rails Express

If you ever heard about Ruby, more than likely you’ve heard of Rails too. Similar to PB&J, these two words pretty much come in a package and you should never forgot to use one or the other.

So what is Ruby on Rails? Ruby on Rails is a server-side web framework that uses the MVC (Model-View-Controller) to help ease web development better. To explain the MVC, it starts with the user that interacts with the view which presents data and handles user interactions. Next, the view tells the controller of a specific event that might have occured. When that event goes through, the controller then updates the model of what has changed. The model then tells the view component of the change in data and so in response, the view will grab the data from the updated model and render the new data onto the view component.

The MVC Cycle

With the design of Rails, the creator, David Heinemeier Hansson, wanted to emphasize on two principles: Covention over Configuration (CoC or Coding by Convention) and Don’t Repeat Yourself (DRY). The CoC principle describes development through programming conventions vs user defined configurations. The DRY principle tells that the user should not repeat their code to help reduce repetition and to avoid redundancy.

Many of Rails features include table creations, migrations, scaffolding, and more. Rails also comes with a package called ActiveRecord which automatically maps objects to databases and can access data from it too. Rails helped pioneer ideas to other frameworks like Django and CakePHP. The introduction to Sass helped add CSS templates to Rails which further implemented it’s resourcefulness.

Game Over Ruby?

It’s true that Ruby is losing its grip compared to the other languages but that doesn’t mean Ruby is dying out. It’s actually quite the opposite. Ruby has such a big community support that Ruby is always finding ways to update itself into the next generation. So keep practicing your Ruby skillz and it will assist you later in the future!

He enjoys Ruby and so should you!

--

--