Saturday, May 18, 2024
HomeRuby On RailsDifficulty #9 - 5-11 September 2022

Difficulty #9 – 5-11 September 2022

Hi there,

I’m Lucian (@lucianghinda on Twitter), and I’m the curator of this text.

Final week I launched Code Summaries, the place I summarise technical articles about Ruby with code.

If you wish to see a brief model of this text with solely the content material that has code, you possibly can see it right here. It’s a presentation that has one tweet per slide uploaded to

This version was created with help from @adrianthedev from Avo for Ruby on Rails (a pleasant full-featured Rails admin panel) and from @jcsrb, who despatched me suggestions to incorporate within the publication.

When you have any suggestions or concepts about this text, please attain out on Twitter or by way of e mail at

πŸ‘‰ Xavier Noria shared a brief rationalization of how constants work in Ruby:

Fixed identifiers and fixed paths are simply handy interfaces into these maps. Useful for frequent utilization, and for giving the phantasm of namespaces. The constants API provides a direct entry to these maps, and permits different issues like itemizing or deleting, for instance. – Xavier Noria

πŸ‘‰ Thiago Massa shared a brand new instance of sample matching with hashes:

He additionally shared the gist in case you need to play with it.

πŸ‘‰ Shino Kouda shared a brief code instance of .map(&:to_s) and Brandon Weaver clarify extra in depth how this works:

πŸ‘‰ Thiago Massa shared an instance of the best way to use the Pin operator (^) sample matching:

πŸ‘‰ Joel Drapper shared an instance of one other underused operator, XOR:

πŸ‘‰ Lucian Ghinda shared one other instance of utilizing XOR:

However you need to learn your complete thread, because it has some glorious discussions about utilizing these operators.

πŸ‘‰ Kirill Shevchenko shared two code samples explaining how |= is creating a brand new array as a substitute of including to the prevailing one:

πŸ‘‰ JoΓ«l Quenneville shared code about the best way to generate infinite sequence with Enumerator:

Because the produce can’t be used to generate sequence the place the enter from every step wants the output of the earlier step, then he confirmed the best way to add unfold to the Enumerator to realize extra:

And right here is how he confirmed the best way to use that:

There are extra examples shared in that thread.

πŸ‘‰ Lucian Ghinda shared a thread about an opinionated option to be taught Ruby:

πŸ‘‰ Emmanuel Hayford requested a sensible query: Find out how to clarify Class.class being Class:

Listed below are a few of the examples shared in that thread by Brandon Weaver, Lucian Ghinda, John Cheek, Ariel Caplan, Eric Halverson:

πŸ‘‰ Brandon Weaver shared an experimental piece of code to implement proc_line:

πŸ‘‰ Joel Drapper shared an instance of the best way to use Phlex with ERB:

πŸ‘‰ Jean Boussier shared their course of to enhance efficiency on string interpolation. Wonderful learn!

πŸ‘‰ Kevin Newton shared a fast command to assist perceive Ruby TRICK entries printed by Yusuke Endoh right here:

πŸ‘‰ Robby Russell requested what’s one foremost enchancment for rushing up assessments and obtained some excellent solutions.

Listed below are a few of the responses shared by Brandon Weaver, Greg Navis, Konnor Rogers, Andrey Novikov, Benjamin Silva H, Andrew Ek, however please do go and browse your complete dialog:

πŸ‘‰ Thiago Massa requested a query and shared a code pattern concerning the ampersand Ruby idiom:

And together with this query Thiago shared a code pattern:

He obtained some inspiring responses, learn your complete dialog. Listed below are two of them:

πŸ‘‰ Stan Lo shared an inventory of characteristic proposals for Ruby debug:

πŸ‘‰ Joel Drapper shared a brand new replace for Phlex.enjoyable exhibiting help for conditional CSS lessons:

πŸ‘‰ Cj Avilla shared code exhibiting the best way to use proper task / sample matching:

πŸ‘‰ Matt Swanson shared code about the best way to use modules to prepare options:

Listed below are some attention-grabbing replies, however I actually advocate you to learn your complete dialog (for folks not utilizing Twitter use this)because it has nice sugestions and a few nice rationalization for numerous kinds:

πŸ‘‰Shino Kouda requested what’s the results of executing the next code:

Brandon Weaver shared explaining how [] works for arrays and hashes:

πŸ‘‰ Kirill Shevchenko shared a code pattern about the best way to use lazy enumerators:

πŸ‘‰ Collin shared a tip about the best way to require a library when beginning IRB:

Supply: @collin_jilbert onΒ Twitter

πŸ‘‰ Joe Masilotti shared a pattern code exhibiting the best way to add a hidden subject to the button_to helper:

In the event you learn thus far and also you just like the content material, possibly you take into accounts sharing this and subscribe:

Vinicius Inventory shared two VSCode ideas for folks working with Sorbet:

Joe Masilotti πŸ“— shared requested about Ruby and Rails communities and he obtained a number of replies:

Listed below are a few of the communities shared within the dialog:

🚒 Julian Rubisch shared that they launched – Reactive Rails Opinions.

