👋 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:

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

📅 Events

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

👉 All about Code and Ruby

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:

👉 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:

🧰 Konnor Rogers announced a new release for rhino-editor - Pull Request #99

Thank you for reading Short Ruby Newsletter. This post is public, so feel free to share it.

🤝 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

🎥 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.

Reply

or to participate.