Gnarly Learnings from February

Engineering Insights

#
Min Read
Published On
March 13, 2025
Updated On
March 17, 2025
Gnarly Learnings from February

We love reading, watching, and listening to constantly update our skills and learn new perspectives. Here are some of the exciting pieces we learned from this month.

Rails 6 deprecates where.not as NOR & Rails 6.1 as NAND

ActiveRecord queries are often a large part of the day in the life of a Rails developer. Recently, we reached for them in order to select some records by leveraging where.not with multiple attributes. However, when we ran the specs we received a warning stating that this implementation has been depreciated due to unapparent behavior related to the conditional logic involved. Previously, logical NOR was used when applying the clause with multiple attributes, but as of Rails 6.1 logical NAND will be used instead.

What does this mean for you? Well, if you want to select for multiple attributes you can either use NAND logic such as where("foo != 'Foo' OR bar != 'Bar'") or you can chain separate where.not statements for each attribute.

Rails 6.1 adds query method missing to find orphan records

Some of our work involves large amounts of interconnected data. When a record is "orphaned", meaning it loses its "parent" record, this new method gives us an expressive API for querying those orphaned records.

Modern CSS with Tailwind

This book is a great introduction to the Tailwind utility CSS framework, as well as a valuable reference guide if you're already familiar.

There's No Such Thing as a Free Gem

Come for the promise of how to build an OAuth flow; stay for the discussion on evaluating the impact of a build vs. buy vs. borrow decision. This reinforced a lot of the conclusions I came to when I asked at RailsConf 2019: I know I can, but should I?

React State Batch Update

Modern react components leverage functional patterns to remain flexible, while still tracking and making changes on state within themselves. We learned that react helps us out by batching these hook-based state update functions so that we do not render unecessarily, and always group these changes so that they are changed within a single re-render.

Why Pry is one of the most important tools a junior Rubyist can learn

We ❤️ using Pry. If this article convinces you to dig into it, we have some additional tips available as well.

The career-changing art of reading the docs

Poring through documentation in the heat of the moment can be a necessity. Pre-emptively consuming documentation requires time (and privilege), but can help you (and others) out of jams, either by being able to find the information required, or recall it without the docs.

Rails' hidden type system

Rails's Attributes API is a great abstraction for helping Rails' internals, but also is very helpful for coercing types out of input for non-ActiveRecord classes, for example from controller parameters.

Contributors

Author headshot
Written by
, The Gnar Company

Related Insights

See All Articles
Engineering Insights
Context-Driven Development: The AI-First Alternative to Agile

Context-Driven Development: The AI-First Alternative to Agile

Context-Driven Development (CDD) is a software development methodology designed for AI-assisted coding. Learn how CDD differs from Agile and why detailed requirements are now the source code of the future.
Product Insights
How to Choose the Right Software Development Partner in 2026

How to Choose the Right Software Development Partner in 2026

Avoid project failure and costly delays. Learn how to choose the right software development partner in 2026 with our guide to vetting quality, teams, and warranties.
News
Expert Software Development Consulting Services

Expert Software Development Consulting Services

Been burned by agencies that over-promised and under-delivered? The Gnar offers guaranteed outcomes, fixed pricing, and a 12-month bug-free warranty. 100% US-based senior engineers.
Previous
Next
See All Articles