Top 3 Elixir books that will make you love Elixir even more
Tags: elixir, phoenix, books, concurrency
Published: 2024-02-28 12:44:12

## Introduction: Beyond the basics

I've been using Elixir for about 2 years now and so far I can confidently say that it's one of the most practical languages I've ever used. It has a lot of features that make it a joy to work with. It's a functional language, it's concurrent, it's distributed, it's fault-tolerant, and it's easy to learn. Whenever my colleagues ask me about Elixir, I always tell them that it's a language that's worth learning. I also recommend they read some of the introductory books about Elixir, like _Elixir in Action_ by Saša Jurić, _Programming Elixir_ by Dave Thomas, and _The Little Elixir & OTP Guidebook_ by Benjamin Tan Wei Hao. These books are great for getting started with Elixir and they cover the basics of the language and the ecosystem. 

But what about the next step? What about the books that will take you beyond the basics? What about the books that will make you love Elixir even more? In this article, I'll share with you the top 3 books that every Elixir developer should read. These books will help you to deepen your understanding of Elixir and to become a better Elixir developer.

_Disclosure: I'm not affiliated with any of the authors or publishers of the books mentioned in this article. I'm just a fan of Elixir and I want to share my love for the language with others._

## _Real-Time Phoenix_ by Stephen Bussey

![Real-Time Phoenix](https://pragprog.com/titles/sbsockets/real-time-phoenix/sbsockets.jpg)

So you've learned the basics of Elixir and you've built a few web applications with Phoenix. You've learned how to use Ecto, how to use Phoenix LiveView, and how to use Phoenix PubSub. You've also learned how to use Phoenix Channels to build real-time web applications. But you want to go deeper. You want to learn how to build real-time web applications that are fast, reliable, and scalable. 

[Real-Time Phoenix](https://pragprog.com/titles/sbsockets/real-time-phoenix/) is a book that will teach you to understand and how to build **real** real-time web applications with Phoenix. The book covers topics like WebSockets, Phoenix PubSub, Phoenix Presence, and (a little bit of) Phoenix LiveView. The best part (I think) is that the book covers how to test Phoenix sockets and channels, which is something that many developers struggle or ignore with. The book also covers how to deploy real-time Phoenix applications to production, and some considerations for scaling them.

## _Metaprogramming Elixir_ by Chris McCord

![Metaprogramming Elixir](https://pragprog.com/titles/cmelixir/metaprogramming-elixir/cmelixir.jpg)

[Metaprogramming Elixir](https://pragprog.com/titles/cmelixir/metaprogramming-elixir/) is a book that will teach you how to write **code that writes code**. Metaprogramming is one of the most powerful features of Elixir and it's what makes the language so extensible and flexible. Inspired by Lisp, Elixir's metaprogramming is easier than many other languages (Yes, I talking about you Rust).

As many Elixir devs know, the author Chris McCord is the creator of the Phoenix web framework. He was once a Ruby developer and there were times when Ruby was not good enough for his needs. He then discovered Elixir and he was amazed by its features. He was particularly impressed by the metaprogramming capabilities of Elixir, which led him to create powerful macros and DSLs in Phoenix. 

In this book, Chris McCord explains how metaprogramming works in Elixir and how you can use it to solve real-world problems. The book covers topics like macros, quote and unquote, code evaluation, and code generation. It also covers the use cases of metaprogramming, like building DSLs, writing code generators, and creating domain-specific abstractions. Once you understand metaprogramming, you'll be able to write more expressive and concise code, and you'll be able to create your libraries and frameworks. 

## _Concurrent Data Processing in Elixir_ by Svilen Gospodinov

![Concurrent Data Processing in Elixir](https://pragprog.com/titles/sgdpelixir/concurrent-data-processing-in-elixir/sgdpelixir.jpg)

Elixir is known for its concurrency primitives. It has lightweight processes, message passing, and supervision trees, which make it easy to write concurrent code. But how do you write concurrent code in Elixir? How do you build concurrent data processing pipelines? How do you handle backpressure and fault tolerance?

[Concurrent Data Processing in Elixir](https://pragprog.com/titles/sgdpelixir/concurrent-data-processing-in-elixir/) is a book that will answer these questions. The book covers topics like processes, message passing, supervision trees, and fault tolerance. It also covers how to use GenStage, Flow, and Broadway to build concurrent data processing pipelines. 

One thing I love about this book is that it starts with a very basic element, the process, and then it builds up carefully to more complex topics like GenStage, Flow, and Broadway. Not only will you get a solid understanding of the basics of concurrent programming in Elixir, but you'll also be able to choose what libraries would be best for your use case. 

## Conclusion

Elixir is a language that's worth learning. It's a language that's worth mastering. It's a language that's worth **loving**. The books I've mentioned in this article will help you to deepen your understanding of Elixir and to become a better Elixir developer. They will help you to build real-time web applications, write expressive and concise code, and build concurrent data processing pipelines. They will make you love Elixir even more.

I hope you find these books as useful as I did. What are your favorite Elixir books? Let me know in the comments below.