Live data from Hacker News

How Ruby on Rails Could Be Much Better (2008)

dreamhost.com

51–60 of 63 posts

Re: How Ruby on Rails Could Be Much Better (2008)

#51
Is there a framework out there that faces as much consistent scrutiny as Rails?

It seems odd that for a decade the web dev community has singled out this framework. It's always relevant to suggest updates and things to be fix - any framework has those. But the continuing conversation of "is Ruby on Rails good enough" (which seems to be the underlying driver for conversation) is still present after hundreds of companies have built solid products with it.

Re: How Ruby on Rails Could Be Much Better (2008)

#53

Is there a framework out there that faces as much consistent scrutiny as Rails? It seems odd that for a decade the web dev community has singled out this framework. It's always relevant to suggest updates and things to be fix - any framework has those. But the continuing conversation of "is Ruby on Rails good enough" (which seems to be the underlying driver for conversation) is still present after hundreds of compani…

More like hundreds of thousands.

Re: How Ruby on Rails Could Be Much Better (2008)

#54

> “Zed Shaw” Wow, that’s a person I haven’t heard from in ages. He was a Big Flipp’n Deal back in the day (Mongrel, Spats with DHH, etc). Curious to know what he’s up to now.

I follow him on Twitter. Mostly he posts about his painting.

Re: How Ruby on Rails Could Be Much Better (2008)

#55
post #48

> “Zed Shaw” Wow, that’s a person I haven’t heard from in ages. He was a Big Flipp’n Deal back in the day (Mongrel, Spats with DHH, etc). Curious to know what he’s up to now.

Authoring books: https://twitter.com/lzsthw

His personal account is @zedshaw where he focuses more on his painting.

Re: How Ruby on Rails Could Be Much Better (2008)

#56

Is there a framework out there that faces as much consistent scrutiny as Rails? It seems odd that for a decade the web dev community has singled out this framework. It's always relevant to suggest updates and things to be fix - any framework has those. But the continuing conversation of "is Ruby on Rails good enough" (which seems to be the underlying driver for conversation) is still present after hundreds of compani…

I don't think it's as scrutinized as it used to be, though it may feel that way if it's your framework of choice (it is mine).

I feel that SPAs get a lot of scrutiny, but it's spread out among the specific libraries/frameworks. There's also a lot of vocal advocates (as Rails used to have) that makes it feel more balanced.

Over the course of my career, it seems that the "easy" languages (Visual Basic, ColdFusion, Ruby, etc) always get a lot of criticism. I feel like Rails is in a great, mature spot right now, and some exciting things are happening to make it the best positioned for the coming push-back against "Javascript all the things".

Re: How Ruby on Rails Could Be Much Better (2008)

#57

To me, the only point on this list that hasn't improved much is "Ruby on Rails needs to more or less work in ANY environment". Ruby's install/user story for Windows is still Not Great, and Ruby version wrangling on any operating system is a question that you still get 100 answers to ("use asdf/rvm/rbenv/chruby blah blah blah"). For the rest: 1) It's certainly Fast Enough now. More important webperf issues are happeni…

For years I've been running everything on Docker Compose. Even with Ruby improving on Windows, many dependencies didn't run well or easily on Windows (like Redis). Things like WSL of course improve that situation, but I don't think you can beat replacing a long-winded README with installation instructions with a simple "docker-compose up" (the minimal loss of performance is worth it to me)

Re: How Ruby on Rails Could Be Much Better (2008)

#58

I think the next main challenges for Rails are improving the view layer (see upcoming ViewComponent for example) and better integrating with modern javascript (WebPacker feels half baked for gem writers). To me these issues (which both have to do more with the view layer) are where Rails is very much lacking.

Stimulus Reflex is an exciting approach. It's a pattern used in other places well, and I think will provide a great option to those who'd rather not deal with modern Javascript complexity.

Re: How Ruby on Rails Could Be Much Better (2008)

#59

Earlier quoted context omitted.

This is not correct. When Ruby is doing I/O such as this is the only time it’s not blocking. This is due to Ruby, not specific to Rails. Here are a few references: https://github.com/puma/puma/issues/1003 https://thoughtbot.com/blog/untangling-ruby-threads

I have to admit that I have not used puma for development. Edit: your links show that indeed its blocking and you need to spawn many threads/instances, which use memory.

So, threads and instances are two very different things. They both use memory, though threads use far, far less memory - just like in other languages where you would use threads for concurrency. When Ruby's GIL is waiting on I/O, it allows other threads to do their work. Per the first link, from the author of Puma:

"The reason for that is waiting on IO (talking to a DB, etc) will allow another thread to run"

The threads don't run in parallel, but they do run concurrently. While this isn't the panacea of performance, it does work well with many web apps which tend to be I/O bound (waiting for a database or remote service). So to your original of "Doing a http request or a sql query blocks everything until it finishes. The solution is to spawn many instances" - an HTTP request or SQL query will, in fact, allow other threads to execute while waiting for a response meaning you can rely on threads, rather than instances, and maintain a very low memory footprint.

If you like Ruby but want true multi-threading and parallelism, I'd highly recommend taking a look at JRuby (https://www.jruby.org). Those guys have done an incredible job with it.

Re: How Ruby on Rails Could Be Much Better (2008)

#60

Earlier quoted context omitted.

The company I work for (mostly standard Web Dev) uses almost exclusively Elixir for any backend work. Only the fanboys of Elixir and functional everything are happy with it, just to be different to everyone else. The experience is terrible: Tooling (editor plugins, tests runners, IDEs (oh, there are no IDEs...), debugging) is like going back 20 years. There are no libraries for the most basic stuff you get almost by…

Really? I've been able to find everything I need in the Elixir ecosystem from auth to background jobs and one of if not the best GraphQL server implementations out there. Do you mind sharing which libraries you found missing or incomplete?

Yes, in fact we have ourselves published a few open source packages out of the need we had to build them.

The latest incarnation of this problem, was when we had to validate RUT codes (a tax code with a checksum we use here in Chile). Options for Python [1], options for Node [2], options for elixir [3] (don't mind to click, it's a list with nothing to do with RUTs or modulo11 validations). So we had to implement it ourselves. Looking for information we found example implementations [4], where as you can see you have example implementations even for Asterisk Dialplans (!!) but no mention of Elixir.

[1] https://pypi.org/search/?q=rut [2] https://www.npmjs.com/search?q=rut [3] https://hex.pm/packages?search=rut&sort=recent_downloads [4] https://es.wikipedia.org/wiki/Anexo:Implementaciones_para_al...

There are many more examples. Of course you get libraries for the "standard" stuff, it is when you get into the detailes, and that happens when you are already too deep into your project, that you realise all the missing pieces.

Also, what code editor do you use? we've tried everything, and seems the best option is you grow a beard and go emacs/vim. The VSCode plugins hog your laptop and are really inconsistent, incomplete and sluggish [1] [2].

[1] https://github.com/JakeBecker/elixir-ls/issues/54 [2] https://github.com/elixir-lsp/elixir-ls/issues/96

Of course there is no IDE similar to intellij, rubymine or pycharm.

Post reply on HN