Ruby Weekly

View the entire history of the Ruby Weekly newsletters

Issue #481

19 Dec 2019 »

#481 — December 19, 2019

Ruby Weekly

Hi! As is traditional for the final Ruby Weekly of the year, we're doing a roundup of the most popular items of the year, but we'll be back on January 2 with a special Ruby 2.7 issue as the final version of Ruby 2.7 should be released on Christmas Day.

Thanks for your continued support, we really appreciate it. See you in two weeks for the Ruby 2.7 news!
— Peter Cooper, Glenn Goodrich and the Cooperpress team

🏆 The Top 6 Ruby Items of 2019

Three ActiveRecord Mistakes That Slow Down Rails Apps — Our most popular link came in just the third issue of the year. Nate Berkopec wrote a thorough piece on the performance perils of count, where, and present? and advice for improving your own use of them.

Nate Berkopec

The Ruby Style Guide Got a Major Facelift — This remains a one-stop-shop for how to write Ruby code that can be easily read and maintained by other Rubyists.

Bozhidar Batsov

A Guide to Function Composition in Ruby — Ruby 2.6’s introduction of the << and >> function composition operators opened up some interesting new techniques and this article toured them deftly.

Paul Mucur

Introducing Automated Postgres EXPLAIN Plan Insights on pganalyze — pganalyze now can automatically collect EXPLAIN plans and provide a visual representation of your costliest plan nodes and more helpful insights into your Postgres database. Learn more about all new EXPLAIN plan features in this blog post.

Pganalyze sponsor

Matz Said Bye Bye to the Pipeline Operator |> — Along with all the excitement of what is coming in Ruby 2.7, we also got an update on something that wouldn't be making the cut. The ‘pipeline operator’ was a piece of syntax added to Ruby head on an experimental basis as an alternative to method chaining, but Matz said it caused ‘more confusion and controversy’ than he had expected. The .: operator was also cancelled.

The Ruby Programming Language

Rails 6.0 Was Released — This year saw a very significant Rails release which, by this point, you're probably more than familiar with.

Official Rails Blog

A Ruby 3 Progress Report — Ruby 3 is (still) due to be released in 2020 and progress is looking good. This was only a slidedeck and is several months old now, but still does a good job of illustrating the main points.

RubyKaigi 2019 slidedeck

💻 Jobs

Software Engineer, Product (San Francisco, Denver, New York City) — We’re looking for Engineers to help our Product Engineering teams serve 100,000 small businesses with our payroll, benefits, and HR software suite.

Gusto

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

Vettery

📘 Top Articles & Tutorials of 2019

How to Create a CRUD App with Rails and React — An incredibly thorough tutorial covering fronting a Ruby on Rails API with a React client along with linting, flash messages, and handling 404s in React.

James Hibbard

42 Performance Tips for Rails Developers — A collection of pretty brief tips, but at least a few are likely to help you, whoever you are (most are not Rails specific). Covers things like eliminating N+1 queries, using HTTP2, and using rack-mini-profiler.

Magnus Skog

Magic Comments in Ruby — You’ve likely seen (and even used) ‘magic’ comments, but you probably don’t know all of them or understand things like precedence.

Mehdi Farsi

What Is a CI/CD Engineer? — Find out how a new role devoted to CI/CD could help teams hyper-optimize their pipelines and speed up development.

CircleCI sponsor

10 New Things in Active Record (in Rails 6) — A neat roundup that covers things like rails db:prepare, database switching, #annotate, #touch_all and implicit ordering by a specific column (which is nicer than using a default scope).

Jason Dinsmore

Rails on Windows Is Not Just Possible.. It's Fabulous — Ruby and Rails development on Windows has been pretty frustrating for well over a decade. Microsoft’s strides to accommodate the Unix way of life via WSL2 and VS Code have changed that in a big way and Ruby on Windows has had an encouraging 2019 (if only by means of going via Linux).

Scott Hanselman

Why Does My App's Memory Use Grow Over Time? — Ruby’s memory allocation algorithm is not quite what you might think. As you add threads, considering the per-thread and across-all-threads impacts are necessary to get a firm picture of what is happening.

Richard Schneeman

🛠 Top Code and Tools of 2019

Sorbet – A Fast, Powerful Type Checker for Ruby — Stripe had been working on a type-checker for Ruby for quite some time and this year they finally placed it in our hands to try.

Sorbet

7 Great Ruby Gems Most People Haven’t Heard About — Some good picks here, from finding dead routes and code to making your tests faster. I’d already heard of 4, but I write a Ruby newsletter so... 😄

Jesus Castello

Track Ruby App Performance with End-To-End Tracing Using Datadog’s Flame Graph

Datadog APM sponsor

Runbook: A Ruby DSL for Gradual System Automation — PayPal-owned Braintree uses this to automate their deployment preflight checklists, on-call playbooks, system maintenance operations, and more. And now, you can too. A neat idea.

Patrick Blesi

Sidekiq 6.0 Released — The popular background job framework reached 6.0 by both adding (logging formatters, ActiveJob integration) and taking away (init.d daemons). 6.0.3 is the latest version as of right now.

Mike Perham

HTTPX: A Ruby HTTP Library 'for Tomorrow' — httpx has a slew of features, the most interesting being HTTP/2 support and concurrent requests by default.

HoneyryderChuck

Opal 1.0: The Ruby to JavaScript Compiler — A release that was seven years in the making, Opal is now faster, supports more Ruby features (such as Module.prepend) and has a promising roadmap for those that want Ruby in the browser (though WebAssembly also holds promise on that front in 2020).

Elia Schito

Faker 2: A Library for Generating Fake Data — The popular ‘fake’/dummy data generator continues to improve by including fake data generators for almost everything. 2.9.0 just came out too.

Faker

TTY::Logger: Structured, Attractive Logging on the Terminal — Nice looking colorized and formatted logging.

Piotr Murach

©