Short Ruby News - Edition #48

Discover the world of Ruby in this comprehensive newsletter covering week 25 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.

You can jump directly to a section:

šŸ‘ Our Community

More content: šŸ—ž šŸŽ§ šŸŽ„ āœšŸ¾ (articles, podcasts, videos, newsletters)

šŸ’ø 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

šŸ‘ Adarsh shared an announcement from RubyCentral:

He also announced two more speakers:

  • Jason Charnes - ā€œhost of the Remote Ruby podcast and a pillar of the Ruby community.ā€

  • Jeremy Smith - organizer of Blue Ridge Ruby and co-organizer of the podcast IndieRails

šŸ‘ Women In Tech Cluj announced they are supporting Friendly.rb - Ruby conference:

šŸ‘ Ruby Conf India announced the dates for the conference:

šŸ‘ Taylor Otwell (creator of Laravel) shared the following:

šŸ‘‰ 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. Send me a message at [email protected] I'll do my best to draft an email for you to send inside your organization.

šŸ‘‰ Joel Drapper shared a gist showing how to use Paquito to encode Sidekiq job parameters (read the full gist here):

šŸ‘‰ Karl Oscar Weber shared a code sample about the beauty and flexibility of Ruby:

šŸ‘‰ Julian Rubisch published a new challenge for the Hotwire Club →  Challenge 5: Turbo Frames - Tabbed Navigation

šŸ‘‰ Hanami Mastery shared a code sample showing a new layout for their snippets. But I included this here as it is rare to see a Hanami 2 code sample shared on social media:

šŸ‘‰ Benito Serna shared a thread about about truncating strings in Rails:

šŸ‘‰ Keith Pitt shared BuildKite engineering principles to work with Rails monolith:

šŸ‘‰ Nick Schwaderer announced a new theme color Spinel Light part of VSCode Shopify Ruby package

šŸ‘‰ Ruby Cademy shared a code sample showing how to use Hash#default_proc to create nested hashes

šŸ¤ž I imagine that if you have read this so far, you find value in this newsletter.

🧰 Gems, Libraries, Tools and Updates

🧰 Kevin Newton announced that YARP has been merged Read the PR

🧰 Andy Maleh announced a new update of Glimmer

🧰 Karl Oscar Weber announced the release of version 3.1 for camping. Here is a part of the announcement:

In this release we've rewritten the Reloader and formalized the directory structure for larger camping apps. The Reloader is now, just the loader, and it eager loads your camping apps in sequential, descending order. With the new Loader behaviour, you can reopen your Controller, Views, Helpers, and Model classes in a predictable manner. Ruby Gems are automatically loaded, so any Gem that adds an app can also have their constants reopened and redefined or modified.

We're very excited about this new release! I hope ya'll enjoy.

🧰 Igor announced that their PR about Support for Docker multistage build cache was merged to mrsk

🧰 Bozhidar Batsov announced that RuboCop 1.53 now has LSP (Language Server Protocol) support. Read the full changelog here

Koichi Ito added that RuboCop - Visual Studio Marketplace has support for RuboCop LSP:

🧰 Adrien Poly shared a work in progress PR from Hotwire/Turbo about Support View Transition API for navigations

🧰 Xavier Noria announced a new PR merged to Rails about Introduce config.autoload_lib

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)

šŸ¤ Jason Swett shared that there is a relation between quality of codebase and quality of UI:

šŸ¤ Jim Nielsen shared some thoughts about AR/VR devices displaying HTML content Thoughts from ā€œMeet Safari for Spatial Computingā€

šŸ¤ Drew Bragg asked about for course about Semnatic HTML:

There are a couple of good recommendations. I will share here one of them recommended by Konnor Rogers ā†’ WAI-ARIA Roles - Accessibility

More content: šŸ“š šŸ—ž šŸŽ§ šŸŽ„ āœšŸ¾

šŸ—ž Newsletters

šŸ—ž Women On Rails published a new edition of Newsletter Women On Rails [FR version]

šŸ—ž Greg Molnar published a new edition of Rails Tricks → Offline Ruby and Rails documentation ā€œThe vacation season is starting and it can be helpful to have access without the internet to the documentation of Ruby, Rails, and the gems you use. If you are going on a trip and taking your laptop, you can prepare them in advance by following this little guideā€

