Hello, Elixir

Recently, the brass at Soundstripe have made the decision to do what was unthinkable and all but taboo to mention barely two years ago: rewrite our app. Not just that, but shifting from a React/Rails stack to a Phoenix LiveView app, which is written in Elixir.

While I would be lying if I said I wasn't absolutely hyped out of my mind to be involved in this (probably once-in-a-lifetime) project, I'm reminded of Joel Spolsky's article covering—among other things—why you should never rewrite your app. That doesn't curb my enthusiasm, but I'm sensitive to the fact that this is a serious undertaking.

A short while before the decision to switch was made, I'd heard of Elixir and Phoenix through a coworker. Of course, as a helplessly curious and obsessive technologist, I dove in head first and began rewriting Agrinomicon (an agriculture-focused mapping and knowledge library) in Phoenix. This was soon after the Next.js app router went stable, so I decided to go split architecture: Next.js 13 over a Phoenix JSON and GraphQL API server. Unfortunately Next.js turned out to be a bit difficult to work with when it comes to the mapping library I picked (Mapbox) so I ended up just switching to Phoenix LiveView, which turned out to be a great decision.

I also recently launched HTTPizza which was built as a Phoenix LiveView app, since I needed a no-nonsense and no-spam way to monitor my own apps.

So far, working in Elixir has been a breath of fresh air—ever since I first started playing around with Python on a hand-me-down Sony VAIO shortly after the turn of the century, I've only ever really worked in object-oriented languages. Functional programming isn't an alien concept, but my experience with it was more pattern-based rather than language-based—using Redux within a React app, for example.

The progress we've made on what we're calling the Phoenix project (side note: The Phoenix Project is a book you should read) in a few months, coupled with the side projects I've shipped has given me a lot of confidence in the new language and stack. I don't know that it's enough of a siren call to lure me away from Ruby on Rails forever, though.