

Discover more from Short Ruby Newsletter
Short Ruby News - Edition #57
Discover the world of Ruby in this comprehensive newsletter covering week 34 and part of week 35 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.
You can jump directly to a section:
π Our Community, πNew Products & π Events
πΒ All about Code and Ruby
π§°Β Gems, Libraries, and Updates
π€Β Related (but not Ruby-specific)
More content: π π π§ π₯ βπΎ (articles, podcasts, videos, newsletters)
π Before going into the newsletter content, please allow me to share some personal news and ask for your help π

Who am I? I am Lucian Ghinda, the curator of this newsletter. I am a polymorphic Ruby developer with around 15 years of experience with Ruby on Rails, complemented by five years as a Product Owner and around five years as an Engineering Manager. Add to everything around ten years of teaching, mainly through technical workshops or mentoring.
Why hire me? I am a self-starter and know how to take over a complex codebase and pull in resources to get up to speed. I can take an idea to production. I juggle various concepts, from pitching ideas, customer interviews, design thinking, and prototyping to going into Rails source code to understand how things work. I donβt shy away from speaking with CEOs, customers, and end-users to clarify or better understand what should be built to solve real business problems.
People describe me as bringing optimism, energy, and passion to teams I join while focusing on high-quality code, performance, and stability.
You can read more about me on my LinkedIn page , some testimonials, or visit my technical blog at allaboutcoding.ghinda.com
π Our Community
π Aleksander Lopez πΊπ¦ shared how they feel when using Ruby on Rails:
π New Products
π Lucas Barret launched a new Podcast called GemRuby Show

π Vladimir Dementyev announced the release of their book Layered Design for Ruby on Rails Applications: Discover practical design patterns for maintainable web applications

π Andrew Atkinson announced the release of the beta version for their new book High Performance Postgre Sql For Rails: Reliable, Scalable, Maintainable Database Applications:
π Avi FlombaumΒ announcedΒ Sell Something Starter - an RoR Template

π Events
π Helsinki Ruby announced a new meetup September meet-up at Kitty's Lounge on 6 September:

π Wnb.Rb announced a new book club WNB.rb: A Virtual Community for Women and Non-Binary Rubyists
π Ruby On Rails announced Calling recent Le Wagon grads: Be the face of Rails World as an emcee!
π All about Code and Ruby
π Kasper Timm Hansen shared a proposal for a new syntax for BRB, a lighter ERB syntax, collaboration? Β· ViewComponent/view_component Β· Discussion #1839

You can read the discussion on Mastodon here or on Twitter here (nitter alternative)
πPostmodern started discussing about what could be improved in Ruby world. This started a good discussion about YARD and documentation:

π David Heinemeier Hansson announced a series of new tools being presented at Rails World:
π Bradley Schaefer shared a tip about naming gem versions:

π Johan Halse shared an idea about including a script tag in turbo frame response:

π A short reminder: If you are looking for a colleague, I am looking for a great team to join π

π Postmodern asked about validating an HTML form with dry-validation:


πJoel Drapper announced a new gem and invited people interested to Join the Naming Things Discord Server!

π Stephann V. shared a code sample showing that Rails scope accepts classes

π Maciej Mensfeld shared they are working on a performance improvement for Karafka:

π Gavin Morrice shared a thread about the complexity added by Service Objects. Here is the first part of that thread, but please read it all:

π u/lsnouser asked about how to handle poor code bases:

It is an interesting discussion and I will include here only some parts of some responses:
π Rob Zolkos asked about how to relaod the src when reopening a details element:

Tony Messias shared a solution to Rob question:

π Ruby Cademy shared about Time#utc and how it modifies self:

If you want to understand more here is a screenshot from the documentation:
π Matt Swanson shared about using Enumerable#tally:
π Stanislav Katkov shared about experimenting with PostgreSQL-based cache by using activesupport-cache-database:
π Matt Swanson shared a code sample about
π Joe Masilotti shared the release of Turbo Native along with a series of links to get started with Turbo Native:

Here is the list of links:
πΒ Michael ChaneyΒ sharedΒ about using select_all in Rails:

π Nate BerkopecΒ sharedΒ about serializers:

