An Ode to Ruby
61–70 of 204 posts
Re: An Ode to Ruby
#62One of my goals for 2022 is to write my first real web app. I want to understand things like authentication, creating an API, and security. My initial impression is that the JS/Node world is miserable. Rails looks 1000 times more pleasant.
Having tried both Node and Rails, Rails was a horrible experience. I hated every minute of it and will ignore any job listings including it. Your whole project is in a billion files and everything works by "magic." There is so much complexity and different flies that it sucks to work with. Meanwhile with Node you can start with a simple index.js and work your way up.
Re: An Ode to Ruby
#63Earlier quoted context omitted.
To be fair, you almost never should use the map builtin instead of the pythonic equivalent, list comprehensions. `print([x + 1 for x in [1, 2, 3])` I agree that the ruby approach is better in terms of consistency, but most developers will be aware of the conventions python uses.
Ok, that's a nicer result (obviously I don't write Python lol) but still seems inconsistent to me (putting the function before the array) considering Python is an OO language and most people are going to be writing methods for classes where you call methods with dot. I just remember list comprehensions from Coffee-script and not going to lie, I hate them. It's like reading backwards.
I'm experienced in ruby, and learning python for a project. I don't think I'll ever not wince when using python's ternary;
ruby: size = (waist > 30) ? 'large' : 'small'
python: size = 'large' if (waist > 30) else 'small'
Re: An Ode to Ruby
#64It's too bad Ruby isn't seen as 'cool' anymore, it's just so easy to be productive in it. And now MJIT, YJIT and TruffleRuby are making some very impressive performance gains. Rails is also better than ever and I still can't think of a better language for scripting.
What was cool was Rails, IMHO, and Ruby was the surprise inside it. I've had my own personal Advent of Code these holidays, coding a small API for a personal need. Ruby (Sinatra) took one morning to full deployment in Heroku. Then I tried Crystal (Kemal) and it took me a couple of days to figure out how to map JSON to Crystal data structures. Then I rewrote it again in Rust (Rocket). Two weeks till I figured out, wel…
Re: An Ode to Ruby
#65One of my goals for 2022 is to write my first real web app. I want to understand things like authentication, creating an API, and security. My initial impression is that the JS/Node world is miserable. Rails looks 1000 times more pleasant.
Having tried both Node and Rails, Rails was a horrible experience. I hated every minute of it and will ignore any job listings including it. Your whole project is in a billion files and everything works by "magic." There is so much complexity and different flies that it sucks to work with. Meanwhile with Node you can start with a simple index.js and work your way up.
Learning a language/runtime takes some effort but much less, IMHO, than learning a framework. Doesn't matter if that is Rails, Django, Ember, Angular, iOS SDK, Android SDK, React+Redux+???, and so on.
Re: An Ode to Ruby
#66I like that the Ruby community has embraced the fact it is no longer cool. I recently interviewed for a ruby/rails job where the dev team had come from a previous start up that tried to port an existing Rails app to a React/Microservices one with disastrous results. For this job they were relishing coming back to a monolithic Rails app. I hope this trend continues!
Ruby is elegant, brings me joy and puts me in a state of flow.
Re: An Ode to Ruby
#67For many gems, all you're going to get are a couple of examples in the readme. If you're lucky, there will be some generated rubydocs, but quite often that isn't helpful either, because it's just a list of method names with no descriptions, or it's not clear at all which pieces are intended to be the public API. Even Rails has this problem sometimes. The guides are very good, but when I need to do something off that beaten path, I'm often reaching for stackoverflow.
Re: An Ode to Ruby
#68Re: An Ode to Ruby
#69Here's my hot take on Ruby (as a big Ruby fan): Ruby libraries in general have bad documentation. Some other languages I've worked with in the same time frame that typically have better docs are node.js/regular js, Python, Golang and Elixir. For many gems, all you're going to get are a couple of examples in the readme. If you're lucky, there will be some generated rubydocs, but quite often that isn't helpful either,…
yard server --gems --reload
For rails and ruby docs, I use Dash (on Mac). I use Dash for local docs for other languages and systems as well. Just a handy tool for local docs.
Re: An Ode to Ruby
#70Here's my hot take on Ruby (as a big Ruby fan): Ruby libraries in general have bad documentation. Some other languages I've worked with in the same time frame that typically have better docs are node.js/regular js, Python, Golang and Elixir. For many gems, all you're going to get are a couple of examples in the readme. If you're lucky, there will be some generated rubydocs, but quite often that isn't helpful either,…
JS libraries, IME, are often very bad, though there are some good ones. But, on Ruby, I would go further and say that, especially compared to Python which is so similar in many other respects, Ruby (and not just the library ecosystem,) has a very bad documentation culture.
In fact, more than in libraries, this is evident in the first-party documentation available on the language homepage.