Live data from Hacker News

Ruby on Rails in a week

simplethread.com

121–130 of 176 posts

Re: Ruby on Rails in a week

#121
post #75

Earlier quoted context omitted.

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?

I'm a Rails newbie, not a software newbie. I was brought in as an engineer with no Rails experience but deep Cloud experience to help break a large complex monolith and yes, we're running into the same "DHH's way or the highway" quagmire that infests the Rails world, as mentioned in a sister comment.

Large complex is usually just a bad architectural choice or misunderstanding your business requirements

Re: Ruby on Rails in a week

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

I’m still on rbebv amnbs clones like nodenv.

Re: Ruby on Rails in a week

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

> Blocks are just anonymous functions. That's it.

Blocks in ruby have non-local return, unlike anonymous functions.

compare `[1,2,3].map {|e| return true if e > 1 }` in ruby to `[1,2,3].map(e => {if(e > 1) { return true}})` in javascript. The ruby version will return a single `true` value, while the javascript version will return an array.

This post walks through a example that resembles my experience writing bugs when I knew way more ruby than javascript: https://github.com/raganwald-deprecated/homoiconic/blob/mast...

Re: Ruby on Rails in a week

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

The only confusing and brittle thing is not being able to remember what the behavior of return is inside a block, price, or lambda

Re: Ruby on Rails in a week

#125
post #96

Is it just me or is Rails really complex? Its abstractions are so far removed from anything familiar (HTTP, SQL) that its difficult to understand what is happening unless you deeply understand the framework.

The point is to rely on the abstractions. :) I get similar feelings, especially having been burned by software in the past that purported to abstract things properly. But perhaps unlike other frameworks/libraries, I think Rails has solid abstractions. Of course they're not perfect, but much like abstractions provided by an OS, they are complex, and you mostly don't have to worry about implementation details. (And when you do, that's okay, because the documentation is solid too and the code is available.)

I've been working with Django lately and I definitely had to learn to let go and trust stuff like the ORM. But after watching migrations get handled automatically and easily adding foreign key relationships to tables, I was hooked. I used to be firmly in the "almost never ORM" camp, but that's changed.

Re: Ruby on Rails in a week

#126
post #51

Earlier quoted context omitted.

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

What about rails doesn’t “just work” in a containerized platform?

Re: Ruby on Rails in a week

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

The thing to read to really accelerate your Ruby/Rails education is the Rails source code, particularly the Model-adjacent classes and perhaps the router/controller as well.

Then use the patterns you find! No greater joy than your own project specific functionality feeling like a native part of Rails and it tended to make me use more robust approaches.

Re: Ruby on Rails in a week

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

[deleted]

Re: Ruby on Rails in a week

#129
I hesitate to state that Ruby is making a comeback, because I don't think it ever really faded (isrubydead.com ;-) )…but it definitely feels like the momentum is picking up. 2021 is going to be amazing. Ruby 3. Rails 6.1+ along with new HEY-derived innovations. ViewComponent + StimulusReflex is quickly becoming a powerhouse combo. A ton of useful gems coming out all the time. I myself am furiously working on making Bridgetown one of the world's great static site generators.

Honestly, there's never been a better time to be a Rubyist than right now.

Re: Ruby on Rails in a week

#130

I hesitate to state that Ruby is making a comeback, because I don't think it ever really faded (isrubydead.com ;-) )…but it definitely feels like the momentum is picking up. 2021 is going to be amazing . Ruby 3. Rails 6.1+ along with new HEY-derived innovations. ViewComponent + StimulusReflex is quickly becoming a powerhouse combo. A ton of useful gems coming out all the time. I myself am furiously working on making…

The market (job vacancies) seem to imply otherwise, I rarely see it mentioned in comparison to Python, Go, PHP.
Post reply on HN