🚀 Short Ruby News - Edition #56

Discover the world of Ruby in this comprehensive newsletter covering week 34 and part of week 33 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

More content: 📚 🗞 🎧 🎥 ✍🏾 (articles, podcasts, videos, newsletters)

Friendly.rb conference is taking place on September 27-28 in Bucharest, Romania. Tickets are already sold out! 👏However, you can still show your support for the conference and market your products to a Ruby audience by becoming a sponsor for just $1250 (and get a conference ticket included).For more information, visit friendlyrb.com/sponsor or write an email to [email protected]. Our community would greatly appreciate your support!

👐 Our Community

🚀New Products & 📅 Events

📅 Euruko announced the list of spearkers for Euruko 2023, starting with the keynote speaker:

📅 Prathamesh Sonpatki announced that RubyConfIN schedule is public:

📅 Ruby On Rails announced the speakers, starting with Rails World - 2023 — Aaron Patterson

👉 All about Code and Ruby

👉 Maciej Mensfeld shared a code sample showing how to use the latest Karafka release:

👉 Collin shared about starting new IRB sessions from current session:

👉 Josef Strzibny shared a code sample showing how to load overrides:

👉 Greg Molnar asked from a security perspective what could go wrong with executing this code:

He also provided a possible solution:

👉 Matt Swanson shared about organising features by modules in Rails:

He provided a more complete code sample:

Friendly.rb conference is taking place on September 27-28 in Bucharest, Romania. Tickets are already sold out! 👏However, you can still show your support for the conference and market your products to a Ruby audience by becoming a sponsor for just $1250 (and get a conference ticket included).For more information, visit friendlyrb.com/sponsor or write an email to [email protected]. Our community would greatly appreciate your support!

👉 Emmanuel Hayford shared a code sample of a feature that will be present in Rails 7.1

If you want you can read the PR here

👉 Matt Swanson shared another code sample about chaining Active Record relations:

👉 Jeremy Smith shared a code sample showing how to Rendering Markdown with Multiple Modes

And if you want to see how this can be used Marco Roth shared a PR for gem.sh where they applied this idea here.

👉 Ruby Cademy shared quick ways to replace a hash key:

👉 Matt Swanson shared about using Association Extensions:

You can read here from the Rails guides about this feature.

Rob Lacey shared another code sample about how they used this:

👉 Prabin Poudel shared a code sample about column_names in Rails:

👉 Matt Swanson shared a code sample showing how to test multi-user flow with Capybara and Rails:

👉Aristóteles Coutinho shared two code samples about how to split date:

👉Nate Berkopec shared an advice about background jobs:

👉 Marco Roth shared speed improvements for gem.sh after using YARP (you can read the PR here)

👉 Nate Berkopec shared an advice about setting timeouts:

👉 Donn Felker shared a tip about testing Sidekiq

👉 Harrison Broadbent asked about testing frameworks.

You should read the replies (nitter link) as there are is a healthy debate abour RSpec and Minitest. Here are some of them:

👉 Koichi Sasada shared a performance benchmark for MaNy project (supporting massive number of threads in Ruby):

👉 Matt Swanson shared a code sample about using Hash#fetch:

👉 Nate Berkopec shared about how Active Record is doing many things:

Xavier Noria replied with how to think about Active Record:

🧰 Gems, Libraries, Tools and Updates

🧰 Ruby on Rails published a new release 7.0.7.2 and 6.1.7.6 that fixed a security issue:

🧰 Jeremy Evans announced a new version of Rodauth 2.31.0 Released · jeremyevans rodauth · Discussion #362

🧰 Kevin Newton announced a new version of YARP. Read the full changelog here

🧰 Vinicius Stock announced a new version for ruby-lsp → Release v0.8.1 · Shopify/ruby-lsp

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

🤝 Related (but not Ruby-specific)

🤝 Donn Felker wrote about tests:

🤝 Jason Swett shared about codebase quality:

He also shared about testing and locked in:

🤝 Siqi Chen shared that culture, taste, and craftsmanship are irreplaceable and cannot be compensated for through strategy, process, or quality assurance:

More content: 📚 🗞 🎧 🎥 ✍🏾

🗞 Newsletters

🗞 Wojtek published a new edition of This Week in Rails - August 25

🗞 Awesome Ruby Newsletter published a new edition Issue 379 - Flipper 1.0 - One Point Oh!

🗞 Greg Molnar published a new edition of Rails Tricks Rails upsert - Tricks Issue 16

