What’s up with Ruby, and should you learn it?
Ruby has been circulating around the IT industry for at least two decades (the first stable version came out around 1996). It’s a gem of a programming language, very exciting to work with — but should you invest the time to learn it now?
The basics: what is Ruby?
Ruby is a programming language similar to Python and Perl. It claims to be flexible, easy to use, and programmer friendly.
Here are its main features:
- Lots of object-oriented stuff. Pretty much everything in Ruby is an object. You can turn anything into a LEGO brick and play with it in Ruby, even very basic stuff like numbers and strings. You can redefine how things work in Ruby and make it suit your needs.
- It manages memory well. Ruby has a feature called garbage collection that allows your programs to run well, even on less capable machines.
- Clean syntax. There isn’t a lot of syntactic noise, unnecessary symbols, semicolons, and such. Ruby looks pretty.
- It’s very…English. When you read the source code, Ruby’s conditions, loops, and typical phrases seem natural. There’s ‘if’ and ‘unless’ and ‘when’ and more words like that. Not that you have complete freedom of expression, but the way you write in Ruby seems pretty instinctive for English speakers.
- It can handle different types of data. In Ruby, you can be pretty free in how you use your data. Strings and numbers do what you need them to do, not what the machine thinks they should do.
- It has all the modern conveniences: package management, APIs, a decent standard library, an interactive interpreter, and web-based interpreters. Ruby also works on all major platforms.
To sum it all up, Ruby is a beautiful and extremely usable modern language. And it’s very forgiving for beginners: if you mess up your syntax or data types, there’s a good chance that Ruby will still run the way you wanted, or help you correct your mistake.
What Ruby is used for
Ruby is good for server applications. (A server application receives requests from other apps and responds by providing a service.) So, Ruby is useful for building online shops, chatbots, and game servers, and for working with databases. Some people also use Ruby to build desktop software, apps, and games, although that happens less often.
Perhaps the most prominent tool that Ruby offers is called Ruby on Rails. Ruby on Rails is a framework for building websites and web applications. This framework is a kind of system that sits on top of Ruby and helps you simplify a lot of stuff related to creating a website. So, some huge sites run on Ruby, like Basecamp, AirBnB, SoundCloud, and Shopify.
But should you learn it?
Short answer: yes, you should. There are many sites that use Ruby, and when small teams set out to create their own web-based product or app, chances are, those teams will consider Ruby as their primary language.
Even if you don’t end up using Ruby in itself, it still contains a lot of stuff that is essential to modern programming. So, you will see a lot of Ruby-like stuff in future programming languages.
Also, Ruby is easy to learn. Learn it, use it, enjoy it, and then learn something else.
Programming languages are just that — languages. Languages are ways to express thoughts or make requests. A language conveys no meaning in and of itself. It contains no value outside of what you mean to say with it. So, no matter which language you code in, there are far more important issues to reflect on:
- Are you fluent in the language? Do you understand its strong and weak areas? Can you harness its power and what makes it unique?
- Do you use the best practices for your language? Or do you create workarounds where they are not needed?
- Do you understand the limitations of a language? Can you identify them and change your tools when needed? Or do you push forward with a tool that’s unsuitable for the situation you’re in?
So, at the end of the day, the answer is — yes. Absolutely. You should learn Ruby, Python, C, PHP, and more. Get familiar with every language you can, and apply your knowledge to your tasks at hand. The more languages you know, the better your chances of creating relevant, powerful, and efficient products. And should Ruby become your language of choice — cool, take it to its limits.
If you’re interested in learning more about the use cases, strengths, and limitations of other languages, check out Practicum. We offer online education and mentoring to help you build essential tech skills and amp up your career.