- Short Ruby Newsletter
- Posts
- Short Ruby News - Edition #55
Short Ruby News - Edition #55
Discover the world of Ruby in this comprehensive newsletter covering week 31 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.
You can jump directly to a section:
š Our Community
š Events
More content: š š š§ š„ āš¾ (articles, podcasts, videos, newsletters)
Looking for sponsors š¤
Friendly RB is a friendly Ruby conference, happening on 27-28 September in Bucharest, Romania. Tickets are already sold out! We are just looking for few more sponsors.
There are 6 spots available for Community Sponsorship at only $1250."We are looking for sponsors to partner with us in bringing a new and unique European conference. Sponsorship funds will go toward keeping ticket costs low, honorariums for conference speakers, and video recording"If you think your company might want to sponsor this conference please write to [email protected].
š Our Community
This is about:
Do you know someone who has consistently gone above and beyond to help others, who has shaped discussions, answered countless questions, triaged bugs, added particularly helpful features, or introduced us all to innovative new ideas?
Nominate these exceptional individuals who you believe deserve to be recognized using the form below.
š Ian shared #helloworld_rb
š Events
š Lucas Barret announced they plan to launch a new podcast:
š Ogom shared Osaka RubyKaigi 03
š Juliana Dias announced that Tropical Ruby 2024 is back
š Friendly.Rb announced a new speaker "Let there be docs!" with Svyatoslav Kryukov - Friendly.rb - Your friendly European Ruby conference
š Avi Flombaum shared they are looking for a space for NYC on Rails | Meetup
š Ruby Conf Thailand shared Schedule | RubyConf TH 2023
š Euruko shared Euruko 2023 agenda:
š Ruby Conf announced their first speaker RubyConf Homepage
š All about Code and Ruby
š Yukihiro Matz shared about methods in Ruby:
Please consider upgrading to paid to support this newsletter and get an ad-free version.Or if you have a product or service, book or event (even better if they are built with Ruby) that you want to promote in this newsletter consider choosing one of the sponsorship packages
š I shared a thread with some insights from Stack Overflow survey:
š Postmodern asked about error key for validating belongs_to:
And it seems that the response could be:
šNithin Bekal shared their article Ruby's bang methods - Handle with care! with a code sample:
š Takashi Kokubun shared about Ruby 3.3 YJIT improvements:
Takashi also shared a merged PR YJIT: Compile exception handlers:
š Donn Felker asked for recommendations of Sidekick config:
š Nick Bradley shared #diff method for Ruby Data classes
Victor Shepelev replied with another code sample:
š Thomas Countz shared a thread about closures in Ruby:
And he also shared how they used this in a gem:
š @[email protected] asked about how to start TDD:
Here are some of the replies:
š Prabin Poudel asked about using JSON type column in PSQL:
Here are some of the replies:
š Ruby Cademy shared how to configure Rails COnsole Prompt to show environment:
Here is a similar tip shared a while back by Matt:
š Rob Zolkos shared how to define a relation between users and teams:
Stephen Margheim proposed an improvement:
š Samuel Williams shared about the performance of sus test runner:
š Ruby Cademy shared about using Faker random to get the same results:
š Harrison Broadbent shared a tip about using y to print data in YAML format in Rails:
š Kevin Newton shared a tip about using Integer#anybits?
š Gavin Morrice asked about why create setters and getters instead of using ivars:
š Kevin Newton shared about redefining Integer#-@
š Kevin Newton shared about magic comments:
š Greg Navis shared a thread about Active Jobs callbacks:
š Jeremy Smith shared the code to create an Alternative approach to drag and drop sorting with acts_as_list
š Janko MarohniÄ asked about the approach to store session in DB and store session ID in cookie:
The replies are mostly pointing out either the limitation of 4KB or the security feature to be able to logout from all sessions:
š§° Gems, Libraries, Tools and Updates
š§° Rafael Franca announced the release of Rails 7.0.7. Read the full changelog here
š§° Sinatra announced a new release of version 3.1 that has new features:
š§° Avo announced that Avo 3 beta is now open ā Avo 3 Beta
š§° Jeffrey Phillips Freeman announced their new gem called abstractify ā a gem to create abstract classes in Ruby:
š§° Avi Flombaum shared a repo that has configuration for A simple TailwindCSS powered Github Pages Starter
š§° Marco Roth announced the release of a new version for Stimulus ā Release v3.2.2 Ā· hotwired/stimulus
š§° Kevin Newton announced the first version of yarp gem
š§° Benjaminwood shared a tip about upgrading RSpec Fix and_call_original for Ruby 3.2 by igor-drozdov Ā· Pull Request #1552 Ā· rspec/rspec-mocks
š§° Yasuo Honda announced a release of a new version activerecord-oracle_enhanced
š§° Jeremy Evans announced a new release of hanna-1.5.0 and hanna-nouveau 1.5.0 Released Ā· jeremyevans hanna Ā· Discussion #23
š§° Stan Lo shared a merged PR for IRB about Drop showing indent level number in DEFAULT prompt and INF_RUBY prompt by tompng Ā· Pull Request #679 Ā· ruby/irb
Thank you for reading Short Ruby Newsletter. This post is public, so feel free to share it.
š¤ Related (but not Ruby-specific)
š¤ Julian Rubisch shared a thread (read on nitter) with the result of a survey they did about Tech Debt. I added here only one of the data shared:
š¤ Justin Jackson shared how to block GPT bot to access your website OpenAI Platform
š¤ Gergely Orosz asked about how to think about moving to the manager path:
š¤ Adrian Oprea shared an advice about naming:
š¤ Julian Rubisch shared what does it mean to be a senior:
š¤ Maple Ong shared a tip about accessing the PR diff on Github:
š Naofumi Kagami å ć ē¾ē“å² shared about TDD:
More content: š š š§ š„ āš¾
š Jason Charnes shared an update about Active Record Cookbook:
š Jason Swett asked for community help to meet people working at AI tech products:
š Joe Masilotti shared an update about their Turbo Native book:
š Newsletters
š Ruby Weekly published a new edition #666 - Sinatra 3.1 released
š Allison Pike published a new edition of Once a Maintainer about Brendon Muir ā āBuilding tools for primary schools in New Zealand using Railsā
š Greg Molnar published a new edition of This Week in Rails: A new release, Action Mailer preview empty states, bugfixes and more!
š Ruby LibHunt published a new edition of the Issue 377 - Two Garbage Collection Improvements Made Our Storefronts 8% Faster
š Any Cable published a new edition about Any Cables Monthly #12
š§ Podcasts
š§ Remote Ruby published a new episode about Hackathon - Strada - Rails World
š§ The Ruby on Rails Podcast published a new episode about Episode 482: Everything is Awe(ful)some! (Brittany + Brian)
š§ The Bike Shed published a new episode about 396: Build vs. Buy
š§ Rooftop Ruby published a new episode about 22: Abstraction Goes All the Way Down
š§ Indie Rails published a new podcast about IndieRails | Nadia Odunayo - Building The StoryGraph
š§ Maintainable Software Podcast published a new podcast about Ahmed Wasfy - Thriving as an Engineering Manager
š½ļø š„ Videos
š½ļø Avi Flombaum streamed during the weekend a series of videos about courseguide.ai - here is the planning session and here is the coding session
Screencasts
š„ Yaroslav Shmarov published new videos about:
š„ Dean De Hart published new videos about:
š„ Nick Sutterer published a new video about How to nest operations in Trailblazer
š„ Phil Smy published a new video about How To Integrate Chatgpt With Rails 7: Step-by-step Tutorial
š„ David Kimura published a new episode about PDF Reader
š„ Pete Hawkins published a new video about Building a ChatGPT bot using Ruby on Rails
š„ Ruby Cademy published a new video about Redirect the Use of the JSON Library to Implement a Powerful Data Import pattern
š„ Jeremy Smith published a new video about Alternative approach to drag and drop sorting with acts_as_list
āš¾ Articles
Whatās new
Avi Flombaum published the 4th part of their series about An ActiveStorage S3 Direct Uploader: Part 4 - Bonus Features ā āJust for fun, I thought we'd add a feature where after the upload is complete we display an audio player for the track that was just uploadedā
Gowsik Vivekanandan published a new article about Rails 7.1 Store secret_key_base In Credentials For Local Environment ā āIn the latest stable version of Rails (Rails 7.0.6), secrets is used for storing the secret_key_base in the local environment. However, from Rails 7.1 onwards, secret_key_base will be moved to credentialsā
Gift Egwuenu published a new article about July 2023 RubyGems Updates ā āAs part of our efforts at Ruby Central, we publish a recap of the work that weāve done the previous month. Read on to find out what updates were made to RubyGems and RubyGems.org in Julyā
Alkesh Ghorpade published two new articles about whatās new in Rails 7.1: Rails 7.1 adds the ability to raise errors on missing callback actions ā āRails 7.1 allows configuring the controllers to raise an error when a callback's only/except options have missing actionsā and Rails 7.1 adds the ability to defer the unique constraints in PostgreSQL ā āRails 7.1 adds the ability to defer the unique constraints in PostgreSQL. You can use the add_unique_key command and pass the deferrable option to do this. The deferrable option can take two values: immediate and deferredā
Jorge Manrubia published a new article about Difficult and complex ā āBeing able to run a marathon is very difficult. But what you have to do to prepare is simple. A small sheet of paper is enough to describe the steps. You will need tremendous effort and discipline - so itās hard - but it is simpleā
I wrote an article about Insights from Stack Overflow Developer Survey 2023 about Ruby where I share key takeaways about Ruby from the 2023 Stack Overflow Developer Survey.
Kartikey Tanna publish an article about Understanding the Role of the `schema.rb` File in Rails Development ā āI've recently had a thought-provoking discussion on LinkedIn Ruby on Rails group about the role of the schema.rb file in Rails development, particularly concerning its authority over the database schema. The conversation evoked mixed reviews, and I thought it might be interesting to bring the topic to dev.to and get more insightsā
Deep Dives
Peter Zhu published a deep dive about Two Garbage Collection Improvements Made Our Storefronts 8% Faster ā āwe found two improvements in Rubyās garbage collector that improved the average garbage collector performance by 46%, which translated to a decrease in average response time by 8% and 99th percentile response time by 25%ā
Akshay Khot published two articles this week: One about Using Zeitwerk Outside Rails ā āThis article shows how to use the Zeitwerk gem to autoload classes and modules in a Ruby app that's not using Rails. We'll also learn how Rails configures Zeitwerk internally and introduce the concept of models in our no-rails Ruby web applicationā and another one about How to Implement Content Security Policy in Rails ā āThis article shows how to implement content security policy in your Rails applications to protect against cross-site scripting (XSS) vulnerabilityā
Jeremy Friesen published an article about Skipping Your Parent to Go to Your Grandparent: Leveraging Ruby's super_method Method ā āKnowing when to break the rules is useful. Explaining why youāre breaking them is crucial. And adding guide/guard rails to help ensure that the assumptions you had when breaking the rules are still in playā
Haseeb A published an article about SQL injection in Rails - Learn from an attackerās shoes ā āThis guide will guide you through the intricacies of SQL injection in Rails applications, helping you understand the vulnerability itself and how to prevent such a disastrous scenarioā
Evgeniy Demin published a new article about Breaking change during Rails upgrade introduced by David Heinemeier Hansson ā āI have noticed one strange behavior about how Rails serves static files. It looks like a breaking change because Iām upgrading Rails 5.2 to 6.1. After spending some time debugging it, I decided to share this short story with youā
How-Tos
Mike Coutermarsh published an article about How to stop Rails from setting a session cookie ā āRecently I was working on a Rails API and I wanted to stop Rails from setting it's _session cookie for API requestsā
Harrison Broadbent published an article about Preview emails in Rails with letter_opener, MailCatcher and MailHog ā āIn this article, I'm going to share everything I've learned about email previewing in Rails, and I'm going to show you how to quickly preview emails in your Ruby on Rails apps, using each of these methods (mailer previews, letter_opener, MailCatcher and MailHog)ā
Barry Hess published an article about TIL: Rails has_one Nested Attributes Tweaking ā āIn a project I'm working on right now I've been using a Rails nested form and a couple of things caught me off guardā
Nithin Bekal published a new article about Ruby's bang methods - Handle with care! ā āIn Ruby, method names can be suffixed with !. These are often called ābangā methods. This is used to indicate that it is a dangerous counterpart of the non-bang version of the method.I had always thought of ādangerousā to mean that the method mutates the underlying object and returns that object. However, these methods can differ from their non-bang versions in other subtle ways, which surprised me recentlyā
Matt Brictson published a new article about Safe redirects in Rails 7 ā āEnforcing canonical URLs by redirecting to params is not safe and may raise an exception. Use strong params with allow_other_host: false for security.ā
Raghu Varma Bhupatiraju published an article about Implementing materialized views in Rails ā āWhen you have a complex query which takes a lot of time to execute and you want to render the data in a page which will be accessed frequently materialized view is your best optionā
JoĆ«l Quenneville published an article about Structuring Conditionals in a Wizard ā āIāve worked on several projects, both Rails and Elm, where the wizard code had gotten so convoluted that the team were scared to work with it. Applying the refactors shown below had a major impact and allowed everyone to feel confident when dealing with this part of the systemā
Tobias L. Maier published an article about Simplifying UI Testing with data-testid in RSpec & Capybara ā āThis blog post explains how to use Test IDs with RSpec and Capybara, and introduces two new RSpec matchers (have_test_id and have_test_id_and_css) to simplify UI testingā
Lucas Barret published a new article about Padle is nice but squash (Rails migration) is funnier ā āThis is the time and place to learn about migration and try to squash someā
Konrad Badzioch published a new article about Setting up Hanami and Postgres with Docker Compose ā showing how to create a Docker image for Hanami
Juraj KostolanskĆ½ published a new article about Dark mode using TailwindCSS and Turbo ā āThe CSS framework Iām using to style LocaleData - TailwindCSS - has a great built-in support for dark mode. It provides a dark variant that lets you style your site differently when dark mode is enabledā
Adrian Valenzuela published a new article about Creating a Ruby Method | Mugen Ruby ā āWe are going to create a method that reverses a stringā¦ready? Letās goā
Carlos Castaneda published a new article about TIL Blog - Mini Project ā āFor my mini project I decided to take my love of movies and build a movie search appā
Related
Adam Rice published a new article about Thriving in economic uncertainty ā āLaying off staff is tough, and it happens due to factors that force management to refocus on efficiency. The challenge, however, is to keep these pressures from eclipsing the importance of maintaining healthy, aligned, and efficient teamsā
Ferdia Kenny published an article about Tips for working across timezones ā āFor about a month though I was working with folks based in UTC -4 which meant I came online about 5 hours before my colleagues. This was challenging. However, I found the following tips helped a lotā
I published an article about Bugs, errors and causes from an 1975 paper ā āIn this article, I share Albert Endres' findings and explore how understanding the problem, effective communication, and domain knowledge play crucial roles in reducing errorsā
Julia Evans published an article about Some tactics for writing in public ā āI want to explain some tactics I use to try to make the comments on my posts more informative and useful to me, and to try to minimize the number of annoying comments I getā
James Garcia published a new article about My experience with the Agency of Learning ā āA couple of months ago I was honored to be accepted to join Agency of Learning. Now that I have had some time in the program I wanted to share my experience. Also, hopefully to bring some awareness to the programā
Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month) and you will receive an ad-free version. Your contribution aids growth and maintains the quality of ShortRuby for everybody:
If you consider upgrading and want more information, please read Why to subscribe to paid.
Reply