Short Ruby Newsletter

Share this post

Short Ruby News - Edition #47

newsletter.shortruby.com

Discover more from Short Ruby Newsletter

A Monday summary of the articles, discussions, and news from the Ruby community
Over 3,000 subscribers
Continue reading
Sign in

Short Ruby News - Edition #47

Discover the world of Ruby in this comprehensive newsletter covering week 24 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.

Lucian Ghinda (from ShortRuby)
Jun 19, 2023
1
Share this post

Short Ruby News - Edition #47

newsletter.shortruby.com
Share

You can jump directly to a section:

πŸ‘ Our Community

πŸ‘‰Β All about Code and Ruby

🧰 Gems, Libraries, and Updates

🀝 Related (but not Ruby-specific)

More content: πŸ“š πŸ—ž 🎧 πŸŽ₯ ✍🏾 (articles, podcasts, videos, newsletters, books and slides)


πŸ’Έ For only $1.5 per week (just $6.5 a month), you can become a paid subscriber and contribute to the success of the flourishing Ruby community we all adore while receiving an ad-free version of the newsletter!!

Support the newsletter for ~1.5$/week


πŸ‘ Our Community

πŸ‘ Friendly.RbΒ announced a new speaker:Β Ayush Newatia - Use Turbo Native to make hybrid apps that don’t suck:

Source:Β @friendlyrb@ruby.social

πŸ‘ Last week Stack Overflow survey results were out, creating some discussion in our community. Here is for example, two of the discussions about it:

Source:Β @davetron5000@ruby.social
Source:Β @davetron5000@ruby.social
Source:Β @lucian@ruby.social
Source:Β @bradgessler

πŸ‘ Jason SwettΒ announced new speakers forΒ Sin City Ruby - Las Vegas Ruby Conference

Source: @JasonSwett
Source:Β @JasonSwett

πŸ‘ Southeast RubyΒ announced a new Ruby Conference in 2024 Β Subscribe for updates at southeastruby.com

Source:Β @southeastruby

πŸ‘ Ruby ConfΒ announced the tickets are on sale forΒ Rubyconf - get them at rubyconf.org

Source:Β @rubyconf

πŸ‘ Nick SchwadererΒ announced a new Hackathon for scarpe

Source:Β @schwad_rb

πŸ‘ Wroclove.RbΒ announced a new speaker:

Source:Β @wrocloverb

πŸ‘ Adrien PolyΒ launched a new project calledΒ rubyvideo.dev to β€œaggregate all Ruby-related videos in one place with searching capabilities to facilitate discovery.” The project is open-source at adrienpoly/rubyvideo

Source:Β @adrienpoly

πŸ‘‰ All about Code and Ruby

πŸͺ§ Have you considered inviting your company to sponsor this newsletter? If you are using Ruby on Rails, I think your company is a perfect fit :)

You can send the sponsorship packages info to your marketing, HR, or product management teams.

I'm happy to assist you with drafting an email. Send me a message at hello@shortruby.com I'll do my best to draft an email for you to send inside your organization.


πŸ‘‰Matt SwansonΒ shared a screenshot from a discussion in Github about Strada where it seems that David Heinemeier Hansson announced that Strada will be launched at Rails World and presented by Jay Ohms:

Source:Β @_swanson

πŸ‘‰ Joel DrapperΒ shared a perspective about thinking about types in Ruby:

Source:Β @joeldrapper@ruby.social

Noah GibbsΒ replied, but I invite you to read the entire conversation about checking and testing:

Source:Β @codefolio@ruby.social

πŸ‘‰ Kuba SuderΒ shared a piece of Ruby metaprogramming for defining a custom Sinatra logger:

Source:Β @mackuba@ruby.social

πŸ‘‰ AristΓ³teles CoutinhoΒ shared a code sample showing pattern matching with types in an initializer:

Source:Β @aristotelesbr@ruby.social

πŸ‘‰ Nate BerkopecΒ shared that Gusto did not see a performance improvement after upgrade to YJIT:

Source:Β @nateberkopec

