Programming types and mindsets

This page summarizes the projects mentioned and recommended in the original post on /r/ruby

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • yard-doctest

    Doctests from YARD examples

  • I never used these, but is it like Python's doctests? If so it exists for YARD: https://github.com/p0deje/yard-doctest

  • syntax_suggest

    Searching for unexpected `end` syntax errors takes a lot of time. Let this gem do it for you!

  • While not everything maps 1:1 we can still learn from other langs. People told me that automating syntax error detection wasn't possible in Ruby, until it was.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • YARD

    YARD is a Ruby Documentation tool. The Y stands for "Yay!"

  • I still just document everything using YARD and focus on designing really obvious Object Models and of course write tests. I have tried using sord to convert my YARD type annotations to RBS or RBI, but you still have to fill in missing bits, then use steep and somehow load in RBS/RBI files for other gems and stdlib, and it's just an uphill battle since Ruby is dynamically typed by default. Obviously Dynamic Typing lends itself more to Dynamic Languages, where you can call an arbitrary method and let the language VM figure it out at runtime. Static or Strong Typing lends itself better to compiled languages where everything needs to be resolved at compile time and converted into object code. If I need to work in a compiled language, then I'll use Crystal, which also supports type inference. TypeScript's type syntax is quite nice, but I tend to avoid writing massive JavaScript code bases where a Type Checker helps catch subtle bugs, and instead prefer sticking to minimal amounts of vanilla JavaScriot in order to keep complexity low and not overwhelm the browser.

  • crystal

    The Crystal Programming Language

  • I still just document everything using YARD and focus on designing really obvious Object Models and of course write tests. I have tried using sord to convert my YARD type annotations to RBS or RBI, but you still have to fill in missing bits, then use steep and somehow load in RBS/RBI files for other gems and stdlib, and it's just an uphill battle since Ruby is dynamically typed by default. Obviously Dynamic Typing lends itself more to Dynamic Languages, where you can call an arbitrary method and let the language VM figure it out at runtime. Static or Strong Typing lends itself better to compiled languages where everything needs to be resolved at compile time and converted into object code. If I need to work in a compiled language, then I'll use Crystal, which also supports type inference. TypeScript's type syntax is quite nice, but I tend to avoid writing massive JavaScript code bases where a Type Checker helps catch subtle bugs, and instead prefer sticking to minimal amounts of vanilla JavaScriot in order to keep complexity low and not overwhelm the browser.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts