Short Ruby Newsletter

Share this post

Short Ruby News - Edition #57

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 #57

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

Lucian Ghinda (from ShortRuby)
Sep 4, 2023
2
Share this post

Short Ruby News - Edition #57

newsletter.shortruby.com
Share

You can jump directly to a section:

πŸ‘ Our Community, πŸš€New Products & πŸ“… Events

πŸ‘‰Β All about Code and Ruby

🧰 Gems, Libraries, and Updates

🀝 Related (but not Ruby-specific)

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


πŸ‘‹ Before going into the newsletter content, please allow me to share some personal news and ask for your help πŸ‘‡
Contact me at hireme@ghinda.com or check my resume on Linkedin

Who am I? I am Lucian Ghinda, the curator of this newsletter. I am a polymorphic Ruby developer with around 15 years of experience with Ruby on Rails, complemented by five years as a Product Owner and around five years as an Engineering Manager. Add to everything around ten years of teaching, mainly through technical workshops or mentoring.

Why hire me? I am a self-starter and know how to take over a complex codebase and pull in resources to get up to speed. I can take an idea to production. I juggle various concepts, from pitching ideas, customer interviews, design thinking, and prototyping to going into Rails source code to understand how things work. I don’t shy away from speaking with CEOs, customers, and end-users to clarify or better understand what should be built to solve real business problems.

People describe me as bringing optimism, energy, and passion to teams I join while focusing on high-quality code, performance, and stability.

You can read more about me on my LinkedIn page , some testimonials, or visit my technical blog at allaboutcoding.ghinda.com


πŸ‘ Our Community

πŸ‘ Aleksander Lopez πŸ‡ΊπŸ‡¦ shared how they feel when using Ruby on Rails:

Source: @alkslpz (read on nitter)

πŸš€ New Products

πŸš€ Lucas Barret launched a new Podcast called GemRuby Show

Source: @yet_anotherDev (read on nitter)

πŸš€ Vladimir Dementyev announced the release of their book Layered Design for Ruby on Rails Applications: Discover practical design patterns for maintainable web applications

Source: @palkan_tula (read on nitter)

πŸš€ Andrew Atkinson announced the release of the beta version for their new book High Performance Postgre Sql For Rails: Reliable, Scalable, Maintainable Database Applications:

Source: @andatki (read on nitter)

πŸš€ Avi FlombaumΒ announcedΒ Sell Something Starter - an RoR Template

Source:Β @aviflombaumΒ (read onΒ nitter)

πŸ“… Events

πŸ“… Helsinki Ruby announced a new meetup September meet-up at Kitty's Lounge on 6 September:

Source: @helsinkiruby@ruby.social

πŸ“… Wnb.Rb announced a new book club WNB.rb: A Virtual Community for Women and Non-Binary Rubyists

Source: @wnb_rb (read on nitter)

πŸ“… Ruby On Rails announced Calling recent Le Wagon grads: Be the face of Rails World as an emcee!

Source: @rails (read on nitter)

πŸ‘‰ All about Code and Ruby

πŸ‘‰ Kasper Timm Hansen shared a proposal for a new syntax for BRB, a lighter ERB syntax, collaboration? Β· ViewComponent/view_component Β· Discussion #1839

Source: @kaspth@ruby.social

You can read the discussion on Mastodon here or on Twitter here (nitter alternative)

πŸ‘‰Postmodern started discussing about what could be improved in Ruby world. This started a good discussion about YARD and documentation:

Source: @postmodern@ruby.social

πŸ‘‰ David Heinemeier Hansson announced a series of new tools being presented at Rails World:

Source: @dhh (read on nitter)

πŸ‘‰ Bradley Schaefer shared a tip about naming gem versions:

Source: @soulcutter@ruby.social

πŸ‘‰ Johan Halse shared an idea about including a script tag in turbo frame response:

Source: @hejsna@ruby.social

πŸ‘‹ A short reminder: If you are looking for a colleague, I am looking for a great team to join πŸ‘‡

See my resume at https://linkedin.com/in/lucianghinda

πŸ‘‰ Postmodern asked about validating an HTML form with dry-validation:

Source: @postmodern@ruby.social
Source: @postmodern@ruby.social

πŸ‘‰Joel Drapper announced a new gem and invited people interested to Join the Naming Things Discord Server!

Source: @joeldrapper@ruby.social

