ruby vs elixir (2 Part Series)
I’ve been starting to prep for the job hunt the last couple weeks, and you know what that means… algorithms!
I’ve been spending around 45 minutes a day working through some of the popular interview questions, and one of the things I've strived to do from the start is look for multiple unique solutions to each problem.
At first, I was just using Ruby because it’s my strongest language. But yesterday I decided to try something different.
Instead of looking for multiple solutions in just Ruby, I would solve each problem twice. Once in Ruby, and once in Elixir.
I’ve been doing this for just two days now and I can already tell it was one of the best decisions I ever made!
For those of you who don’t know, Ruby and Elixir are two languages that are aesthetically very similar, but behave completely differently behind the scenes.
Ruby is an object-oriented language at heart and relies heavily on iteration and mutation to solve problems
Elixir is a functional language that relies on recursion and pattern matching.
Using both to solve problems everyday has forced me to look at the same problem from two completely different perspectives, and use two totally different sets of tools to solve it.
In the long run, I think doing this will make me a more multidimensional developer, which I think is one of the key skills that separates the beginners from the pros.
Anyways, this got me thinking a lot about the whole Ruby / Elixir ecosystem and the crossover between the two, and I realized that the two are almost the perfect yin and yang.
Polar opposites in how they operate but with a lot of similarities and a strong relationship. Where one is weak the other is strong, and if you can master both you become a much stronger developer.
What do you guys think… Are Ruby and Elixir the perfect yin and yang?
Are there any other two languages out there that fit the mould?