🚒 Jeremy Smith shared launched – A curated assortment of code samples from Ruby on Rails tasks.

Colby Swandale shared from his discuss at RubyKaigi about Including Kind Signatures into Ruby Docs

Yusuke Endoh shared a Cookpad code puzzle that was created for RubyKaigi, however anybody can play it now:

Jeremy Evans shared slides from RubyKaigi presentation: Fixing Project Analysis Order

Koichi ITO shared their slides from RubyKaigi about Making Rubocop Tremendous Quick

Takashi Kokubun shared their slides from RubyKaigi about In the direction of Ruby 4 JIT

πŸ“– Noel Rappin shared that the second model of his e-book Fashionable Entrance-end Developmen for Rails is now up to date to work with Rails. Purchase it right here (PragmaticProgrammers shared on twitter additionally a reduction code)

πŸ“– David Colby shared that they made free their e-book Hotwired ATS, that’s educating the best way to construct a posh Rails 7 software with Turbo, Stimulus, CableReady and Stimulus Reflex.

Any Cable shared a brand new challenge of month-to-month Any Cable updates: Any Cables Month-to-month #2 β€” August, 2022

Greg Molnar shared a brand new version of This Week in Rails created by Emmanuel Hayford.

Andrew Mason shared they launched a brand new Ruby Radar challenge #67 – New Rails Launch!

Ruby Libhunt launched a brand new model of their #329 Superior Ruby publication.

Nate Berkopec shared an article written by Jemma Issroff about the best way to discover sooner in a sorted array utilizing bsearch

Sam Ruby shared tutorial about the best way to use Turbo Stream and Stimulus with a Rails app on Fly

R7kamura shared about the best way to automate rubocop corrections on PRs.

The Ruby Dev shared putting in Ruby on AWS EC2 with Cloud Formation

πŸŽ₯ Julian Rubisch shared a video exhibiting how he’s utilizing CableReady::Updatable and Turbo kinds to implement a previewable textual content space. See it β†’ Public Constructing RailsReviews – #1 Preview Part

πŸŽ₯ Vladimir Dementyev shared a brand new episode of AnyCasts the place deploys AnyCable to Fly. See it β†’ Ep. 6: Study to with AnyCable

πŸŽ₯ Hexdevs shared a brand new episode of Open Supply Thursdays about an introduction to how Faker works and the best way to contribute to it. See it β†’ Let’s Faker Collectively: a Ruby library for producing pretend information

πŸŽ₯ Drifting Ruby shared the video model of This Week in Rails. See eit β†’ This Week in Rails Sept tenth, 2022

🎧 Drew Bragg shared a brand new episode about Coding Coders who Code with Ernesto. Hear β†’ Episode 10 – Ernesto Tagwerker

🎧 Therubyonrailspodcast shared a brand new episode of The Ruby on Rails podcast about RubyConfMini: Hear β†’ Episode 434: All Issues RubyConf Mini (Brittany + Jemma)

🎧 Fullstack Ruby shared a brand new podcast about Find out how to handle ruby apps dependencies. Hear β†’ Episode 6: How do you handle Ruby Software Dependencies

🎧 Ruby For All shared a brand new episode about programming with ADHD. Hear β†’ Programming with ADHD

🎧 JoΓ«l Quenneville shared a brand new episode of BikeShed with @EebsKobeissi. Hear β†’ 353: Psychological Fashions

🎧 Distant Ruby shared a brand new episode concerning the new V2. Hear β†’ Episode 196 β†’ The model new V2

Aaron Patterson shared a launch of Rack 3.0.0.rc1 and invited anybody to check it. Learn the most recent Changelog right here.

Mike Dalessio shared the most recent model of sqlite3 gem is out and it ships with precompiled sqlite. Learn the Changelog right here

Rob Sanheim shared a gem that helps operating parallel_tests:

It’ll run parallel on a number of CPU cores. ParallelTests splits assessments into even teams (by variety of strains or runtime) and runs every group in a single course of with its personal database.

ζˆη€¬ shared that Ruby 3.2 preview 2 is launched. See the announcement right here. Ruby 3.2 has WASI primarily based WebAssembly help, Regexp timeout, YJIT arm64 help and plenty of extra issues.

Hiroshi Shibata shared they launched Ruby construct with help doe Ruby 3.2.0 preview2. See the discharge

Koichi Ito shared rubocop efficiency 1.15. Test launch notes

Konnor Rogers shared declarative shadow DOM elements in Rails. See the code right here.

Ruby Lib HuntΒ sharedΒ for creating chains, much like chaining with then. The supply code of this library is right here. Here’s a code pattern:

Michael Nikitochkin shared a brand new model of the toxiproxy library that could be a TCP proxy to simulate community and system circumstances for chaos and resilience testing. See the mission right here and right here is an instance:

This was an extended challenge as there was a number of nice content material that I found in Ruby neighborhood. I began to comply with what is occurring on Reddit communities so I'll most likely begin bringing content material from there.

Please think about sharing this on social media or along with your colleagues:




Please enter your comment!
Please enter your name here

Most Popular

Recent Comments