#505 — June 11, 2020

Read on the Web

📢 We've got a bit of bonus content this week in the form of an interview with Richard Schneeman at the footer of the issue :-)

Ruby Weekly

An Interview with Rails' Creator David Heinemeier Hansson — Evrone are a development company who did a pretty neat interview with Matz recently and now we have DHH too, our favorite race car driver, Basecamper, and framework creator.

Evrone

Why and How 'mkdev' Switched to Fullstaq RubyFullstaq Ruby is a “server-oriented configuration of Ruby” provided via maintained packages for RHEL/CentOS/Ubuntu, etc. It also touts reduced memory and easy updates. The ‘mkdev’ consultancy put it through its paces and shared some results here.

Kirill Shirinkin

How To Set Up A CI Pipeline For A Rails Dual Boot — Learn from Kayla Reopelle from the team over at Planet Argon how they dual boot Rails for a better upgrading experience using CircleCI.

CircleCI sponsor

The RuboCop Name Drama Redux — Last week, someone suggested renaming RuboCop, the popular Ruby static code analyzer, due to negative sentiments over the term 'cop' in regards to the police. The issue got a little heated, and here the author of Rubocop gives his perspective and explains how he wants to move forward. Whatever 'side' you're on, if any, it's clearly a tricky situation to navigate even with the best of intentions.

Bozhidar Batsov

RubyFlow: A Ruby Community Link BlogRubyFlow is a community blog we run (all you need is a GitHub account to post) and has become one of our main sources of links, so if you have a library, tutorial, or something else Ruby related, post about it there.

RubyFlow

ParallelTests 3.0: More Cores Equals Faster Tests — Speed up Test::Unit, RSpec, Cucumber, or Spinach by running in parallel across multiple CPU cores.

Michael Grosser

⚡️ Quick bits:

💻 Jobs

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

▶  Realtime Browser Updates with CableReady — A 12 minute screencast showing how to use CableReady to perform realtime browser updates using actions generated in Rails controllers, models, and background jobs. Cable Ready is the magic behind StimulusReflex.

Go Rails

▶  Rethinking the View Layer with Components with Joel Hawksley — A chat with the creator of ViewComponent about why you might want to use view components in a Rails app.

Ruby Rogues Podcast podcast

Exploring Metaprogramming in Ruby — A few metaprogramming concepts tackled at a basic, introductory level, including monkey-patching, class macros, and DSLs.

Ivan Oštrić

Best Practices For Getting A Performance Boost On Your Postgres DB

pganalyze sponsor

Linkers and Ruby C Extensions — Did you know that you can dynamically load C libraries at runtime? Did you know linkers aren’t that intimidating? Some under the hood digging.

Jake Zimmerman

Ruby Refinements — This guide is a good reference to keep around if you start seeing odd behavior using refinements.

Brooke Kuhlmann

Ruby vs Crystal Performance — The comparison uses our favorite sequence (Fibonacci) and shows some things that are a bit different for Crystal. Oh, and Crystal is much faster, but you probably expected that.

Pavel Timofeev

I Created The Same App with Rails and 'No' JavaScript — Speaking of CableReady, here’s an example of building a no custom JavaScript ‘To Do’ app with it.

Mario Alberto Chávez

🛠 Code and Tools

TestBench: A 'Principled' Test Framework — Principled in this case refers to encouraging clean tests with no superfluous syntax.

Nathan Ladd

ansible-rails: An Ansible Playbook for Rails App Deployment — Includes Lets Encrypt, Sidekiq, PostgreSQL, nginx, and Puma. Oh, and no containers in sight :-)

EmailThis

Get Up To $20,000 Free APM Usage Credits* — Switch your application monitoring to Raygun and receive up to $20,000 in usage credits*. Find out more—apply today.

Raygun sponsor

redis-rb 4.2: The Ruby Client Library for Redis — The official Ruby client for the Redis data structure server. If you’re using Redis 6’s new TLS support, you’ll want to get this. Keyword argument support for commands is now baked in too.

Redis

Regexp::Parser: A Regular Expression Parser Library — For actual tokenizing, parsing and transforming regexes themselves.

Ammar Ali

Active Record SQL Server Adapter 6.0: The SQL Server Adapter for Rails — If you’re using SQL Server 2012 or higher, this will get you up and running with Rails and Active Record.

Rails SQL Server

ROXML 4.1: Ruby Object to XML Mapping Library — A very old library that’s just got Ruby 2.7 support. Map Ruby classes to XML for bidirectional marshalling between Ruby and XML using annotation-style class methods.

Ben Woosley

Amazing Print 1.2: Pretty Print Your Ruby Objects with Style — It’s neat to see that this fork of the long standing AwesomePrint is continuing to get the updates promised.

AmazingPrint

Pallets: A Simple Workflow Engine — It claims to not be production-ready but has a nice set of features nonetheless and leans upon Redis.

Andrei Horak

Richard, a.k.a. Schneems, is a long-time Rubyist that works at Heroku. He has been a Ruby instructor and created an open-source contribution project called CodeTriage. He lives in Austin, TX.

What is your best story as a Ruby instructor?

For one class, I made a homework assignment where I wrote a bunch of failing tests and asked my students to write code to get them to pass. It was supposed to teach the Array methods as well as be an introduction to testing. Several people proudly proclaimed they were "done" super early. When I looked, they all had failing tests, and I couldn't figure out why they thought they were done. After talking to them, I realized that the output said 0 failures 10 errors and my instructions told them to look for 0 failures. The students genuinely didn't link the concept of errors and failures and were taking my words literally. They saw 0 failures and thought they were done. They didn't have any prior context with the tool, so all the red words didn't mean anything to them.

It was a fantastic reminder of how vital wording is and how much context we carry with us, even if we don't realize it. It's a lesson I have to keep having from time to time. It feels good to recognize that simple thing you do is actually a difficult task you've mastered. It's also profoundly humbling and forces me to continually strive to write better tools, docs, and blog posts.

What is one thing you wished more programmers know about Heroku?

There's a bunch of foundational features people are continually discovering. For instance, heroku run bash gets you an interactive shell where you can debug, roll back a failing build with the cli, and have our own CI service. Really though, I wished people knew all the work we do that doesn't result in a customer-facing feature but goes towards safety and stability. When some people say "I can build my own Heroku", I think it's because they don't see how much work goes into maintaining those services and doing it well.

How about a heart-warming CodeTriage story?

For the uninitiated CodeTriage is a service to get people involved in Open Source. We've got over 50,000 developers signed up over the years. I know of a few who have used the service to get commit access and get on some core teams.

When COVID-19 started getting bad, I tracked down several virus-related open-source projects and put them on the homepage and invited others to submit their own. Some of them have been very successful for example this Python web app for visualizing pathogen evolution is almost at 100 subscribers. We're living through difficult times with a lot of anxiety and uncertainty. It feels good to be able to focus some of that nervous/anxious energy towards good causes and open-source work.

What have you learned about programming in your Master's program that you didn't already know?

Ohh, this is a good one. I don't have a CS background, so the most valuable things I've learned are foundational. I learned a bunch about how operating systems work (Intro to Operating Systems), I made some of this into a short talk about how threads work. Another surprising class for me was Human-Computer Interfaces (HCI), which I loved. I learned a lot of professional/power/soft skills, such as how to effectively run a brainstorming session that I use all the time at work. I didn't even know that was a thing you could get better at.

Find out more about Richard on his website. Go sign up for CodeTriage. and get your open-source on.