Gnarly Learnings from July 2023

News

Ethan Fertsch
#
Min Read
Published On
March 13, 2025
Updated On
March 24, 2025
Gnarly Learnings from July 2023

At The Gnar we are always reading, watching, and listening in order to keep our skills sharp and our perspectives fresh. Here are some of the resources we learned from this month.

 

ComparisonValidator

Gone are the days when we need to write custom validators in Rails to determine if a start date begins before an end date! Back in 2021, the ComparisonValidator was added to Rails 7. While useful for solving the date comparison example above, that's not all it can do! It can also compare strings, and it allows for the flexibility of custom comparisons.

Active Storage Can Pre-Process Variants

Earlier this month Rails added a feature allowing Active Storage variants to be pre-processed up front by adding preprocessed: true to the variant definition. This makes the attachment ready to serve from the outset, rather than requiring the variant to be prepared/transformed on the fly.

JavaScript's findLast() and findLastIndex()

There are a few new Array functions included in ES2023, findLast() and findLastIndex(). The exciting piece is less about what these functions do (you can probably figure it out from the names) and more about the convenience that they provide. As a Rubyist by trade, I am used to a super developer-friendly experience when it comes to the readability, and accessibility of functions so it's great to see these being added to JavaScript - even if it took until 2023. 😉

Partial Renders in Rails

Partial rendering allows you to create a consistent template with different sections, for example "title", "body", and "footer."  Then the templates can define content for each of those sections without having to know anything about the layout of the root template.

React.FC Removed From create-react-app Base TypeScript Template

If you build React apps with TypeScript, you're certainly used to seeing and using the React.FC (or React.FunctionalComponent) type at the declaration of your functional components. The folks maintaining create-react-app have decided to remove this type from their template as they believe it is more harmful than helpful. I tend to agree, particularly around the implicit definition of children.

 

Contributors:

 

Learn more about how The Gnar builds software.

Ethan Fertsch

Related Insights

See All Articles
Engineering Insights
Why Your AI Coding Agent Keeps Making Bad Decisions (And How to Fix It)

Why Your AI Coding Agent Keeps Making Bad Decisions (And How to Fix It)

AI coding agents making bad decisions? The frustration comes from two fixable problems: assumptions and code quality. Here's how to get consistently good results.
Product Insights
From Dashboards to Decisions: Why Traditional BI Can't Keep Up

From Dashboards to Decisions: Why Traditional BI Can't Keep Up

Stop waiting days for dashboards. Learn how BI2AI uses LLMs and RAG to eliminate the analyst bottleneck and turn complex data into instant executive decisions.
Product Insights
Are Your Legacy Systems Bleeding You Money?

Are Your Legacy Systems Bleeding You Money?

Technical debt now accounts for 40% of IT balance sheets, with companies paying a 10-20% surcharge on every new initiative just to work around existing problems. Meanwhile, organizations with high technical debt deliver new features 25-50% slower than competitors. Features on your six-month roadmap? They're shipping them in three weeks.
Previous
Next
See All Articles