Short Ruby News - Edition #46

Discover the world of Ruby in this comprehensive newsletter covering week 23 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, books and slides)

💸 For only $1.5 per week (just $6.5 a month), you can become a paid subscriber and contribute to the success of the flourishing Ruby community we all adore while receiving an ad-free version of the newsletter!!

👐 Our Community

👐 Friendly.Rb announced a new speaker and the topic of Xavier's talk. If you want to participate, check friendly.rb.com

In case this does not make you want to grab some tickets, you should read what Trinity Takei shared about Friendly.rb in their article Catch the Wave: Europe's Ruby Scene is Heating Up

👐Andy Croll asked for mentors for First Ruby Friend. If you want to be a mentor just visit firstrubyfriend.org

👐 Allie P announced that RubyConf opened a form for people that want to be part of RubyConf 2023 Program Committee Fill this form if you are interested

👐Ruby On Rails reminded us that the CFP would close on Friday, 16 June → Apply at PaperCall.io - Rails World 2023 

👐 Euruko announced the first batch of available ticket at 2023.euruko.org

👐 Donn Felker shared about seeing Rails trending:

👉 All about Code and Ruby

🪧 Have you considered inviting your company to sponsor this newsletter? If you are using Ruby on Rails, I think your company is a perfect fit :)

You can send the sponsorship packages info to your marketing, HR, or product management teams.

I'm happy to assist you with drafting an email. Simply send me a message at [email protected] I'll do my best to draft an email for you to send inside your organization.

Moses Gathuku later announced they made the repo public at gathuku/hotwiredcases

👉 Aaron shared about the importance of testing and what strategies they use in a Rails codebase:

👉 Roland Studer shared a code sample from their article about Phlex is the better way to build your views

👉 Konnor Rogers shared how to maintain scroll position without data-turbo-permanent article:

👉 Kevin Newton shared that in Ruby now it is valid to start an identifier with an underscore since numbered params were introduced (checkout Ruby 2.7 change here)

👉 Maciej Mensfeld shared about some attacks happening on RubyGems:

👉 Joe Masilotti shared a small tip about how to use Devise authentication with Turbo Native:

👉 Pasha Kalashnikov shared a code sample showing two code lines that help exploring requests when using RSpec and Selenium:

👉 Ruby Cademy shared a code showing how to customize Rails console prompt:

👉 Andrew Hodson shared a sample code about how to use named variants with Active Storage:

👉 Brad Gessler asked about what is Magic in Rails:

There are discussions in there about code loader, conventions, single table inheritance, working with components, forms and meta-programming.

👉 Mario Alberto Chávez shared a code sample about how to generate embeddings:

👉 Robby Russell shared a thread about using Drb to send messages from SVN to IRC:

Here are two code samples from the thread, but you should read it all to understand what they do and the context:

👉 Samuel Williams shared a code that shows  the unfair scheduling of threads when using a condition variable. See the code at ruby-condition-variable-timeout

👉 Josef Strzibny shared a thread with gems that he recommends:

Here is the list of recommended gems, but I think you should open the thread and read it all as Josef also explains why they recommend each gem:

👉 Andrew Hodson shared a code sample showing how Rails has support for PostgreSQL generated columns:

👉 Kevin Newton shared about the performance of YARP:

👉 Adam Rice shared about the performance of starting a big Rails codebase:

👉 Rob Zolkos shared a tip about how to replicate flakey test failures on CI:

👉Sebastian Szturo shared that Figma seems to use Ruby from this article The growing pains of database architecture

But it seems they are using Sinatra and Active Record based on this job.

👉 Ruby Cademy shared a code sample explaining predicate methods:

🤞 I imagine that if you have read this so far, you find value in this newsletter.

🧰 Gems, Libraries, and Updates

🧰 Any Cable announced a second release candidate for AnyCable v1.4 Read the release notes

Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). Your contribution aids growth and maintains the quality of ShortRuby for everybody while receiving an ad-free version:

If you consider upgrading and want more information, please read Why to subscribe to paid

🤝 Related (but not Ruby-specific)

🤝 Sebastian Wilgosz shared a tip about using Github CLI:

🤝 Samuel Williams shared an advice about how to think about the code:

🤝 Chris Wanstrath shared about remote work:

🤝Patrick Mc Kenzie shared about how to get paid as OSS maintainer:

🤝 Taylor Poindexter asked about reasons why people stayed at company for over 5 years. The replies are very interesting.

More content: 📚 🗞 🎧 🎥 ✍🏾

📚 Books & Slides

🗒️ RubyKaigi released the video for RubyKaigi 2023 - [EN][JA]Lightning Talks

📚 Thoughtbot released a book celebrating their 20th anniversary A 20th Anniversary eBook

In celebration of our 20th Anniversary, we’ve selected 20 amazing articles posted to our blog from over the course of our 20 years, and compiled them into a beautiful 78 page PDF book. View a Sample PDF

