The smell of that potion

The smell of that potion

Some thoughts on Ruby, Rails, Elixir and Phoenix and how libraries, frameworks and communities influence the practices and the sustainability of languages.

I’ve been using Ruby as my main programming language since 2010. As of today I still enjoy its syntax and simplicity. Its community is very friendly and productive and many companies and products have sprung from it.

However all these years have not been a path of roses. I have seen how the Ruby community has been deeply influenced by one big project: Ruby on Rails. The standards and conventions of that project were taken as the right way of using the language. There have been plenty of voices complaining about it yet the mainstream mentality hasn’t changed one bit.

The other problem that any Ruby developer will face sooner rather than later is performance. If there were people in the community warning about the Rails way of doing things the complains about the performance have been an outcry.

It’s been three years since this thought crossed my mind for the first time and I still think that Rails and the GIL will kill1 Ruby. There are countless examples of how bad the maintainability of Rails applications gets as the code base grows. You will find even more cases of performance issues. There is a lesson to be learnt lurking in there. A lesson that I won’t easily forget when I choose my next go-to programming language.

Speaking of which: I have been playing with Elixir lately. It was a young language back in 2013 when I first tried it out. It’s more mature now. Several libraries and frameworks are making the language ecosystem more interesting. One of these projects is Phoenix.

Phoenix is a mayor player in the language now. Big enough to make creating a new Phoenix project a task in the language build tool, mix.

I have to admit that I haven’t given the framework a serious try yet. But all the demos and guides I have seen reminded me so much of Rails that I wanted to brew uninstall elixir immediately. While performance won’t be an issue, maintainability and bad practices may turn Elixir into the new Ruby.

It was a relief to find this article by José Valim (the creator of Elixir) while researching about testing and mocking tools. That blog post is a summary of the mocking and testing practices that I have been following and advocating for several years. I was super pleased not only to see that José advocates them too but also that the language has support for them right out of the box.

I am looking forward to give Phoenix a try. Hope all that Rails-iness is only a coat intended to create familiarity. Hope Elixir and its community embraces modularity and good design practices like Ruby never did. My fingers are crossed.

  1. And by killing I mean significantly impacting the usage of the language.