#527 — November 12, 2020

Read on the Web

Ruby Weekly

Listen: 'Listens' to File Modifications and Notifies You About The Changes — OS-optimized on each of macOS, Linux, BSD and Windows, and can detect file modification, creation or deletion in one or more directories. With v3.3.0 out this week, it's great to see a mature library continue to develop and become more resilient with initial Ruby 3 and TruffleRuby support.


How to GraphQL with Ruby, Rails, Active Record, and No N+1 — These Martians are big GraphQL fans and know a lot about using it with Rails. Dmitry explains the ins-and-outs of several GraphQL approaches to avoid the N+1 death ray. Or, as they put it, “an exhaustive hands-on guide on fighting N+1 from a fellow GraphQL-ing Rubyist!”

Dmitry Tsepelev (Evil Martians)

ButterCMS Melts into Your Ruby App. #1 Rated Headless CMS — ButterCMS is the #1 rated Headless CMS for Ruby. Let your marketing team blog, create landing pages and more w/ our easy to use dashboard. Fast content API for modern apps. Secure. Scalable. Less Code. Try free today for 30 days.

ButterCMS sponsor

What Are The Different Kinds of Rails Tests and When Should I Use Each? — Focuses on RSpec but Jason covers just how often he uses model, system, request, helper, view, routing, mailer and job specs (and why or why not).

Jason Swett

Ruby Refinements Have One Good Use Case — Yes, strong opinions lie ahead! “After 10 years of refinements I know of a single (rare) good use-case for them.”

Bradley Schaefer

Ryan Bates, RailsCasts, and Choppy Seas on the DigitalOcean — Ryan Bates and his RailsCasts are still hugely loved for their impact on the Ruby community several years ago, but he’s been quiet for a few years. He reappeared though not with good news. This isn't about Ruby per se, but I know many of you will remember RailsCasts fondly. (To their credit, DO appear to be making good now.)

Ryan Bates on Hacker News

📘 Articles & Tutorials

▶  That’s So fetch — A Ruby Tapas episodes from the archives covering advanced use of Ruby’s #fetch family of methods.

Avdi Grimm

RBS, Duck-typing, Meta-Programming, and Typing at httpxhttpx is a Ruby HTTP request library and the maintainer has had a go at adding types to it using Ruby 3’s RBS resulting in a lot of learning and a solid evaluation of what RBS offers. As a bonus, there’s a comparison to Sorbet.


Ruby 3's New Hash#except Method — Like the same named method in ActiveSupport, it will return a hash that excludes certain keys and is a bit less cumbersome than Hash#reject.

Akhil Gautam

Decoupling Ruby: Delegation Vs Dependency Injection — We know (too tight) coupling is bad and that it can be avoided. Here are two ways to help you have conscious uncoupling.

Honeybadger sponsor

▶  How to 'Dual Boot' Rails Versions — How to use a gem to easily run your current Rails app against the latest version.


What's The Purpose of private? — Communication is the cornerstone of any healthy relationship. Using private in your classes is a way to communicate to future developers (including yourself!)

Tom Dalling

The Leaky Bucket Rate Limiter — The Leaky Bucket algorithm is a way to rate limit (in this case) callers to an application or API. Mike tells us how he added this algorithm to Sidekiq Enterprise.

Mike Perham

The Art of Errors in Ruby — This is more about best practices with errors that extends to concepts like the null object pattern and monads.

Paweł Dąbrowski

▶  Parsing ORFs From a Genome with Ruby — If you think of DNA as being an organism’s ‘source code’ you can take this ‘code’ and parse it in numerous ways to be able to break it up into more useful parts for further analysis.

Alexander Farley

Free eBook: How to Get a 3x Performance Improvement on Your Postgres Database

pganalyze sponsor

A Fresh Introduction to Rails Testing with RSpec and Capybara — If you’ve covered this area before, move on, but otherwise it’s nice to see an up to date beginner-level walkthrough.

Axek Kee

▶  Black-Belt Debugging with Chelsea Troy — Discussion of how to actively improve debugging skills, train troubleshooting instincts and practical strategies for tackling brain-bending bugs.

Ruby Rogues Podcast podcast

How Do I Add Tests to An Existing Rails Project? — A common question.
Jason Swett

💻 Jobs

Senior Software Engineer, Full Stack (Fully Remote/UK) — We're looking for exceptional engineers to join our remote dev team and help us revolutionise dental practices the world over.


Mux Is Hiring Across the Board to Build the Future of Online Video


Find Your Next Job Through Vettery — Create a profile on Vettery to connect with hiring managers at startups and Fortune 500 companies. It's free for job-seekers.


ℹ️ Interested in running a job listing in Ruby Weekly? There's more info here.

🛠 Code and Tools

quine-relay: An 'Uroboros' Program with 100+ Programming Languages — An uroboros is an ancient symbol of a serpent or dragon eating its own tail. Built by a member of the Ruby core team, quine-relay is a program that naturally starts in Ruby, generates code in a chain of languages, and ends back at Ruby as it should. The source is a thing of intimidating beauty.

Yusuke Endoh

Logidze 1.0: Log Database Record Changes in Rails Apps Using Postgres — Logs are stored in a JSONB column. It’s been around a while but 1.0 has just been released. Good luck pronouncing it though.

Vladimir Dementyev

aws-sessionstore-dynamodb-ruby: Handles Sessions for Ruby Webapps using DynamoDB as a Backend — Compatible with all Rack based frameworks but v2.0.0 removes Rails support which is now the aws-sdk-rails gem’s responsibility.

Amazon Web Services

Valvat 1.0: Validates European VAT Numbers — Tax number validation isn’t the most fun thing to be doing but.. we’ve used this for years at Cooperpress ourselves, so a 1.0 release is nice.

Sebastian Munz

VideoInfo 3.0: Get Video Info From Dailymotion, Vimeo, Wistia, and YouTube URLs — If you’ve got Dailymotion, Vimeo, Wistia or YouTube video URLs and want to grab useful metadata about them, this is for you. This week’s 3.0.0 release seems to fix issues with numerous services.

Thibaud Guillaume-Gentil

Bridgetown v0.18: A Ruby Static Site GeneratorBridgetown has added a slew of view-engine related features, including support for ERB everywhere, link helpers, and more i18n support.

Jared White

ruby-macho: Pure-Ruby Library for Parsing Mach-O (macOS and iOS Executables) Files
Homebrew Project