Jump to ratings and reviews
Rate this book

Programming Elixir: Functional |> Concurrent |> Pragmatic |> Fun

Rate this book
You want to explore functional programming, but are put off by the academic feel (tell me about monads just one more time). You know you need concurrent applications, but also know these are almost impossible to get right. Meet Elixir, a functional, concurrent language built on the rock-solid Erlang VM. Elixir’s pragmatic syntax and built-in support for metaprogramming will make you productive and keep you interested for the long haul. This book is the introduction to Elixir for experienced programmers.

Maybe you need something that’s closer to Ruby, but with a battle-proven environment that’s unrivaled for massive scalability, concurrency, distribution, and fault tolerance. Maybe the time is right for the Next Big Thing. Maybe it’s Elixir.

287 pages, Paperback

First published January 1, 2013

Loading interface...
Loading interface...

About the author

Dave Thomas

216 books142 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
327 (44%)
4 stars
304 (41%)
3 stars
89 (12%)
2 stars
10 (1%)
1 star
2 (<1%)
Displaying 1 - 30 of 68 reviews
Profile Image for Michael.
162 reviews72 followers
March 13, 2015
Disclaimer: The good folks at The Pragmatic Bookshelf were nice enough to provide me with a free copy of this book, but this has no influence on the contents of the review.

My first contact with Dave Thomas was the famous “Pickaxe book” for Ruby. It wasn’t my first contact with the language, but it certainly helped in deepening my understanding of it. It’s a great book, and I went back numerous times to re-read certain chapters. I already had a crush on Ruby, but “the Pickaxe” helped turning that into a solid and lasting love affair.

Fast-forward some years. While I still love Ruby and work with it professionally, I have to admit to having a new language crush: Elixir. I’ve been interested in Erlang for several years, read some books, dabbled a bit, but never really got into the language. Elixir however got me hooked almost from the get-go. I find it’s a simple, elegant language, that’s easy to pick up, but has quite some depth.

The book

Let’s start off by clearly stating what this book is not: a reference. It weighs in at around 340 pages and does not try to cover every aspect of Elixir/Erlang. It still is one of my all-time favorite programming books though. Why? Because I believe it does an amazing job in conveying the “essence” of Elixir. There’s no point in documenting APIs, the language has great documentation online. Instead Dave tries to teach the reader how to think in Elixir.

“Programming Elixir” has three main parts. The first called “Conventional Programming” introduces some core concepts like pattern matching and immutability, before covering Elixir types, functions, modules, language constructs, and project organization. It’s easy to read, but not too boring for seasoned developers. However, if you have some previous experience with Elixir, Erlang, or even some other functional programming language you may end up skimming this section a bit, at least I did.

Where it starts to get really interesting is the next part called “Concurrent Programming”, which covers processes, nodes and the basics of OTP. This latter part can easily fill books of its own, so the author only manages to cover some behaviours, like servers (gen_server to be specific), supervisors and applications. It’s some excellent material however, so unless you’re a seasoned Erlang developer this part alone could be reason enough to read this book. Sure, it would have been great to go into some more detail or cover more of OTP, but I think it’s more than enough to make people understand the core principles of the framework so they are able to continue their studies with a solid foundation. I’ve seen many people struggle with the concept of processes and message passing concurrency, despite the relative simplicity of the Actor model. But when Dave suggests thinking of processes somewhat like objects in the sense that they encapsulate state, sending messages suddenly will feel very familiar to OO programmers who find it hard to structure their code around Elixir/Erlang semantics.

Last but not least there’s “More Advanced Elixir”, which covers macros, protocols, the language’s approach to mixins and a grab bag of topics that didn’t quite warrant chapters of their own. I really liked this entire section, especially the parts on protocols and mixins. I feel like it gave me the tools to look at most Elixir code and figure out what’s happening, which is quite an achievement for a book of this length.

Closing thoughts