🗞 Allison Pike published a new edition of Once a Maintainer: Robby Russell

🎧 Podcasts

🎧Drew Bragg published a new episode of Code and the Coding Coders Who Code It: Episode 27 - Andrew Atkinson “PostgreSQL wizard Andrew Atkinson joins the show to discuss his new book, "High-Performance PostgreSQL for Rails." Andrew talks about the challenges of writing a database book for Rails developers, refactoring prose, and the importance of maintaining a work-book-life balance”

🎧 Content For :Devs published a new episode about #010 Advanced Ruby with Jeremy Evans - content_for :devs“In this episode, we're digging into the Roda framework, and behind the scenes of maintaining super popular Ruby gems on the professional level”

🎧 Remote Ruby published a new episode about Ain't Your Callback Girl “In this episode, Chris, Jason, and Andrew engage in a discussion revolving around the functionality and nuances of generated columns, callbacks, and coding practices in database and Rails applications. They explore the benefits and challenges of these features, and they dive into the complexities of coding tests”

🎧 The Ruby on Rails podcast published a new episode about Level Up in Learning with Ariel Fogel“Ariel Fogel is a software engineer with an enduring soft spot in his heart for Ruby and Rails. Since graduating from Dev Bootcamp, he has found himself driven by finding ways to improve the quality of education for coders and non-coders alike. Brittany and Ariel discuss how engineers can level up in how they learn”

🎧 Jason Swett published a new podcast about 193 - Amanda Perino, Executive Director of The Rails Foundation “This week I'm joined by Amanda Perino, Executive Director of the Rails Foundation. We discuss the upcoming Rails World conference in Amsterdam on October 5th & 6th. We also discuss what makes for a great conference experience, learning new languages and studying abroad, cultural differences between the US and Europe, and what's new at the Rails Foundation”

📽️ 🎥 Videos

📽️ Rubber Duck Dev Show published a new episode about Starting a Business With Kota Weaver

Screencasts

🎥 Kasper Timm Hansen published a new video about Extending Rails (Gently) (Example) | GoRails

🎥 Yaroslav Shmarov published new videos about:

🎥 Dean De Hart published new videos about:

✍🏾 Articles

What’s new

Kevin Murphy published an article about Keeping Up With Ruby News All Week Long“I read a lot of Ruby news throughout the week. When someone asks me what they should follow, I first suggest that they not follow exactly the same blogs I do”

Rafael Peña Azar published a new article about Empowering Ruby in the World of Machine Learning “this is a new one in my now called "Ruby is waaaay more than web development" article series, in which I'm trying to raise awareness in the community that the Ruby language covers a lot more ground than just Web Development and its relation to the RubyOnRails framework. In this post we'll talk about Ruby and Machine Learning”

John Nunemaker published an article about Flipper 1.0“I love Flipper. I want to work on it more – all the time. So that's why some great friends and I are turning it into a business. We helped build a lot of cool internal dev tools (at GitHub and elsewhere) and we want to unleash them on the world – starting with Flipper”

Emmanuel Hayford published an article about Secure Your Ruby App with JSON Web Tokens“Securing a web application can mean several things. In this post, we'll discuss a subset of web security that involves authentication using JSON Web Tokens (JWTs) and the Ruby on Rails web application framework”

Prasanth Chaduvula published an article about Open Ranges Are Now Supported By The Object#in? Method In Rails“In the upcoming version of Rails, it is possible to check if a date is present in an open date range with Object#in?”

Alkesh Ghorpade published an article about Rails 7.1 adds support for Array#intersect? to ActiveRecord::Relation“Rails 7.1 added support for the Array#intersect? method to ActiveRecord::Relation objects. This means that you can now use the intersect? method to check if two ActiveRecord relation objects have any common elements”

Matt Brictson published an article about Speed up your default Rake task with the multitask -m option“I recently discovered that Rake has the ability to run tasks in parallel. For Rails projects with many test and linting tasks, this can be a huge time-saver”

Josef Strzibny published an article about Verifying Paddle Billing webhooks with Rails“Paddle recently made a major overhaul of its offering and API. If you need to validate the new Paddle Billing webhooks in Rails, here’s how to do it”

Deep Dives

Mohit Sindhwani published a new article about Ruby Learning by Reversing: Native Gems, Part 5 “The first series of Learning by Reversing examines a Ruby native gem to understand how it works. Part 5 digs looks at the C code needed to interface with the Ruby code”

