Introduction
In this issue, we have picked 10 interesting articles published last week that we feel are worth reading. These articles cover topics such as rails8, sidekiq, rails router, tests, packwerk gem, rspec, action cable, and web API. I hope you will like it.
1. The Plan for Rails 8
Rails 8 has announced its goals for the next release, which include a new background worker, cache backend, asset pipeline, framework for pushing notifications to mobile devices, and a load of development tools.
2. How does Sidekiq work?
This article focuses on the internals of Sidekiq, its design and implementation decisions, and its full lifecycle.
3. Understanding the Rails Router: Why, What, and How
The article discusses the concept of routing in Rails, focusing on the role of the Rails router and its internals. It covers topics such as the instance_exec method, match method, HTTP method shorthands, segment keys, named routes, resourceful routes, and non-resourceful custom routes.
4. Catching Assertionless Tests
Shopify has over 170,000 tests in its core monolith, covering most of its application code. However, some tests were added over 10 years ago, and it is unclear if all tests still perform their intended duties. This article explores how Shopify revised all tests to reveal and fix ones that were testing nothing while still being executed.
5. A Packwerk Retrospective
Packwerk, a Ruby gem released in September 2020, is a static analysis tool that helps decouple code and organize it into well-defined packages. It is similar to tools like Rubocop and Sorbet and has taken on a life of its own, inspiring blog posts, conference talks, and an entire gem ecosystem.
6. A Deep Dive Into RSpec Tests in Ruby on Rails
Ruby on Rails applications consist of several layers, including Models, Views, and Controllers. Secondary layers like Mailers, Jobs, and Helpers are crucial for testing, as they are largely impacted by the code's design. This article discusses in detail about writing tests at different layers.
7. Avoid most of the pain with test factories with the principle of minimal defaults
The author discusses The principle of minimal factory defaults which is a fundamental principle that helps create maintainable and easy-to-use test factories. This principle is universal and should apply to any test factory in any programming language.
8. Turbo Sortable Paginated Tables
The article discusses the creation of a sortable, paginated table using Ruby on Rails and Turbo Frames.
9. Deconstructing Action Cable
The author explained Action Cable using a top-down approach, observing its behavior in a browser, following the code, and deconstructing its implementation to understand its functionality.
10. Automated Web API Tests You Can Trust
This blog discusses the importance of thorough testing for web APIs and integrations. He argues that not all automated tests are protected equally and that thorough tests for public APIs can be detrimental to clients' day(s).
Resources ( Affiliated )
Upgrade SQL skills by practicing it.(Use discount code: ABNEW20OFF for 20% off )
That’s a wrap for this week. If you have any feedback, requests, or improvements for this newsletter consider commenting so that we can work on improvements for the next one.