DEV is in the process of launching a podcast and we'd love for you to be involved! We're recording the episodes in advance, and this week we'd like to know:
What’s your opinion on the Ruby programming language?
If you'd like to participate, please:
- Call our Google Voice at at +1 (929)500-1513 and leave a message 📞
- Send a voice memo to pod@dev.to 🎙
- OR, if you don't want your voice recorded...just leave a comment here and we'll read your response aloud for you 🗣
Thank you!
Top comments (41)
It's a rare and beautiful gem ❤️💎😉
I like ruby because it is very easy to read but in terms of speed it leaves a lot to be desired compared to other technologies I use :(.
That's why I currently use Crystal (which is like a "Ruby", but compiled).
I agree that Crystal is exciting, but dude. Ruby has come out faster than Python and sometimes Node in a few benchmarks...
Can you share link to those benchmarks? 2 main reasons for not using Ruby now for me are not so type safe (at least in 2016 when I tried it, it appeared not to be) and way slower in my cases than JVM languages. Keep in mind I stated my cases; where I need type safety for my own protection and I do not need simple calls to underlying libraries written in C or whatever, these are libraries I needed for domain specific work.
benchmarksgame-team.pages.debian.n...
Granted, they're using the JIT which is still relatively experimental in Ruby but... yeah.
benchmarksgame-team.pages.debian.n...
Thx
Yep. I don't like Python hahaha
First time I hear about Crystal but looks nice. Thanks
It's weird. Everyone seems to think it's easy to read, but I find it's a pain - I'm constantly scooting my eyes back and forth trying to translate it into something that makes sense to me. A lot of the syntax seems to have been implemented just for the hell of it rather than for any good reason, and I've never learned to use it beyond the basics.
What I'm saying is, it might well be a great language, but its first impressions always put me off.
What prior languages do you know?
Also, A lot of things in Ruby have more than one syntax in order to allow for various styles from prior languages, so you may have come across a strange code base.
Ruby is great. I love it.
Coming off of having learned (and struggled) with Javascript, learning Ruby felt like caaaaake. I found it very easy to understand and build that understanding to Ruby on Rails relatively quickly.
I would love to pick it up, maybe just because of how DHH speaks of it :D
I recently tried it and one thing that put me off was the installation. I couldn't access installed gems like rails and searching online for the issue it seems there is a wide range of bundlers people use and I just couldn't find help for my super basic setup. I will probably try reinstalling everything again once I have a little more free time.
I suggest using rvm not to depend on the operating system's ruby :-)
I would suggest using chruby. It was reviewed and approved by the head rvm maintainer. The only reason to use RVM these days is if you are maintaining a legacy app that needs it.
Didn't know about chruby! Going to check it out :) Thanks!
Needing to use rvm was honestly a big reason that I let my ruby use dwindle to just chef customizations; I really couldn't stand having to maintain more than 2 package catalogs.
My opinion is that it Ruby, along with Python, greatly improved the programming ecosystem for the better.
By putting an almost dogmatic focus on programmer's time over cpu time, the language allowed for elegant and beautiful features.
I came across Ruby around 2010 (circa Ruby 1.9) in my last year of college. Until then I'd written mostly in C, C++, Matlab and a small bit in Java and Scheme. I recall reading The Ruby Programming Language from front-to-back and just being in awe of the language. It's safe to say it's the first programming language I ever liked-liked. "Love" is a bit too strong...but it's close.
I started working through Project Euler problems using Ruby and was astounded by how Ruby handled FixNum to BigNum seamlessly.
Then I hit the performance wall. I can't blame Ruby, since I was a fledgling programmer and was probably throwing O(n^4) programs at irb. But you can say that I had my first "heartbreak" with the language.
At the time Rails was also really taking off. To the point where it was very obviously a fad/bubble but you couldn't help get swept up in it.
Then I think the Twitter rewrite from Ruby to Scala really took a "gem" out of Ruby's crown. Even though 99.9999% of companies are not going to have the scaling concerns that freaking Twitter is going to, everyone likes to imagine their startup will be the next Twitter and thinks that choosing Ruby will stop them from getting there, even though it's likely that Ruby's expressiveness is what got Twitter to where it would need a rewrite!
So yes, the "ruBY Is SLoW" argument won't go away anytime soon, but for me personally, Ruby was a level-up in my understanding of programming languages. I still find my thinking to be somewhat rooted in Ruby. Like when I had to learn Objective-C, I thought of Categories as akin to Modules. As I learned and am re-learning Lisp, I see Lisp's influence on Ruby and can better understand one because of the other.
I'm glad Ruby exists if nothing else to be a force pulling other programming languages to focus on programmer expressiveness.
P.S. Like others have mentioned, I'm also keeping a close eye on Crystal as it seems to be the optimal balance between expressiveness and ease of Ruby but with C-like blazing speed. It's more type-strict than Ruby and doesn't have the full "range" of Ruby, but it's super fast and super easy to pick up.
I have been working professionally with Ruby more than 6 years now. I love how easy it is for me to throw something together that works be it a web service/API with Sinatra or Grape, a command line script or anything with Rails. I love how easy it is to use and handle gems and ruby versions between projects (rvm/rbenv/chruby and bundler help with that). The best practices are mostly agreed upon within the community, we have Rubocop to make sure we are following these. There's lots of materials to study from, lots of open source and friendly people to help.
If you are looking for something to quickly setup a web backend and deploy (to Heroku) with just a git push, Ruby is great.
If you think that it can't perform, check Shopify's Black Friday stats.
A lot of people talking about types, there's a project called Sorbet (developed by Stripe) that brings a form of type checking to Ruby.
Ruby has mature testing tools (RSpec, capybara etc) and is one of the communities that really believes in good testing practices.
Would be happy to chat to anyone wanting to get more into Ruby and having difficulty with something.
I thank the dark powers every day for Ruby, which was designed by its creator - Matz - with the express goal of making programmers happy. The ethos of happiness runs deep in the language. In fact, we have a saying/acronym: MINASWAN. Matz is nice and so we are nice. That has been demonstrated over and over during the 16 years since I started working with it.
The weird thing about our niceness is that it seems to make some developers who love other languages deeply uncomfortable, as though our niceness makes them somehow less nice by depleting some finite supply of niceness. If you're ever reading comments from someone who seems to wish Ruby would just roll over and die because it's inferior to what they like, chances are they just aren't prioritizing being nice.
The other thing that I find really compelling about working in Ruby is that it tends to draw some of the most interesting, creative, eccentric and artistic folks. Most of the best Ruby developers are deeply skilled in other, more traditionally "right-brained" disciplines, whether it's music, linguistics, art. Some of the wackiest characters I've met in my development life have been Ruby luminaries.
Honestly? I never used it.
When it was hyped around 2008/09, because of Rails, all of my friends used it at their internships, but they didn't like it anymore when they came back.
I used PHP at that time and switched to JS in 2011, so Ruby was never talked about in any way at my jobs.
Great language, would be better if typed hehe. It really would be awesome for real async and concurrency support.
Both reasons for which I don't use it on current project. A lot of IO calls where cost is lowered by using async stuff by having app not scale because there's no need for more (count of or powerfull) instances.
You might want to check out Crystal or even Elixir.
I've looked at Elixir before. Never had time to really test it out. However, gotta say on big and complex data it looks less optimal than JVM stuff. I know people like to protect elixir/erlang but if you have complex data and you need to do stuff with it JVM still rocks although I would like Elixir for other stuff. I like Scala but Elixir is more pretty. Feel like a teenager don't know what I want too much good stuff
To be fair, Erlang has been running global telecommunications for decades (Ericsson, T-Mobile run their nodes with it, many LTE nodes run on Erlang) and it's the system WhatsApp (which has quite a few users :D) runs on. OTP, the platform Erlang uses, also contains a distributed real time database called Mnesia.
from Erlang celebrates 20 years as open source
Companies use it for massively scalable systems so I think it's quite battle tested. Not a comparison to the JVM, there are very complex software architectures out there running on the JVM but I wanted to shine a light on Erlang for a moment :-)
That's not the point, it's much better for passing small data in high volumes. Data transformation and calculation is another thing. JVM is not excelent at big numbers but it's a bit better than Erlang so it's in between hardcore language for math and excelent IO like Erlang. That's one of the examples. Also transformating 20MB+ json to yourown stuff can be pain but with JVM stuff i do it quite easily although it's bad to do such thing anyways sometimes you have to do it. That's another example. I would love to use all technologies but that's not always possible
My point wasn't a comparison though, I was just highlighting Erlang.
I agree that we can't always choose the technology we want to use or use them all at the same time :-D
Oh, sry, I take Erlang/Elixir as the same thing I thought you were pointing stuff out to compare them but you just want to mention battle tested part. Yeah I agree it's more than battle tested. Hope I get time to learn it soon