πŸ‘‰ Stephann V. shared a code sample showing that Rails scope accepts classes

Source: @ste@ruby.social

πŸ‘‰ Maciej Mensfeld shared they are working on a performance improvement for Karafka:

Source: @maciejmensfeld (read on nitter)

πŸ‘‰ Gavin Morrice shared a thread about the complexity added by Service Objects. Here is the first part of that thread, but please read it all:

Source: @MorriceGavin (read on nitter)

Please consider becoming a paid subscriber to support this newsletter and you will receive an ad-free version. Your contribution aids growth and maintains the quality of ShortRuby for everybody:

πŸ‘‰ u/lsnouser asked about how to handle poor code bases:

Source: https://www.reddit.com/r/ruby/comments/167e0k5/feeling_stuck_with_bad_ruby_codebases_anyone_else

It is an interesting discussion and I will include here only some parts of some responses:

Source: https://www.reddit.com/r/ruby/comments/167e0k5/comment/jypj5qp
Source: https://www.reddit.com/r/ruby/comments/167e0k5/comment/jysiot2
Source: https://www.reddit.com/r/ruby/comments/167e0k5/comment/jyqhwr8
Source: https://www.reddit.com/r/ruby/comments/167e0k5/comment/jyq961u

πŸ‘‰ Rob Zolkos asked about how to relaod the src when reopening a details element:

Source: @robzolkos (read on nitter)

Tony Messias shared a solution to Rob question:

Source: @tonysmdev (read on nitter)

πŸ‘‰ Ruby Cademy shared about Time#utc and how it modifies self:

Source: @RubyCademy (read on nitter)

If you want to understand more here is a screenshot from the documentation:

Source: https://docs.ruby-lang.org/en/3.2/Time.html#method-i-utc

πŸ‘‰ Matt Swanson shared about using Enumerable#tally:

Source: @_swanson (read on nitter)

πŸ‘‰ Stanislav Katkov shared about experimenting with PostgreSQL-based cache by using activesupport-cache-database:

Source: @5katkov (read on nitter)

πŸ‘‰ Matt Swanson shared a code sample about

Source: @_swanson (read on nitter)

πŸ‘‰ Joe Masilotti shared the release of Turbo Native along with a series of links to get started with Turbo Native:

Source: @joemasilotti (read on nitter)

Here is the list of links:

  • Turbo iOS

  • Turbo Android

  • Turbo Native in 15 minutes

  • Hybrid iOS apps with Turbo

  • Joe’s Newsletter

πŸ‘‰Β Michael ChaneyΒ sharedΒ about using select_all in Rails:

Source:Β @MichaelDChaneyΒ (read onΒ nitter)

πŸ‘‰ Nate BerkopecΒ sharedΒ about serializers:

Source:Β @nateberkopecΒ (read onΒ nitter)

KeygenΒ replied with:

Source:Β @keygen_shΒ (read onΒ nitter)

πŸ‘‰Β Matt SwansonΒ asked to make the code cleaner:

Source:Β @_swansonΒ (read onΒ nitter)

Here are some of the proposed solutions:

Source:Β @DiragorΒ (read onΒ nitter)
Source:Β @jorgemanruΒ (read onΒ nitter)
Source:Β @_swansonΒ (read onΒ nitter)
Source:Β @kaspthΒ (read onΒ nitter)

πŸ‘‰Β Brad GesslerΒ shared a code snippet aboutΒ Google OAuth controller in Rails in 57 lines of code WITHOUT OmniAuth

Source:Β @bradgesslerΒ (read onΒ nitter)

πŸ‘‰Β Avi FlombaumΒ sharedΒ a code sample for a module to add reset password and login tokens:

Source:Β @aviflombaumΒ (read onΒ nitter)

DorianΒ proposed an alternativeΒ password_resetable.rb

Source:Β @dorianmariefrΒ (read onΒ nitter)

πŸ‘‰Β Harrison BroadbentΒ sharedΒ a code sample about using Image Actions - GitHub Marketplace to automatically compress images:

Source:Β @hrrsnbbntΒ (read onΒ nitter)

πŸ‘‰Β Ruby CademyΒ sharedΒ a code sample about using private_class_method:

Source:Β @RubyCademyΒ (read onΒ nitter)

πŸ‘‰Β MonochromeΒ sharedΒ  about monoruby performance:

Source:Β @s_isshiki1969Β (read onΒ nitter)


