3 ms·
Ruby is a great language. It is very expressive and often quite readable. Ruby has a strong standard library, and the ruby gem ecosystem is great. Ruby is a hig
by mrinterweb 3y ago
Ruby is a great language. It is very expressive and often quite readable. Ruby has a strong standard library, and the ruby gem ecosystem is great. Ruby is a highly productive language for devs to use as it makes prototyping easy. In terms of benchmark performance, I would say it is probably closest to python. One thing I stress when comparing CPU performance of languages is to not get hung up on that too much. Most web apps I work on get hung up on IO and database interactions and not CPU. I've been working with ruby for 17 years and the number of times ruby's performance has got in my way are too few for me to mention.
Finding a job with ruby isn't too bad. Keep in mind that just because there aren't as many ruby jobs that also means competition may be less because fewer people know ruby. 9/10 (probably higher) jobs will be rails jobs. Rails is an outstanding web framework. There is a reason rails is still one of the most popular web frameworks after 20 years.
For learning to program, choose something you enjoy. If you pick a tech that doesn't agree with you, learning is going to be an uphill battle. I don't love JS, and I don't find python enjoyable either. Pick something that clicks for you. Once you learn one, other languages will be easier to pick up. Disclaimer, ruby is my favorite language.
- tenacious_tuna 3y agoRuby might be readable, but I've really come to hate working in a Rails codebase. So much of what happens is 'magick' that's not obvious, and I constantly hate not having typechecking backing me up. Blocks are cool, and Ruby makes them so easy to use which is neat, but global namespacing, lack of types, and a general "I'll do it for you" attitude has made it frustrating for me to learn. Not having a reliable go-to-definition in my IDE is driving me insane as well. I'm less than a year into a new job at a Rails shop though, so obviously a grain of salt with the above, but I've had several peers of mine echo the same frustrations I've had so I don't feel TOTALLY nuts.
- mrinterweb 3y agoI've been working with rails for a long time, so it doesn't feel like magic to me, but I can understand that concern. I highly discourage metaprogramming unless there is an obvious win. Rails/Ruby, especially in the beginning really leaned in hard on metaprogramming, but I've seen that be less of a trend with ruby. From my perspective, the metaprogramming trend has been going down. Ruby makes writing DSLs easy, and that can appear as magical too. In general, if a rails project follows convention it is easy to find what you're looking for. I don't understand what you mean the global namespacing. Ruby has namespacing, and adding to the global namespace should be avoided except for adding new class definitions. Maybe you're referring to inheritance, and how much stuff can sneak into the current scope from class inheritance.
- dalyons 3y agoI’m guessing they mean the lack of manual import/use statements. Tends to annoy folk coming from other languages
- tenacious_tuna 3y agoYeah, our rails codebase by default has everything in the global namespace. It's possible to add namespacing with modules, which we do all over the place, but it took some getting used to for me to learn that everything was automatically "available" without any import statements anywhere. While convenient, it's made it very hard for me to reason about each module's dependencies and interconnections to other bits of the code.