The world of Erlang/OTP is somewhat different from other programming languages, so no matter what your background is, chances are that certain things may feel somewhat alien to you. This is were “Programming Elixir” shines: it doesn’t just try to get you to write Elixir, it wants you to write good idiomatic code because you understand what makes the language tick. The writing has a good flow and is to the point. On top of that each chapter comes with some well thought-out exercises that should keep motivated readers busy for a while. It’s hard to imagine a better introduction to the language than “Programming Elixir”, highly recommended!
Profile Image for Sebastian Gebski.
1,043 reviews1,024 followers
August 10, 2018
I've fully re-read new version (>=1.6) to compare it with the original release (1.2 or 1.3 if I'm not wrong). The impression is 95% positive:
* book is polished, well-structured & perfectly edited
* it's 100% enough to start an adventure with Elixir programming
* some of new elements (since 1.3) were properly covered (e.g. formatter), but there are also some other very interesting elements (like GenStage & flow) that haven't been even mentioned - yes, I know that GenServer is huge & it's not possible to cover every related topic, but as streaming was already covered, some kind of basic intro into GenStage would probably be helpful
* chapter on tooling is here, but I'd expand it a bit - these are important elements of ecosystem that may scare people off

But in general, book is still decent & all I can do is to recommend it heartily & honestly to everyone interested in Elixir.
Profile Image for Jeremy Carman.
65 reviews2 followers
October 24, 2019
It was a good book. I had previously ready Learn functional programming with Elixir last month. I expected this to be very similar, and just reinforce what I had just learned, but I was pleasantly surprised. One thing I liked about the book was the author was often pointing out the functional way to think about or do things. I also liked that he would occasionally point out convention, and then say I prefer method X.


The book is broken into three major sections. The first section was language basics, along with some suggestions on how to approach problem solving in a function manner. The second section was about concurrent programming and how Elixir handles it, giving practical examples on how to deploy Elixir applications. The last section covered a mix of more advanced topics, that you don't need to get started programming, but are interesting to learn.

The first section covered about 3/4 of what the previously mentions book covered, but with a different focus, and order. It was very neat to see how the two different authors built up your understanding of the language. One of the coolest bits I saw was where he shows the reader how to implement the classic fizzbuzz problem without an if statement.

The second section really went deep on how to use Elixir concurrently. There's examples, exercises and explanations from the bare bones, up to using several advanced libraries. Before reading this section I didn't know how easy it was to execute elixir code across multiple machines. He also shows of some really neat release features, like upgrading a live process without shutting it down.

The last section was shorter than the other two. I think the authors primary purpose was to show that there was more, and a lot more advanced features you could use if you needed, but he wasn't pushing it on you.
Profile Image for Bo Jeanes.
12 reviews18 followers
February 4, 2016
I've been really excited about Elixir for a few months and wanting to dig in. Late last year, I went through the Getting Started guide and managed to get through the whole thing in about a day.

Then I did nothing with Elixir until picking up this book.

I really wanted to like it but really, I found that it was just a wordier version of the Getting Started guide. It took longer to get through but taught very little above what was in the guide. Furthermore, the author's writing style and humour came off as condescending using occasional agist innuendo. It doesn't feel like the author has correctly identified his target audience in the slightest. People who've already bought this book do not need to be patronised to about the benefits of functional programming.

I did finish the book, but it was extremely difficult to get through, in part due to this writing style. I've read other work by Dave Thomas' and don't remember having this reaction to it, but I'm not sure if I've changed or if this book is different.

My suggestion? Just go through Elixir's Getting Started guide.
Profile Image for Babak Ghadiri.
33 reviews9 followers
February 26, 2021
من قبلا زمانی‌که داشتم زبان
Erlang
و فریمورک
OTP
رو بررسی میکردم خیلی هیجان زده بودم (حس مشابهش رو در بررسی هیچ زبان دیگری نداشتم). به نظرم از لحاظ نوع نگرش به توسعه‌ی سیستم‌های توزیع‌شده و همروند و
fault tolerant
خیلی رویکرد درست و منحصر به فردی داره.
این کتاب زبان الکسر (الاکسیر/کیمیا) رو آموزش میده که مفاهیم ارلنگ رو به همون شکل داره، جدیدتره و به نظرم یادگیریش ساده‌تره. کتاب پوشش مناسبی روی مفاهیم و نحو زبان داشته و خوندنش ( مخصوصا قسمت دومش) لذتبخشه.
به نظرم به عنوان یک علاقه‌مند به نرم‌افزارهای توزیع‌شده یا برنامه‌نویس، حتی برای تفریح و یادگیری یک پارادایم و نحوه‌ی تفکر جدید، خوبه که نیم‌نگاهی به این زبانها داشته باشید.
June 5, 2016
Very chaotic, with debatable topic order, some explanations posing more questions than they provided answers. Some of this could be possibly blamed on the characteristics of the language. The author states in the foreword "I want to inspire you to get involved, and the point to the online resources that will fill in the gaps.", but I think this has been taken a step too far. Frequently there's just a handful of examples for a given construct with a wordy commentary, without a more in-depth explanation of the semantics for example. This gives you a vague idea of what is possible, but doesn't give you an actual understanding or confidence in the subject. Much of the stuff could be described shorter and more precisely, without sacrificing how accessible it is to the newcomers to the language.