Jean BoussierΒ shared that they see performance improvements at Shopify:

Source:Β @_byroot

πŸ‘‰ Andrew HodsonΒ shared a code sample showing Rails 7.1 Comparison Validator:

Source:Β @MyBuddyAndrew

πŸ‘‰ Ruby CademyΒ shared a code sample showing the difference between not and !@

Source:Β @RubyCademy

Drew BraggΒ replied with an explanation about how not works:

Source:Β @DRBragg

As a valued reader, your support is crucial for this publication to continue providing new posts. By becoming a subscriber, whether free or paid, you will contribute to the sustainability of my work.


πŸ‘‰ DavidΒ shared how to configure View Component to raise errors on deprecations in development and test environments, specifically on slot_name syntax:

Source:Β @dcyoung_dev

πŸ‘‰CollinΒ sharedΒ a code sample from Forgive Us Our Sends about join that does not need flatten called before:

Source:Β @collin_jilbert
Source: https://forgiveusoursends.com/blogs/day-in-the-life-june-2023

πŸ‘‰Matt SwansonΒ shared a code sample showing how they work with Form Builder in Rails in a discussion about how to make Form Builder more flexible:

Source:Β @_swanson
Source:Β @_swanson
Source:Β @_swanson

Brad GesslerΒ also shared about improving form builders:

Source:Β @bradgessler

πŸ‘‰ Marc KΓΆhlbruggeΒ shared a code sample showing how to add a validator to Rails and filter disposable emails:

Source:Β @marckohlbrugge
Source:Β @marckohlbrugge

πŸ‘‰ Marco RothΒ shared a browser console warning with did you mean message:

Source:Β @marcoroth_

πŸ‘‰ Kevin NewtonΒ shared that YARP docs got better and invited people to contribute atΒ ruby.github.io/yarp

Source:Β @kddnewton

πŸ‘‰ Jason ZimdarsΒ sharedΒ a video (click to see the video embedded in tweet) showing an exploration of using View Transitions API - Web APIs in Hey

Source:Β @jasonzimdars

πŸ‘‰ Andrew HodsonΒ shared about the Object#presence added by ActiveSupport in Rails:

Source:Β @MyBuddyAndrew

πŸ‘‰ IΒ shared a quote from Sandi Metz about code design:

Source:Β @lucianghinda

πŸ‘‰ Marc KΓΆhlbruggeΒ shared the list of gems they are using forΒ Room AI

Source:Β @marckohlbrugge

Here is the shared list with Mark notes:

  • rails - obviously

  • puma - server of choice

  • pg - postgres ftw!

  • turbo-rails - interactive apps without JS

  • stimulus-rails - if I need to write JS after all

  • importmap-rails - sane way to deal with JS deps

  • tailwindcss-rails - sane way to deal with CSS

  • sidekiq-ent - advanced background processing

  • http - best gem for making http requests

  • pay - easy stripe integration

  • authentication-zero - devise without the headache

  • heroicon - icons by tailwindcss team

  • haml-rails - easier to write than HTML

  • replicate-ruby - run AI models

  • omniauth - for Google/Apple sign in

  • dry-initializer - simplify initializers

  • rqrcode - generate QR codes

  • strong_migrations - dont mess your DB

  • notable - track of weird requests

  • blazer - business analytics

  • pghero - fix DB performance

  • lograge - make your logs more useful

  • neighbor - similarity search w/ pgvector

  • memoist - easy memoization

  • pagy – fast pagination

  • ahoy_matey - self-hosted analytics

  • ahoy_email - email analytics

  • bcrypt - secure passwords

  • active_storage_validations - self-explanatory

  • premailer-rails – inline your email CSS

  • bugsnag - bug tracking

  • skylight - performance monitoring

  • cloudflare-rails - fix request.remote_ip on cloudflare

  • letter_opener - preview what emails look like

  • factory_bot_rails - fixtures but nice

  • faker - generate fake data for tests

  • mocha - mocking/stubbing for minitest

  • hotwire-livereload - reloads browser

  • cuprite - headless chrome for tests

