Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The state of Ruby tooling

The state of Ruby tooling

This talk analyzes the current state of developer experience in Ruby. Currently, there's a high level of fragmentation for Ruby tooling and no official default experience that new developers can expect. The presentation compares that scenario with Rust, an example of a highly consolidated ecosystem and what we could do to deliver a better developer experience for Ruby out of the box.

In addition to that, the presentation also aims to foster more collaboration and coordination between tool maintainers, so that all tools that compose our ecosystem can build towards a highly integrated experience in the future.

Vinicius Stock

May 29, 2024
Tweet

More Decks by Vinicius Stock

Other Decks in Programming

Transcript

  1. Vinicius Stock Sta ff dev Ruby DX team @ Shopify

    X / GitHub: @vinistock https://vinistock.com
  2. Sources: When Choice is Demotivating: Can One Desire Too Much

    of a Good Thing? - Sheena S. Iyengar, Mark R. Lepper 2000 Journal of Personality and Social Psychology, 2000, Vol. 79, No. 6, 995-1006 • consider smaller portion of the available information • simplify their decision making • prefer the default option • make no choice at all When Choice is Demotivating: Can One Desire Too Much of a Good Thing? Complexity Options choice overload
  3. It’s common to hear that tooling for Ruby is di

    ff i cult to make because it is too dynamic
  4. Rust’s well integrated experience didn’t happen by accident Source: https://www.rust-lang.org/governance/teams/dev-tools

    Rust has a dedicated developer tooling team Responsible for designing a cohesive experience and coordinating e ff orts
  5. Modern default tools + guidance Consolidated tooling Easy integration Minimal

    decisions Reduced learning curve Minimal con fi guration High collaboration
  6. Project A Project B Open source project C asdf No

    typing RuboCop RSpec rbenv Steep / RBS Standard Test Unit Mise Sorbet Rubyfmt Minitest
  7. Missing defaults and guidance Dif fi cult integration Excessive decisions

    for new developers Tooling fragmentation Too much con fi guration Spreading our efforts Steeper learning curve Community driven tools DX design is delegated
  8. JavaScript is another fragmented ecosystem Source: https://survey.stackover fl ow.co/2023/#technology-most-popular-technologies But

    they have a much larger community JavaScript: 63.61% Rust: 13.05 % Ruby: 6.23% We can’t a ff ord to divide our e ff orts
  9. Contributors (not unique) Sorbet + Steep + Solargraph + Ruby

    LSP + TypeProf = Rust Analyzer = 816 603
  10. Building new tools might make sense More tools != Better

    experience We need to consider the big picture of DX DX is not about any one tool. It’s about the combination of them
  11. Sources: When Choice is Demotivating: Can One Desire Too Much

    of a Good Thing? - Sheena S. Iyengar, Mark R. Lepper 2000 Journal of Personality and Social Psychology, 2000, Vol. 79, No. 6, 995-1006 • make no choice at all When Choice is Demotivating: Can One Desire Too Much of a Good Thing? • consider smaller portion of the available information • simplify their decision making • prefer the default option
  12. • make no choice at all Evaluating the alternatives requires

    too much e ff ort
 
 Best case: having a worse developer experience Worse case: deciding to not try Ruby
  13. Using the tools is not the final goal Tools are

    a stepping stone. The goal is to build things Setting up your development environment should be e ff ortless So that developers can fully focus on what they want to build
  14. In Ruby, it’s common to add tools as project dependencies

    But why? # Gemfile group :development do gem “formatter” gem “debug” end
  15. Tools installed globally Version consistency in any project Auto-updates Global

    installation already in the PATH Reduced maintenance Tools can easily integrate with the project’s dependencies
  16. Rust’s case is the exception Fragmented • Ruby • Python

    • JavaScript • C / C++ • Java • PHP Consolidated • Rust • Go 1995 1991 1995 1970s / 1985 1996 1995 2015 2009
  17. This is very long term, but we can achieve it

    The challenges for a modern developer experience are not technical So what’s missing?
  18. • Is it coordination? • Is it collaboration? • Is

    it governance? Do any of these look like a problem we can’t solve?
  19. Language server 3 Code index Language server 2 Code index

    Language server 1 Code index Extension host Document 1 Document 1 Document 1 Open document 1 Open document 1 Open document 1 Editor Indexing…
  20. • Duplicate work • Increased memory usage • Each language

    server can potentially make the other slower
  21. If we consolidate language servers, we can do a better

    job at integrating the rest of the ecosystem
  22. Ruby LSP addons • No need to write a VS

    Code/editor extension • No need to write a brand new language server Source: https://github.com/Shopify/ruby-lsp/blob/main/ADDONS.md • No need to build your own static analysis tools
  23. Language server Code index Extension host Document 1 Editor Rails

    addon Test addon Linter addon Type checker addon
  24. Ruby LSP addons • Ruby LSP Rails https://github.com/Shopify/ruby-lsp-rails • Ruby

    LSP RSpec https://github.com/st0012/ruby-lsp-rspec • Internal integrations with RuboCop, Syntax Tree, Minitest and Test Unit Source: https://github.com/Shopify/ruby-lsp/blob/main/ADDONS.md
  25. The most important steps to advance Ruby developer experience: •

    Consider the big picture • Coordinate our e ff orts