Elixir book recommendation for a Javascript dev

I come from a javascript background and I just starting learning elixir. I went through the basic tutorials but I want something deeper. I know there are about 5 books, couple different videos etc but I am a little tight on cash. If I was going to get one of the major books what would you recommend? From the brief chapter overviews it seems the “little elixir and otp book” and “elixir 1.3” seem to stand out the most. Any thoughts or recommendations would be awesome. Thanks

2 Likes

Hi, you might want to check out this thread on reddit - Good book for experienced dev?

3 Likes

Don’t forget our monthly giveaways and that you can get 25% off any Pragprog ebook with your code via the comp site :slight_smile:

This is the order I am intending to read my first five books:

Programming Elixir
Elixir in Action
Little Elixir &OTP
Programming Phoenix
Metaprogramming Elixir

Full list here:

2 Likes

Get Little Elixir & OTP Guidebook, read it, and understand it. Then just code your own projects or read source code of others and read the docs a lot (they are good)—no need for more books.

1 Like

@sotojuan, that was pretty straightforward :joy:
I recommend to start with Programming Elixir 1.3.

2 Likes

I personally think a lot of developers waste too much reading books and watching videos to feel “prepared” and do not spend enough time actually coding real things. Just my opinion though.

6 Likes

[quote=“jsnoble, post:1, topic:3815”]
I went through the basic tutorials but I want something deeper. … but I am a little tight on cash.
[/quote]Have you actually worked through Introduction to Mix? Did you get What’s new in Ecto 2.0? The idea being to keep yourself busy until the next 50% off sale at Manning or 40% off sale at PragProg (last year there was one in April).

Right now at Manning code wm022317lt will take off 40% for Little Elixir & OTP Guidebook and Elixir in Action until Feb 28, 2017.

2 Likes

I like books as references or for tricks, but I do not learn via books, rather I learn by ‘doing’, with the reference manual available. ^.^

Consequently I have a ‘programming’ directory in my home directory that has subdirectories of about 300 different languages, inside of each are more sub directories of projects that I made while learning those languages. This is the way I learn. ^.^

1 Like

I think books are awesome - especially from respected tech publishers like Pragprog. The professional editing alone is priceless.

I probably fall into @sotojuan’s group who reads a lot before getting stuck in, and although I haven’t finished learning Elixir yet, I can honestly say that going through all the books and learning material that I did when learning Ruby, was definitely not a mistake.

In fact I think my first app was actually one of my best - because all the best practises and all the knowledge was fresh in my mind :slight_smile:

Having said that, I am thinking of learning Elixir by getting stuck in more purely because I have to ‘unlearn’ much of what I know and I need to get into the habit of doing things differently, and I think that might be better cemented through practise. I’m still going to read lots before I get stuck in to my first app, but I am not going to make handwritten notes like I did when I was learning Ruby which would increase my learning time by 50% or more (I didn’t just take notes, but reviewed them before each reading session).

I think it’s great that some people can learn by doing or reading through code, but I’ve also seen downsides to that - sometimes an explanatory sentence or two can shed so much more light.

2 Likes

“Don’t throw the baby out with the bathwater” - maybe move to a “terse note system” (that you can support with your smart phone). While cheat sheets compiled by others are readily available I often find that certain tidbits are missing. The “what was that again?” and “where did I come across that?” feeling is really, really annoying.

2 Likes

I did actually start off by just copying and pasting bits from the PDF into a notes file, but found I was copying a bit too much :lol:

The reason I am leaning towards not writing notes this time, is because at least 4 of my Elixir books cover the language basics itself - so that more or less emulates note taking as I will be reading that stuff 4 times. I did consider reading the books in parts in succession, i.e. reading the basics of Elixir covered in each book first, then moving on to the next part of each book… but I’m not convinced - it makes sense, but may not work in practise. What do you think?

1 Like

Reading multiple books takes care of the “review” aspect. I was more thinking along the lines of a “jump start document” to get you back into the zone with Elixir after, lets say, working for a few weeks exclusively in Ruby.

I’m also not sure how (time-)effective “multiple” books are going to be - unless they make you work through a (different) substantial project. “Programming Elixir” is largely exercise based, while IIRC “Elixir in Action” has you build a key-value store (in the beginning). So between those two you should be covered and which one you start with is largely a matter of preference.

Now for additional practice you can use Études for Elixir almost immediately alongside either of those two. I really don’t see a case for also going through “Introducing Elixir”.

2 Likes

I used to have notes like that for Rails - but found that after a while of working with it I no longer needed them, so the ROI for it didn’t seem great. Also, I found that I just googled things like that as generally what’s in the official guides is enough :lol:

Re reading multiple books that cover a similar topic, I think I do so for a number of reasons:

  • Repeating/reciting stuff helps reinforce it
  • Sometimes a different take can help make things clearer or let you view it from a different angle
  • I want to write a similar post about learning Elixir that I did for Ruby, so want to read everything out there if possible.
  • I will feel like I’ve missed out if I don’t read everything (or as much of it as possible) :044:

I’m not really into doing exercises as I don’t feel the same sort of reward from them, as say, working on an actual app (but I think part of me is just lazy like that, haha).

1 Like

I’ve just made the Javascript transition. I’m two months into it and feel pretty comfortable.

My favorite is Stephen Grider’s Complete Phoenix and Elixir Bootcamp. It’s slow but very comprehensive. If you like a lecture format, this is where I’d start.

I also got quite a bit out of https://www.learnelixir.tv The videos are very dense and quick.

There are good program challenges on Code Wars

Dave Thomas’s Programming Elixir is great, as everyone mentioned.

I’ve held off on the OTP stuff. Javascript is goofy being single threaded, synchronous execution context with a separate event loop. Elixir has great async helpers to “simulate” a JS event loop. For threads, If you’ve worked with Node and spawning child processes, then you know when and how OTP might be advantageous. If you’re designing web apps like me, my opinion is deep diving OTP is overkill. I’ll wait until I need an OTP optimization and then go for it.

My biggest Elixir struggles aren’t functional programming, pattern matching, recursion, or the rest. It’s the vast number of data types, macros, and imports.

Data Types: To me (and I think most Javascript converts), we’re used to everything being an object. The Elixir/Erlang data types are many and, at times, maddening. When to use a tuple, a map, a list, a struct, and atom? Why use an atom and not a string? And the various notations, e.g. %{“a” => :b} vs %{a: :b} //error.

Macros: Marcos often hide the code (to me anyway) and makes it difficult to determine if you’re dealing with a function, macro, or what. They can be very magical and very frustrating.

Imports: I still fight this one. I’ve never worked with a compiled language. With Javascript being interpreted (and the Common JS / ES6 import pattern), Javascript imports are explicit. Elixir’s use macro can inject functions. And use of named modules doesn’t tell you where the function physically sits.

But I’ve done more in two months with Elixir than a year of Node. I find the code so much easier to read (save the imports parts) and explicit.

2 Likes

A while ago, I asked my fellow developers for their recommendations, read reviews and visited a couple of websites. Here are the results:

Elixir books and courses for beginners

Plus, a friend of mine has also authored a Free Elixir Course. Feel free to check it out!