Live data from Hacker News

What’s Up With All These Changes in Rails?

yehudakatz.com

11–20 of 115 posts

Re: What’s Up With All These Changes in Rails?

#11
I kind of wish they would go further. While I prefer Rspec, I understand and sympathize with those who feel Test::Unit is a better default.

But HAML feels like such a vast, unambiguous, never-going-back improvement over ERB that I am honestly baffled Rails hasn't adopted it. It's at least as big a win as Sass and CoffeeScript, if not bigger.

I agree with Katz here. If anything, Rails has shown remarkable restraint in the face of a smorgasbord of shiny, new, and often superior, competing technologies.

Re: What’s Up With All These Changes in Rails?

#13
I'm not a fan of Rails myself, but I sympathize with Yehuda's position. The helpers are my #1 gripe with Rails. It really kills productivity to have to dig through all your views for what feels like pet changes.

The one point Yehuda's making I'd dispute is the impact of Arel.

I saw a very early version of Arel back when I was maintaining DataMapper. To be clear, Arel is beautiful code. It's ridiculously well done IMO from an OO stand-point. It's the code I wished I could write in DM.

I didn't use it (or something like it) in DM because I'd been there and seen the consequences. To give the point some context, you might expect NHibernate to impose a 10% overhead on c#. NHibernate is a very complex library, doing a lot more than most (any?) Ruby O/RM. In Ruby, once you get beyond the most trivial examples, you can easily see numbers like 50% overhead, and some queries that would be a cake-walk in .NET are impractical or even impossible in Ruby with constrained resources or service timeouts.

Ruby method dispatch and object instantiation is slow. Damn slow. Ridiculously slow.

The reason DM and now AR perform two-query-eager-loads to avoid JOINs has almost nothing to do with database performance. I doubt many Rubyists really understand or grok what that means. It has everything to do with the instantiation and even simple iteration of a cartesian product in Ruby being infeasibly slow.

Getting back to Arel: It's probably the very best of Rails OO. But that it's introduced some very serious performance regressions is no surprise at all. I said as much to NK and Yehuda when we discussed it during DataMapper 0.9 development.

With Ruby you have to make compromises. Especially in such a critical-loop portion of your stack.

On the other hand, if you're going to stay with AR, then it probably needed to happen sooner or later.

Best of all worlds would have been to drop AR altogether and promote a migration to Sequel for the official Rails O/RM. ;-)

Re: What’s Up With All These Changes in Rails?

#14

I kind of wish they would go further. While I prefer Rspec, I understand and sympathize with those who feel Test::Unit is a better default. But HAML feels like such a vast, unambiguous, never-going-back improvement over ERB that I am honestly baffled Rails hasn't adopted it. It's at least as big a win as Sass and CoffeeScript, if not bigger. I agree with Katz here. If anything, Rails has shown remarkable restraint in…

Haml is great for many cases, but it's terrible when the ratio of text to embedded code gets large. Chris Eppstein, one of the developers of Haml, made a blog post to this effect last year:

http://chriseppstein.github.com/blog/2010/02/08/haml-sucks-f...

As a result, though I love Haml, I think ERb is a more sensible default.

Re: What’s Up With All These Changes in Rails?

#15
post #13

I'm not a fan of Rails myself, but I sympathize with Yehuda's position. The helpers are my #1 gripe with Rails. It really kills productivity to have to dig through all your views for what feels like pet changes. The one point Yehuda's making I'd dispute is the impact of Arel. I saw a very early version of Arel back when I was maintaining DataMapper. To be clear, Arel is beautiful code. It's ridiculously well done IMO…

Wow! This is the first I've heard that RoR's ORM is slow. That's it's slow because Ruby is slow, is even more of a shocker.

I'd love to hear some practical limitations that applications using Ruby and NHibernate face when querying data.

Is this slowness a reason that so many no-sql engines seemed to have sprung at the same time as RoR?

Re: What’s Up With All These Changes in Rails?

#16
post #12

I'm so impressed with Yehuda's ability to be both persuasive and calm while completely destroying every aspect of the argument he is refuting.

Agree that Yehuda is calm and makes good points - However the main point of the original article still remains intact - Rails is very hard for the beginner to learn, much harder than before.

Re: What’s Up With All These Changes in Rails?

#17
post #2

I feel like this discussion wouldn't be getting so much traction if it was easier to learn the differences between specific versions. Today there's enough resources out there to learn about rails and/or the differences between versions and/or 'the right way' of doing things, but it's scavenger hunt meets jigsaw puzzle. Currently, if you don't follow the Rails evolution regularly, going out there and catch up with it…

I abandoned Rails years back because of precisely this problem. Releases would break or arbitrarily drop functionality, with little or no documentation. If you got more than a few point releases behind you were really screwed. I couldn't explain the dearth of documentation for these changes at all, it seemed so lax compared to other platforms. Then I realised all the incentives for those who would produce the documen…

[deleted]

Re: What’s Up With All These Changes in Rails?

#18
I appreciate the post and am a huge fan of Yehuda, he used my comments as teeing off points for your remarks but I feel that what I was trying to say has been lost in his response, probably because I was unclear.

Lets start with this ...

"The Rails core team does seem to treat the project as if it’s a personal playground"

This was said more in frustration with the coffeescript/sass decision than any real belief that it really was the case.

I understand it may be hurtful and disparaging of the amazing effort that the Rails core team has dedicated to making Rails fantastic, and I apologize unreservedly.

With respect to outlining the changes (prototype to jquery etc), I'm not complaining about the changes per se (because I like most of them), what I'm complaining about is the pace of the changes.

Something as major as the asset pipelining feature (where you move assets out of the public folder and into the app folder), for example, seems big enough that it should be a 3.2 release not the next release after an already major change in 3.0.

See what I'm saying?

I haven't worked on the Rails core, so this can be taken with a pinch of salt, but I feel like it would be a good idea to adopt the Intel tick tock refresh style of cpu releases http://en.wikipedia.org/wiki/Intel_Tick-Tock, where major releases come out on the 'tock' and are refined on the 'tick'. That would work well for Rails releases, giving major releases enough time to settle into the Rails consciousness before the next set of changes comes down.

It was great to get a thorough explanation of the rationalization behind the decisions that have been made recently, it would be awesome to see that increase in frequency.

I just want to thank the Rails team for all the hard work and have them understand that while I may argue hard for what I believe, that I have nothing but the highest regard for them.

Re: What’s Up With All These Changes in Rails?

#19
post #14

I kind of wish they would go further. While I prefer Rspec, I understand and sympathize with those who feel Test::Unit is a better default. But HAML feels like such a vast, unambiguous, never-going-back improvement over ERB that I am honestly baffled Rails hasn't adopted it. It's at least as big a win as Sass and CoffeeScript, if not bigger. I agree with Katz here. If anything, Rails has shown remarkable restraint in…

Haml is great for many cases, but it's terrible when the ratio of text to embedded code gets large. Chris Eppstein, one of the developers of Haml, made a blog post to this effect last year: http://chriseppstein.github.com/blog/2010/02/08/haml-sucks-f... As a result, though I love Haml, I think ERb is a more sensible default.

I feel like if you've got lots of text and embedded code mixed together in a template there's probably something wrong with your architecture.

For the few cases where that makes sense, ERb is great. But I have a hard time imagining it's common enough to make it the default.

Edit: Also, the post you linked to outlines several simple ways to mix text into your HAML (inlining HTML, using markdown filters, etc)

Post reply on HN