- Published on
Resources for learning Elixir
- Authors
- Name
- Gabriel Perales
- @g_perales
One year ago, I started learning Elixir. It's an interesting language to learn and very different from the languages I've used before. The dynamic typing is something that took me a while to get used to, but I've found very interesting its concurrency model and how it allows you to build scalable and fault-tolerant systems. It worth to give it a try.
On the other hand, for somebody like me who has been mainly a JavaScript/TypeScript developer, I love the versatility of the Phoenix framework and how it allows you to make real-time applications with ease using channels and LiveView.
Without making you wait any longer, these are the best resources I've found so far to learn the language and the Phoenix framework:
Exercism Elixir Track (free)
One of the best ways to learn a new language is by doing exercises. Exercism has a track for Elixir that I've been using to practice and learn the language. The Elixir track is one of the most complete tracks that Exercism offers, and it's a great resource to learn the language. I like how they have structured the exercises, and the feedback they provide after submitting an exercise, there is also a tree graph with all the topics covered in the track, which is great to understand the language and the concepts, find the next exercise to do, and master some concepts before moving on to the next one.
You can do the exercises in the web or in your local machine, and they provide a great setup guide to have a working environment in your computer.
Here is the link to the Exercism Elixir Track.
Build and MVP with Elixir (paid)
This is a course that covers the basics of Elixir and Phoenix to build a real-world application. It's a paid course, but is not expensive and it's a great way to learn the language and the framework. I really like the courses where you can build a real-world application, and more when you can build something that includes authentication, authorization, a database and integration with payments. The course also covers deployment to Fly.io, setup CI/CD pipelines with GitHub Actions, link the domain, and analytics with Plausible (which is open source and coded in Elixir). Don't expect deep dives into the language, but a good overview and a practical guide to build something.
The course is taught by Peter Ullrich, who is pretty active in the Elixir community and has a lot other good resources. He has also released a free online course Run Elixir, which is another great resource to learn the language, by now it seems basic, but it's a good starting point and I like that you can run all the exercises in Livebook.
Here is the link to the Build and MVP with Elixir.
Elixir Cryptobot book (free)
This is a free to read book (online) that covers Elixir and OTP. In the book you go through the process of building a crypto trading bot, and in the process, you will be introduced to concepts like processes, supervisors, and supervision trees and other OTP concepts. The book goes iterating on the previous version of the bot, adding more features and refactoring the code to introduce new concepts, improving the concurrency model and the overall design of the system, adding tests, and more.
I haven't finished the book yet, but I've seen enough of it to recommend it and it's free, so you have nothing to lose. In my opinion, this must be one of the best resources to learn about OTP because you see how the concepts are applied in a real-world problem, and the author does a great job explaining why they are used and what are the trade-offs, where there are alternatives to learn OTP like the Pragmatic Studio Elixir course, I think the book complements goes much more into detail.
If you want to support the author, like I did, you can buy the PDF/EPUB version of the book.
Here is the link to the Elixir Cryptobot book.