👐 Short Ruby News - edition #22

Briefly about everything in Ruby world

This edition was created with the help of @adrianthedev/@adrian@ruby.social from Avo for Ruby on Rails (a friendly full-featured Rails admin panel) and @jcsrb.

You can jump directly to one of the following sections if you like:

👐 Our Community

👉 All about Code and Ruby

🧰 Gems, Libraries, and Updates

🤝 Related (but not Ruby-specific)

More content: 🎥 🎧 🗞 (articles, podcasts, videos, slides and newsletters)

👐 Our Community

👐 Drew Bragg invited me to his podcast. If you want to learn more about why I wanted to create this newsletter and some further plans I have for it, listen to Episode 12 - Lucian Ghinda (available on all platforms), and please be kind, as this was my first podcast ever 🙈

成瀬 shared that Ruby 3.2.0 RC 1 has been released:

You can install it right now with:

💔 Sad news hit the community this week when we learned that Chris Seaton had died:

A lot of people shared how amazing Chris was:

If you need more context to process this, Richard published a good thread about how to think about this event. Please be safe! Call a friend or colleague today and see how they are! 

👐 Richard Schneeman asked on Reddit about suggestions for Ruby accounts to follow on Mastodon:

Check out the replies here

👐 u/ogarocious asked on r/rails about stories of landing their first junior entry-level RoR job:

Read the replies, as there are good stories there.

👉 All about Code and Ruby

🗣️ Sticking to their once-every-two-weeks schedule, Adrian and Paul launched Avo 2.21. This week's release makes it way easier to authorize at row-level the has_many associated records, adds the disabled option to fields to give you more control over how you display them in a form, and adds callable action messages where you can customize the action messages using the selected record, current_user, context data and more, making it even more dynamic:

(Avo has supported Short Ruby from the beginning. Thank you!)

👉 Greg Navis shared a code sample showing the helper methods defined by belong_to in Rails:

💡 Rails tip: belongs_to defines 8 helper methods on the model that can help you write more idiomatic Rails code. 1️⃣ Setter 2️⃣ Getter 3️⃣ Build 4️⃣ Create 5️⃣ Create or raise 6️⃣ Reload 7️⃣ Has changed? 8️⃣ Has previously changed? (= before last save)

👉 Cezar Halmagean shared a list of topics that are important to focus on when learning Rails

What do you need to know as a Rails beginner? Here are some big topics: 1. Databases 2. REST 3. MVC 4. Testing 5. APIs 6. Deployment 7. Mailers 8. Asset management 9. Background jobs 10. Storage 11. Hotwire 12. Websockets And build lots of pet projects.

👉 Joel Drapper announced the release of Phlex 1.0:

👉Konnor Rogers published the first version of Rhino Editor - an Actiontext compatible editor (currently based on TipTap and having plans to integrate with ProseMirror):

👉Cezar Halmagean shared some ideas to build with Rails:

Struggling to find ideas about what projects to build with Rails? Here are a few ideas: - Expenses tracker - Pomodoro app - Blog engine - Reddit clone - Notes app - Chat system - Weight tracker - Bill tracker - Personal journal - Book database - Recipe platform - Forum

👉 Greg Navis shared a code sample about working with Ruby date objects:

💡 Ruby tip: Date objects provide a bunch of methods for determining various facts about a date ✅ Date, month, year ✅ Leap year ✅ Week number ✅ Day number (in a year) ✅ Monday? Tuesday? ... Sunday? It's all vanilla Ruby, no Rails needed!

👉Ko1 shared a link to Ruby Consultancies Companies

👉Kevin Newton shared a Ruby code sample showing a bit of the Perl heritage/inspiration:

Josh Cheek replied, showing more examples:

👉Chris Oliver shared a code sample showing how to use custom Turbo StreamActions in Rails:

I love the power custom Turbo StreamActions gives you in Rails.

👉 Greg Navis shared a thread showing the Ruby Forwardable module:

👉 Tim Morgan shared their Compiler Fun series:

👉David Teren shared a guide written with ChatGPT help about Paradigms of Ruby: OOP Principles & Design Patterns

I've been collating the #Ruby OOP answers #ChatGPT has provided me.

👉 u/Merlynndo asked a question on r/ruby about how to get better quickly:

Here are some of the responses:

  • Books: Programming Ruby 3.2, Practical Object Oriented Design with Ruby

  • “If you need to edit something and you don’t understand the surrounding code, do some googling (or searching api references) to figure it out. Likewise, if you find an example code somewhere, take the time to understand it and all the syntax. That’s a quick way to pick up lots of useful knowledge.” (source)

  • Pair programming with many people in the company to get technical knowledge and domain and company-specific knowledge (source)

