Ruby AMA with Glenn Goodrich, 16th Nov 1pm (PST)

I love all the bits about new approaches to concurrency. I really feel like that issue is what is holding Ruby (and, thus, Rails) back more than anything else. The presentations about Guilds are very encouraging, giving Ruby a solid and approachable answer to concurrency. That would propel Ruby forward, I think.

I think scaffolding is appropriate when you are spiking something or, maybe, when you want a quick skeleton that you know you are going to overhaul. It puts a ton of pieces in place, but you need to make sure all the pieces are necessary, etc.

1 Like

The intended readership are those new to Rails, for sure. However, I will tell you that I learned a fair amount writing this book. So, I think anyone will learn something new, except maybe DHH coughs

1 Like

Is anyone currently learning/using Rails? What are you doing? Are there things you don’t get?

1 Like

Yup. I use Rails at work. I’m currently looking at ways to combine it with JS frameworks (esp. Angular).

What’s your opinion on pushing as much logic down onto the client as you can (as seems to be the trend nowadays)?

I am trying to learn rails as we use it as the backend for one of our apps. I come from a PHP background and find it hard to follow where some variable comes from it often just seems like “Magic”. Any advice for someone moving from PHP to Rails?

3 Likes

I read a really good post today about replacing the asset pipeline with yarn, webpack, etc. I think it shows how versatile Rails can be, which is one of my favorite things about it.

1 Like

I’ve been learning Ruby and Rails primarily through contributing to Discourse (the software that is running this platform). The biggest holdups I’ve had to date have been probably some assumptions I have from other languages like C# and that really do not work the same in Ruby. Such as Class inheritance, Extending Classes, and the fact that a lot of magic still happens behind the scenes in Ruby, such as, routing calling out to its controllers, and the controllers interacting with their models.

Does your book provide any insight to some of that magic? I’ve gone through Code Academy’s course, and a couple at Treehouse, but that was 2 years ago and I feel like I am constantly forgetting that knowledge (primarily because I’m only in Ruby/Rails for a limited time, then back to full time in C#).

2 Likes

Bookmarked. Thank you :slight_smile:

1 Like

My main issue with Rails is that it’s too much MVC, too little OO. But then again, that’s a small price to pay for the productivity you get. Do you sometimes wish Rails was a little more OO ?

1 Like

Alas, I have zero PHP experience. However, you’re right, Rails has a fair amount of magic. I would suggest learning the basics of Rails as much as possible, and the magic will start to fade out. The conventions are meant to make it easier to get going, so get as comfortable as possible with them.

1 Like

As @cpradio, in the context in which Discourse uses it

A lot of it is Ember, but the backend is Ruby.

So, the book focuses very intentionally on the conventions of Rails. It is meant for those new to Rails, so dissecting the magic is not really in scope. C# and Ruby are not similar, so drawing comparisons will probably just confuse the issue. When you are off Ruby and on C#, try to spend a few minutes doing things like http://exercism.io to practice Ruby and keep it fresh.

1 Like

I do, and I make it that way where I can. There is a bit of a movement around things like Operations and Service Interactors (i.e. Trailblazer, etc.) that I like and use when appropriate. However, you need to understand Rails and its approach before you move away from it.

1 Like

To be fair, that’s Rails magic.

Yes, the more I work with routing the more I like to think I understand it.

But I always have the feeling I’m more guessing than knowing.

What’s it like writing a book @ruprict?

2 Likes

Yeah, true. Ruby itself, doesn’t have a lot of magic to it, it is purely a language and constructs and constraints on what you can and cannot do.

I’ve done most of my learning through examples and forcing myself to try and implement features to this point. I’ve learned a lot, but having a better grasp of the magic and how it works is still something I think I would benefit greatly about, as I can’t help but feel like I’m implementing something I don’t fully understand. I understand it will just work, but that isn’t sufficient for me, I like to know how. :slight_smile:

This post implements a simple router in the Rails style, it might help

1 Like

This popped up a while back: http://rebuilding-rails.com/
I always wanted to check it out, but never had enough time.