šŸ—ž Allison Pike published a new edition of Once a Maintainer: Michael Grosser → ā€œEngineering Group Tech Lead at Zendesk and creator of multiple ruby gems, including single_cov, parallel, kennel, and ruco. We talked with Michael about moving from animation to programming, reading code you thought was dead, and building opinionated softwareā€

šŸ—ž Ruby Weekly published a new edition about Cataloging hundreds of Ruby videos

šŸ—žļø Ruby Libhunt published a new edition of Issue 370 - ORMs are criticized for the wrong reasons

šŸ—žļø Greg Molnar published a new edition of This Week in Rails: Rails World website and ticket sales, CPK improvements and more!

šŸ—ž Sara Jackson published a new edition of This Week in Open Source (June 16, 2023) ā€œThis past week we saw updates to Administrate, Flightdeck, and Guidesā€

šŸ—ž Ruby Radar published a new edition Amsterdam Dreamin'

šŸŽ§ Podcasts

šŸŽ§ Drew Bragg published a new episode of Code and the Coding Coders who Code It. with Episode 23 - Daniel Huss ā€œDaniel is a Test Double agent and recently gave his first conference talk (Spoiler, it was great)! We talk about the differences between contract and product work, Dragon Ruby, and tending to your code like it's a garden. Daniel crush it on his first, of what I hope will be many, podcast appearancesā€

šŸŽ§ The Bike Shed published a new episode 389: Review Season ā€œReview season is upon us. Stephanie and JoĆ«l think about growth and goals and talk about reviews: how to do them, how to write them for yourself, and how to write them for othersā€

šŸŽ§The Ruby On Rails Podcast published a new episode about The Return of Rocky Mountain Ruby with Spike Ilacqua ā€œRocky Mountain Ruby is baaaaaack! Conference organizer, Spike Ilacqua, joined Brittany to discuss why he was bringing the conference back to life in Boulder, CO on October 5th and 6th, 2023. They talk about the advice he has gotten, the open CFP and funding the conference. The wrap up talking about how Spike finds AI kinda cool and kinda scary.ā€

šŸŽ§ Remote Ruby published a new episode about Jason Goes to Infinity (and Beyond) ā€œOn this episode of Remote Ruby, Jason, Chris, and Andrew reunite after a hiatus, starting their conversation with a playful idea of starting a band and Andrew possibly recording a new podcast introā€

šŸ“½ļø šŸŽ„ Videos

Talks

Screencasts

šŸŽ„   Dean De Hart published a series of videos:

šŸŽ„ Joel Drapper and Kasper Timm Hansen published a Twitch stream about Exploring a new form pattern for Rails

šŸŽ„ Pete Hawkins published new videos:

šŸŽ„ Drifting Ruby published new videos:"

āœšŸ¾ Articles

What’s new

Julie Kent published an article about Intro to Propshaft: A new asset pipeline for Rails ā€œExplore the future of asset pipelines in Rails with Propshaft! Discover how this cutting-edge technology enhances the management and delivery of assets while simplifying your development workflowā€

Gift Egwuenu published an article about May 2023 RubyGems Updates ā€œAs part of our efforts at Ruby Central, we publish a recap of the work that we’ve done the previous month. Read on to find out what updates were made to RubyGems and RubyGems.org in Mayā€

Gavin Morrice published a new article about Avoid using SecureRandom when testing your Ruby code ā€œusing SecureRandom when writing tests for your Ruby code can make your tests harder to debug and more prone to flakiness.ā€

Deepak Mahakale published an article about Rails 7 extends enum support for Postgres adapter ā€œNow, Rails 7 has extended the ability to rename an enum, add enum value and rename enum value for the Postgres database adapterā€

Collin Donnell published an article about MVC Isn’t MVC ā€œabout where MVC started, the variations I've experienced on native and web, and some thoughts about thatā€

[Beginner] Gabrielle J. published a new article about Ruby: An Intro for the Curious-Minded ā€œIf you're new to programming, Ruby is a great language to start learning. Ruby is a general-purpose, object-oriented programming language known for its readability and flexibilityā€

Konnor Rogers published a new article about Pulling your dev.to posts down locally ā€œI'm about to show you how I pulled all my writings on dev.to down locally into a new Bridgetown site I madeā€

How-Tos

Richard Huang wrote an article about Use call_helper to set rails config.load_defaults → ā€œSynvert provides the ability to write code snippets that can automatically rewrite your source code. This video demonstrates how to use call_helper to set rails config.load_defaultsā€