🧰 Gems, Libraries, Tools and Updates

🧰 Avo announced a new release for both Avo 2 and Avo 3:

Source: @avo_hq (read on nitter)

🧰 Gerald Bauer published a new gem called punkmaker about make your own (pixel) punk base (archetype) heads incl. humans, zombies, apes, aliens, mummies, robots, and much more

Source: https://github.com/cryptopunksnotdead/punkart.sandbox/tree/master/punkmaker

🧰 Konnor Rogers announced a new release for rhino-editor - Pull Request #99

Source: @RogersKonnor (read on nitter)

🧰 Vladimir Dementyev announced a new release for Release 1.0.0 · palkan/active_delivery

Source: https://github.com/palkan/active_delivery/releases/tag/v1.0.0

🧰 Greg Molnar shared a merged PR for Rails about Add an option to start rails console in sandbox mode by default by shouichi · Pull Request #48984 · rails/rails

Source: https://github.com/rails/rails/pull/48984

🧰 Dima Fatko shared a merged PR to Rails about Add ability to show slow tests to the test runner by fatkodima · Pull Request #49082 · rails/rails

Source: @fatkodima (read on nitter)

🧰 Jeremy Evans announced a new release for Sequel 5.72.0 Released · jeremyevans sequel · Discussion #2074

Source: https://github.com/jeremyevans/sequel/discussions/2074

Thank you for reading Short Ruby Newsletter. This post is public, so feel free to share it.

Share

🀝 Related (but not Ruby-specific)

🀝 Jason Swett shared about duplication:

Source:Β @JasonSwettΒ (read onΒ nitter)

🀝 Robby Russell asked us to write recommendations:

Source:Β @robbyrussellΒ (read onΒ nitter)

🀝 Santiago shared a hot-take about estimates. Here is a part of what they posted:

Source:Β @svpinoΒ (read onΒ nitter)

🀝 Jason Swett shared about technical debt and how we act about it:

Source:Β @JasonSwettΒ (read onΒ nitter)

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

πŸ—ž Newsletters

πŸ—ž Harrison Broadbent published a new edition of The RailsNotes Newsletter ISSUE #9 (Deploying with Dokku, Hatchbox, Hetzner)

πŸ—ž Sara Jackson published a new edition about This Week In Open Source (September 1, 2023)

πŸ—ž Awesome Ruby Newsletter published a new edition about Awesome Ruby Newsletter Issue 380, Aug 31, 2023

πŸ—ž Greg Molnar published a new edition of Dependent Dropdowns With Hotwire Rails Tricks Issue 17

πŸ—ž RubyRadar published an article about Book.Publish All!

🎧 Podcasts

🎧 Lucas Barret published a new podcast GemShowRuby Igor Alexandrov, Wiselink Made by Headliner

🎧 Emmanuel Hayford published a new episode of The Rails Changelog 012: DHH joins the show to talk Rails 8, Delegated Types, Kamal and more! β†’ β€œIn this episode, I'm joined by DHH to discuss Kamal, The Rails Foundation, Rails 8, Delegated Types, On Writing Software Well and a whole lot more! This episode is packed and a must-listen”

🎧 Remote Ruby published an episode about No Surprise | Now We Are A Burger Podcast β†’ β€œdive into the benefits of building UI components using frameworks like Tailwind CSS and Alpine.js, emphasizing the importance of well-organized and specialized components for better code management. The conversation also touches on the desire for more pre-built component libraries in the Rails ecosystem and the complexities of using various frontend frameworks”

🎧 The Ruby on Rails Podcast published a new episode aboutEpisode 485: A Ticket Giveaway And Kamal / Kemalβ†’ β€œThe pair talk about doing hard things first, the renaming of MRSK to Kamal and then a random deep dive on our show's archives”

🎧 Rubber Duck Dev Show published a new episode about Programming & Child Development With Noah Gibbs β†’ β€œIn this episode of the Rubber Duck Dev Show, we discuss learning to program and child development with Noah Gibbs”

🎧 Rooftop Ruby published a new episode about 23: Head Of Open Source At Ruby Central AndrΓ© Arko β†’ β€œRuby Central head of open source AndrΓ© Arko talks Bundler, Ruby Gems, supporting the community, and more”