Lucas Barret published an article about ActiveRecord Internals : You are not ready for this“This article will demystify Rails by looking deeper into the Rails active record association internals”

Ivo Anjo published an their presentation and associated slides about about understanding the ruby global vm lock by observing it“The GVL is an extremely important implementation detail, as it can have a big impact on the performance and responsiveness of any Ruby application that uses more than a single thread to do its work”

Steve Polito published an article about A pragmatic guide to building a Rack application from scratch “Until recently, I didn’t really understand what Rack did. I knew it had something to do with Rails, but I was never in a situation where I needed to use it directly. Not only that, but I realized that I didn’t actually know how to make a server-side web application from scratch because I had become so dependent on Rails”

Brad Gessler published an article about Organic Test Driven Development“Test-driven development sounds like a really “heavy”, dogmatic way of building applications, but it can be surprisingly organic and lightweight starting with “does it run?” as the first test, followed by more formal unit test verification”

Jeremy Friesen published an article about Testing a Method Outside of the Application Test Suite to Speed Up Iterations“Several of those code repositories are applications that run in Docker containers. Their test suite is written in RSpec. That pernicious auto-require of rails_helper means that all invocations of RSpec will boot the entire Ruby on Rails application. Which does not create conditions for fast iteration”

How-Tos

Harrison Broadbent published two articles about A simple Stimulus Tabs Controller “If you're after a simple Stimulus controller to handle tabs in your Ruby on Rails app, look no further. This controller handles toggling between multiple tabs, choosing a default tab, and adding CSS classes to the corresponding button” and Add a favicon to your Rails app in 2 minutes

Mario Alberto Chávez Cárdenas published an article about Working with Rails Engines, Importmap and TailwindCSS for assets “Rails 7 introduced CSS and JS bundling, along with the Propshaft gem to manage and serve assets. Also, introduced Importmaps and TailwindCSS as options for not having Node as a dependency, but in both cases without any official word on how to make these work with engines”

Akshay Khot published an article about Practical Stimulus: Building a Counter Component“In this article, we will build a counter component using the Stimulus JavaScript library. This simple example will demonstrate a bunch of useful features of Stimulus such as managing state, handling events, and targeting DOM elements”

Ben Sheldon published an article about How to isolate I18n configuration in a Rails Engine “Internationalizing GoodJob has been a fun creative adventure. I hope that by writing this that other Rails Engine developers prioritize internationalization a little higher and have an easier time walking in these footsteps. And maybe we’ll make the ergonomics of it a little easier upstream too”

Ryan Bigg published two articles about Alpine Linux, Selenium Manager, Chrome and ChromeDriver and Ubuntu, Ruby, Selenium Manager, Chrome and ChromeDriver “Selenium, and by extension the selenium-webdriver gem, after version 4.11 come with a new feature called Selenium Manager. This CLI tool will automatically install whatever browser and driver you need to run your Selenium tests”

Josef Strzibny published an article about Overriding Rails engines models and controllers “If you’ve ever worked with a Rails engine, you might have come to a moment you needed to quickly override something. But do you know how to override the engine application files from within your Rails application?”

Sid Krishnan published an article about How to use React just on one page in a Rails app “Having had experience with React, you wonder if it is possible to use React just where it is needed, for your new feature, and continue to use plain old ERB and JS (Stimulus) everywhere else”

Related

Jon Sully published an article about How to Fix Heroku's Noisy Neighbors “If you've had any kind of production-tier application running on Heroku with a moderate (or higher) level of traffic for the last several years, you've probably experienced Heroku's noisy neighbors issues”David Bryant Copeland published an article about Getting 'Save to Home Screen' to Kinda Work on iOS “iOS has a feature on any website called “Save to Home Screen”, which creates an icon that then goes to that site. If you craft your website a certain way, this will launch the site in an app-like mode that is often referred to as a “Progressive Web App” or PWA. This post will document exactly what you need to do, because it’s not documented very well”

Jim Nielsen published an article about Reloading a Document (and Preserving Query String Parameters) Using Only HTML“The other day I was trying to write some HTML to give the user the ability to reload the document in its exact state by clicking on a link (same functionality as if they hit CMD + R on their keyboard, or clicked “reload” in the browser UI)”

Victor Bogo published a new article about Prometheus metrics at 37signals “In this blog post, I will share more about how we use Prometheus to properly ingest, store, and alert based on metrics in a way we can confidently migrate and manage infrastructure and applications on-prem”

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