Akshay Khot wrote a new article about How to Split a List into N Equal Parts in Ruby (and Rails) ā†’ ā€œThis article shows you can split (or chunk) a list of items into n-equally sized parts using the `each_slice` method in Ruby and `in_groups_of` method in Railsā€

Mailsnag published an article about Rails 7 + Vuetify 3 (MPA Style) ā€œIn this article, we will demonstrate how to set up a Rails 7 project with Vuetify 3 (and Vue 3 ) using the MPA approach. We will also use Turbo Drive to get the performance benefits of SPA without the added complexity.ā€

Benito Serna published a new article about Truncate in the middle with truncate rails helper ā†’ ā€œImagine that you want to truncate a filename, but you want to keep showing the extension of the file. Like ā€œA big file name that…awesome.pdfā€. How would you do it?ā€

Connor James and Tom de Bruijn published an article about Exceptional Error Reporting for Rails Exceptions ā€œIf you want insights into your application's exceptions but don't have time to invest in adding verbose logic to your code, we've got some exceptional news: The AppSignal for Ruby gem 3.4.1 now supports the Rails error reporter!ā€

Sam Ruby published an article about Around the World With SQLite3 and Rsync ā€œFly.io runs apps close to users around the world. This same infrastructure can be used to route requests to where the data residesā€

Harrison Broadbent published an article about Custom Credentials in Your Rails App — Replacing .env with Rails credentials ā€œIn this article, we're going to dive into the basics of Rails credentials, explore the benefits and drawbacks of this approach, and demonstrate how easy it is to integrate this powerful tool into your Rails app development processā€

Anton published a new article about The Service Object pattern in Ruby applications with unified approach → ā€œThe purpose of this post is to demonstrate how to prepare the base for further development of uniform services in Ruby projectsā€

Ahmad Raza published a new article about Google Login in Rails 7 with devise ā€œIn this comprehensive guide, we'll walk you through the steps to integrate Google login into your Rails 7 app, allowing users to authenticate using their Google accountsā€

Kevin Luo published a new article about Unleash Devise-Enabling All Modules ā€œIn this article, I will enable all 10 modules on the User model one by one. I suggest reading this article sequentially and also following the codes in each chapterā€

Hùng LĆŖ published a new article about Rails nested form (new gem with Stimulus) ā€œWhen Stimulus is came out, Rails devs is suggested to use Stimulus as Javascript library in their projects. So, I created a gem for handling dynamic nested forms with Stimulus JSā€

Deep Dives

Maciej Mensfeld published an article about Inside Kafka: Enhancing Data Reliability Through Transactional Offsets with Karafka ā€œThe crux of this article is about managing offsets - unique identifiers for messages within Kafka's partitions. Often, there's a need to manage offsets alongside database operations within a transaction, especially when handling potential process crashes and anomalies, minimizing the risk of double processingā€

Cody Norman published a new article about Rails Console Deep Dive ā€œHere are some handy tips and tricks to get the most from the Rails consoleā€

Steve Polito published an article about Inspecting Ruby's inspect method ā€œIf you’ve ever worked with a class in Ruby’s Core Library or Rails, you might not realize that special care was taken to print useful information when used in the context of an IRB sessionā€

Vishal Yadav published an article about Using enable-load-relative flag in building Ruby binaries ā€œI'm working on building neetoCI, which is a CI/CD solution. While building pre-compiled Ruby binaries we ran into some challenges. This blog post explores the problems we faced and how we solved themā€

Tobias L. Maier published an article about Comparing Pundit RSpec test Approaches ā€œI found two approaches to test Pundit policies with RSpec. Both approaches are described in the Pundit README and I want to compare them in this postā€

Darren Broemmer published an article about An Introduction to Lambdas in Ruby ā€œIn this article, we'll explore how you can use Lambda functions in Ruby to simplify your code and make it more powerfulā€

Paweł Dąbrowski published an article about Breaking down the Rails request cycle: ā€œThis article is a journey from a moment when the visitor submits the website address to a moment when a view in your Rails application is rendered. Jump on board!ā€

Related

Lucas Barret published a new article about Logged VS Unlogged table Performance in Postgres ā€œTo ensure this durability and consistency, relational databases use several techniques. One of these is to use a WAL file (Write-Ahead Log file). Let's see what this means and how it affects the performance of our read and writes operations. And determines what can suit more for an ETL process.ā€

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.