Select Page

It Honestly Felt Like Reuniting with a Friend

Software Development

I’ve been writing software for a very long time; I’ve learned and used many programming languages over the years. The very first program I ever wrote was in basic on a RadioShack TRS-80 computer. I later bought the assembly package, fired up the cassette tape and wrote a lot of software for the TRS-80 in assembly. On many platforms since then I’ve written software using assembly for at least 10 different CPU families and micro-controllers, the Motorola 68HC11 was a favorite in the 1980s. I used flavors of Basic, Fortran, Cobal, C/C++, Prolog, C#, PHP, JavaScript and very recently Elixir. I’ve mastered countless frameworks and ever evolving standards and best practices. There is almost something Zen about creating software that is performant, stable and useful. You either get it or you don’t. It can be done with almost any language but it is easier in some languages.

A few months ago, I started playing with Elixir. For the last decade over 90% of my work has focused on web applications and sites. A couple of years ago, I settled into a comfortable technology stack … VueJS on the front end, PHP or NodeJS on the back end. On the back end almost all new projects were NodeJS. I have a lot of experience with PHP and clients I still support using it but NodeJS is superior in so many ways. But after playing with Elixir I have altered my technology stack for new projects. VueJS on the front end and Elixir Phoenix on the back end. Yes, I still work with PHP and NodeJS for existing projects with an existing code base. But for new work Elixir Phoenix is the default.

When I started learning about Elixir it felt oddly familiar. Elixir is a newish language. It compiles to byte-code which runs on BEAM the virtual machine for Erlang. Erlang has been around for several decades and has its origins in the telephony industry. Because of its history, BEAM is inherently stable and secure. But I’ve never used Erlang prior to my exposure to Elixir. Elixir can include Erlang code and libraries and shares some basic syntax and structure. But if I never used Erlang before, why did Elixir feel so familiar?

It turns out the syntax of Elixir is very similar to the syntax of Prolog. I used Prolog in the late 1980s for several projects. I can honestly say without a doubt I enjoyed writing software in Prolog more than I have in any other language … until I found Elixir. But we go where the money is and I left Prolog behind with the rest of the 1980s and embraced object oriented languages because that’s where the jobs were.

I could spend days explaining why functional programming in general and the BEAM virtual machine in particular are superior to what is in wide spread use today. But while I am an advocate of Elixir and BEAM, I am not a crusader. I’ve been doing this for a very long time. I understand the compromises and economic realities of building software today. I get it. I’m just glad I’m at a point where I can use what I think are the right tools, languages and frameworks to serve the best interests of my clients. Having written that, because I do understand the realities, I would never convert a clients existing code base to BEAM without their consent and I fully disclose to new clients my preferred technology stack for new projects. They know if I take them on as a new client, for a new application or extension to an existing application, the technology stack will be VueJS in the front, BEAM (using Elixir Phoenix) in the back. If they want or need a different stack, I’m more than happy to help them find the right person to work with them.

I am fully embracing this for my own projects too. For the past year I have been rewriting RediDraft using VueJS and NodeJS. In May, after spending some time with Elixir, I completely rewrote the RediDraft back end to run on BEAM. The NodeJS version of the RediDraft back end took over six months to code and test up to the point where I decided to switch. There was still work to be done to fully flesh it out and secure it properly. In May, rewrote the entire back end server in two weeks using Elixir. There is still work to be done but because of the nature of BEAM I don’t have to spend the inordinate amount of time required on defensive programming in NodeJS. And since BEAM is really multi-threaded, the deployment options are far simpler and far more secure. Don’t hate the messenger, the shortcomings of NodeJS are well documented. An additional bonus is since testing is a first class citizen in Elixir it is much easier to write and maintain unit, integration and end-to-end tests.

I am grateful to have found BEAM and Elixir. I’m not a bit worried about the naysayers who talk about adoption rates and available talent. The very stark reality is code camps are churning out huge numbers of minimally trained … I’m not even sure what to call them. They are great at parroting back canned solutions but lack creativity to plow new ground when solving problems. They will be replaced with code generators built from Large Language Models. They have never been my competition and never will be my competition. They would never be able to make the transition to any functional programming environment like BEAM.

And I think that’s a good thing!

0 Comments