Short Ruby Newsletter

Share this post

Short Ruby News - Edition #56

newsletter.shortruby.com

Discover more from Short Ruby Newsletter

A Monday summary of the articles, discussions, and news from the Ruby community
Over 3,000 subscribers
Continue reading
Sign in

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.

Lucian Ghinda (from ShortRuby)
Aug 28, 2023
Share this post

Short Ruby News - Edition #56

newsletter.shortruby.com
Share

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)

Friendly.rb conference is 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 adrian@adrianthedev.com 

Our community would greatly appreciate your support!

πŸ‘ Our Community

πŸš€New Products & πŸ“… Events

πŸš€ Alex Rudall launched RailsAI- A specialised engineering resource at an unbelievable price

Source: @alexrudall (read on nitter)

πŸš€ Ruby Cademy launched Ruby Mastery by RubyCademy

Source: @RubyCademy (read on nitter)

πŸ“… Friendly.Rb finished the announcement of speakers with The Power of We with Gabriela Luhova - Friendly.rb - Your friendly European Ruby conference

Source: @friendlyrb (read on nitter)

πŸ“… Nathan H announced a new meetup Elasticsearch 100, Mon, Sep 11, 2023, 7:00 PM

Source: @hacknut@ruby.social

πŸ“… Euruko announced the list of spearkers for Euruko 2023, starting with the keynote speaker:

Source: @euruko (read on nitter)

πŸ“… Prathamesh Sonpatki announced that RubyConfIN schedule is public:

Source: @prathamesh2_ (read on nitter)

πŸ“… Ruby On Rails announced the speakers, starting with Rails World - 2023 β€” Aaron Patterson

Source: @rails (read on nitter)

πŸ‘‰ All about Code and Ruby

πŸ‘‰ Paul Mucur shared ActiveRecord::QueryMethods::WhereChain examples:

Source: @mudge@ruby.social

πŸ‘‰ Maciej Mensfeld shared a code sample showing how to use the latest Karafka release:

Source: @maciejmensfeld (read on nitter)

πŸ‘‰ Collin shared about starting new IRB sessions from current session:

Source: @collin_jilbert (read on nitter)

πŸ‘‰ Josef Strzibny shared a code sample showing how to load overrides:

Source: @strzibnyj (read on nitter)

πŸ‘‰ Greg Molnar asked from a security perspective what could go wrong with executing this code:

Source: @GregMolnar (read on nitter)

He also provided a possible solution:

Source: @GregMolnar (read on nitter)

πŸ‘‰ Matt Swanson shared about organising features by modules in Rails:

Source: @_swanson (read on nitter)

He provided a more complete code sample:

Source: @_swanson (read on nitter)

πŸ‘‰ Emmanuel Hayford shared a code sample of a feature that will be present in Rails 7.1

Source: @siaw23 (read on nitter)

If you want you can read the PR here

πŸ‘‰ Matt Swanson shared another code sample about chaining Active Record relations:

Source: @_swanson (read on nitter)

πŸ‘‰ Jeremy Smith shared a code sample showing how to Rendering Markdown with Multiple Modes

Source: @jeremysmithco (read on nitter)

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.

Please consider becoming a paid subscriber to support this newsletter and you will receive an ad-free version. Your contribution aids growth and maintains the quality of ShortRuby for everybody:

πŸ‘‰ Ruby Cademy shared quick ways to replace a hash key:

Source: @RubyCademy (read on nitter)

πŸ‘‰ Matt Swanson shared about using Association Extensions:

Source: @_swanson (read on nitter)
Source: @_swanson (read on nitter)

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

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

Source: @braindeaf (read on nitter)

πŸ‘‰ Prabin Poudel shared a code sample about column_names in Rails:

Source: @coolprobn (read on nitter)

πŸ‘‰ Matt Swanson shared a code sample showing how to test multi-user flow with Capybara and Rails:

Source: @_swanson (read on nitter)

πŸ‘‰AristΓ³teles Coutinho shared two code samples about how to split date:

Source: @aristotelesbr@ruby.social
Source: @aristotelesbr@ruby.social

πŸ‘‰Nate Berkopec shared an advice about background jobs:

Source: @nateberkopec@ruby.social

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

Source: @marcoroth_ (read on nitter)

πŸ‘‰ Nate Berkopec shared an advice about setting timeouts:

Source: @nateberkopec (read on nitter)

πŸ‘‰ Donn Felker shared a tip about testing Sidekiq

Source: @donnfelker (read on nitter)

πŸ‘‰ Harrison Broadbent asked about testing frameworks.

Source: @hrrsnbbnt (read on nitter)

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

Source: @joemasilotti (read on nitter)
Source: @KarlLingiah (read on nitter)

πŸ‘‰ Koichi Sasada shared a performance benchmark for MaNy project (supporting massive number of threads in Ruby):

Source: @_ko1 (read on nitter)

πŸ‘‰ Matt Swanson shared a code sample about using Hash#fetch:

Source: @_swanson (read on nitter)

πŸ‘‰ Nate Berkopec shared about how Active Record is doing many things:

Source: @nateberkopec@ruby.social

Xavier Noria replied with how to think about Active Record:

Source: @fxn@ruby.social


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

Source: https://rubyonrails.org/2023/8/22/Rails-Versions-7-0-7-2-6-1-7-6-have-been-released

🧰 John Bachir announced the release of version 2.0 for ruby-clock - A ruby job scheduler which runs jobs each in their own thread in a persistent process

Source: https://github.com/jjb/ruby-clock/blob/main/CHANGELOG.md#200

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

Source: https://github.com/jeremyevans/rodauth/discussions/362

🧰 Xavier Noria announced a new PR for Rails about Generate config.autoload_lib(...) for new apps by fxn · Pull Request #49032 · rails/rails

Source: https://github.com/rails/rails/pull/49032

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

Source: @kddnewton (read on nitter)

🧰 Vinicius Stock announced a new version for ruby-lsp β†’ Release v0.8.1 Β· Shopify/ruby-lsp

Source: @vinistock (read on nitter)

🧰 Brad Gessler announced a new gem rubymonolith/superview: Create Rails applications entirely from Phlex components.

Source: https://github.com/rubymonolith/superview

🧰 Koichi Ito announced a a new version of rubocop/vscode-rubocop: The official VS Code extension for the RuboCop linter and code formatter

Source: @koic (read on nitter)

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

Share

🀝 Related (but not Ruby-specific)

🀝 Donn Felker wrote about tests:

Source: @donnfelker (read on nitter)

🀝 Jason Swett shared about codebase quality:

Source: @JasonSwett (read on nitter)

He also shared about testing and locked in:

Source: @JasonSwett (read on nitter)

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

Source: @blader (read on nitter)

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:

  • Why I am replacing Turbo Frames with Streams for ActsAsVotable?

  • Turbo Permanent: persist Audio Video and Search results while navigating pages

πŸŽ₯ Dean De HartΒ published new videos about:

  • Unity Game Engine with Rails 7 API Speedrun

  • Superform Gem for Ruby on Rails 7

  • Logidze Gem for Change Tracking in Rails 7

✍🏾 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:

Support the newsletter for ~1.5$/week

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

Share this post

Short Ruby News - Edition #56

newsletter.shortruby.com
Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

Β© 2023 Lucian Ghinda
Privacy βˆ™ Terms βˆ™ Collection notice
Start WritingGet the app
Substack is the home for great writing