Trying Phoenix and Elixir
Earlier this year I surprised myself and got back into daily programming. It’s been quite a trip and mostly fun. The part that has been the most frustrating is when I solve a problem one week only to have the same problem again next week, but I can’t quite remember how I solved it. I have tried to minimize that issue a bit by keeping a log.
Just when I’ve started to get rolling, I am surprising myself again by picking up Phoenix and Elixir for my next project. About eighteen months ago, before this web-project bug hit me, I did try to book-learn myself some Phoenix. Without a project to work on, or even a desire to come up with a project, I fell off the practice rather quickly.
I have never been a deep-diver of programming languages and frameworks. I don’t find the details of how things work to be that interesting on their own. I find the fact that these open source tools exist at all to be the amazing part, and it turns out I very much enjoy them to build things. The quickly-built things are what excite me.
Fast forward to today. After standing up three prototypes with Ruby on Rails, I reminded myself of another thing that really makes me happy: fast websites. I’m building prototypes here, with hopes no higher than eventually serving a few thousand people on an app that catches on in its little niche. There is no practical reason for me to move from Rails. It’s certainly fast enough to handle the things I want to build. As experience is (re)gained, the workflow is quite nice. And while it’s hard to find things on Google, there is a lot of hard-won knowledge out there, including my own experiences with the framework, which are certainly buried somewhere in my brain.
Elixir and the Phoenix framework promise better performance on the basic web things; probably by a factor of five or ten. On top of that, the authors were inspired by Ruby and Rails, so they have been able to largely keep the “developer happiness” goals of those inspirational technologies alive in their own developments.
As I go through the book learning, it has been remarkably quick to stand up a simple application in Phoenix. Certainly I will be slowed down as I learn to embrace a new framework, a new mode of programming (functional declarative rather than object oriented), and a less-magical way of doing things. Okay, the latter might net out positive very quickly.
I realize the performance of my applications might not be all that noticeable, especially if they include multimedia assets like photos and videos, but the promise of simply not worrying about scaling for a very long time is a good one. The promise of apps that are not resource-needy and that are cheap to run is great for someone building many prototypes each year. The promise of serving thousands of connections cheaply for live websocket interactions is quite exciting. The promise of tests that run blazingly fast makes me smile.
So here I go. Maybe I’ll be even happier building apps over the next couple months. Or maybe I’ll fall back to Rails, my comfort zone. Either option will be a pretty great place to be.