Live data from Hacker News

Ruby on Rails in a week

simplethread.com

51–60 of 176 posts

Re: Ruby on Rails in a week

#51
post #20

Earlier quoted context omitted.

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

that seems beyond the scope of rails itself. why would you want to complicate deployment as a newbie? what problems are you facing that containerization specifically solves for you, rather than deploying to a (virtual) server directly? and why not heroku to start?

Can't speak for GP, but in my case I had to learn Rails in an environment where the previous devs were no longer available and the whole app was developed on EC2 instances by a different team. Later, the company decided that containerization was the Next Big Thing and we needed to port the app or else we'd have either no platform to run on or no job. I would have loved to do the simple "just run it on Heroku" thing but sometimes that is just not possible due to external pressures. A lot of the success of Rails is due to its "my way or the highway" methodology where you either conform to the vision of DHH or you can get lost, but the downsides of this priciple are obvious when real life won't conform to his vision.

Re: Ruby on Rails in a week

#52

I love rails, but despite its presense for over a decade, it doesn't feel mature. Something as basic as a native left join in ActiveRecord wasn't added until Rails 5.0, on June 30, 2016. Something as basic as native multiple database support wasn't released until Rails 6.0, on August 16, 2019, 15 years after its initial release... These are just two examples.

> native multiple database support wasn't released until Rails 6.0

While it wasn't in rails natively, you could do it in rails 5 in ~10 extra lines and before with... considerably more hacking. But there were external projects which gave you the possibility.

Re: Ruby on Rails in a week

#53
I took a rails job by accident- I knew rails was in use but I was interviewed in Go and talked about new things going on in Go micro services. I didn’t expect 40 hours a week of rails / ember JS work and that’s my fault.

I have 12 years with Django and I was shocked there wasn’t the equivalent of the Django tutorial. Everyone says the rails tutorial is good and I’m sure it’s worth the money but no one at work endorsed it (nor provided recommendations for any Ruby / rails tutorials).

Coming from Python, Go, JS/Typescript (react, vue, etc) in my most recent experiences it was really rough. I couldn’t understand some of the rails magic and the docs were horrible compared to Django. Ruby Mine IDE was essential.

I learned how much I love DDL management via code (Django ORM or SQL Alchemy) and how active record did just enough to fool you (which is common in other ORMs).

In the end I left the job for a full time Go position and I’ve missed Rspec every day. The rails (or Ruby in general) toolset really impressed me and I’m using Ginkgo at my current job to get my fix for BDD / specs.

Re: Ruby on Rails in a week

#54

I took a rails job by accident- I knew rails was in use but I was interviewed in Go and talked about new things going on in Go micro services. I didn’t expect 40 hours a week of rails / ember JS work and that’s my fault. I have 12 years with Django and I was shocked there wasn’t the equivalent of the Django tutorial. Everyone says the rails tutorial is good and I’m sure it’s worth the money but no one at work endorse…

> The rails (or Ruby in general) toolset really impressed me and I’m using Ginkgo at my current job to get my fix for BDD / specs.

This is, I suspect, the biggest win from the Ruby/Rails ecosystem.

Rubyland went hard-core TDD a long while back -- I suspect largely due to the influence of Pivotal Labs -- and the maturity of the toolset and automation really reflects that.

Every time I work in another language, I find myself very much missing both the Ruby toolchain and (depending on the language) the everything-is-an-object approach.

Not to say that Ruby is perfect, but the tooling really is that good, which is pretty amazing given that Ruby isn't exactly the most parseable of languages -- although on that front, I've got a lot of hope for Crystal: https://crystal-lang.org

Re: Ruby on Rails in a week

#55

Earlier quoted context omitted.

Love the Rebuilding Rails concept! I'm doing a very similar thing in Ruby, focused more on "web application development from first principles" ( https://theodorekimble.ck.page/e0bb43b156 ). I know I better absorb concepts if I can trace them back to a more fundamental "truth". Curious to hear if anyone else has found success with Rebuilding Rails, and what they found most helpful.

