Ruby is the very least favorite of all the programming languages I've had to use regularly over my career. Its syntax strongly favors cuteness over familiarity. Wherever Ruby can diverge from expectations to give you a pointless little tickle of whimsical inventiveness instead, it seems to do so. Visually it looks like an unwanted love child of Pascal and Python. There's no clear rhyme or reason to the use of sigils…
So, I'm old, and have done lots of stuff in lots of languages in frameworks. For about a dozen years, Rails was my go-to toolkit. I've written a couple dozen production applications with it. Unfortunately, Rails has really fallen out of favor lately. Even a Rails-specialty shop I worked for briefly has pivoted to using ASP.NET. I've played around in that stack, and found it lacking. (EF just doesn't compete as an ORM…
Happy Birthday, Ruby
91–100 of 239 posts
Re: Happy Birthday, Ruby
#92Ruby is the very least favorite of all the programming languages I've had to use regularly over my career. Its syntax strongly favors cuteness over familiarity. Wherever Ruby can diverge from expectations to give you a pointless little tickle of whimsical inventiveness instead, it seems to do so. Visually it looks like an unwanted love child of Pascal and Python. There's no clear rhyme or reason to the use of sigils…
Early in my career, I only "knew" a little C++ from a high school programming class I had taken, and I knew a tiny bit about Java. Then I found Ruby, and people talked very highly of it. But it had all these "Gems", I couldn't figure out what a Gem was. I didn't know enough. I thought it was like a compiler plugin or something. I thought that just like there were different versions of Java, there were different versi…
Re: Happy Birthday, Ruby
#93Ruby is the very least favorite of all the programming languages I've had to use regularly over my career. Its syntax strongly favors cuteness over familiarity. Wherever Ruby can diverge from expectations to give you a pointless little tickle of whimsical inventiveness instead, it seems to do so. Visually it looks like an unwanted love child of Pascal and Python. There's no clear rhyme or reason to the use of sigils…
Every language out there has pros and cons with different set of tradeoffs , you can't point at a language and objectively say X is better than Y.
Ruby has its place and whilst you think Rails is "magic" the internet begs to differ. Of course any framework looks like "magic" if you don't bother digging into implementation details of it. That is the whole point!
The fact that so many successful companies are using rails in production and scaling it, just shows the complete opposite of what you claim: "an extremely resource-intensive web server framework built around assumptions of what web apps were like in 2003."
There has been plenty of times where i wondered how a piece of AR worked and popped over to the Rails github repo and quickly glanced over the details and had no problem understanding it.
You are entitled to your own opinion, but from the outside, it looks like you are just not familiar with ruby.
Re: Happy Birthday, Ruby
#94Earlier quoted context omitted.
Check out Crystal - Its statically typed, compiled, and a near one to one implementation of Ruby. https://crystal-lang.org
Is it backwards compatible with Ruby?
Re: Happy Birthday, Ruby
#95Earlier quoted context omitted.
I don't understand your bit about "cuteness over familiarity". Can you give an example outside that's not Rails-related (given that Rails seems to be the main source of your concrete complaints)? Sigils in Ruby actually do have strong and clear meanings. And the difference between symbols and strings is a useful distinction. And contrary to your statement, Ruby's stdlib is far more complete and more internally consis…
Yes, maybe my problem is more with Rails. (Because of monkeypatched APIs, it’s not always obvious to me whether a particular weirdness originates from Ruby’s standard library or is a Rails addition. Arguably this is something the language has also encouraged though.) Is there any reason to use Ruby outside Rails? Its niche seems to completely overlap with Python and modern JavaScript, and those have enormously more e…
Re: Happy Birthday, Ruby
#96Re: Happy Birthday, Ruby
#97Earlier quoted context omitted.
So, I'm old, and have done lots of stuff in lots of languages in frameworks. For about a dozen years, Rails was my go-to toolkit. I've written a couple dozen production applications with it. Unfortunately, Rails has really fallen out of favor lately. Even a Rails-specialty shop I worked for briefly has pivoted to using ASP.NET. I've played around in that stack, and found it lacking. (EF just doesn't compete as an ORM…
Do you have any experience with Django? I haven't used rails myself, but I'm told they are very similar in the "look at what I'm not doing" regard.
Re: Happy Birthday, Ruby
#98Earlier quoted context omitted.
> Its syntax strongly favors cuteness over familiarity. Funny, I recently made a stack switch from Ruby to Python, and I had the exact opposite impression. Ruby coding style/syntax tends to favor convention over configuration (at least in terms of Rails setup), while Python to me seems less so. Ruby also seems to me a bit more consistent across it's versions. One of the biggest gripes I've had about Python so far is…
> having two distinctly different types of strings You must be talking about Python 2, the deprecated version for 12 years now, with support ending next year. Because last time I checked, current, modern Python only has one type of string.
I was writing brand-new applications in it for my job as late as early last year
Why the defiant tone?
Re: Happy Birthday, Ruby
#99Earlier quoted context omitted.
> having two distinctly different types of strings You must be talking about Python 2, the deprecated version for 12 years now, with support ending next year. Because last time I checked, current, modern Python only has one type of string.
The problem is that "modern python" really includes Python 2 in addition to 3. You can't practically ignore it the way you can ignore ruby 1.x. Yes, things are very slowly moving to python 3, but there is a reason most systems have python 2 and python 3 and even now it isn't uncommon for /usr/bin/python be python 2.
And the reason you don't see that for ruby or node is because their community said "move or die". And many, many projects just died. I've seen the graveyard in the corporate world.
Re: Happy Birthday, Ruby
#100Earlier quoted context omitted.
> It used to get accused of scaling poorly, but tell that to Github, Gitlab, and other large-scale sites with millions of users. I've worked on one such large-scale enterprise-level web app, and it really does scale poorly in some areas, specifically database management. ActiveRecord tends to get extremely expensive when db's take on large amounts of records and complex relationships start forming between those large…
Isn't this true of any language? I mean the language isn't what decides how you connect or build your sql queries? In rails I could choose to write a pretty scary join ``` User.joins("left join ponies on ponies.user_id IN (select id from foobars where user_id=users.id").group("so_funny").count ``` or I could have a policy to avoid joins at all cost and reject any commit that uses a join and get fun things like: ``` u…
This is compounded by the fact that ActiveRecord obfuscates much of the sql code you posted above (not always, but in many cases). When a user new to Rails goes in and sees "Oh, all I have to do to set up foreign key relations is to just say this model belongs to this other one? NICE!", it isn't immediately clear what the implications of whats happening under the hood to accommodate that are, and all of the ways which this can quickly be misused to cause a huge performance bottleneck. That syntactic sugar smooths over some of the pitfalls of efficiently interacting with a relational DB.
It's important to note that these things do not make ActiveRecord a bad ORM in and of itself, as many users will not build projects large enough to have to worry about such bottlenecks, but it CAN and DOES cause problems when projects get larger and have to start taking on overhead from the resources allocated for all those records. That is what people are complaining about when they mention Rails doesn't scale well (or at least one of the reasons).