KeygenΒ replied with:

πΒ Matt SwansonΒ asked to make the code cleaner:
Here are some of the proposed solutions:

πΒ Brad GesslerΒ shared a code snippet aboutΒ Google OAuth controller in Rails in 57 lines of code WITHOUT OmniAuth

πΒ Avi FlombaumΒ sharedΒ a code sample for a module to add reset password and login tokens:

DorianΒ proposed an alternativeΒ password_resetable.rb

πΒ Harrison BroadbentΒ sharedΒ a code sample about using Image Actions - GitHub Marketplace to automatically compress images:

πΒ Ruby CademyΒ sharedΒ a code sample about using private_class_method:

πΒ MonochromeΒ sharedΒ about monoruby performance:

π§° Gems, Libraries, Tools and Updates
π§° Avo announced a new release for both Avo 2 and Avo 3:
π§° Gerald Bauer published a new gem called punkmaker about make your own (pixel) punk base (archetype) heads incl. humans, zombies, apes, aliens, mummies, robots, and much more
π§° Konnor Rogers announced a new release for rhino-editor - Pull Request #99

π§° Vladimir Dementyev announced a new release for Release 1.0.0 Β· palkan/active_delivery
π§° Greg Molnar shared a merged PR for Rails about Add an option to start rails console in sandbox mode by default by shouichi Β· Pull Request #48984 Β· rails/rails
π§° Dima Fatko shared a merged PR to Rails about Add ability to show slow tests to the test runner by fatkodima Β· Pull Request #49082 Β· rails/rails

π§° Jeremy Evans announced a new release for Sequel 5.72.0 Released Β· jeremyevans sequel Β· Discussion #2074
π€ Related (but not Ruby-specific)
π€Β Jason SwettΒ sharedΒ about duplication:

π€ Robby RussellΒ asked us to write recommendations:

π€Β SantiagoΒ sharedΒ a hot-take about estimates. Here is a part of what they posted:
π€Β Jason SwettΒ sharedΒ about technical debt and how we act about it:

