Testing Rails Controllers with ActionDispatch::TestRequest
Testing Rails Controllers with ActionDispatch::TestRequest Learn how to effectively test your Rails controllers using ActionDispatch::TestRequest. This code snippet demonstrates how to interact with …
A pragmatic guide to browser support by Rachel Andrew
It’s tempting to think of Baseline as creating a hard line. If a feature isn’t Baseline, then it’s not ready for use. However, we all know that web development is a world of “it depends”.
Let's dive into the React fundamentals. This will help us build up a solid mental model that will allow us to understand what happens when react updates the UI.
There is No Need to Trap Focus on a Dialog Element | CSS-Tricks
Accessibility advice around modals have commonly taught us to trap focus within the modal. Upon further research, it seems like we no longer need to trap focus within the (even in modal mode).
In a typical imperative application, business logic and side effects are inextricably linked. For example, when you write await db.checkInventory(…), the runtime immediately reaches out to the database. Our Effect System works differently. Instead of performing the action, our functions return a description of the action. When our code needs to check inventory, it doesn’t call the database; it returns a plain object instead, which will be executed later by an interpreter.
investment portfolios which occupy the 'efficient' parts of the risk-return spectrum;set of portfolios which satisfy the condition that no other portfolio exists with a higher expected return but with the same standard deviation of return
The Invoker Commands API provides a way to declaratively assign behaviors to buttons, allowing control of interactive elements when the button is enacted (clicked or invoked via a keypress, such as the spacebar or return key).
oavif is a new approach to target quality encoding in image compression, designed around smarter convergence strategies and quicker scoring to be as fast as possible.
State in the url in React (the right way) State management should be easy. It’s hard if not performed properly. Putting state in the url can be tricky if one doesn’t use a proper pattern. Routing …
Rails views performance matters: can render slow you down?
In this post, we’ll benchmark and analyze the most used view rendering options, the optimizations Rails provides, and when it makes sense to use each alternative (or not).
There are books & many articles online, like this one arguing for using Postgres for everything. I thought I’d take a look at one use case - using Postgres instead of Redis for caching. I work with APIs quite a bit, so I’d build a super simple HTTP server that responds with data from that cache. I’d start from Redis as this is something I frequently encounter at work, switch it out to Postgres using unlogged tables and see if there’s a difference.
cleaning house in nx monorepo, how i removed 120 unused deps safely
Real cleanup in a big Nx monorepo. I used Knip to flag unused deps, verified removals, handled false positives, and shaved about a minute off yarn install with lower CVE risk.