πŸ‘‰Ruby CademyΒ shared a code sample showing the difference between safe navigation operator and try:

Source:Β @RubyCademy

πŸ‘‰ Nick SchwadererΒ shared a preview of a new Ruby desktop app:

πŸ‘‰ Mario SchΓΌttelΒ shared a code sample about building a Boolean Validator in Ruby on Rails:

Source:Β @marioschuettel

🀞 I imagine that if you have read this so far, you find value in this newsletter.

This is a free publication that relies on the support of its readers. If you'd like to stay updated on new posts and help me continue my work, please consider subscribing for free or choosing a paid subscription.


🧰 Gems, Libraries, Tools and Updates

🧰 Peter ZhuΒ announced that they open-sourced the Ruby builds they use at Shopify. Read more at Open Sourcing Shopify’s Ruby Builds and project is at Shopify/ruby-definitions

Source:Β @peterzhu2118

🧰 Rubymine published a new Early Access Preview 2023.2 EAP 4. This release has:

Source: https://blog.jetbrains.com/ruby

🧰 Samuel Williams announced that Rails 7.1 will work with Rack 3 Read the entire PR that groups all work needed for this

Source:Β @ioquatix@ruby.social

🧰 Peter Zhu submitted a PR to Ruby about Remove transient heap:

Source: https://github.com/ruby/ruby/pull/7942

🧰 Truffle RubyΒ announced a new release of Truffle Ruby 23.0 and a new distribution called Oracle GraalVM under GraalVM Free Terms and Conditions (GFTC) licenseΒ  that seems to be β€œfree for development and production use”:

Source:Β @truffleruby@ruby.social

🧰 Mike Perham published a new update for Sidekiq version 7.1.2 Read the changelog

🧰 Kirill Platonov announced a new release of polaris_view_components that upgrades Polaris 10 to View Component 3 Read the release notes

🧰 Andrea Rocca shared a gem they were happy discovering called query_diet:

Source: https://github.com/makandra/query_diet

🧰 Jeremy Evans announced a new release of Roda 3.69.0 Released · jeremyevans roda · Discussion #325

Source: https://github.com/jeremyevans/roda/discussions/325

🧰 Konnor Rogers shared a gem they discovered called isorun: Run JavaScript applications in your Rails application. Here is the list of features:

Source: https://github.com/eliias/isorun

🧰 Petrik De Heus announced a fork of motion-turbolinks at p8/motion-turbo-ios: Turbo Native iOS for RubyMotion apps

Source:Β @four54

🧰 Alex Lion announced a new release for alxlion/eyeloupe: The elegant Rails debug assistant - Read changelog for 0.3.0

Source: https://github.com/alxlion/eyeloupe/releases/tag/v0.3.0

Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). Your contribution aids growth and maintains the quality of ShortRuby for everybody while receiving an ad-free version:

Support the newsletter for ~1.5$/week

If you consider upgrading and want more information, please read Why to subscribe to paid


🀝 Related (but not Ruby-specific)

🀝 Jason Swett shared about testing:

Source:Β @JasonSwett

🀝 Chris Wanstrath shared about how Github readme for an empty repo was created:

Source:Β @defunkt

🀝 Alex Lion shared about moving out of PaaS to bare metal.

Source:Β @alxlion_

Before making this change I think it will be great if you read also this article 11 years of hosting a SaaS by Alex Ghiculescu.


More content: πŸ“š πŸ—ž 🎧 πŸŽ₯ ✍🏾

πŸ“š Books

πŸ“š Jason SwettΒ shared a small introduction for his new book about ChatGPT:

Source:Β @JasonSwett

πŸ—ž Newsletters

πŸ—ž Sara Jackson published a new edition of This Week in Open Source (June 16, 2023) - β€œIn the past week we saw updates to Art Vandelay, Administrate, Shoulda Matchers, and our dotfiles.”

πŸ—ž Ruby WeeklyΒ published a new edition about Exciting developments in Ruby parsing

