Ruby -> Elixir

Sushruth Siv
Tiny Tech Tales
Published in
2 min readMar 24, 2016

Get ready to un-unlearn and learn a lot of things when you head over to a functional programming language like Elixir from Ruby

One of the main reasons for using Ruby was the beauty and elegance that Ruby offered. The codes just speak to you and I am sure, tiny Ruby snippets can be understood by non programmers as well. Ruby is just a pleasure to code in and I think it has definitely achieved one of it mottos, “Programmer Happiness”.

After over 2 years of Ruby and Ruby on Rails, my work soon required me to scale substantially and I felt, either my coding skills were not mature enough to make Ruby scale along with the requirements, or Ruby was just not meant for heavy-duty applications. It did not matter. I had a task and it had to be done.

Enter Elixir. At first glance Elixir looked like Ruby. I guessed, learning Elixir will be a breeze since I had experience with Ruby. After a lot of research, I learnt about the benefits of functional programming, how it is easier to scale, how maintaining a large codebase is easy etc.

The first few minutes of familiarity that my Ruby experience brought was soon destroyed as I felt lost in a sea of programs in a totally different paradigm than the ones our brains had been force fed from our childhood.

You un-unlearn the meaning of the plain old = (Equals)

However, a few weeks into the ecosystem, and help from the wonderful BEAM Community, I crossed those initial hurdles and reached a place where I could get a lot of tasks I had considered to be difficult in the Ruby world, with ease in Elixir, with one tenth of the experience.

I would not say Elixir is a silver bullet for all programming problems, but keep this in mind.

For some problems,

(1/n * Experience) * Elixir implementation = Ruby implementation  
# 10 > n > 1

--

--