Live data from Hacker News

Ruby on Rails in a week

simplethread.com

11–20 of 176 posts

Re: Ruby on Rails in a week

#12
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-…

[deleted]

Re: Ruby on Rails in a week

#13

Nah. In a week, some component will need a security update, and your "hello, world" will break.

Rails has been relatively consistent over the past 10 years with few breaking changes, especially compared to most other frameworks.

Re: Ruby on Rails in a week

#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 was able to go from ground zero to building a real application just by reading the docs, getting started guides and Googling.

Opinions combined with a massive community are an awesome combo.

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, or there might be a few scattered posts that are outdated and partially implemented because everyone has their own opinions and go off in their own directions. It's just dead end after dead end and getting stuck trying to pioneer stuff without a strong grasp on how things work.

Re: Ruby on Rails in a week

#15
Years ago I put together a Rails app to store iPhone/iPad apps for curation. There was a backend that connected to the iTunes API and then I parsed the data elements I needed and entered them into the DB.

The most infuriating thing was realizing that I needed to update the model with a new data element, or that some API responses didn't include the needed data. There was all this controller and model code and then the migrations every time I needed to make a change.

Is this normal when coding any web application at all? I think if I had to do it again I'd just store the entire API response in a single "document" column and query it dynamically as needed. Did I stumble upon why many developers have moved to "noSQL" models of document storage?

Re: Ruby on Rails in a week

#16

Years ago I put together a Rails app to store iPhone/iPad apps for curation. There was a backend that connected to the iTunes API and then I parsed the data elements I needed and entered them into the DB. The most infuriating thing was realizing that I needed to update the model with a new data element, or that some API responses didn't include the needed data. There was all this controller and model code and then th…

Try jsonb fields (postgres only maybe?) and the jsonb accessor gem: https://github.com/madeintandem/jsonb_accessor

I use this for prototyping new apps a lot, where I'm not sure on the best design. Then I migrate to proper database columns when I'm sure of something. Feels like the best of both worlds to me.

Re: Ruby on Rails in a week

#17

Years ago I put together a Rails app to store iPhone/iPad apps for curation. There was a backend that connected to the iTunes API and then I parsed the data elements I needed and entered them into the DB. The most infuriating thing was realizing that I needed to update the model with a new data element, or that some API responses didn't include the needed data. There was all this controller and model code and then th…

Not sure exactly what you’re describing. If the iTunes api was constantly changing that’s sort of an issue in and of itself, beyond whatever database you’re using.

Re: Ruby on Rails in a week

#18

Years ago I put together a Rails app to store iPhone/iPad apps for curation. There was a backend that connected to the iTunes API and then I parsed the data elements I needed and entered them into the DB. The most infuriating thing was realizing that I needed to update the model with a new data element, or that some API responses didn't include the needed data. There was all this controller and model code and then th…

> I think if I had to do it again I'd just store the entire API response in a single "document" column and query it dynamically as needed.

You'd quickly find that it is a lot of code to parse that column and read and write data to it, compared to a normalized database wrapped in ActiveRecord. I've done just that, and it's just a lot more work in the long run. A relational database really is a good thing when you want to slice and dice that data and keep it consistent.

Re: Ruby on Rails in a week

#19

>“Rails generates a lot of functions and methods for you that aren’t defined in the code—I bet that will be hard to debug.” This was definitely the biggest obstacle for me learning Rails (and also Ruby at the same time). And also figuring out what part of the language was Ruby, and what part was Rails. Thankfully Rails' docs have come a long way from just OK to being some of the best in the business.

this is where rubymine really shines, you can right click and select "goto definition" which takes you right to the class that defines the method.

Rubymine really is a fanatastic IDE.

Re: Ruby on Rails in a week

#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 large when you want to go beyond Heroku and stand your app up in containers against cloud components using best practices. As a Rails newbie it has been downright painful and there have been many cases where I wish I was still writing a language like C# or Java where containers and modern cloud architectures have been embraced instead of shunned.

Post reply on HN