πŸ—ž Allison Pike published a new edition of Once a Maintainer: Josh Branham - β€œcontributor to the popularΒ attr_encrypted gem and the person who made it compatible with Rails 7”

πŸ—žAny CableΒ published a new edition of Any Cables Monthly #10

πŸ—ž Greg MolnarΒ published a new edition ofΒ Active Record Transactions - Rails Tricks Issue 10

πŸ—ž ZzakΒ published a new edition ofΒ This Week in Rails - June 16, 2023 - β€œTighter security with SSL enabled as a default in production, expanded PostgreSQL enum support, and more”

πŸ—ž Ruby Radar published a new edition Father's Day 2023 Edition

🎧 Podcasts

🎧 Jason Swett published a new episode of The Code With Jason Podcast about 185 - Test Suite Performance with Vladimir Dementyev

🎧 The Ruby On Rails Podcast published a new episode about Episode 474: Ship to Learn (Github and AI) with Kyle Daigle

πŸ“½οΈ πŸŽ₯ Videos

Talks

πŸ“½οΈ FastRuby published a video and the slides for the workshop Fortify Rails - Defending Your Ruby on Rails Applications from Bad Actors

πŸ“½οΈ Creston JamisonΒ published a new episode of Rubber Duck Dev Show aboutΒ Palantir & Testing in Dragon Ruby with Kevin Fischer

πŸ“½οΈ Nick SchwadererΒ published a video where Noah Gibbs does a Walkthrough of the Scarpe framework code

πŸ“½οΈ Samuel WilliamsΒ shared they updated their YouTube playlist aboutΒ Ruby Async Presentations

Screencasts

πŸŽ₯Β Β Yaroslav ShmarovΒ publishedΒ a new video aboutΒ Rails 7Β #135Β Export videos from ANY Youtube channel using Youtube API

πŸŽ₯Β Β Dean De HartΒ published a series of videos:

  • Thredded Gem for Forums (Reddit Clone) | Ruby on Rails 7 Tutorial

  • Creating A Private Ruby Gem for Ruby on Rails 7

  • Your First Rails Engine | Ruby on Rails 7 Gem Tutorial

  • Private Gem Repositories in your Gemfiles | Ruby on Rails 7 Tutorial

  • Devise Single User Sessions in Ruby on Rails 7

πŸŽ₯ GoRails published a new video about Adding a Highlight Button to Trix

πŸŽ₯ Hanami MasteryΒ published a new video aboutΒ Send emails with hanami-mailer

πŸŽ₯ Pete HawkinsΒ published a small video on Twitter about using Modules

πŸŽ₯ Dr Nic WilliamsΒ published a video aboutΒ 80% users want Dark Mode - How to add to Jumpstart Pro

✍🏾 Articles

What’s new

Nate Berkopec published an article about How We Made Gusto Page Loads 40% Faster: β€œFor businesses with 25 or more employees, pages load 1.4 times faster. After loading gusto.com for the first time, navigations in Gusto are 2 times faster. For smaller businesses, page loads are 1.2 times faster, and all navigations after the first are now 1.8 times faster. Gusto’s internal customer support tools are faster, too: 30% faster than a year ago”

Nicholas Van Doorn published an article about Reducing Solidus Memory Usage with jemalloc β€œThis post aims to discover if improving performance is possible without changing any code or adding extra costs to our production infrastructure. We will test the jemalloc project on a production Solidus store to see if we can improve some memory usage issues without negatively impacting response time”

Kevin MenardΒ published an article announcing thatΒ TruffleRuby in Shopify CI β€œI’m happy to say our internal CI system recently added support for TruffleRuby in both release and snapshot builds. We utilizeΒ ruby-buildΒ to handle the installation, enabling us to use TruffleRuby’s published snapshot builds instead of waiting for the interpreter to be compiled from source”

Alessandro RodiΒ published a new article aboutΒ Rubyday 2023 - A great come back!

How-Tos

