Four phases, roughly a hundred and twenty to a hundred and sixty hours. Erlang's syntax takes a weekend and its mental model takes months, because the model is the part that is genuinely different.
Expect to unlearn more than you learn. If you arrive from Java, Python, C# or JavaScript, the following instincts are all wrong here, and fighting them is most of the difficulty:
- reaching for a variable you can update
- writing a loop
- wrapping operations in try/catch
- thinking of concurrency as threads sharing memory with locks around it
- treating a crash as a failure of the program rather than a normal event
None of those are bad habits elsewhere. They are just answers to problems Erlang solved differently, and holding onto them means writing Java in Erlang syntax — which is possible, produces something worse than either, and is the commonest way a first Erlang project goes wrong.
Phase 1, around thirty hours. Sequential Erlang, no processes.
It is tempting to rush to the concurrency, since that is why you are here. Do not. Pattern matching is the mechanism behind function clauses, case, and receive, and if it is not automatic by the end of this phase, every later topic is harder than it needs to be. Likewise tail recursion: every long-lived process is a tail-recursive loop, and getting it wrong means a process that grows until the node dies.
Build: a command-line tool that parses a file and reports on it. No processes. Do it with clauses and guards rather than case where you can, and feel how different the code looks when branching is done by matching.
Phase 2, around forty hours, and the one that changes how you think. Processes, messages, links, monitors, ETS, binaries.
Spawn ten thousand processes just to see it happen — it takes about a second, and the number stops being abstract. Then write the counter from the first topic, deliberately leave out the catch-all receive clause, send it something unexpected, and watch the mailbox grow. That five-minute exercise teaches selective receive better than any explanation.
Build: a chat server. One process per connected user, a registry process, messages routed between them. No OTP, by hand. It will have bugs that OTP exists to prevent, and meeting them first is the point.
Phase 3, around thirty-five hours. This is the phase that matters most professionally. Nobody writes raw receive loops in production, and OTP is what Erlang jobs are actually about.
Rewrite the phase 2 chat server as gen_server processes under a supervision tree. The diff is the lesson: the boilerplate disappears, and the things you had not thought about — a caller dying mid-call, clean shutdown, back-pressure — turn out to have been handled all along.
Then do the exercise that makes supervision real. Start your tree, find a worker's pid, and exit(Pid, kill) it. Watch it come back. Kill it ten times in a second and watch the supervisor give up and escalate. Reading about restart intensity teaches you the parameter; doing this teaches you what it is for.
Build: the chat server as a proper OTP application with a supervision tree, eunit tests, and a release you can start with bin/chat foreground.
Phase 4, around thirty hours. Distribution, production, the VM.
Run a three-node cluster on your laptop with -sname and three terminals. Connect them, send messages between them, then kill one and watch what the others do. Everything about distributed Erlang is clearer once you have seen nodedown arrive.
Build: the chat server across three nodes, with users on any node able to message each other. Then partition it — block the port with a firewall rule — and decide what your application should do about it. That decision is the real content of the phase.
What to skip on a first pass. Hot code upgrade with appups and relups: know it exists, know how it works, and deploy with a rolling restart like everyone else until you have a reason not to. NIFs, until profiling says so. Mnesia beyond the basics, unless you are already using it. The older gen_fsm, which gen_statem replaced. And parse transforms, which you will meet in other people's code and should not write.
Where to look things up. Learn You Some Erlang is free, funny, and the best introduction to the language. Adopting Erlang covers the production side almost nothing else does. The official docs at erlang.org are terse and exact, and become far more useful once you can read them. Joe Armstrong's thesis, Making reliable distributed systems in the presence of software errors, is the clearest statement of why any of this is shaped the way it is, and is more readable than its title suggests.
One habit worth forming now. Run observer:start() against everything you build, from the first process onwards. Watch the process count, the supervision tree, the mailboxes. Erlang is one of very few languages where you can see your program's structure while it runs, and getting into the habit early turns the architecture from something you imagine into something you look at.