🗞 Newsletters

🗞 Joe Masilotti published a new edition of their Turbo Native newsletter about Interacting with Stimulus from Turbo Native apps

🗞 Ruby On Rails published a new edition of This Week In Rails - June 9, 2023

🗞️ Ruby Libhunt published a new edition of Awesome Ruby Newsletter - Issue 368

🗞️ Ruby Radar published a new edition about Ruby Kaigi 2023 Videos Unleashed!

🗞️ Ruby Weekly published a new edition AWS Lambda loves Ruby again

🎧 Podcasts

🎧 Drew Bragg published a new episode of Code and the Coding Coders Who Code It about Episode 22 - Brittany Martin

🎧 Creston Jamison published a new episode of the Rubber Duck Dev Show about The Making of Avalon in Dragon Ruby with James Stocks. Just a reminder that June is the DragonRuby month at RDDS and if you want to get to know DragonRuby you should also check the Code with Chris series

🎧 The Bike Shed published a new episode about 387: RubyKaigi 2023 with Mina Slater

📽️ 🎥 Videos

Talks

📽️ Jason Swett published a new video from Code With Jason Meetup session Matt Berg code review (2023-04-27)

📽️ Drifting Ruby published their video version for This Week In Rails - June 9th, 2023

📽️ Prefab published a video about 7 Ruby Feature Flag Products Compared

Screencasts

🎥 Dean De Hart published a series of videos:

✍🏾 Articles

What’s new

Steve Polito published an article about Are you absolutely sure your `has_one` association really has one association?: “The Rails has_one API has an unexpected limitation: It does not prevent multiple records from being associated to the parent record.”

Takashi Kokubun published an article about Monitoring YJIT in Production Do you use an app performance monitor like NewRelic or Scout, or check your daily performance graphs? Here’s how you can make sure YJIT is doing what you want when you monitor”

Julian Rubisch published a new challenge for the Hotwire Club Challenge 4: Turbo Drive - Form Activity Indicators “In this challenge we will take an in-depth look at the lifecycle around Turbo Drive form submissions. We will leverage the several events Turbo emits during a form submission to display an autosave activity indicator”

Paweł Dąbrowski published an article about SOLID principles in Ruby: “This article is a quick summary easy to memorize, so you will never wonder again what this SOLID term is all about”

Andrei Kaleshka published an article about Optimize Rails app performance with ChatGPT “We experimented and found out how ChatGPT is good with code optimization. We saw how it transforms Ruby code into performant SQL. The results were great”

How-Tos

Benito Serna published an article about What to do when you need a button_to within a form in Rails “Imagine that you have a form to update a record (let’s say a product record) and inside the form, you are showing a list of images, and each image needs a button to remove it. You tried to use button_to but it doesn’t work because in html you can have form within a form. What do you do?”

Stefanni Brasil published a new article about 4 Strategies To Remove Dead Code from your Ruby App It’s easy to believe that just because a feature is available, it is going to be used someday. But let’s face it: some features in production will go completely unnoticed and unused forever, but you still have to maintain them. How much does it cost to carry all this dead code around?”

Dr Nic Williams published an article about Can we add a dark mode toggle to Jumpstart Pro/Rails? “How can we support dark and light CSS modes, using both system preferences and a dark mode switcher on our Jumpstart Pro apps? Or any Rails + Tailwind CSS + Stimulus JS app”

Adrien Poly published a step by step guide for Deploying a Rails App with MRSK on Hetzner: A Beginner's Guide “With this guide, I'll walk you through the process step by step that I used to create and deploy your first Rails application with MRSK on a Hetzner VPS”

Matt Brictson published a new article about The 3 Vite plugins I use on every new Rails project I’ve completely switched away from Sprockets and Webpacker and am using Vite for my current Rails projects. Here are the three plugins I like to add on top of the standard Vite-Rails setup”

Deep Dives

Sawincp published a new introductory article about Ruby and Object Oriented Programing “For today's topic we will discuss the Ruby programming language and how it's object-oriented approach makes it fun and happy for programmers to use”

David Haley published an article about The 80% abstraction - A method for simplifying large monolithsPerfection protects the future but costs time & money, and is risky besides: the future is elusive & ever-changing. Speed protects the now but risks unnecessary complexity or even rework as we add features. Let’s explore that tradeoff, and how we get to monolithic software in the first place”

Related

Julia Evans published a new article about Some blogging myths. They talk about 8 myths: you need to be original, you need to be an expert, posts need to be 100% correct, writing boring posts is bad, you need to explain every concept, page views matter, more material is always better, everyone should blog.

Paweł Dąbrowski published an article about Redis - a clear breakdown that contains: “starting with some basic usage instructions, an explanation of the data structures, through the deployment process and handling Redis in production, to a deep dive to understand how Redis is working”

Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). 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.