In general a far cry from the Joe Armstrong's Programming Erlang: Software for a Concurrent World, 2/E. I don't think I would have understood some of the topics covered by this book if I didn't have the better structured and more in-depth explanation from "Programming Erlang".
Profile Image for Sananab.
277 reviews16 followers
February 25, 2021
There's been a lot of hype about Elixir and its web framework Phoenix on various programmer-related forums over the last few years. I made a personal project in Phoenix while reading this book, and I have to say that whole experience was a major disappointment from start to finish. For that and other reasons, I don't go to those sites anymore.

Elixir is a bog-standard functional language whose main advantage over Erlang is that some aspects will be a bit more familiar to people coming from certain mainstream languages. Not worth the extra time and effort, imo. Phoenix - Elixir's killer app - looks nice on the surface, but is an absolute mess, and trying to get anything accomplished felt like death by a million pinpricks.

The book itself is a pretty standard go-through, as exist for a million other languages. It was competent but didn't spark joy or inspire me. The low rating is for how bitter I am to have wasted my time.
Profile Image for Sebastian Gebski.
1,043 reviews1,024 followers
May 7, 2015
The best tech book I've read in months.

Perfect balance between what's told & what's needed to comfortably start coding in Elixir. It shines especially in language-dedicated sections, OTP part feels a bit too short, but as it can be really overwhelming (based on my own experience when I was learning Erlang some time ago), I don't find it a big trouble.

