Short Ruby News - Edition #104
The one with Josef's new book about Minitest, where Xavier celebrates 15 years of maintaining Rails contributors app and where Andrew launches state-of-the-art transformers gem for Ruby
You can jump directly to a section:
πΒ All about Code and Ruby: π» Code, πCode Design,π‘Around, β€οΈ Why Choose Ruby
π§°Β Gems, Libraries, and Updates: π New, π§° Updates
π€ Related (but not Ruby-specific)
More content: π π π§ π₯ βπΎ (articles, podcasts, videos, newsletters)
[Sponsor β¬]Β reinteractive.com
The reinteractive Application Code Review is a deep dive into your application, providing you a complete window into the state of your app.
π Launches and discounts
π Josef Strzibny launched Test Driving Rails: Take Minitest and fixtures for a spin
π Nate Berkopec announced the launch of his new retainer service Ruby on Rails Performance Service
πΒ Rails PlanΒ launchedΒ Web Application Metadata Markup
π
Events
π Events happening this week if you want to attend (source:Β RubyConferences):
27 August, Thailand - Bangkok.rb - Ruby Tuesday #56
27 August, Jacksonville, FL - RubyJax - Open Hax August 2024
27 August, Viet Nam - Saigon.rb - Ruby Tuesday #20
28 August, Taiwan - Rails Taiwan - ι«ι Rails Meetup August 2024
29 August, Austin, TX - Austin.rb - Ruby Social - Evening August 2024
29 August, Data Point, CA - Orange County Ruby Users Group - Meetup August 2024
29 August, Philippines - Philippine Ruby Users Group - A night of Ruby Community Roadmapping
29 August, Poland - Polish Ruby User Group - Warsztaty PrzywΓ³dcze (PRUG) August 2024
31 August, India - Pune Ruby Users Group - August Meetup
π Β Scot RugΒ announced the new conferenceΒ Haggis Ruby is coming... | Haggis Ruby
π All about Code and Ruby
π₯³Β Xavier NoriaΒ celebrated 15 year of buildingΒ Rails Contributors - All time
π₯³Β Β Evil MartiansΒ published a new video showing the atmosphere from the Ruby Meetup co-hosted with YCombinator in San Francisco:
π» Code Samples
οΈπ»Β Michael ChaneyΒ sharedΒ about doing find_or_initialize by with unpersisted record:
οΈπ» John Nunemaker shared ActiveRecord scopes can use arel_table, which allows regex matching without having to use SQL strings. Eileen suggested against using the arel_table since itβs a private API
οΈπ»Β Nate HopkinsΒ sharedΒ a code sample about how using pattern matching could improve readability:
οΈπ»Β Michael ChaneyΒ sharedΒ about how pattern matching will only work with hashes that use symbols as keys:
π» Bradley SchaeferΒ sharedΒ a code sample usingΒ module File::File::Constants - RDoc Documentation
οΈπ» Ruby Cademy shared how to use ActionDispatch::DebugLocks to diagnose deadlocks efficiently.
οΈπ» Nidhi Sarvaiya shared a detailed journey how Enums have evolved across multiple versions of Ruby on Rails.
οΈπ»Β Igor AlexandrovΒ asked a question about redirect options (he reviewed multiple solutions after the poll ended at Redirect and return in Rails controllers)
οΈπ» Ruby Cademy shared how ActionView::Helpers::FormBuilder and default_form_builder help us create reusable form components.
οΈπ»Β Rob LaceyΒ sharedΒ a code sample about assigning undefined local variable and method will still create a nil variable:
οΈπ»οΈ Samuel Williams sharedΒ how moving logic out of initialize helps make testing and implementation easier
He later added:
οΈπ» Michael Chaney shared a detailed thread about the subtle differences between each_with_object and inject
οΈπ» Saeloun shared how db:seed:replant works. Read their blog to know more.
οΈπ» Zhephyn shared a detailed thread introducing ActionCable. Do give it a full read
π» Ruby Cademy shared how to use ActionDispatch::PermissionsPolicy and the HTTP Feature-Policy response header to secure your Rails app by controlling browser features
οΈπ»Β Ruby CademyΒ sharedΒ a tip about using Rails #future? to check if a date is in the future:
They added that Rails also supports #past?
οΈπ»Β RoR vs WildΒ sharedΒ a couple of benchmarks about Strings operations:
Stephen MargheimΒ added:
Xavier NoriaΒ added:
Jean BoussierΒ added:
οΈπ»Β Akash ManoharΒ sharedΒ about configuring scheduled jobs for concurrency when using Goodjob gem:
οΈπ»Β RoR Vs WildΒ sharedΒ about Array#find vs Array#bsearch (read the full thread here):
οΈπ»Β Marc KΓΆhlbruggeΒ sharedΒ a code sample about working with Cloudflare:
οΈπ»Β Andrei BondarevΒ sharedΒ a code sample to Enable debug for all Ruby HTTP requests
οΈπ»Β Michael ChaneyΒ sharedΒ a thread about merging queries with Active Record:
οΈπ»Β Samuel WilliamsΒ shared an example about streaming downloads in Rails:Β async-examples/rails-streaming-download/app/controllers/streaming_controller.rb at main Β· socketry/async-examples
οΈπ»Β Ruby CademyΒ sharedΒ about Rails suppressor method:
οΈπ»Β Thibaut BarrΓ¨reΒ sharedΒ a code sample about automating secret retrieval from 1Password via their CLI:
π Thinking about Code Design
οΈπΒ Mohammad A. AliΒ sharedΒ about running Ruby apps with 1M MAUs combined using a single server:
οΈοΈπ Nate Berkopec shared how installing jemalloc is a no-brainer if youβre running a Rails application, which gives instant memory savings by making a 3-line change
He lated added the 3 lines proposed:
Szymon Fiedler also added that using jemalloc was very helpful in reducing memory utilization:
οΈοΈοΈπΒ Dmitry DavydovΒ sharedΒ about Ruby GVL:
οΈπΒ Mohammad A. AliΒ sharedΒ a thread about Ruby on Rails performance:
π‘ Around code (news, findings, books, and more - all about Ruby)
π‘Β AvoΒ sharedΒ a list of issues marked as good first issues to their open-source repo:
π‘ Robby Russell shared that he was looking for the migration guide from Webpacker for Rails apps. Some folks suggested the vite-rails docs.
οΈπ‘ Josef Strzibny shared how to fix the Ruby formatter in Zed editor
π€ Zed shared the launch of Zed AI in collaboration with Anthropic AI.
β€οΈ Why Choose Ruby and Rails
β€οΈ οΈRoss Kaffenberger shared the things available out of the box when using Ruby on Rails
β€οΈΒ David Heinemeier Hansson elaborated on the Provide Sharp Knives part of the Ruby on Rails doctrine.
β€οΈΒ PaweΕ DΔ browskiΒ sharedΒ about using Ruby for 16 years:
β€οΈΒ Luan EstradiotoΒ sharedΒ
β€οΈΒ RamanΒ sharedΒ
β€οΈΒ Ted MartinΒ sharedΒ about Rails:
β€οΈ Β Brandur LeachΒ sharedΒ about Explore Companies that use Ruby around the world
Tobi LutkeΒ added
π§° Gems, Libraries, Tools and Updates
π New Gems and Repos
π Andrew Kane announced a new version of ransformers-ruby: State-of-the-art transformers for Ruby
π Adrian Marin announced a new gem of active_storage-blurhash - AΒ blurhashΒ integration for images stored in ActiveStorage
πΒ Greg NavisΒ announced a new project pocus: Simple server provisioning via POSIX-shell
π Javi RamirezΒ announced a new version ofΒ allgood: Quickly set up a health check page for your Rails app
πΒ Rails PlanΒ announced a new gem mokkku: Mokkku is a simple library to provide fake data that is unique for your project. You can easily use LLM like GPT, Gemini, or Claude to fill the mock that based on your database schema.
π Lucas Carlson announced a new version of kamalx: KamalX is a command-line tool that enhances the user experience of the Kamal by making it more user-friendly and easier to understand
π Sebastian BuzaΒ published a new gem called Ruby2sass - a powerful and flexible Ruby DSL for generating SASS and CSS
π§° Updates
π§° Ruby On Rails announced a new version of Ruby on Rails - Rails 7.2.1 has been released!
Also Rails 7.1.4 has been released!
π§°Β Marco RothΒ announced a new PR for about Automate fetching Meetups from Meetup.com by marcoroth Β· Pull Request #720 Β· ruby-conferences/ruby-conferences.github.io
π§°Β Stan LoΒ announced a small update docs.ruby-lang.org
π§°Β LekΓ« MulaΒ announced a new version ofΒ Release v0.4.0 Β· lekemula/solargraph-rspec Β· GitHub
π§° Maciej Mensfeld announced a new version of Recurring Tasks - Karafka framework documentation
π§° Koichi Ito announced a new version of Release RuboCop Rails 2.26.0 Β· rubocop/rubocop-rails Β· GitHub
π§° Justin CollinsΒ announced a new version ofΒ Brakeman: Brakeman 6.2.1 Released
π Keep an eye on
π Sebastian Buza submitted a new feature request for Ruby about Rewrite Array#bsearch in Ruby
π€ Related (but not Ruby-specific)
π€Β AlazycoderΒ sharedΒ a code sample for upgrading from PostgreSQL 15 to PostgreSQL 16:
π€ Mike Coutermarsh shared his thoughts on why focusing on βgood codeβ is not the thing one should optimize for
π€ David Heinemeier Hansson shared optimizing for resilience prematurely is not worth it.
π€John NunemakerΒ sharedΒ an article about State of Independent SaaS Report: Benchmark Report and Data for the Bootstrapped SaaS Industry β MicroConf
π€ Lucian Ghinda shared a detailed thread about designing tests. He talks about the guidelines one should consider while writing tests:
π€ Jason Swett shared that code design skills and testing skills move in lockstep.
π€Β David Heinemeier HanssonΒ sharedΒ about estimates:
π€Β Tuomas ArtmanΒ sharedΒ about their strategy to handle bugs at Linear:
More content: π π π§ π₯ βπΎ
π Newsletters
π Ruby On RailsΒ published a new edition of This Week in Rails aboutΒ Β ActionText store_if_blank, SQLite non-GVL-blocking busy handler, and more!
π Ruby Weekly published a new edition about Thoughts about static typing in Ruby
πΒ Hotwire WeeklyΒ published a new edition aboutΒ Week 34 - Hotwire with Django, Stimulus Social Share Button, and more!
π Awesome Ruby Published a new edition about Issue 431 - Proposal to change private method to work on Constants in Ruby
π RubyCentral published a new edition of their newsletter about August 2024 Newsletter
π§ Podcasts
π§ Code with Jason published a new podcast 228 - Test Driven Design with Alex Bunardzic
π§ Indie Rails published a new podcast about IndieRails | Getting Performant with Nate Berkopec
π§ Jeremy Smith published a new podcast about Building Liminal
π§ RemoteRuby published a new podcast about Rails 7.2 β First Impressions
π½οΈ π₯ Videos
π₯ RubyKaigi published the list of videos from the RubyKaigi 2024
π₯ Kasper Timm Hansen published a new video about Oaken and ActiveRecord::AssociatedObject
π₯ Arkency published a new video about Rails upgrades 101 β tips and tricks from Piotr Jurewicz
π₯ Yaroslav Shmarov published a new video about SupeRails | Social Share button (very important for PWA & Turbo Native
π₯ Jason Swett published a new video about Testing and OOP - Expression Parser (Part 1) and about Testing and OOP - Changing Expression Parser to use Tokens Instead of Scalars
π₯ Ruby Rogues published a new video about Rails, Assets, ActiveStorage and a Cloudfront CDN
π₯ Dave KimuraΒ published a new video aboutΒ Β Episode 471 - Dark Mode | Drifting Ruby
βπΎ Articles
Whatβs new π
βοΈ Evil Martians published a new article about AI-ification of our TestProf toolkit!
βοΈ John Nunemaker published a new article about Data Modeling Entitlements and Pricing for SaaS Applications
βοΈ Apoorv Tiwari published a detailed guide on migrating from Sidekiq to SolidQueue
βοΈ Garrett DimonΒ published an article aboutΒ Organizing Rails Code with ActiveRecord Associated Objects and aboutΒ Data Modeling Entitlements and Pricing for SaaS Applications
βοΈ Camilo Payan published an article aboutΒ How Standard Ruby updates its rules
βοΈ Navaneeth D published an article aboutΒ Rails 7.2 brings SQL queries count to template rendering logs
βοΈ Igor Alexandrov published a new article about Redirect and return in Rails controllers
βοΈ Haseeb Annadamban published a new article about How to Add PostgreSQL Index based on Query Plan as a Rails Developer
βοΈ Stephen Margheim published a new article about Parsing and emitting database.yml
βοΈ Allancoder published a new article about Getting started with Rspec for testing
βοΈ RailsDesigner published a new article about When to Use call, erb_template, or html.erb in Rails ViewComponents?
βοΈ Guillaume published a new article about building Magic Link Authentication for Devise natively in Rails 7.1
βοΈ RubyCademy published an article on Twitter about Unlearn programming to learn Ruby
βοΈ Maciej MensfeldΒ published an article aboutΒ Under the Hood: Enhancing Karafkaβs CPU and Memory Efficiency
βοΈ Lucian GhindaΒ published an article aboutΒ Proposal to change private method to work on Constants in Ruby
How-TOs π
π PaweΕ DΔ browski published a new article aboutΒ Mokkku, a modern replacement for FFaker
π Matt BrictsonΒ published an article aboutΒ Building a better bin/dev script
πΒ Kasper Timm Hansen published a new article aboutΒ Keep your Rails app competitive with Oaken & ActiveRecord::AssociatedObject
π Rails DesignerΒ published an article aboutΒ Better Inline Validation for Rails Forms (with ViewComponent or partials)
π Martin Streicher published an article aboutΒ Squash Your Ruby and Rails Bugs Faster
Related
David Heinemeier HanssonΒ published an article aboutΒ Software estimates have never worked and never will
Geshan Manandhar published a new article about Docker for beginners: a guide to understanding the core concepts