Earlier quoted context omitted.
> but I dont think you could find similar testing being done and Deployed at the scale of Github on any other framework. ?! There's at least Spring.
It's been a very very long time I touched anything Java so excuse my ignorance. I know there are many Enterprise, internal Web Apps that uses Spring. But are there any web companies built their SaaS or Consumer Web App on Spring, that is at the scale of Shopify and Github?
Building GitHub with Ruby on Rails
281–290 of 332 posts
Re: Building GitHub with Ruby on Rails
#282Earlier quoted context omitted.
I have yet to see a tech stack that's not locked up into a framework version. That's more because of our engineering culture. The cost of NOT upgrading outweighs by a huge margin than keeping building on top. And yes, have seen Django shops locked into 0.9x release patched right into the core and running for a very long time, impossible to upgrade and all the horror stories. EDIT: Added Django
At Shopify we also are basically always on the bleeding edge of all Rails and Ruby versions. By always moving forward it makes each improvement much smaller
Re: Building GitHub with Ruby on Rails
#283Earlier quoted context omitted.
Ruby tells you where methods are defined - it is worth your time to learn how explore ruby code from the REPL - this is the ruby way. For example (I have pry installed, but you can do it without pry) [5] pry(main)> $ user.first_name From: /Users/.../.asdf/installs/ruby/2.7.7/lib/ruby/gems/2.7.0/gems/activerecord- 6.0.6/lib/active_record/attribute_methods/read.rb:15: Owner: User::GeneratedAttributeMethods Visibility:…
Can you point to where this is documented? Thanks for sharing!
Re: Building GitHub with Ruby on Rails
#284Earlier quoted context omitted.
Metaprogramming in ruby is not magic. It is fairly simple, but if you come from a language where metaprogramming is difficult or not possible it can seem like magic. Good metaprogramming levels up a language's power in the same way going from a hammer to a nail gun levels up your building power. Creating a DSL in ruby is mostly just creating well named class methods, often that take blocks, and calling them without p…
I've created many DSLs in Ruby. The issue is later debugging said "magic" methods, when said method is throwing an error and you can't find said method in your codebase. Metaprogramming is pretty amazing for gems and DSLs in a limited domain. When I see business logic that has metaprogramming in it, I kinda freak. I know in the future that business logic will change and debugging the very clever code in that business…
Re: Building GitHub with Ruby on Rails
#285Earlier quoted context omitted.
> but I dont think you could find similar testing being done and Deployed at the scale of Github on any other framework. ?! There's at least Spring.
It's been a very very long time I touched anything Java so excuse my ignorance. I know there are many Enterprise, internal Web Apps that uses Spring. But are there any web companies built their SaaS or Consumer Web App on Spring, that is at the scale of Shopify and Github?
It's one of the most common frameworks in the industry across languages.
Re: Building GitHub with Ruby on Rails
#286Earlier quoted context omitted.
Rails has dependencies, but not like node apps; last time I counted create-react-app vs a new rails app, there was nearly 10x as many distinct maintainers with access to push new releases to the default dependency tree. I consider that a better measure of dependency risk than absolute count, since different ecosystems have different ideas about how large a library should be.
Create-react-app isn't really a fair comparison. Create-react-app has ridiculous dependency bloat compared to the norm in the JS ecosystem because it includes every possible option rather than just picking one option in each category. Most serious project using React aren't using create-react-app.
Re: Building GitHub with Ruby on Rails
#287Earlier quoted context omitted.
I think it's a tradeoff - rails makes live frontend updating challenging because you need to maintain a separate system to manage that, especially when you have a large app. JS frameworks have this built in, but their backend is lacking compared to rails IMO
GitHub could've used Hotwire [0] but instead they decided to grow a buggy immature in-house solution. [0]: https://hotwired.dev/
Attributing some UI bugs with their choice of framework is a massive oversimplification of the problem.
Re: Building GitHub with Ruby on Rails
#288Earlier quoted context omitted.
RBS ( https://github.com/ruby/rbs ) + Sorbet ( https://sorbet.org ) in Ruby 3!
It’s… not ready for prime time. I’m optimistic that it can get there but right now the tooling is quite immature and the type system flexibility is not there for such a dynamic language as ruby.
Re: Building GitHub with Ruby on Rails
#289Earlier quoted context omitted.
You don't have to use `let` in specs. I prefer setting instance variables inside a `before :each` block.
Instance variables, you mean those beloved things in Ruby that cannot be distinguished between not having been defined versus having being assigned the value `nil`? :p
instance_variable_defined?
defined?
are two common onesbut if you are using something before defining it you are going to crash so that's definitely one way of distinguishing it.
using fetch is another way to provide a default value to something that may have a nil value as a meaningful value.
Re: Building GitHub with Ruby on Rails
#290Earlier quoted context omitted.
Very true, but that's a frontend problem, not a rails problem.
These problems are always more common in server-rendered apps though, because front-end state is always a patchwork. And the Rails developers and community have a strong preference for this architecture.