#472 — October 17, 2019

Read on the Web

Ruby Weekly

Debugging Hidden Memory Leaks in Ruby — Tracking down a nasty (new with Rails 6) memory leak using tools like mwrap, heaptrack, iseq_collector, and chap. If these tools aren’t in your toolbox, they might be soon!

Sam Saffron

Shrine 3.0 Released: The File Attachment Handler — Shrine is a gem for handling file attachments that supports resumable uploads and can work with Rails and standard Rack apps. This version is even more friendly to non-Active Record frameworks, among other things.

Janko Marohnić

A New Ruby SDK Gem for Rubyists to Use the Square API — The Square SDK gem makes it easy to use Ruby to process payments or store a card on file from your mobile app or web form. You can also make commerce apps that go beyond payments with orders, customers, inventory and more.

Square sponsor

How MJIT Generates C From Ruby - A Deep Dive — If you like digging into the guts of Ruby compilation and C code, this is your jam. If not, “…this may be a good week to skip this blog.”

Noah Gibbs

A Detailed Log of the Changes in Ruby 2.4 — “Ruby 2.4!?” you say, “That came out 3 years ago.” True, but zverok has continued to analyse its changes in-depth (as well as those in Ruby 2.5) which can be a handy page to skim to find those new features you simply missed or never noticed (e.g. I never knew about Integer#digits till just now).

zverok

Ruby 2.7 Introduces a Array#intersection method — Ruby 2.6 added union and difference methods to Array (which broadly work like the | and - operators), and Ruby 2.7 is going a step further with intersection that will work like the & operator.

Aditya Narsapurkar

faastRuby: An Indie Ruby Serverless Platform Shuts Down? — faastRuby was an interesting, independent serverless platform built at a time when AWS Lambda didn’t support Ruby at all. Reading between the lines, it seems the developer may have been acqui-hired by Shopify but he says he’ll be “taking down all faastRuby servers” as a consequence.

Paulo Arruda

💻 Jobs

Sr. Rails Engineer - Top Consultancy (Remote First / India) — Highly-technical Rails/React/React Native firm led by to of the top 100 Rails contributors.

BigBinary.com

Rails Developer — Help build crowdsourcing tools that democratize decision making and fight politics in large organizations.

CultivateLabs

Find A Job Through Vettery — Vettery specializes in tech roles and is completely free for job seekers. Create a profile to get started.

Vettery

📘 Articles & Tutorials

Getting Started with AWS S3 IAM Policies Security Config for Rails Apps — The joy of getting S3 bucket access and permissions often leads to incorrect and insecure configurations. Is yours configured properly?

Paweł Urbanek

Let's Hash This Out — Some history and advice on using hashes, including why the author prefers Hash over HashWithIndifferentAccess and you probably should, too.

Steve Jackson

Automate and Standardize Ruby Code Quality — Set standards on coverage, duplication, complexity, and style issues and see real-time feedback in your Git workflow.

Codacy sponsor

Exploring Linux File Locking Mechanisms in Ruby — The usage and gotchas of a couple of file locking mechanisms that discusses bits like advisory and partial file locking.

Prajjwal Singh

▶  Surviving Webpack with Ross Kaffenberger — If the introduction of Webpack into Rails 6 (via Webpacker) has caused confusion, maybe these tales of making the move will fill you with confidence.

Ruby Rogues Podcast podcast

How to Make Colors With Ruby and Bitwise Operations — We don’t see many posts about using Ruby with a Raspberry Pi and this one is particularly fun, nerdy, and colorful.

Valentino Stoll

Rails 6's delete_by and destroy_by Methods

Saeloun Blog

Rails, Webpacker, and Vue CLI Can Actually Play Nicely — This is more of a “rip it all out and then put it back a bit differently” approach to the problem, just so you know.

Andrew Hunter

🛠 Code and Tools

Humanize: A Library to Make Your Numbers More 'Fancy' — If by ‘fancy’ you mean turn into natural language versions, e.g. 15.humanize # => "fifteen" .. it supports English, Spanish, French, and 7 other languages out of the box.

Ryan Bigg

with_advisory_lock: Advisory Locking for ActiveRecord — Think of an advisory lock as a mutex that can span multiple hosts.

ClosureTree

eBook: Best Practices for Optimizing Postgres Query Performance

pganalyze sponsor

Piperator 1.0: Composable Pipelines for Enumerators — Inspired by both Elixir’s pipe operator and Node.js streams.

Ville Lautanala

Active Merchant: Shopify's Simple Payment Abstraction Library — A well-established, long-standing gem that continues to get frequent updates.

Shopify

Xcodeproj: Create and Modify Xcode Projects from Ruby — One for you macOS/iOS developers, this could help you script away boring management tasks or auto generate projects, etc.

CocoaPods