More content: π π π§ π₯ βπΎ
π Newsletters
π Harrison Broadbent published a new edition of The RailsNotes Newsletter ISSUE #9 (Deploying with Dokku, Hatchbox, Hetzner)
π Sara Jackson published a new edition about This Week In Open Source (September 1, 2023)
π Awesome Ruby Newsletter published a new edition about Awesome Ruby Newsletter Issue 380, Aug 31, 2023
π Greg Molnar published a new edition of Dependent Dropdowns With Hotwire Rails Tricks Issue 17
π RubyRadar published an article about Book.Publish All!
π§ Podcasts
π§ Lucas Barret published a new podcast GemShowRuby Igor Alexandrov, Wiselink Made by Headliner
π§ Emmanuel Hayford published a new episode of The Rails Changelog 012: DHH joins the show to talk Rails 8, Delegated Types, Kamal and more! β βIn this episode, I'm joined by DHH to discuss Kamal, The Rails Foundation, Rails 8, Delegated Types, On Writing Software Well and a whole lot more! This episode is packed and a must-listenβ
π§ Remote Ruby published an episode about No Surprise | Now We Are A Burger Podcast β βdive into the benefits of building UI components using frameworks like Tailwind CSS and Alpine.js, emphasizing the importance of well-organized and specialized components for better code management. The conversation also touches on the desire for more pre-built component libraries in the Rails ecosystem and the complexities of using various frontend frameworksβ
π§ The Ruby on Rails Podcast published a new episode aboutEpisode 485: A Ticket Giveaway And Kamal / Kemalβ βThe pair talk about doing hard things first, the renaming of MRSK to Kamal and then a random deep dive on our show's archivesβ
π§ Rubber Duck Dev Show published a new episode about Programming & Child Development With Noah Gibbs β βIn this episode of the Rubber Duck Dev Show, we discuss learning to program and child development with Noah Gibbsβ
π§ Rooftop Ruby published a new episode about 23: Head Of Open Source At Ruby Central AndrΓ© Arko β βRuby Central head of open source AndrΓ© Arko talks Bundler, Ruby Gems, supporting the community, and moreβ
π§(related) Adam Wathan published a new podcast about Predictable mistakes of the developer-turned-founder β βSo many developers (your podcast hosts included) make the same mistakes when trying to turn an idea into a business for the first time. In this episode, Ben and Adam talk through a bunch of these mistakes, why they matter, and what you should do to avoid themβ
π½οΈ π₯ Videos
Screencasts
π₯ Yaroslav Shmarov published new video about Ruby On Rails #145 Stimulus Js Hotkeys Without Any External Libraries. It Just Works!
π₯ Dean De HartΒ published new videos about:
π₯ Drifting Ruby published a new video about Episode 416 - Forecasting Data | Drifting Ruby
π₯ GoRails launched a new series called SQL for Beginners
βπΎ Articles
Whatβs new π
Aaron Patterson published an article about Ruby Outperforms C: Breaking The Catch 22 | Rails At Scale β βIn this post Iβd like to present one data point in favor of maintaining a pure Ruby codebase, and then discuss some challenges and downsides of writing native extensions. Finally weβll look at YJIT optimizations and why they donβt work as well with native code in the mixβ
Brooke Kuhlmann published an article about Hanami Views β βAt the moment, the Hanami View gem is in a prerelease state but Iβve been making heavy use of this gem so wanted to share notes in case this information is helpful to you or, at a minimum, prep you for the upcoming 2.1.0 releaseβ
Aaron Patterson published a new article about Fast Tokenizers with StringScanner β βToday weβre going to specifically look at the lexing part of parsing. Lexing is just breaking down an input string in to a series of tokens. Itβs the parserβs job to interpret those tokens. My favorite tool for tokenizing documents in Ruby is StringScanner. Today weβre going to look at a few tricks for speeding up StringScanner based lexers. Weβll start with a very simple GraphQL lexer and apply a few tricks to speed it upβ
Akshay Khot published an article about Rails Database Migrations Cheatsheet β βThe database schema evolves continuously. Rails migrations is a powerful and flexible way to update the schema without dropping and re-creating the database. However, all this power and flexibility can be overwhelming. Here's a handy cheatsheet for most common migration operationsβ
Alkesh Ghorpade published an article about Rails 7.1 Makes Increment Counter And Decrement Counter Accept A By Argument β βRails 7.1 makes increment_counter and decrement_counter accept a 'by' argumentβ
MichaΕ ΕΔcicki published an article about Easy Introduction To Connection Pool In Ruby β βLet me introduce the concept of connection pooling and show you an example of easy, performant connections to RabbitMQβ
Andrei Kaleshka published an article about Cheaper And Risk Free Ruby On Rails App Redesign β βThis article shares the approach we took to apply the new design in one of our projects. The changes we made increased the project revenue by 30%β
Szymon Fiedler published an article about How To Become 10x Developer With A Help Of Chat Gpt β βthere are couple scenarios where tools backed with LLMs shine and can boost your productivityβ
Travis Turner published an interview with Vladimir Dementyev about It Deserved Its Own Tome: Layered Design And The Extended Rails Way β βThe Evil Martiansβ Principal Backend Engineer goes deep on a number of topics: the contents of his book, the importance of maintainability, the Extended Rails Way, sharing his experience-driven methodology for building web apps with Rails, the future of Railsβ
Garrett Dimon published a new article about How We Added Free Plans to Flipper Cloud Using Flipper β βWe used Flipperβs feature flags to iteratively build out everything we needed to offer a free Cloud account to anyone. And since we had been updating, releasing, and testing various elements to support free plans over the course of the last several months, we had a painless releaseβ
Jorge Manrubia published a new article about Minding the small stuff in pull request reviews β βWe pay attention to the minutia in pull request reviews, and for good reasonsβ
Deep Dives π
Ben Sheldon published an article about Appropriately Using Rubyβs Thread.Handle Interrupt β βWorking on GoodJob, I spend a lot of time thinking about multithreaded behavior in Ruby. One piece of Ruby functionality that I donβt see written about very often is Thread.handle_interruptβ
Lucas Barret published an article about Active Record Internals: You Are Still Not Ready β βI try to understand better Rails ActiveRecord and how this is designed internally. In the last article, we discussed reflection but did not dive into it. Now we still have some black spells to exploreβ
Noah Gibbs published two new articles about We Turned Lobste.Rs Into A Rails Benchmark For Yjit β βas YJIT improves we need more data from real world apps to help us understand what will speed up Ruby the most. We turned the Lobsters codebase into a nice new benchmarkβ and about How We Used A Sq Lite Memory Db For Rails Benchmarking β βwe want very little database time in our benchmarks, since weβre trying to optimise Ruby. One way to do that is to use SQLite rather than a separate database like MySQL or PostgresSQL. In fact, faster yet is an in-memory SQLite database. It doesnβt even write to diskβ
Sid Krishnan published an article aboutΒ The Anatomy Of A Turbo StreamΒ β βWhy and how does a <turbo-stream> make the DOM change? What do Turbo Streams have to do with web sockets? What even is a <turbo-stream>?β
How-Tos π
Avi Flombaum published a new article about Build a Reset Password in Ruby on Rails β βAs a continuation of Rails Authentication from Scratch, let's add a password reset feature to our applicationβ. You should also read Rails Authentication From Scratch and Create Rails Magic Login Link.
Mario Alberto ChΓ‘vez CΓ‘rdenas published an article about Full Text Search With Sq Lite And Rails
Harrison Broadbent published an article about Build Dynamic Navs With Current Page? (And Conditional Classes) β βBy combining the current_page? helper with dynamic classes, we can build a nav that's styled differently based on the page we're onβ
Steve Polito published an article about Speed Up Your Rack Application With Http β βIn this tutorial, weβll learn how to leverage HTTP to improve the performance of a simple Rack application in an effort to demystify the intricacies of caching strategies and performance enhancement at the foundational levelβ
Matt Brictson published an article about Fixing Thorβs CliΒ Quirks β βIβve been wanting to build a CLI in Ruby, and Thor is the obvious library to use. But Thor has some weird behaviors that were driving me crazy. Hereβs what I found, and how I extended Thor to fix itβ
Felipe Vogel published an article about Roda + Turbo Streams = β€οΈβ βPorting Wiki Stumble from Rails to Roda and Turbo Streamsβ
Julie Kent published an article about A Step By Step Guide To Building A Ruby Gem From Scratch Honeybadger Developer Blog β βFrom concept to execution, join me on a step-by-step journey through the process of crafting your own functional Ruby gemβ
Niklas HΓ€usele published an article about Open Ai Transcription Api And Active Storage Analyzers β βWeβre building an audiofile upload with ActiveStorage. After the file has been uploaded successfully, weβre going to use the transcription OpenAI endpoint to get the audiofileβs text contentβ
Lars Peters published an article about Generating barcode PDFs with Rails β βFor a project, I was researching methods to generate individual PDFs with imprinted EAN barcodes. Some of the how-tos and blog articles I found were quite old, and it was not directly obvious if the solution still works and can be recommended in 2023β
Cj Avilla published a new article about How to setup react-rails with esbuild β βThis was the time to add React into our Rails. That'll be easy, I thought. Just a couple hours of work, I thought. PSSSSSH. Naw, dog -- the gods don't want you putting React in your Rails, for some reason. Or, at least they don't want you to without their build toolsβ
Related π
Cameron Day published an article about Writing Code You Don't Intend To Keep β βCode doesn't always need to be permanent. In fact, there's plenty of times that it shouldn't beβ
Josef Strzibny published an article about Business Class 1.1 Released With Paddle Billing, An Improved Crud Generator, And New Pricing β βThe Rails SaaS boilerplate Business Class goes 1.1. Hereβs whatβs newβ
Sid KrishnanΒ published an article about What To Do When The Docs Aren't EnoughΒ β βA lot of the time, once you read the docs, you do end up finding enough guiding information to help overcome the snag and move on to the next increment of work. But every now and then, even if the docs give you some additional context around the problem, you find that you are still in the dark when it comes to actually solving itβ
Please consider becoming a paid subscriber to support this newsletter for just $1.8/week ($7.5/month) and you will receive an ad-free version. Your contribution aids growth and maintains the quality of ShortRuby for everybody:
If you consider upgrading and want more information, please read Why to subscribe to paid.