Hanami Mastery published an article about WIP: Unofficial guide for upgrading Hanami 1.x -> Hanami 2.x β€œThis is an unofficial, community-maintained guide to help upgrading projects that are built on Hanami 1.x to Hanami 2.x”

Matt Brictson published an article about Applying a Rate Limit inΒ Sidekiq β€œI discovered an easy way to implement job throttling using the ruby-limiter gem and the new β€œcapsules” feature of SidekiqΒ 7”

Akshay KhotΒ published a new article about Practical Stimulus: How to Toggle CSS Classes β€œThis second article in the 'Stimulus in Practice' series shows how you can work with HTML classes using Stimulus. Specifically, we'll learn how to toggle classes on an element. This is useful when you want to show or hide certain elements or update the design in response to user interaction”

Benito SernaΒ published a new article aboutΒ A form with two buttons with formation and formmethod β€œImagine that you are building a custom CMS. Within the form to edit anΒ Article, you need to have two buttons: a normal β€œSave” button and a new β€œSave and publish” button. And maybe, additionally, you will need a third button to delete the article”

Greg MolnarΒ published an article aboutΒ Deploying a Rails app with MRSK β€œIn this tutorial, I will show you how to: deploy a Rails app to a VPS, run Caddy in front of the docker container to handle SSL, use a hosted database server, run Redis on the same droplet, run a worker to process background jobs”

Julian RubischΒ published a new article aboutΒ Setting Up Business Logic with DCI in Rails β€œwe will introduce another alternative that more naturally fits the mental models we apply when reasoning about the behavior of our applications: DCI (Data, Context, Interaction) for Rails”

MafulΒ publishedΒ a new article aboutΒ How I use Nano ID in Rails β€œNano ID is a tiny, URL-friendly, and unique string ID generator. Nano ID is a library for generating random IDs that still have probability of duplicate IDs. However, this probability is extremely small and it is based on the rules you defined”

Deep Dives

Akshay KhotΒ published an article about Blocks, Procs, and Lambdas: A Beginner's Guide to Closures and Anonymous Functions in Ruby β€œClosures and anonymous functions are very useful concepts, especially in functional programming. Ruby makes working with them a pleasure via its flavors like blocks, procs, and lambdas. This post provides an in-depth tutorial and shows the subtle differences between them”

Kevin NewtonΒ published an article aboutΒ Rewriting the Ruby parser β€œAs of the date of this post, YARP can parse a semantically equivalent syntax tree to Ruby 3.3 on every Ruby file in Shopify’s main codebase, GitHub’s main codebase, CRuby, and the 100 most popular gems downloaded fromΒ rubygems.org. We recently got approval to merge this work into CRuby, and are very excited to share our work with the community. This post will take you through the motivations behind this work, the way it was developed, and the path forward”

JuliΓ‘n PinzΓ³nΒ published a new series of articles aboutΒ Unlocking the power of forms in Rails, Diving Deep: Action View Form Helpers, The Potential birth of AttributeBuilders

Related

I published two new articles: Why write technical content on a blog and not only on social media and A simple idea of how to grow the Ruby community

Richard Schneeman published an article about What is github.com/zombocom and why most of my Ruby libraries there? β€œThe other day I got another question about the zombocom org on GitHub that prompted me to write this post. This org, github.com/zombocom, holds most all of my popular libraries). Why put them in a custom GitHub org, and why name it zombocom? Let’s find out.”

Jorge ManrubiaΒ published an article aboutΒ Remote struggles β€œThe failed experiment wasn't remote work but rewiring your company from the ground up. That makes for a less clickable headline, though, and is probably a harder pill to swallow for the people running the show”

Vadim Demedes published an article aboutΒ Generating income from open source


Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). Your contribution aids growth and maintains the quality of ShortRuby for everybody:

Support the newsletter for ~1.5$/week

If you consider upgrading and want more information, please read Why to subscribe to paid.

1
Share this post

Short Ruby News - Edition #47

newsletter.shortruby.com
Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

Β© 2023 Lucian Ghinda
Privacy βˆ™ Terms βˆ™ Collection notice
Start WritingGet the app
Substack is the home for great writing