Learn Elixir: The Ultimate Guide
If you come from an object-oriented background, Elixir might be a little bit confusing.
Thankfully, there are a lot of resources out there that will help you learn the language and the functional programming paradigm. Below, I have listed most that I think are valuable.
The article has two parts. In the first one, I review resources for beginner Elixir developers. Once you finish up with these, the second part is a collection of further suggestions to help you improve your skills.
Since everyone learns differently, I have tried to provide a diverse set so that you can pick content that suits your learning style. Good luck!
Learn Elixir with these resources
Programming Elixir & Elixir in Action
Both have three sections: introduction/syntax, OTP, and stuff you can skip for now.
There are some differences. Programming Elixir is more accessible and beginner friendly, while Elixir in Action is a bit more detailed, which is a minus for it in the syntax section and a plus in the OTP section.
If you can access both, I’d advise reading them together until the third section. If not, choose Elixir in Action – it will take you to production-level Elixir faster.
Joy of Elixir
Both of the books above assume that you are switching to Elixir from another programming language. If Elixir is your first language ever, Joy of Elixir is well-suited for complete programming beginners.
Elixir’s homepage has what amounts to a book on Elixir. It can serve as a quick intro to the syntax or even substitute for a “real book” if you’re a person that can’t wait to get a project up and running. Elixir’s documentation is renowned for its greatness, so don’t be afraid to use it.
Elixir School is a fantastic resource that includes syntax, OTP, and some stuff on Ecto (Elixir’s database tool) and other libraries. It is somewhat similar to the introduction on the Elixir website but more in-depth.
If you want to use an online resource instead of a book, or perhaps you feel more comfortable reading about Elixir in your native language (Elixir School has translations in 24 different languages!), this might be your choice.
Learn With Me: Elixir
Learn With Me: Elixir is a great resource to pair with Joy of Elixir for further beginner programmer studies. It’s like having a personal learning buddy!
Furthermore, if you like your intros with a bit more prose, this series is for you. It covers a lot of concepts and can help in case you have a question that the documentation or StackOverflow didn’t (or couldn’t) answer.
Since it’s a blog, it’s always in progress, but the basics have been covered.
I would suggest doing Exercism exercises in parallel to reading the books as they are a great way to test out your skills, learn new things, and practice Elixir. What puts Exercism over other “kata” websites is the fact that you get mentoring, for free.
How to productively procrastinate on YouTube
Some of you might perceive information better through video. Personally, I watch YouTube videos to immerse myself in the subject when my brain isn’t ready for serpentine book paragraphs and code examples.
Elixir tutorial by Derek Banas
Get introduced to the syntax of Elixir and go through some code and a few vital concepts in 1 hour. Extremely simple, extremely effective, no fluff.
Intro to OTP in Elixir
A broad overview of OTP. You can watch this before tackling the OTP section in a book or course.
Introduction to Elixir
If you prefer to learn by video, this is a ten video series that covers most of the stuff that one of the introductory programming books would cover.
Interaction with peers
If you are looking for a more chat-like experience, join the Elixir Slack workspace, they have a #beginners channel with nice people that answer questions. In addition, you are welcome to come hang out at #elixir-lang on IRC.
Let’s go a bit further
You can find a multitude of cool Elixir books out there; here are the optimal choices for a budding Elixir developer. If you want more, head to the Books section of the Elixir Forum.
Phoenix is the main Elixir’s web framework. If you are coming to Elixir to build web apps, this is what you will probably use. Programming Phoenix is a lucid introduction to Phoenix and the principles underneath it. With it, you can learn Phoenix and build a reasonable-ish application at the same time.
While the Phoenix book covers the basics of Ecto, Programming Ecto delves deeper into Ecto’s philosophy and all the things that you can accomplish with it.
To pair it with, here is a cool video on Ecto:
Designing Elixir Systems With OTP
Do Fun Things with Big, Loud Worker-Bees! Designing Elixir Systems With OTP is an introduction on how to structure your Elixir applications and make use of OTP properly. It’s straightforward and quite handy once you start going further than simple modules or using frameworks.
There is an EMx episode with authors in case you want to hear what you will get before you leap.
Did you know that most of Elixir is written in Elixir? Here’s how.
The implementation of first-class metaprogramming, or “programs writing programs”, was first introduced in Lisp. It is most useful in practice to implement boilerplate generation or have compile-time parametric polymorphism.
Elixir, inspired by Lisp’s facilities, provides programmers with two ways of metaprogramming: defining macros and code generation.
Believe it or not, but you can take a list, enumerate over it and define functions based on the values of the list at compile time! It is really easy if you familiarize yourself with two primitives: quote and unquote (that are really just macros, code of which you can also read later on). Once you understand those, it’s just like writing any other Elixir code. Truly a useful tool.
Read Metaprogramming Elixir to delve deeper into the possibilities of metaprogramming in Elixir.
Elixir for Programmers
Elixir for Programmers is a course by Dave Thomas, the author of the brilliant The Pragmatic Programmer and Programming Elixir, the beginner book mentioned at the start of the article. This course throws you straight into building things, and you are gonna create a Hangman game using OTP and Phoenix. If you need to get accustomed to the language quickly, this is the best way to do it.
The course is not free, but at $30 it is quite good value.
Alchemist Camp covers a variety of topics suited for both beginner and intermediate Elixir developers. While you need a “PRO membership” to see some of the videos, the free ones are already worth your time.
The Complete Elixir and Phoenix Bootcamp
Udemy courses get a bad rep these days, but I browsed this one, and it surprised me quite a lot. While the brevity of the course (it also covers Elixir, but just a little bit) makes it something I would not recommend to complete beginners, the section on Phoenix is astonishingly well done.
Unfortunately, it uses Phoenix 1.2, so some of the code in the videos is outdated for newer versions of Phoenix. I don’t think that figuring out the correct code is a problem if you’re adventurous enough, though. :)
Now, these aren’t exactly prime learning material on the foundations of Elixir, but if you are searching for something to listen to in free moments, why not?
Elixir Wizards is a podcast hosted by Justus Eapen and Eric Oestrich. Every episode, they invite a special guest to talk about some kind of topic or project the guest has been working on. For now, they have finished three seasons, each one with a more or less distinct topic: Elixir in production, Elixir internals, and hiring/training.
Confusingly called the same as Elixir’s build tool, Elixir Mix is quite similar to Elixir Wizards: every episode has a guest, you get to learn about the topic they are expert in. Have fun listening!
I admire your courage and wish you success. Learning a new language can be laborious, but I hope these resources will help you out. If you want to read more about Elixir, be sure to check out our posts with the Elixir tag.
- Learn Elixir with these resources
- Let’s go a bit further