#503 — May 28, 2020 |
Ruby Weekly |
The Results of a Survey into RuboCop's Defaults — Over 700 RuboCop users were surveyed about their preferences around the popular code analyzer and formatter’s default settings. The results make for interesting reading: the majority went for single-quoted string literals, a 120 character line limit, and never using Bozhidar Batsov |
delete_in_batches: A Fast Way to Delete with Active Record — Bills itself as “the fastest way to delete 100k+ rows with ActiveRecord” by deleting rows in batches. Usually I’d have a skeptical look on my face at such a bold claim, but given the author, I’ll try this out next time I’m wiping Andrew Kane |
Happy Rails Deployments with Cloud 66 — The simplicity of Heroku on your own servers. Deploy your Ruby, Rails, Sinatra and Rack application to any cloud or server. Try it free and get extra $66 free credits with the code: Cloud 66 sponsor |
VCR 6.0: Record Your Test Suite's HTTP Interactions and Replay Them — A long standing library for recording HTTP interactions and replaying them during testing. 6.0 needs Ruby 2.3 or newer, supports Faraday 1.0, and removes old JSON library dependencies. They’re also seeking more maintainers, if you can help. VCR |
Creating a Ruby Gem with Rust — Rust is an increasingly popular compiled, safety-first systems programming language and calling libraries built with it via Ruby FFI is pretty easy. Richard Patching |
Quick bytes:
|
💻 Jobs |
Engineering Manager Backend (f/m/x) — Grow and work with our backend team in an amazing environment, providing a personal educational budget and 30d of vacation. HOMEDAY |
Software Developer at Dr. Bill (Canada Only - Vancouver BC or Remote) — Dr. Bill helps Canadian doctors save time by streamlining their billing. Join our team for our next phase of growth. Dr. Bill |
Find a Job Through Vettery — Vettery specializes in tech roles and is completely free for job seekers. Create a profile to get started. Vettery |
ℹ️ Interested in running a job listing in Ruby Weekly? There's more info here.
📘 Articles & Tutorials |
Never Query the Same Thing More Than Once — A real-world refactoring aimed at reducing the number of calls to the database. These posts will always teach you something. John Nunemaker |
From 25 Minutes to 7 Minutes: Improving the Performance of a Rails CI Pipeline — “For every minute we speed up our CI environment, we see a correlation of engineers landing 2% more Pull Requests per week.” More PRs == more work done. Kelly Sutton |
Rails 6.1 Adds Support for Signed IDs to Active Record — You could use this in some situations where you might currently use tokens, where you want to be sure that someone is only referring to a specific ID if they’re really meant/have permission to. Rohit Kumar |
Opening The Ruby Concurrency Toolbox 🛠 — Browse Ruby's concurrency toolbox and learn how each tool works so you can compare them or even build your own Sidekiq. Honeybadger sponsor |
Two Commonly Used Rails Upgrade Strategies — You can create a separate branch and bring that up to speed before merging it in or.. you can take baby steps by ‘dual booting’ your app up the versions. Luciano Becerra |
▶ Setting Up a New Mac for Development — You’d need to be dedicated to the cause to watch all of this video, IMHO, but nonetheless, it’s neat to skim through and see how an experienced developer sets up a new Mac from scratch for Ruby and JavaScript development work. Justin Searls |
Speeding Up Rails with Memoization — Memoization is the idea of saving/caching a method’s return value so it can be more rapidly returned in future (rather than recalculating it from scratch). This is really an introduction to memoization in Ruby but touches on some Rails use cases at the end. Jonathan Miles |
A Quick Comparison of Approaches to Multitenancy in Webapps — ‘Multitenancy’ is simply the idea of having a system support numerous end-users, such as a webapp that has numerous users. There are a few ways to deal with this in Rails whether at the row level (e.g. a Tomasz Wróbel |
Catch a Batch: Making Mayhem 5 Times More Responsive — Mayhem is a community gaming platform that includes real-time scoreboards, chat, and more. It uses Ruby and GraphQL, so performance profiling had to be invented by Martians. Martian Chronicles |
🛠 Code and Tools |
pry-rescue: Start a Pry Session Whenever Something Goes Wrong — If you use the turbo charged Ruby shell Pry, consider adding this to your arsenal. You run your script with Conrad Irwin |
Jekyll 4.1.0 Released — The popular static site generator adds excerpts for pages and updates to some common filters. Ashwin Maroli |
Dynamoid 3.5: A Ruby ORM for Amazon's DynamoDB — Get an ActiveRecord-esque for DynamoDB which is kinda interesting given that DynamoDB is famously a NoSQL database. Dynamoid |
On Heroku? Now You Can Autoscale Sidekiq, Resque, DJ, and More Rails Autoscale sponsor |
webmention-client-ruby: A Ruby Gem for Sending Webmention Notifications — Webmention is a “web standard for mentions and conversations across the web” so you can federate comments, likes, and other social media interactions without having to rely on a specific platform. IndieWeb |
PgHero 2.5: A Performance Dashboard for Postgres — Built in Ruby, of course :-) Andrew Kane |
Rambulance: Dynamically Render Error Pages for Rails Apps — Now supports Ruby 2.7. Yuki Nishijima |