All key topics (distribution, supervision, actor model itself) have enough of author's love, with an exception of error handling maybe. And I don't mean exception handling (there's a short appendix), but error resilience in general - in theory supervision chapter is pretty much about that, but I think more emphasis would be welcome.

Anyway, the truth is simple - it's a GREAT book. Pleasure to read, I just couldn't wait to use all the inspiration & knowledge taken from it by putting my hands on the actual code.
Profile Image for Fabian Linzberger.
7 reviews2 followers
June 25, 2013
very nice introduction to the language. while it targets programmers who do not know erlang already, and I already do, I still enjoyed the macro and protocol chapters a lot. also covers some basic functional programming well with practical examples.

recommended for anyone looking to learn Elixir!
March 18, 2019
Comparing to the “Programming Erlang” book by Joe Armstrong I found this book lacking in many regards. I often found myself wondering why some parts of the book are so shallow. All-in-all, if I were a beginner to functional programming and was learning from this book I would certainly learn allot, just not have much in-depth knowledge on how things work behind the scenes.
Profile Image for Justin.
199 reviews44 followers
April 1, 2017
Fun easy read. Doesn't dive to deep, but gives you what you need to understand the language.
September 13, 2021
This book is a good introduction to Elixir as a language, but lacks depth on areas such as how data structures work, concurrency primitives, and OTP. It's unfortunate, because the point of Elixir being created was for concurrent programming, and that's the weakest part of this book.

The primary strength of PE 1.6 is the exercises in the earlier chapters. An example problem is "implement the map function", after you've just been introduced to some concept that lets you accomplish this task. The author goes through several small and medium size projects in the book, and all the code is posted on the pragprog site.

The later chapters on concurrency had the potential to be so much better, but lack the "introduce a concept" -> "give related exercise" pattern of earlier chapters. The examples don't illustrate why some language feature for concurrency is useful, or when it's appropriate to use each one. Part 3 feels like it was tacked on at the end, and while the content is useful it would have been better to introduce the last 50 pages through an example project.

A major weak point of the book is philosophizing about "the real world" and how functional programming is superior to OOP. Elixir is a significant technical achievement, and this book attempts to explain that fact, but it uses platitudes instead of real examples. You'll probably read it anyway if you're interested in elixir.

Profile Image for Nathaniel Inman.
42 reviews1 follower
October 23, 2022
My review is for the >= 1.6 version. This book covers the basics of the language semantics to concepts like protocols, macros or even writing your own sigils. There is understandably an extensive section on OTP and elixirs flavor of concurrent programming for which sits on top of Erlang. Unfortunately there are times where the author waves away complexity indicating details lie within Erlang. There are some language specific design patterns annotated, but sometimes a lack of proper computer science terms to describe ideas. The book appears to be written with a specific idea of developer in mind: someone who has used ruby.

Overall it's an excellent resource for someone who's new to elixir, but it can't stand alone in said developers repertoire. I'd suggest complimenting this resource with elixir in action or the languages comprehensive online documentation.

My bookmarks are on pages 23, 43, 48, 62, 89, 100, 113, 119, 125, 136, 293, 319 & 347.
Profile Image for Daniel Paulino.
3 reviews4 followers
July 26, 2017
If you're looking for a introduction about how powerful is Elixir, this is a great choice. Dave Thomas starts with some basics principles of the language and Functional Progamming then shows how the some core principles of the OTP works, as the final part he shows some advanced principles like Macros and Protocols, but If you're looking for a more advanced book this is probably not the best one.

The nice thing about the book is that all chapters comes with a some exercises to reinforce what you learned and there's also a forum to discuss the solutions for the exercises. I think this is a very good introduction to Elixir and to see if you should invest more time in the language or not.
Profile Image for Michael Dubakov.
208 reviews139 followers
November 8, 2016
Quite OK book. It was the first FP book I read fully, so first part was useful. I imagine it will be too basic for developers with FP experience. Unfortunately, second part did not dig deep into systems design based on processes. You have a glimpse of processes, supervisors, tasks and agents, but there is no foundation you can understand how to create at least medium apps. I think this book is good for beginners only.
Profile Image for Bruno.
12 reviews2 followers
May 3, 2020
Elixir takes pattern matching to the next level. GenServers and Supervisors is something very clever that I haven’t seen in any other language as a primitive concept. Dave has his own magical way to teach tough subjects and I have to say that Elixir really caught my attention. This is the best book you can get to learn the the basic concepts and have a glimpse of the advanced features Elixir provides.
2 reviews
March 30, 2020
This book was my first step coming into Functional programming from years of writing object oriented code. Dave handles the nuances of Elixir as well as Functional programming masterfully. The book does not delved deeply into OTP which I think is a correct decision for an introductory Elixir book. This book is best complemented with Exercism-Elicir track if you want the most out of it.
Profile Image for Michael Caveney.
438 reviews7 followers
May 31, 2020
Probably the best book currently available on learning the Elixir language, Dave Thomas continues the high-quality you've come to expect from him after books like The Pragmatic Programmer. I'd recommend pairing this with his Elixir For Programmers course for the full effect!
126 reviews2 followers
June 2, 2021
This was a wonderfully written book. It's been a while since I've been this excited about a language! The examples given in this book, as well as the clear, methodical, and charming writing make it well and truly worth your time. I am looking forward to writing more Elixir soon to solidify these concepts. Highly recommend.
1 review1 follower
April 5, 2020
The book is well structured and covers everything of what's needed to start using the language. It also has some very nice examples. Unfortunately, the discussions forum for the book has been disabled.
Profile Image for Sotolf Flasskjegg.
128 reviews18 followers
November 19, 2017
This book was fun, I still have quite a bit to learn, but it was well written, and I would need to practice a bit to get to understand stuff completely.
Profile Image for Valery Lukin.
12 reviews1 follower
January 4, 2019
Great and easy to read book. After getting familiar with Elixir basics this book is a gem to find. Gives nice introduction to ITP and some more in depth of language itself.
Profile Image for Romenig Lima.
7 reviews3 followers
May 7, 2019
It has useful examples for how to code in different ways with elixir!
Profile Image for Dave Shah.
5 reviews
June 18, 2020
Decent. I got a bit bored and toggled between this and the Phoenix book to really feel like I was learning
1 review
July 27, 2020
Very good introduction to elixir but without some dense material, but it can put you on the right direction.
Profile Image for Imp.
61 reviews8 followers
November 24, 2020
Good information on the Elixir programming language, recommended read if you are already somewhat familiar with the language and want a deeper and better covered understanding.
Profile Image for Stevo Ilišković.
98 reviews3 followers
Read
February 24, 2021
You’re going to have to unlearn a whole lot of what you know about programming.
Many of your instincts will be wrong. And this will be frustrating, because you’re going to feel like a total n00b.
Displaying 1 - 30 of 68 reviews

Can't find what you're looking for?

Get help and learn more about the design.