I get the language and functional programming, but not OTP

So I went through Programming Elixir and did fine. I’ve written a couple of API clients and can solve programming problems with Elixir. I’m comfortable with higher order functions, immutability, etc.

Where I get lost is OTP applications… I get the basic GenServer API, Agent API, etc but say, I get lost in Chapter 11 of Programming Phoenix or part four of the official guide. I’m just not used to this kind of stuff since I come from a Node background. I have Elixir in Action but I also have trouble with the second part, but will go through it again. It just doesn’t stick.

I’m definitely going to re-read the books and guides and comment everything… but what resources did you guys use? I’m looking at The Little Elixir & OTP book as well but I think writing a project would be the best thing to do.

2 Likes

I followed the same route and had pretty much the same difficulties wrapping my head around it. Still haven’t but every days clears up a few things. My advise, just start building something. With time you will start refactoring bits and pieces and it will fall into place.

1 Like

Stick with it. Find an example problem to code up. What you have is more than I had when I gave my first talk on OTP. For example, the problem I chose was to simulate a system of elevators. https://github.com/gvaughn/elixir_elevated

I should revisit that with some pg2 goodness, but otherwise it’s still a pretty solid first OTP app.

1 Like