🎧(related) Adam Wathan published a new podcast about Predictable mistakes of the developer-turned-founder β†’ β€œSo many developers (your podcast hosts included) make the same mistakes when trying to turn an idea into a business for the first time. In this episode, Ben and Adam talk through a bunch of these mistakes, why they matter, and what you should do to avoid them”

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

Screencasts

πŸŽ₯ Yaroslav Shmarov published new video about Ruby On Rails #145 Stimulus Js Hotkeys Without Any External Libraries. It Just Works!

πŸŽ₯ Dean De HartΒ published new videos about:

  • Deleting Posts Via Api React On Rails 7 Part 6

  • Editing Posts React On Rails 7 Part 5

  • The New Post Form React On Rails 7 Part 4

  • The Post Show Page React On Rails 7 Part 3

  • The Vite App React On Rails 7 Part 2

  • React On Rails 7 Series

πŸŽ₯ Drifting Ruby published a new video about Episode 416 - Forecasting Data | Drifting Ruby

πŸŽ₯ GoRails launched a new series called SQL for Beginners

✍🏾 Articles

What’s new πŸ†•

Aaron Patterson published an article about Ruby Outperforms C: Breaking The Catch 22 | Rails At Scale β†’ β€œIn this post I’d like to present one data point in favor of maintaining a pure Ruby codebase, and then discuss some challenges and downsides of writing native extensions. Finally we’ll look at YJIT optimizations and why they don’t work as well with native code in the mix”

Brooke Kuhlmann published an article about Hanami Views β†’ β€œAt the moment, the Hanami View gem is in a prerelease state but I’ve been making heavy use of this gem so wanted to share notes in case this information is helpful to you or, at a minimum, prep you for the upcoming 2.1.0 release”

Aaron Patterson published a new article about Fast Tokenizers with StringScanner β†’ β€œToday we’re going to specifically look at the lexing part of parsing. Lexing is just breaking down an input string in to a series of tokens. It’s the parser’s job to interpret those tokens. My favorite tool for tokenizing documents in Ruby is StringScanner. Today we’re going to look at a few tricks for speeding up StringScanner based lexers. We’ll start with a very simple GraphQL lexer and apply a few tricks to speed it up”

Akshay Khot published an article about Rails Database Migrations Cheatsheet β†’ β€œThe database schema evolves continuously. Rails migrations is a powerful and flexible way to update the schema without dropping and re-creating the database. However, all this power and flexibility can be overwhelming. Here's a handy cheatsheet for most common migration operations”

Alkesh Ghorpade published an article about Rails 7.1 Makes Increment Counter And Decrement Counter Accept A By Argument β†’ β€œRails 7.1 makes increment_counter and decrement_counter accept a 'by' argument”

MichaΕ‚ Łęcicki published an article about Easy Introduction To Connection Pool In Ruby β†’ β€œLet me introduce the concept of connection pooling and show you an example of easy, performant connections to RabbitMQ”

Andrei Kaleshka published an article about Cheaper And Risk Free Ruby On Rails App Redesign β†’ β€œThis article shares the approach we took to apply the new design in one of our projects. The changes we made increased the project revenue by 30%”

Szymon Fiedler published an article about How To Become 10x Developer With A Help Of Chat Gpt β†’ β€œthere are couple scenarios where tools backed with LLMs shine and can boost your productivity”

Travis Turner published an interview with Vladimir Dementyev about It Deserved Its Own Tome: Layered Design And The Extended Rails Way β†’ β€œThe Evil Martians’ Principal Backend Engineer goes deep on a number of topics: the contents of his book, the importance of maintainability, the Extended Rails Way, sharing his experience-driven methodology for building web apps with Rails, the future of Rails”

Garrett Dimon published a new article about How We Added Free Plans to Flipper Cloud Using Flipper β†’ β€œWe used Flipper’s feature flags to iteratively build out everything we needed to offer a free Cloud account to anyone. And since we had been updating, releasing, and testing various elements to support free plans over the course of the last several months, we had a painless release”

Jorge Manrubia published a new article about Minding the small stuff in pull request reviews β†’ β€œWe pay attention to the minutia in pull request reviews, and for good reasons”

Deep Dives πŸ”

Ben Sheldon published an article about Appropriately Using Ruby’s Thread.Handle Interrupt β†’ β€œWorking on GoodJob, I spend a lot of time thinking about multithreaded behavior in Ruby. One piece of Ruby functionality that I don’t see written about very often is Thread.handle_interrupt”

