5 ms·
What are your thoughts about it being the 7th most dreaded language on Stack Overflow's 2020 developer survey? I've never programmed in Ruby, but it seems attra
by will_pseudonym 6y ago
What are your thoughts about it being the 7th most dreaded language on Stack Overflow's 2020 developer survey? I've never programmed in Ruby, but it seems attractive to me.
- bdcravens 6y agoI think that says more about who takes the survey.
- berkes 6y agoI honestly cannot believe that this is a solid metric. I believe the question, or their answers are poorly parsed. I presume a lot of the dread is really about Rails. And the rest partly hearsay of the slow performance of Ruby. Rails is, to me, a blessing, but also a terrible framework. It helps to rapidly ship products. Just cobble some gems together in a controller or two, mix a gem or three into your models and you have a demo. A rapid Proof of Concept. But also a product that is practically unmaintainable. I've been doing Rails from its very beginning, solving this (trying to) has been my primary job for over seven years now. And performance? Yes Ruby is slow. But the speed of the language is unmeasurable in, I daresay, the vast majority of the projects of people who tell you it is too slow. That legacy mysql setup, this poorly evolved domain model, or that badly integrated external API is almost always the thing making it slow. The ms of Ruby handling that JSON to CSV conversion then is practically unmeasurable. Rust is not going to speed up those 3000ms spend in that ugly SQL query. Go's multithreading is not going to solve the slow API which you call thrice per minute. And Java is not magically making the tangle of classes, jobs, callbacks, listeners and whatnot dissapear.
- joelbluminator 6y agoRails is alright. It's just a great scapegoat for bad teams working under impossible deadlines: "Our code is unmaintainable because Rails! We need 1 year to rewrite it in Go/Elixir/Java". I mean, because Rails has a flat structure you couldn't ever take the time to reactor that piece of crap code you wrote for 2 years? really? You didn't notice a model stopped making sense or growing in complexity? I see the same criticism with PHP. It's perfectly fine, stop blaming the tool.
- berkes 6y agoRails doesn't help you form a proper domain model. Or force you to put side-effects in the proper place; it doesn't help with evolving a proper data model, or avoid tight coupling in unwanted places, it has hardly any tooling in place to employ design patterns. On contrary: often it encourages bad practices through "defacto" standard gems, or by making "the wrong choice" easier than "the proper design pattern". A "concern" is a simple way to turn a 800-lines controller into four 300 lines modules that amount to the same ball-of-mud, for example. (Concerns have great use-cases, but most often it is not the solution to your problem). Rails offers things like `try(:foo)` to quickly solve that equivalent of the "null-pointer"- exception, without forcing the developers to dive and in and solve the reason why it is nil, or solve it with some design pattern (adapters, null-pattern etc) either: just keep sprinkling `try()` keeps it rattling along too. Somewhat. So, yes: lack of proper design and architecture is the real problem behind those "ball-of-mud" rails projects. But Rails' lack of training-wheels and the ease at which to make the wrong choices, really doesn't help teams aim at proper design and archicture either.
- joelbluminator 6y agoRails has a flat structure, it has no knowledge how big your project will become. For many, many code bases this is good enough. Look at Gitlab, which is quite big. If you need more structure there are many design patterns you can follow and introduce into your codebase.
- pdimitar 6y agoGitLab is also notoriously difficult to deploy by yourself (okay, lately it has been better though) and slow as hell.
- joelbluminator 6y agoI like their UI just fine. Speed, smoothness, never had much of a problem. And the amounts of features they were able to come up with the last few years is pretty impressive.
- twic 6y ago> And Java is not magically making the tangle of classes, jobs, callbacks, listeners and whatnot dissapear. Make it disappear, no, but it can make it much easier to create, using Spring's ClassJobCallbackListenerTangleFactory.
- joelbluminator 6y agoRuby isn't new or novel anymore, and is a relatively small niche. Learning it properly takes time and effort - hence the "dread". I'm pretty sure 10 years ago no one dreaded Ruby yet the language was almost identical to what it is now. So I think it speaks less about languages per se and more about hype cycles and job markets.
- pdimitar 6y agoNot a big fan of Ruby (okay, with 3.0 I might become a fan again!) but to be fair, these SO surveys are asking really weird questions that appeal much more to emotion than to reason.
- yumaikas 6y agoThere's a saying that Ruby gives "Every toddler a chainsaw" (https://codefol.io/posts/ruby-python-and-freedom/ https://codefol.io/posts/ruby-python-and-freedom/). You can use it and it's metaprogramming to write some really elegant APIs. You can also write entirely the wrong abstractions, and it will not stop you. You can even extract private variables from lambdas if you're willing. Now, imagine that in the hands of someone with poor taste, or, even, just rather different taste than yours.