## You probably don't need to #map or #pluck that relation
On November 5, 2020; inFor performance, for a better life.
## Designing a Monolith: Understanding Code Architecture (Part One)
On October 23, 2020; in Designing a Monolith SeriesDefining what code architecture is and changing the way we think about our code.
## Designing a Monolith: The Series
On September 24, 2020; in Designing a Monolith SeriesRethinking how we design our monoliths.
## The big list of Ruby on Rails performance tweaks
On September 22, 2020; in Ruby on RailsSo you wrote an app and you think it's slow. What can you do? A lot.
## Async ActiveRecord Callbacks
On September 20, 2020; in Ruby on RailsNifty hack that's not terribly awful?
## Introducing Gearhead
On September 14, 2020; in Ruby on RailsTurn your database schema into a RESTful API in just three commands (including rails s
!)
## Using filters to easily create DSLs
On August 31, 2020; in Ruby on RailsTidy up your controllers and introduce descriptive one-liners by wrapping filters with clear method names.
## Ruby blocks in a few minutes.
On July 19, 2020; in RubyA quick and practical guide to seeing blocks being used.
## Organized code made easy with ActiveSupport::Dependencies::Loadable
On May 8, 2020; in Ruby on Rails, Code ArchitectureUse require_dependency
to make your code more organized.
## Querying and serializing one million records in Ruby on Rails
On May 1, 2020; in Ruby on Rails, PerformanceTips and tricks when querying your database and serializing objects in a performant and maintainable manner.
## Prefer `size` over `count`
On November 2, 2019; in Ruby on Railssize
doesn't hit the database if things are loaded?
.
## How Ruby on Rails ActiveRecord chaining works
On August 22, 2019; in Ruby on RailsReturning self
makes this clever API slick.
## Trivial Batch Actions in Ruby on Rails
On April 15, 2019; in Ruby on RailsWriting an elegant and DRY API to handle batch actions in Ruby on Rails.
## Purging ActiveStorage attachments with a familiar API
On March 19, 2019; in Ruby on RailsUse ActiveModel::Attributes
to easily create a familiar API for purging ActiveStorage
Attachments.
## Custom exception patterns in Ruby on Rails
On January 11, 2019; in Ruby on RailsCreating custom exceptions specific to your app's needs is a powerful way to convey intent. What do they look like and where should you put them?
## Custom headers for HTTP statuses in Ruby on Rails
On November 3, 2018; in Ruby on RailsAdding headers for specific HTTP statuses in Ruby on Rails easily with super
.
## Using Rails ActiveModel::Attributes and practice ActiveModel examples
On August 6, 2018; in Ruby on RailsUse ActiveModel::Attributes
in your models to get the schema-back attributes you love without the schema requirement.
## Keeping it classy with Struct
On May 25, 2018; in RubyUsing Struct
to bundle attributes together using accessor methods without having to write an explicit class.
## The ultimate pizza hack
On January 8, 2018; in LifeThis will change the way you buy and consume pizza and there's not even an ad on my site so please trust me when I say read this.