Learning Erlang as an Experienced Developer
jonalmeida.com Sadly, I have even less to say about OTP given my limited knowledge of it. I would really like to have another course that would focus more on it.
As an experienced programmer learning about the Erlang and Elixir ecosystem, I found Elixir in Action (https://www.manning.com/books/elixir-in-action) an excellent next step after working through the Elixir guides and writing some small applications. The examples are written in Elixir rather than Erlang, but really it is about how to structure OTP applications.Excellent recommendation. For the people who are considering getting this book, I would like to point out that a 2nd edition of the book is also available in the Manning Early Access Program (MEAP) [1]. OTP-wise things haven't really changed much, but the new edition addresses changes in the Elixir language over the past few years.
[1] https://www.manning.com/books/elixir-in-action-second-editio...
A bit of self promotion that is well intentioned (I seek to help the elixir community and not sell myself in any way): https://stephenbussey.com/2018/01/08/designing-elixir-superv...
Learning about OTP took several tries for me. It didn't click until I had a few real world trials under my belt, because I couldn't see the use case for things.
I recently did a project where I had to build a distributed "choke point" across a cluster and funnel requests to it based on an ID. A project like that took what I thought I knew about otp design and raised it even more.
I've had about the same experience getting started with Erlang. It was mostly using recursive, immutable state and the functional style that was hard to get my head wrapped around.
Pattern matching was somewhat hard but you can of course program by not using them, then during code reviews, you start getting advice like "split into a separate function clause". So bit by bit I started to get patter of using patterns and guards.
A thing that helped there was watching Garrett Smith's "Beautiful Erlang" video:
https://www.youtube.com/watch?v=IdJwECjylB4
On concurrency I had already did enough programming with threads before that and didn't have much difficulty understanding processes, pids and messages. Well except for being happy to get isolated heaps, smaller size threads (a few KBs) and supervision trees.
It's funny how people understand different things in different ways. For me, 00 style programming was what I could never get my head fully around. Erlang immediately made sense to me. It's my favorite language and I wish I could use it more on the job.
I find that the harder with immutability is to go for it with a blank head. After that it's ok.
Indeed if i use my xp from other languages, my brain screams that it's ineficient and will kill perfs. Old habits die hard.