πŸ‘ Short Ruby News - edition #22

Briefly about everything in Ruby world

This edition was created with the help of @adrianthedev/@[email protected] 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

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:

πŸ‘ 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!

πŸ‘‰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:

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

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

🎧 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 a stream from Jason Charnes about using Hanami. There are already two videos saved on Jason stream:

Articles

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

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:

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

Reply

or to participate.