Sortsmith was born from one of those "I definitely need this for my blog" moments that every developer has experienced. I was working on itsthedevman.com and convinced myself I needed elegant case-insensitive sorting functionality. Drawing from my previous job where I'd written similar sorting logic countless times, I figured it was time to build the sorting library I'd always wished existed.
The core idea was simple: make sorting feel natural through a chainable API that reads like English. Instead of wrestling with Ruby's built-in sort methods and custom comparison blocks, you could just write users.sort_by.insensitive.desc.sort and get exactly what you expected, no matter where you are sorting.
The technical implementation goes deeper than just case-insensitive sorting though. The library supports accessing hash keys, object methods, or array indices using dig, and includes ascending/descending controls built-in. To make sorting intuitive, I decided to hijack the default return for Enumerator#sort_by and instead return Sortsmith's Sorter class. I'm particularly proud of how simple the implementation turned out to be.
But here's the plot twist: I never actually used it. The blog I was building it for? Yeah, I never got into blogging, so the original need just... disappeared. Classic me - build the perfect tool for a problem that evaporates before you can use it.