If you want to do the same thing (build up from 1st principles) with CSS, I ravingly endorse Axiomatic CSS as defined and implemented in https://every-layout.dev Disclaimers: no affiliation, just a very satisfied customer. IME the free content alone is illuminating, and having paid $100 to access to the full "book" incl all the layouts' implementation it was a bargain.

Starting my projects from every-layout instead of using foundation/bootstrap has been like the move away from jQuery as js developed.

Re: Ruby on Rails in a week

#56

I took a rails job by accident- I knew rails was in use but I was interviewed in Go and talked about new things going on in Go micro services. I didn’t expect 40 hours a week of rails / ember JS work and that’s my fault. I have 12 years with Django and I was shocked there wasn’t the equivalent of the Django tutorial. Everyone says the rails tutorial is good and I’m sure it’s worth the money but no one at work endorse…

It’s really surprisingly difficult to jump between Python and Ruby. And Rails and Django. They are just similar enough that you think the switch shouldn’t be so tough but all the differences really bite you. Whereas jumping into a completely different ecosystem like JS or Go you don’t have the part of your brain telling you “this isn’t that different, you’ll be fine, look for something familiar.”

Re: Ruby on Rails in a week

#57

I love rails, but despite its presense for over a decade, it doesn't feel mature. Something as basic as a native left join in ActiveRecord wasn't added until Rails 5.0, on June 30, 2016. Something as basic as native multiple database support wasn't released until Rails 6.0, on August 16, 2019, 15 years after its initial release... These are just two examples.

Do you mean it didn't feel mature before June 2016 or August 2019? Cause... those things are there now, so how can they be examples of it not feeling mature now? What's it missing for you now to feel mature?

(And also, lots of people and code definitely did left joins and multiple databases in Rails before those dates, without needing to add any sort of plugin/additional dependency. I did myself, plenty of times! Rails just added features to make them smoother and more complete. Which is actually examples of how mature it is, that it went back and made smoother things people were already doing in less smooth ways, isn't that what maturity looks like?)

Re: Ruby on Rails in a week

#58

I love rails, but despite its presense for over a decade, it doesn't feel mature. Something as basic as a native left join in ActiveRecord wasn't added until Rails 5.0, on June 30, 2016. Something as basic as native multiple database support wasn't released until Rails 6.0, on August 16, 2019, 15 years after its initial release... These are just two examples.

Rails _did_ support multiple databases up until then, it just wasn't _as easy_ as everything else in rails. You just defined another database in database.yml (say "second_database") and then ran something like class Foo Still pretty straight forward and simple - just opaque. A lot was available in the Rails ecosystem or using Rails code without being explicitly supported by Rails itself. Much of the last few years ha…

That's just per-model database annotation. It's not enough for use cases like: data sharding, switching reader/writer endpoints at runtime, and a few others. I wouldn't count the basic case as "multi-db support"

Re: Ruby on Rails in a week

#59
post #46

> is there a version manager I should be using? > I am familiar with nvm and pyenv for managing Node and Python versions, respectively, however the tutorial I was following did not mention any Ruby version manager. I took to the internet and found the highly popular, rbenv. If you want "just" a version manager for ruby, I'd go with rbenv. But if you use, say, node and python too - I'd go with asdf: https://github.com…

That's a great share! Didn't know about `asdf`, and not having to load ~4 different language version managers is a solid win.

It also looks like `asdf` Does The Right Thing and uses shims, unlike `rvm`, which, as of the last time I checked, overrides shell builtins, which is a straight-up WTF where I come from.

Re: Ruby on Rails in a week

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

Metaprogramming Ruby by Paolo Perrotta has the best explanation of Ruby's object system I've seen.

It's a must-read for anyone working with Ruby, even if you have no interest in metaprogramming. Despite the title, it's a very approachable and widely-applicable book.

Post reply on HN