If you have read so far and you like the content, maybe you take into consideration sharing this and subscribing:

🧰 Gems, Libraries, and Updates

🧰 Brad Gessler shared they added in sitepress support for Phlex and ViewComponents: read the commit

🧰 Gavin Morrice talked about their gem jiminy. Here is a good explanation from gem Github:

🧰 Vladimir Dementyev released a new version of test-prof: Read release notes for v 1.1.0

🧰 Kevin Newton published a new gem rails-pattern_matching:

This gem provides the pattern matching interface for ActiveModel::AttributeMethods, ActiveRecord::Base, and ActiveRecord::Relation

Here is a code sample:

🧰 Bozhidar Batsov published a new version of Rubocop: Read release notes for v1.40. New cops added:

🧰 Leastbad shared a new version for stimulus-hotkeys v2.3:

🧰 Alessandro Rodi published a new gem named validation_errors:

🧰 Guillaume Briday shared a npm package they created turbo-frames-debug that helps add debug information for turbo frames.

🧰 A new improvement is coming in Ruby: ObjectSpace.dump_all: dump shapes as well

🤝 Related (but not Ruby-specific)

🤝Jason Swett shared about making sure the AI writes also tests not only code:

AI can write code. But probably not ALL the code. Programming will have to be a collaboration between AI and humans. In that case, we better make sure to have the AI write not just code but also tests. Otherwise humans will inevitably introduce regressions.

🤝 Kent Beck shared a piece of advice about reversible/irreversible changes:

🤝 Peter Solnica shared:

More content: 🎥 🎧 🗞

Slides

Charles Oliver Nutter shared their slides from RubyConf: Using JRuby: What, Why, When, and How

Nate Berkopesc shared their slides from RubyConfTh about: A Beginner’s Guide to Puma Internals

Newsletter

🗞 Greg Molnar published a new edition of This Week in Rails: Disabled IRB autocompletion, bugfixes and more!

🗞 Ruby Radar published a new edition: Ruby Radar #80 - Rest In Peace, Chris Seaton

🗞️ Ruby Weekly published a new edition: RIP Chris Seaton

🗞️ Ruby LibHunt published a new edition of the Awesome Ruby Newsletter

Podcasts

🎧Jason Swett published a new episode of The Code with Jason Podcast: 166 - Feature Flags and Duplication with Julian Fahrer

🎧 Code And The Coding Coders Who Code It published a new episode Episode 12 - Lucian Ghinda

🎧 The Ruby on Rails Podcast published a new episode Episode 447: Rubyconf Mini Recap + The Rails Foundation (Brittany + Jemma + Emily)

🎧 Ruby For All published a new episode about GitHub Codespaces & Julie's RubyConf Mini Recap

🎧 Remote Ruby shared a new episode about Jason gets Twitchy with Hanami

Videos

🎥 Creston Jamison shared a new episode for Rubber Duck Dev Show: What Happens After RubyCritic with Ernesto Tagwerker

🎥 The Rubber Duck Dev Show shared the last episode this year about Should you store business logic in your database?

🎥 Nate Hopkins published a new video about Quick intro to ReflexBehaviors

🎥 The Rubber Duck Dev Show shared a stream from Jason Charnes about using Hanami. There are already two videos saved on Jason stream:

🎥 Drifting Ruby published the video version of This Week in Rails - Dec 9th, 2022

🎥 Deanin published a new video about Keyboard Hotkeys With Stimulus In Ruby On Rails 7

Articles

Celso De Sa published an article about SOLID Principles Explained by GPT-3 with Analogies and Ruby Code

Mike Munroe shared an article they published about their program of helping junior Rails devs OBLSK 30/60/90 Apprenticeship Program

Paweł świątkowski published a new article on AppSignal about A First Look at Hanami 2 for Ruby

Gavin Morrice published an article about Understanding n+1 query problems in Ruby on Rails

Kevin Newton published a series of articles this week explaining how the CRuby virtual machine works. These articles are great if you are looking to understand how Ruby works inside:

Benito Serna published a new article about Examples to explore possible race conditions when caching custom computed values in Rails

Thought Bot published a new article about A Journey into Site Reliability Engineering.

Scott Watermasysk published an article about Optimizing ActiveRecord SQL Memory Usage in Rails

Yukihiro Matz shared an article about Ruby, meet Compute@Edge! Building on Fastly with Yuta Saito

Greg Navis shared an article they wrote about Elixir-style Pipelines in 9 Lines of Ruby

Janko Marohnić published an article about Social Login in Rails with Rodauth

Workhunty published an article analyzing data from Linkedin: Number of open positions for Ruby jobs per country

All issues