Short Ruby News - Edition #71
Discover the world of Ruby in this comprehensive newsletter covering week 51 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.
You can jump directly to a section:
π New Products & π Events
πΒ All about Code and Ruby
π§°Β Gems, Libraries, and Updates
π€ Related (but not Ruby-specific)
More content: π π π§ π₯ βπΎ (articles, podcasts, videos, newsletters)
[Sponsor β¬] flippercloud.io
Are big launches stressing you out? Then you need feature flags.
Flipper Cloud helps your team deploy the code now and then rollout features when you are good and ready.
Get started for free at flippercloud.io
π New Products
πΒ Jason SwettΒ launched theirΒ Coaching for engineering leaders service:
πΒ Josh PigfordΒ launched sharedΒ Gemfile.Directory β View Gemfiles Of Your Favorite Rails Apps
πΒ Manu JΒ launched Zest UI Kit For Ruby On RailsΒ
πΒ Garrett DimonΒ launched a new book calledΒ Β Frictionless Generators
πΒ Errol SchmidtΒ launchedΒ SecretLink.org - The Secure Way to Share Sensitive Information
πΒ Joe MasilottiΒ launched Daily Log
π
Events
π Β Rubyfuza & Friends sharedΒ the CFP is open for RubyFuza 2024
π Β HexdevsΒ announced Hacking with Ruby Prism happening on 15 December. RSVP here
π All about Code and Ruby
[Sponsor π]
Flipper 1.1 is out, and it's a sturdy release. One of the most exciting bits is expressions. If you are already a flipper user, expressions are groups you can change at runtime (instead of statically defined in code).
If you aren't using Flipper, get started free today!
π Takashi KokubunΒ announced that `it` is accepted as default block parameter β read about it hereΒ Β Feature #18980: Re-reconsider numbered parameters: `it` as a default block parameter (Read the notes from the Dev Meeting discussion here )
I think Peter from RubyWeekly describes it well:
in case there are concerns about breaking RSpec, Joel shared this:
and Martin SpickermannΒ shared a code sample with it:
πΒ Jean BoussierΒ sharedΒ Shopify is running Ruby 3.3.0-dev in production:
David Heinemeier HanssonΒ shared they are also running Ruby 3.3.0-dev for Hey and Basecamp:
π More Advent of code solutions shared:
Onur OzerΒ shared their repo containing solutionsΒ onurozer/advent-of-code-2023
Jean TessierΒ shared their repo containing solutions at jeantessier/advent-of-code-2023
Cj AvillaΒ published new videos solving Advent on Code in Ruby
πΒ Thiago AraujoΒ sharedΒ a code sample showing how to chain Enumerable:
πΒ Dhaval SinghΒ sharedΒ a thread about Enumerable#each_cons (read the entire thread):
π Dave CopelandΒ sharedΒ thatΒ Sustainable Web Development with Ruby on Rails is now updated to Rails 7.1:
π Joel DrapperΒ sharedΒ about transitioning from ViewComponent to Phlex:
[P] flippercloud.io
π¬ Using the open source version of Flipper to flip features? Switch to Cloud in a few minutes for support, audit history, finer-grained permissions, multi-environment sync, and all your projects in one place.
Start with our free tier today at flippercloud.io
πΒ Colleen SchnettlerΒ sharedΒ a thread about building an alert with Hotwire. Read the entire threadΒ (alternatively read onΒ nitter):
πΒ PostmodernΒ shared a code sample showing how to useΒ Β kramdown-man to add man pages to Ruby CLI:
πΒ Gergely OroszΒ asked about big Ruby codebases:
Here are some of replies in the threadΒ (read onΒ nitter):
π Joel DrapperΒ sharedΒ a code sample from their rainbow-unicorn gem:
π Jean BoussierΒ sharedΒ about common real-life tasks that should be considered when running a benchmark:
πΒ Joel MossΒ sharedΒ about the lack of a way to separate concerns from models and controllers:
πΒ Brad GesslerΒ asked about resources to learn about low level Ruby construct:
Here are the two recommendations:
Read Karafka code as it uses threads, workers, scheduler, queues and it is very well documented
πΒ Nathan S. RobinsonΒ asked who is building in public with Ruby on Rails:
So far, at least 95 people have replied to this question. See all replies hereΒ or onΒ nitter.
πΒ Nick SchwadererΒ sharedΒ a code sample from Shoes:
πΒ Kevin NewtonΒ sharedΒ a Ruby code sample showing various strings and their encodings:
πΒ Ahmed NadarΒ sharedΒ a code sample from working at RapidRails UI Components for Ruby on Rails
πΒ Josef StrzibnyΒ sharedΒ a code sample showing how they added Sitemap for their website:
πΒ Stephen MargheimΒ asked about real-world Rails application load:
Here are some of the replies:
βAvg: 1160 RPM = 19.3 RPS | Peak: 1780 RPM = 29.6 RPSβ (source)
βavg 2200rpm, peak 4000rpm for a well-known newspaper site where most requests returns full HTML pagesβ (source)
βhttp://mynewsdesk.com does about 2k RPM (33 RPS) on average. Peaked around 7k RPM (116 RPS) in the last 7 daysβ (source)
βAverage: 66 RPS | Peak: 110 RPS | Running on Rails: 5.2.4.1 | Mysql: 5.7β (source)
βAverage: 2 RPS | Peak: 34 RPSβ (source)
β210.5 RPM for chaskiq.ioβ (source)
πΒ Ruby CademyΒ sharedΒ about using install_if in Gemfile:
πΒ Facundo Espinosa sharedΒ a code sample from Turbo::Frames::FrameRequest module automatically included in ApplicationController:
πΒ Bram JettenΒ sharedΒ a code sample where they implemented a similar functionality as Rails find_signed
πΒ Vladimir DementyevΒ sharedΒ a comparison of running RubyNext with/without Prism:
πΒ Nate BerkopecΒ sharedΒ a code sample showing how a memory leak can happen in Ruby:
πΒ Joel MossΒ asked about why Ruby has elsif instead of elseif
I'm not sure if in the repliesΒ (read onΒ nitter) there is a real explanation, but there are a lot of hypotheses.
πΒ Andrew MasonΒ shared they created a group onΒ Snipd for Rubyists (premium plan)
πΒ Ruby CademyΒ sharedΒ a code sample about private constants:
πΒ IΒ sharedΒ a thread about refactoring with endless method and here is the final refactoring form:
πΒ Andrew MasonΒ asked about Ruby on Rails as an option for a beginner:
Here are some replies, but you should read the entire threadΒ (read onΒ nitter):
πΒ Ruby CademyΒ sharedΒ about using Rails safe_constantize method:
πΒ Stanislav KatkovΒ sharedΒ a code sample showing how to run tests forever (until they fail)
π IΒ sharedΒ a thread where I reviewed the Mastodon open source app (read the thread on @ruby.social, or twitterΒ or read it onΒ nitter:
πΒ David AlejandroΒ sharedΒ a code sample about querying JSON fields:
πΒ Adrian OpreaΒ sharedΒ why they think Ruby is easy to learn:
π u/Leizzures asked why is Ruby used so much in Startup/scale-ups:
There are more than 100 replies, I will share here only three, but it is worth reading them all:
π§° Gems, Libraries, Tools and Updates
π§° PostmodernΒ announced the release ofΒ Release 1.0.0 Β· postmodern/kramdown-man
π§° Justin CollinsΒ announced a new release ofΒ Β Brakeman: Brakeman 6.1.0 Released
π§°Β John NunemakerΒ announced a new version ofΒ FlipperCloud:
π§° Paul MucurΒ announced a new release ofΒ Β GitHub - mudge/re2 at v2.5.0
π π§°Β Harrison BroadbentΒ published a new gemΒ better_mailer_previews: Better Mailer Previews is a Ruby on Rails gem that makes it easier to preview ActionMailer email templates.
π π§°Β Samuel WilliamsΒ announced a new gemΒ async-actor
π§°Β Stanislav KatkovΒ announced a new release forΒ yard-markdown: yard theme plugin that generates markdown documentation for gems
π§°Β Joel MossΒ announced a new release forΒ Release 0.4.0 Β· joelmoss/spaced
π§°Β Stephen MargheimΒ sharedΒ SQLite on Rails | Fractaled Mind
π§° Iryna Pisklyarova announced a new version ofΒ Ruby Mine 2023.3: Generally Available AI Assistant, Improved Project Indexing, New Supported Libraries And Technologies
π§°Β Chris OliverΒ announced a new version ofΒ pay-rails/pay
π§°Β Chris OliverΒ announced a new version ofΒ Release v1.0.0 Β· acts_as_tenant
π§°Β Xavier NoriaΒ announced they are thinking to implement an experimental null inflector forΒ zeitwerk: Efficient and thread-safe code loader for Ruby
π€ Related (but not Ruby-specific)
π€Β Jason SwettΒ sharedΒ about how we should view testing:
π€Β Mohammad A. AliΒ shared JSONB branch is merged to SQLiteΒ β SQLite: Timeline
π€Β Erwin KroonΒ sharedΒ about code reviews:
π€Β Brad FrostΒ sharedΒ about working together:
π€Β William KennedyΒ sharedΒ about the advantages to hire a junior:
π€Β Adrian OpreaΒ shared about building filter-able suggestion list with onlyΒ HTML Standard
π€Β Dhaval SinghΒ sharedΒ a trend of maybe hiring starting to slowly increase in tech:
π€Β Paul GrahamΒ sharedΒ a Replit graph about how many people go through each day of a tutorial:
π€Β Arian CelinaΒ sharedΒ about organising work:
π€Β Jason SwettΒ asked a question about practical lessons people wish they learned in Computer Science school:
There are more than 21 repliesΒ (read onΒ nitter) worth reading.
More content: π π π§ π₯ βπΎ
Friendly.RbΒ started publishing videos from the conference: This week we had Xavier Noria Zeitwerk Internals, sharedΒ Julian Cheal Making Music With Ruby And Sonic Pi You Tube, Marian PosΔceanu - Ruby and the Lisp, sharedΒ Lucian GhindΔ The State Of The Rubyverse
π Newsletters
π Ruby WeeklyΒ published a new edition aboutΒ Ruby 3.4 to get the 'it' factor
πΒ Any CableΒ published a new edition aboutΒ Any Cables Monthly #16
πΒ Emmanuel HayfordΒ published a new edition of This Week in Rails aboutΒ Allow object_id as a column name for ActiveRecord and a lot more!
πΒ Hotwire WeeklyΒ published a new edition aboutΒ Week 49 - Stimulus Hotkeys, new Turbo Native app, and more!
π Awesome Ruby Newsletter published a new edition Issue 394 - Duke Libraries Drop Basecamp
π§ Podcasts
π§Β Jason SwettΒ published a new podcast aboutΒ 203 - Simmon Li - The Code with Jason Podcast
π§Β Ruby For AllΒ published a new podcast aboutΒ Live From Rubyconf 2023 β Conference Recap, Talk Highlights, Ruby 4, Hacking on OSS, Restaurant Reviews, and Much More
π§Β The Rails ChangelogΒ published a new podcast aboutΒ 016: Fireside chat with Rafael FranΓ§a
π§ Matt Swanson published a new episode aboutΒ Yagni | Programming Books W/ Aaron Francis
π§ Remote Ruby published a new episode aboutΒ Scaling Buzzsprout: A Deep Dive Into Podcast Hosting, Cdn, Rails, And Business Happiness With Tom Rossi
π§ The Ruby on Rails PodcastΒ published a new episode aboutΒ Episode 498: Remote Ruby X The Ruby On Rails Podcast
π½οΈ π₯ Videos
Screencasts
π₯Β Yaroslav ShmarovΒ published a new video aboutΒ #155 Generate, store, email PDF invoices. DocRaptor API, HTML to PDF, ActiveStorage, ActionMailer
π₯Β Drifting RubyΒ published a new video aboutΒ Episode 431 - Hotkeys
π₯ I published a short video aboutΒ A Good Use Case For The Endless Method Syntax
βπΎ Articles
Whatβs new π
Stephen MargheimΒ published an article aboutΒ SQLite Myths: Linear writes don't scale and SQLite on Rails: Improving the enhanced SQLite3 adapter
RoRvsWild published a new article aboutΒ Everyday performance rules for Ruby on Rails developers - RorVsWild
Noel RappinΒ published an article aboutΒ Β How To Manage Duplicate Test Setup, or Can I Interest You In Weird RSpec?
Jiaqi Liu, Daniel RogartDaniel Rogart and Xin WuXin Wu published an article aboutΒ Upgrading Github.com To MySQL 8.0
Apoorv Tiwari published an article aboutΒ Ruby 3.3 Resolves The Range#Size Bug For Rational Endpoints
Ruby CentralΒ published an article aboutΒ Ruby Central Welcomes New Board Members
Brandon Keepers, John Nunemaker published an article aboutΒ Flipper 1.1.0
Deep Dives π
Sebastian Wilgosz published a new article aboutΒ The underrated power of dry-schema
Kevin Newton published article about how the prism Ruby parser works: Part 4 - Writes, Part 5 - Operator writes, Part 6 - Control-flow writes, Part 7 - Control-flow , Part 8 - Target writes, Part 9 - Strings, Part 10 - Regular expressions
Ariel Juodziukynas published an article aboutΒ Exploring Ruby's Global Constants And Variables
I published an article about Ruby on Rails Open Source: Mastodon
How-TOs π
PostmodernΒ published an article aboutΒ Postmodern How To Add A Man Page To Your Ruby Project
Akshay KhotΒ published an article aboutΒ How Respond To Method Works In Rails
Myungwoo SongΒ published an article aboutΒ Optimizing Ruby On Rails Serializers: Efficient Hash Unpacking In Serializer
Franklin Yu published an article aboutΒ Error Of βRuby Function Name Stringβ When Compiling Ruby
Postmodern published an article aboutΒ Postmodern Solving Advent Of Cyber 2023 Day 2 Using Ruby
Harshaan Nihal Khan published a new article aboutΒ Optimizing System Performance by Implementing a Dual Database Setup in Rails
Andres ChaconΒ published an article aboutΒ Ruby Tip: Did You Know That Ruby Supports Pattern Matching?
Mario Alberto ChΓ‘vez CΓ‘rdenas published an article aboutΒ Sound To Script: Using Open Aiβs Whisper Model And Whisper.Cpp
Aaron Sumner published an article aboutΒ Write Resilient Tests With Matchers That Take Other Matchers
I published an article about An Endless Method Use Case
Related
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:
If you consider upgrading and want more information, please read Why to subscribe to paid.