Lucas Barret published an article about Active Record Internals: You Are Still Not Ready β†’ β€œI try to understand better Rails ActiveRecord and how this is designed internally. In the last article, we discussed reflection but did not dive into it. Now we still have some black spells to explore”

Noah Gibbs published two new articles about We Turned Lobste.Rs Into A Rails Benchmark For Yjit β†’ β€œas YJIT improves we need more data from real world apps to help us understand what will speed up Ruby the most. We turned the Lobsters codebase into a nice new benchmark” and about How We Used A Sq Lite Memory Db For Rails Benchmarking β†’ β€œwe want very little database time in our benchmarks, since we’re trying to optimise Ruby. One way to do that is to use SQLite rather than a separate database like MySQL or PostgresSQL. In fact, faster yet is an in-memory SQLite database. It doesn’t even write to disk”

Sid Krishnan published an article aboutΒ The Anatomy Of A Turbo StreamΒ β†’ β€œWhy and how does a <turbo-stream> make the DOM change? What do Turbo Streams have to do with web sockets? What even is a <turbo-stream>?”

How-Tos πŸ“

Avi Flombaum published a new article about Build a Reset Password in Ruby on Rails β†’ β€œAs a continuation of Rails Authentication from Scratch, let's add a password reset feature to our application”. You should also read Rails Authentication From Scratch and Create Rails Magic Login Link.

Mario Alberto ChΓ‘vez CΓ‘rdenas published an article about Full Text Search With Sq Lite And Rails

Harrison Broadbent published an article about Build Dynamic Navs With Current Page? (And Conditional Classes) β†’ β€œBy combining the current_page? helper with dynamic classes, we can build a nav that's styled differently based on the page we're on”

Steve Polito published an article about Speed Up Your Rack Application With Http β†’ β€œIn this tutorial, we’ll learn how to leverage HTTP to improve the performance of a simple Rack application in an effort to demystify the intricacies of caching strategies and performance enhancement at the foundational level”

Matt Brictson published an article about Fixing Thor’s CliΒ Quirks β†’ β€œI’ve been wanting to build a CLI in Ruby, and Thor is the obvious library to use. But Thor has some weird behaviors that were driving me crazy. Here’s what I found, and how I extended Thor to fix it”

Felipe Vogel published an article about Roda + Turbo Streams = ❀️→ β€œPorting Wiki Stumble from Rails to Roda and Turbo Streams”

Julie Kent published an article about A Step By Step Guide To Building A Ruby Gem From Scratch Honeybadger Developer Blog β†’ β€œFrom concept to execution, join me on a step-by-step journey through the process of crafting your own functional Ruby gem”

Niklas HΓ€usele published an article about Open Ai Transcription Api And Active Storage Analyzers β†’ β€œWe’re building an audiofile upload with ActiveStorage. After the file has been uploaded successfully, we’re going to use the transcription OpenAI endpoint to get the audiofile’s text content”

Lars Peters published an article about Generating barcode PDFs with Rails β†’ β€œFor a project, I was researching methods to generate individual PDFs with imprinted EAN barcodes. Some of the how-tos and blog articles I found were quite old, and it was not directly obvious if the solution still works and can be recommended in 2023”

Cj Avilla published a new article about How to setup react-rails with esbuild β†’ β€œThis was the time to add React into our Rails. That'll be easy, I thought. Just a couple hours of work, I thought. PSSSSSH. Naw, dog -- the gods don't want you putting React in your Rails, for some reason. Or, at least they don't want you to without their build tools”

Related πŸ”„

Cameron Day published an article about Writing Code You Don't Intend To Keep β†’ β€œCode doesn't always need to be permanent. In fact, there's plenty of times that it shouldn't be”

Josef Strzibny published an article about Business Class 1.1 Released With Paddle Billing, An Improved Crud Generator, And New Pricing β†’ β€œThe Rails SaaS boilerplate Business Class goes 1.1. Here’s what’s new”

Sid KrishnanΒ  published an article about What To Do When The Docs Aren't EnoughΒ β†’ β€œA lot of the time, once you read the docs, you do end up finding enough guiding information to help overcome the snag and move on to the next increment of work. But every now and then, even if the docs give you some additional context around the problem, you find that you are still in the dark when it comes to actually solving it”


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

Support the newsletter for ~ $1.8/month

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

2
Share this post

Short Ruby News - Edition #57

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