Live data from Hacker News

Ruby on Rails in a week

simplethread.com

81–90 of 176 posts

Re: Ruby on Rails in a week

#81
post #20
post #14

Rails is in a really good place. When I learned it back in 2015 there were so many resources for learning, it felt like every time I had a specific problem related to a feature I was implementing there was either a railscasts or gorails video on it, along with 10 blog posts and stack overflow results. I can only imagine how much better it is now. It has been one of the only semi-modern learning experiences where I wa…

> It's definitely noticeable when you try to learn a newer framework with a much smaller community and less opinions. You could end up Googling for what you might think is a common thing to solve only to find zero answers in sight I have felt this exact way when I'm Googling for problems running Rails in modern cloud environments. It seems like there are loads of problems that are largely unsolved in the community at…

For a sample of one, I've run rails in containers for years without problems. Is your problem the containerization, or trying to split a rails app into microservices?

I've also split a rails application into separate services, but if you really want the MICROservices approach, then you're going to lose most of the advantages of rails.

Re: Ruby on Rails in a week

#82
I'm a back end C++/rust type and I script with Python. If I wanted to build a front end, is there any reason I'd use Ruby/Rails over Django? I'm not familiar with Rails but I'm curious if it's worthwhile to pick up.

Re: Ruby on Rails in a week

#83
post #73

> Blocks are one of the most confusing, yet most powerful elements of Ruby. They allow you to group expressions, save them to a variable, and even pass them to a method. I’m still getting used to blocks and realizing their usefulness, but overall I feel that they condense a lot of code, and also make code more reusable and extensible. Agreed re: confusion! I've been using Ruby (and Crystal) for years and I'm only sli…

What ruby blocks have in common with js anonymous functions is that they are closures, so that might be what made them click when you learned about those.

Re: Ruby on Rails in a week

#84
post #41

Earlier quoted context omitted.

Multi-database support is not "basic". At what point do you need that? What percentage of users do? Regardless, it was fully supported in gems for years before it went into Rails. It's nice to have it in core. But to say that Rails doesn't feel mature without it? Come on.

> At what point do you need that? What percentage of users do? In my experience, rather a lot.

If you need to connect to multiple databases at a time for your business logic then you're doing it wrong.

Re: Ruby on Rails in a week

#85
post #73

> Blocks are one of the most confusing, yet most powerful elements of Ruby. They allow you to group expressions, save them to a variable, and even pass them to a method. I’m still getting used to blocks and realizing their usefulness, but overall I feel that they condense a lot of code, and also make code more reusable and extensible. Agreed re: confusion! I've been using Ruby (and Crystal) for years and I'm only sli…

yes, exactly! Anonymous functions weren't as common in other languages when Ruby first got popular, so the older Ruby devs had to learn about blocks without talking about anonymous functions, and I think they mostly haven't realized that the world has changed and there's a common terminology that people coming in from other languages will know.

The one big quirk is that Ruby syntax doesn't let you assign a block to a variable like you can assign a function to a variable in javascript. But you can work around that by using the lambda keyword or Proc.new with a block, which will wrap it into an object. Then you can use the & sigil to pass that object into a method that's expecting a block

Re: Ruby on Rails in a week

#86

I'm a back end C++/rust type and I script with Python. If I wanted to build a front end, is there any reason I'd use Ruby/Rails over Django? I'm not familiar with Rails but I'm curious if it's worthwhile to pick up.

The neat thing about Rails is that going from zero to a running database-backed app is done in a ridiculously few number of keystrokes that invoke quite a bit of under-the-hood magic in terms of routing, form and view scaffolding, etc. Django is kind of similar, in that you don't need to write a ton of code to get a basic app in the browser, but it exposes a bit more of itself as you get going right away, and you need to work a bit connecting things together. As far as mature, large Django and Rails apps – the similarities outweigh the differences, in my opinion. I would recommend doing the basic Rails tutorial, it really doesn't take that much time.

Re: Ruby on Rails in a week

#87

Earlier quoted context omitted.

This 10,000 times. And it’s not just Rails, the quality of the Rails documentation made an impact on the Ruby community that was generally replicated. Compare that to the JavaScript world where cornerstone, insanely popular libraries will have documentation that covers roughly 10% of a library’s API surface area and maybe one simple example that doesn’t cover production use cases. And dozens of out of date Medium blo…

I've been doing Javascript for a long time and have rarely run into issues with a lack of documentation. Maybe in projects with like 10 stars on Github ran by a single developer but in all of the major Node projects, you're going to have ample documentation and support for implementing said libraries. Just my take.

Ever used Sequelize?

Re: Ruby on Rails in a week

#88
post #2

Having picked up Rails 9 years ago and having been using it literally daily ever since, it's joyful to read from someone that is just starting. I also started with https://www.railstutorial.org/book , highly recommend it. I also loved Metaprogramming Ruby (Paolo Perrotta) - it's more advanced and starts to open your mind to how Rails magic DSL's were built. I just bought today "Rebuilding Rails" ( https://rebuilding-…

I was in high school when Rails came out. I wanted a Mac so bad just for TextMate. But Rails and the whole philosophy of 37Signals even going back to Getting Real were total life changers. Everything from how I act to my writing to my presentation skills have all been influenced heavily by DHH and Jason Fried.

If anyone has recommendations for soft skills books that are relatable to tech please let me know.

Re: Ruby on Rails in a week

#89

I'm a back end C++/rust type and I script with Python. If I wanted to build a front end, is there any reason I'd use Ruby/Rails over Django? I'm not familiar with Rails but I'm curious if it's worthwhile to pick up.

Unless you are interested in learning ruby or have some specific gripes with how django does things (it is very opinionated) I would say no.

Re: Ruby on Rails in a week

#90
post #2

Having picked up Rails 9 years ago and having been using it literally daily ever since, it's joyful to read from someone that is just starting. I also started with https://www.railstutorial.org/book , highly recommend it. I also loved Metaprogramming Ruby (Paolo Perrotta) - it's more advanced and starts to open your mind to how Rails magic DSL's were built. I just bought today "Rebuilding Rails" ( https://rebuilding-…

I see that Rebuilding Rails doesn't mention a version number of the book, and sales page is actually very uninformative about the actual content. Elsewhere I see it was first published in 2012- How relevant do you find the 'latest' version to modern development? And what is the latest version, has it been updated for rails 6?

Have you got any other recommendations for intermediate to advanced rails topics?

Post reply on HN