#486 — January 30, 2020

Read on the Web

Ruby Weekly

Optimization Techniques by the Benchmark Winners — Lessons from the Sequel and Roda gems extracted from Jeremy Evans' Ruby Kaigi talk. “These techniques may not be the best to write at application code level but good when building libraries or to optimize the critical path of your application. The ideas and principles are universally applicable.”

Juanito Fatas

How to Perform Concurrent HTTP Requests in Ruby and Rails — Ah, concurrency and Ruby. Will it ever be safe and easy? We can hope, but in the meantime here’s why it’s unsafe and an easy way to enjoy concurency safely.

Paweł Urbanek

Monitor Ruby App Metrics and Distributes Traces in Real Time — Trace requests across service boundaries (and identify latency and other potential errors) with detailed flame graphs. For deeper context, pivot to related logs and metrics with one click. Try Datadog APM free with a 14-day trial.

Datadog APM sponsor

Code Coverage Tool SimpleCov 0.18 Gains Branch Coverage SupportSimpleCov is a code coverage analysis tool and now it can provide further information about conditional or branched code that is or isn’t being covered by your tests.

Christoph Olszowka

Awesome Ruby: A Curated List of Ruby Libraries and Tools — Every now and then, we like to link to this epic, categorized collection of Ruby goodies. It continues to be updated every month with new entries added and obsolete entries removed and you’re encouraged to contribute your own projects too.

Marc Anguera Insa

A Rubyist's Introduction to Character Encoding, Unicode and UTF-8 — A really solid article on encodings, starting with what it is and how encodings work and evolve. Then, a little bit on how to play with them in Ruby.

Honeybadger Developer Blog

💻 Jobs

Full-Stack Software Engineer at Modern Treasury (San Francisco) — Modern Treasury builds innovative payments solutions that delight both engineering and finance teams.


Ruby on Rails Engineer at Buildkite (Remote) — We’re looking for an Engineer that can influence all corners of our product and help shape a tool that thousands of devs use every day.


Find a Job Through Vettery — Vettery is completely free for job seekers. Make a profile, name your salary, and connect with hiring managers from top employers.


📘 Articles & Tutorials

The Tale of the Mysteriously Truncated Timestamps in Rails — A story of a flaky test with a well-known culprit: timestamps. Still, the reason for the flakiness is interesting and good to know.

Toptal Engineering Blog

▶  How to use Uppy with ActiveStorage — How to use Uppy as a frontend for uploading files via drag and drop, paste, URL, etc with Rails’ Active Storage. 23 minutes.


Why The Sorbet Typechecker Is Fast — The second in a series on things that went right creating Sorbet, the type checker for Ruby. This is another pretty technical (but accessible) post which includes some interesting decisions.

Nelson Elhage

Are You Struggling to Upgrade to Rails 6? — If you need to upgrade your Rails Application or dependencies and need a skilled partner, reinteractive can help. Ask for a free quote.

reinteractive sponsor

Automating Rails Database Migrations on Heroku — There’s a new Release Phase in town.

Scott Bartell

A Guide to npm Version Constraints for Rubyists — A reference guide to NPM version constraints for dependencies declared in the package.json file of a Rails project. npm has some interesting quirks, particularly around caret ranges and version numbers lower than 1.0.

Ross Kaffenberger

Working with Temporary Files — Ruby’s standard library tempfile is a nice fit for specific use cases.

Remi Mercier

Taming Long-Running Tasks in Rails with ActiveJob — Sometimes if you need to generate large file exports or run reports that are just slow to build, pushing them to a background job makes sense.

Matt Swanson

▶  An Interview with Sandi Metz, Author of Practical Object-Oriented Design in Ruby — Approximately an hour long. BTW, if you’re not familiar with Sandi’s book, it’s a community favorite and worth checking out.

Code with Jason podcast

Refactoring Ruby with Monads — This lengthy post (with video) is a bit old, but it shows how to build on basic concepts to get an understanding of monads as simple abstract data types.

Tom Stuart

Top 34 Companies Using Ruby and Rails in 2019 — We see a list like this every year, but it’s a good reminder that Rails is not even close to dead. Just ask GitHub, Airbnb, Indiegogo…


🛠 Code and Tools

Vacuum: Amazon Product Advertising API Client — Amazon’s Product Advertising API lets you obtain Amazon product prices, details, etc. via an API.

Hakan Ensari

ActiveInteractor: Ruby Interactors Based on ActiveModel — As you might have guessed, this is heavily inspired by the Interactor gem but includes more deliberate ActiveModel integrations.

Aaron Allen

16 New Machine Learning Gems for Ruby — In a recent RubyRussia interview (that we linked to last week) Matz said he wants Ruby to be used more in the AI/ML space. One developer is working seriously hard to make an impact, as seen here.

Andrew Kane

Fix Ruby Problem Endpoints FAST. Get Back to Coding with ScoutAPM

ScoutAPM sponsor

Sequenced: Generate Scoped Sequential IDs for Active Record Models — The sequential ID is not a replacement for the usual primary key, but adds another way to retrieve the object without exposing the primary key.

Derrick Reimer

omniauth-facebook 6.0: Facebook OAuth2 Strategy for OmniAuth — Updated to use v3.0 of the FB Graph API.

Josef Šimánek

Database Cleaner 1.8: Strategies for Cleaning Databases in Ruby — A very long standing project but it’s still getting updated :-)

Ben Mabey