#​613 — July 21, 2022

Read on the Web 🇺🇦

Ruby Weekly

Down The Caching‑Hole? Adventures in 'HTTP Caching and Faraday' Land — It’s never good when you enable caching and performance gets worse. These cases often lead to long, forensic investigations that expose a previously unknown nuance and this case is no exception. “Off with their headers!”

Kryukov & Turner (Evil Martians)

Modernizing Einhorn: A Gem for Managing Forked Processes — Somehow I’d never come across Einhorn till now, but it started life as a Stripe-built gem for managing multiple copies of long-lived processes and now Sidekiq’s Mike Perham has inherited it (pretty much the biggest seal of approval a Ruby project could get) and taken it to a 1.0 release.

Mike Perham

RedisGreen: Secure, Scalable, Full-Featured Redis 7 Hosting — The latest Redis features, instrumented and scaled with the tools teams need as they grow.

RedisGreen sponsor

▶  A Rails Performance Guidebook: From 0 to 1B Requests Per Day — A senior engineer at Zendesk gave a talk at RailsConf 2022 reflecting on Zendesk’s use of Rails and a variety of high-level principles you can adopt when scaling your own apps (if not to the same level!) In related news, Zendesk is about to be acquired for $10.2bn. The most expensive Rails app ever? 😁

Cristian Planas

Quick Bits:

  • 🏆 TopRubyCompanies is a site that presents a table of well known companies (44 so far) known to be heavy Ruby users. While Zendesk (mentioned above) may be the biggest acquisition so far, it's only at #5 on this table.

  • It looks like direct support for common table expressions (CTEs) is coming to Active Record soon based on fresh activity on this PR from 2019.

  • Over ▶️ 60 talks from RailsConf 2022 are now available to watch on YouTube. We're still watching them and will feature some of our favorites next week.

📖 Articles, Stories & Videos

'Booleans Don't Exist in Ruby' — Sure, true and false exist and work well as high level representations, but under the hood, a lot is going on. Mike digs into a variety of areas to learn more including object identifiers, Ruby’s C underpinnings, and what third party libraries do.

Mike Burns

Value Object Semantics in Ruby — A short article covering how equality works for value objects along with what methods you need to be sure to implement to get the right behavior.

Joël Quenneville (thoughtbot)

A Practical Guide to Changing Code So You Can Understand It — Specifically, Daniel discusses three refactoring methods: Introduce Variable, Extract Method, and Rename.

Daniel Huss (TestDouble)

A Rubyist's Guide to ViteVite is the (another) latest shiny toy in JavaScript and frontend build tooling (but, to be fair, it’s pretty amazing). It uses ES module imports, it’s fast and setting it up with Rails is pretty easy thanks to some gems including vite_ruby/rails. (Note: This article dates from 2021, but Vite seems to be going from strength to strength lately, and Vite 3.0 just came out.)

Máximo Mussini

▶  Turbo Frames vs. Turbo Streams — When he was first introduced to Turbo Frames and Turbo Streams, Cezar couldn’t quite figure out the differences (though there are many). Now he has, and deftly explains in this video when to pick one over the other. (Eight minutes.)

Cezar Halmagean

Ruby Transactional Notification Infrastructure Saves Engineering Time

Courier.com sponsor

▶  Xavier Noria Talks About His and Rails' History — Xavier is the creator of Zeitwerk and a long time Rails core team member, so he has tales to tell. So here he does, with reflections on Rails’ history and how he got onto the core team.

Remote Ruby Podcast podcast

Why Ruby is More Readable than Python — We agree with the points made here, but we would, wouldn’t we?

Michael Karamuth

🛠 Code & Tools

Bridgetown 1.1 (Belmont) Released: The Progressive Site Generator — Now with improved i18n support, Sass support within esbuild/PostCSS bundling, phrase highlighting in Markdown, and a brand new Jekyll to Bridgetown migration guide if you want to make the switch for your blog, say.

Jared White

SearchCop: Search Engine-Like Query Support for Active Record — Adds support for an easy to use search interface on top of AR models. It’s smarter than you might imagine and can handle using operators to query against columns – it’s not just for text. Can’t help but think I’d like to see some of these ideas become standard AR features!

Benjamin Vetter

Don’t Let Your Issue Tracker Be a Four-Letter Word. Use Shortcut — The best issue tracking software is one that software developers are actually happy to use.

Shortcut (formerly Clubhouse.io) sponsor

gem-compare 1.2: The RubyGems Plugin for Comparing Gem Versionsgem-compare is a RubyGems plugin that can compare gem versions at the source code level, particularly useful if you want to vet changes or see if updates make sense to you.

Mgr. Josef Strzibny

Redhot: REDux Pattern for HOTwire — A port of the Redux framework (popularly used with React) to ActiveRecord, enabling the tracking of actions and state for your models so you can easily undo and time travel while debugging.

Ivo Herweijer

Casting 1.0: Delegate Methods in Ruby and Preserve self“Casting gives you real delegation that flattens your object structure compared to libraries like Delegate or Forwardable. With casting, you can implement your own decorators that will be so much simpler than using wrappers.”

Jim Gay

⚡️ QUICK RELEASES:

Chatwoot 2.7 – Open-source customer chat system.
HTMLProofer 4.1 – Test rendered HTML files for accuracy.
test-queue 0.5 – Parallel test runner for CI environments.
ServiceActor 3.3 – Composable Ruby service objects.
Opal 1.5.1 – Ruby to JS transpiler.
Mongoid 8.0 – Ruby ODM framework for MongoDB.
ActiveType 2.3 – Make any Ruby object quack like ActiveRecord.
Avo 2.11 – Config-based, extendable Rails admin.
Sidekiq::Grouping 1.1 – Combine similar jobs into groups to process at once.
ruby-warning 1.3 – Add custom processing for warnings.

Jobs

TravelJoy | Engineer #7 | Full-Stack | Remote in USA | Full-time — TravelJoy is the market network for leisure travel. Thousands of travel agents love and depend on our product every day.
TravelJoy - Bring the joy back into travel planning

Senior/Staff Rails Engineer (Denver or US Remote) — Bring your love of Rails, Stimulus, and Hotwire to our team and help us build version 2 of our Visitor Management platform.
The Receptionist

Find Ruby Jobs Through Hired — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers.
Hired

🤔 DID YOU KNOW..