#508 — July 2, 2020

Read on the Web

Ruby Weekly

A Syntax for Anonymous Struct Literals — A proposed new Ruby feature where ${a:1, b:2} would be roughly equivalent to Struct.new(kw.keys).new(kw.values) (where kw is {a:1, b:2}) which may be more practical in situations where you’d use a hash now. There’s already a pull request to bring this to Ruby.

Koichi Sasada

Writing Better, Type-Safe Code with Sorbet — The initial Sorbet hype has abated, so now we’re into the Real World Examples phase. Here are four such examples that had me wishing I had interned at Shopify.

Shopify Engineering

CI/CD with Docker and Kubernetes eBook by Semaphore — Learn how to deliver cloud-native applications at high velocity.

Semaphore sponsor

AnyCable 1.0: Four Years of Real-Time Web with Ruby and Go — Built as an add-on to Rails ActionCable, AnyCable uses Go to handle WebSockets while remaining compatible with the core framework. It’s now production-ready and moving towards an ambitious v2. GitHub repo.

Martian Chronicles

Advanced Active Record: Using Subqueries in Rails — When your N+1 queries go beyond includes, understanding subqueries lets the database do the heavy lifting and minimizes round trips. Leigh goes through several real-world(ish) examples.

Leigh Halliday

💻 Jobs

Senior Software Engineer, Team Lead — Got experience architecting Ruby/Rails projects? Join us and lead our product team, building web applications and integrations to help both our customers and employees.

Framebridge

Find a Job Through Vettery — Use Vettery to connect with growing tech teams at startups and Fortune 500 companies.

Vettery

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

📘 Articles & Tutorials

How GitLab Scaled Async Workload Processing with Sidekiq — GitLab found Sidekiq to be a great tool for async processing until it couldn’t keep up.. but here’s how they got it back on track. (Their Sidekiq fleet is 26 servers with 158 CPUs between them, so GitLab’s problems are, let’s say, of a ‘certain scale.’)

Rachel Nienaber (GitLab)

Troubleshooting Encoding Errors in Ruby — Most of us probably don’t think about encoding until it breaks, so being aware of how to deal with common encoding errors is a good id\xCF\x88\xCF\x88.

José M. Gilgado

The Ruby Spec Suite Compatibility Report — ruby/spec is the specification for Ruby compatibility targeted by all major interpreters. Here, Benoit tests TruffleRuby, JRuby, Opal, and Artichoke to see how they fare.

Benoit Daloze

Why Pry Is One of the Most Important Tools a Rubyist Can Learn — From the Honeybadger Developer Blog featuring tutorials & good advice by the coolest error monitoring solution around. 😎

Honeybadger sponsor

Rails and JavaScript: The Early Days — Noel (author of many Rails books, including one back in 2008) starts a series on the relationship between Rails and JavaScript. This first post covers pre-3.0 or, if you like, The RJS Days.

Noel Rappin

▶  Deploy Ruby on Rails on Google Cloud — A handy intro if you’ve not seen GCP and Google App Engine before.

nETSETOS

🎧 Podcasts of the Week

Rails::Engine with Vladimir Dementyev — Vladimir Dementyev is the author of AnyCable, test-prof and an advocate for building monoliths with Rails Engines.

Ruby on Rails Podcast

MiniTest for Those Who RSpec — Two developers talk about MiniTest, RSpec, Tailwind CSS, factories, fixtures, Faker, Shoulda and a lot more besides.

Remote Ruby

🛠 Code and Tools

Graphiti: Add RESTful Graph APIs to Ruby Webapps — Essentially a REST-flavored alternative to something like GraphQL which means you don’t need to leave behind the REST you know and love. To learn more, check out creator Lee Richmond’s appearance on the Ruby Rogues podcast this week.

Lee Richmond

Diff::LCS: Generate Difference Sets Between Enumerable Sequences — Uses the Hunt–McIlroy longest common subsequence (LCS) algorithm

Austin Ziegler

Sidekiq 6.1: Simple, Efficient Background Processing for Ruby — A new version of the perennially popular background jobs system. sidekiq-statistic is also worth checking out if you use Sidekiq as it provides a nice display of the statistics around your workers and jobs.

Mike Perham

Speed Up Your Postgres Queries by 1000x. Learn How in This eBook

pganalyze sponsor

GemUpdater: Update Gems in Your Gemfile and Fetch Their Changelogs — The idea is that you don’t just want to update gems en masse, you want to know how they changed too.

Maxime Demolin

Xlsxtream: A Fast, Streaming XLSX Spreadsheet Writer

Felix Bünemann

Foreman 2.1: An Operations Manager for Your Apps and Servers — a complete lifecycle management tool for physical and virtual servers. Not to be confused with the other Foreman that runs Procfile-based apps.

The Foreman

JRuby 9.2.12.0 Released

JRuby Team