AstonJ

AstonJ

[Erlang] Programming Erlang (Pragprog)

by Joe Armstrong

A multi-user game, web site, cloud application, or networked database can have thousands of users all interacting at the same time. You need a powerful, industrial-strength tool to handle the really hard problems inherent in parallel, concurrent environments. You need Erlang. In this second edition of the bestselling Programming Erlang, you’ll learn how to write parallel programs that scale effortlessly on multicore systems.


Using Erlang, you’ll be surprised at how easy it becomes to deal with parallel problems, and how much faster and more efficiently your programs run. That’s because Erlang uses sets of parallel processes—not a single sequential process, as found in most programming languages.

Joe Armstrong, creator of Erlang, introduces this powerful language in small steps, giving you a complete overview of Erlang and how to use it in common scenarios. You’ll start with sequential programming, move to parallel programming and handling errors in parallel programs, and learn to work confidently with distributed programming and the standard Erlang/Open Telecom Platform (OTP) frameworks.

You need no previous knowledge of functional or parallel programming. The chapters are packed with hands-on, real-world tutorial examples and insider tips and advice, and finish with exercises for both beginning and advanced users.

The second edition has been extensively rewritten and covers Erlang R17 features. New to this edition are seven chapters covering the latest Erlang features: maps, the type system and the Dialyzer, WebSockets, programming idioms, and a new stand-alone execution environment. You’ll write programs that dynamically detect and correct errors, and that can be upgraded without stopping the system. There’s also coverage of rebar (the de facto Erlang build system), and information on how to share and use Erlang projects on github, illustrated with examples from cowboy and bitcask.

Erlang will change your view of the world, and of how you program.

Don’t forget you can get 35% off the ebook using the code ‘devtalk.com:023:

Most Liked

Ted

Ted

In my ongoing endeavor to learn Elixir, Programming Erlang was the second book I read; the first being Programming Elixir >= 1.6.

This may seem like an interesting trajectory for an Elixir noob, but in retrospect I think it was an excellent decision, given my background and learning style.

Here’s how it is: I’m a Java programmer by trade with almost 20 years under my belt, and along the way I’ve dabbled in other JVM languages like Groovy, Scala, and Clojure, with the latter capturing my attention the most.

So, my background is working in the language “closest” to its virtual machine, and branching out from there.

Also, my learning style favors a linear, comprehensive, foundational approach: I seek out materials and approaches that imply “okay, if you just stick with this path, you’ll have a solid foundation by the end.”

I think this is why a gravitate towards books instead of blogs, tutorials, etc.

At any rate, I worked through half of Programming Elixir >= 1.6 and felt a bit lost; things were going too fast for me.

That’s when I thought, “Okay, let’s slow down. What can I read that appears to be foundational and comprehensive?”

I landed on Programming Erlang because things don’t get any more foundational than Erlang and I knew I was in for a treat, having previously read Joe Armstrong’s doctoral thesis; I’m delighted to say it was everything I was hoping for.

It’s clear that Joe had a real gift for explaining things; the prose is patient yet concise and digs into details without belaboring the point.

The progression from sequential programming to concurrency feels steady and natural; by the time we reached concurrency I was ready to see what it was all about. (This is in stark contrast to the premise of tackling concurrency in Java, which is scary and better left to the experts.)

The latter third of the book provides a lot of valuable exposure to other details of the BEAM and its ecosystem, e.g., distributed programming, tracing, logging, monitoring, etc.

In all, this was exactly the sort of foundation I was seeking and I feel that my subsequent and ongoing travels in Elixirland have benefitted tremendously from my side-trip into Erlang.

AstonJ

AstonJ

Fantastic review, thanks for posting Ted!!

I had originally planned to read this book after all my Elixir books, but your review has made me want to read it sooner.

Only thing is I miss Joe, and reading his book will probably make me feel quite emotional :cry:

I think I might read it after Programming Phoenix, since I’ll have gotten most of the beginners books out of the way and the rest are mainly about OTP, systems architecture or more advanced topics.

Did you read the book start to finish? Is that how you recommend it is read?

Ted

Ted

And thank you for the nudge in posting the review! :023:

My trick was to play a cycle of “Hello Robert / Mike / Joe!” in my mind at every ah-ha moment, of which there were many. :smile:

That might work out really well; the last handful of chapters are about OTP and systems, starting with building up a hand-rolled version of GenServer.

That’ll probably be a really nice segue into your remaining reading list.

Yes, I usually read books cover-to-cover, even on the occasion when they suggest jumping around because I’m usually seeking that foundation and exposure.

I recommend reading this one start-to-finish: there’s no overarching project being built throughout the book, but the chapters do build on each other.

And even in the introductory “this is a list, this a tuple, …” material, there were plenty of nuggets that had me thinking “okay, so that’s why Elixir does what it does”, although YMMV because I only had a very rudimentary familiarity with Elixir at the time.

AstonJ

AstonJ

Thanks for the insight Ted :smiley:

One more question, you mentioned:

So would I be wrong to assume this is a good candidate to be read on an e-reader? Where I don’t need to be in front of a computer to follow along with examples etc?

Actually one more question :lol:

The book is quite large at 546 pages :icon_eek: did it take you long to read? I generally prefer shorter books, because I like seeing the % progress quickly (it makes me feel like I am making good progress :lol:)

Ted

Ted

You’re good to go: I read it on a Kindle Paperwhite in landscape orientation and I don’t recall any reading woes or having to jump back to code examples.

Yeah, it’s a biggie. :smile:

I don’t quite remember how long it took, mainly because I got interrupted with another book I had to read for work.

But it didn’t feel too long because:

  • I was getting so much foundation
  • Joe’s writing style is great

And if it helps, you could consider it as four books in sequence, given the way the book is structured into four parts:

  • Sequential Erlang
  • Concurrent and Distributed Programs
  • Programming Libraries and Frameworks
  • Building Applications

Where Next?

Popular in Books Top

PragmaticBookshelf
Alexander Koutmos @akoutmos Elixir Patterns aims to surface the powerful and unique characteristics of the Erlang virtual machine and sho...
New
PragmaticBookshelf
Frank Hunleth @fhunleth Bruce A. Tate @redrapids edited by Jacquelyn Carter @jkcarter Want to get better at coding Elixir? Write a har...
New
PragmaticBookshelf
Bruce Tate @redrapids edited by Jacquelyn Carter @jkcarter OTP is the heart of the rapidly growing Elixir, the functional language at th...
New
PragmaticBookshelf
Rebecca Le and Zach Daniel @zachdaniel _edited by Kelly Lee @k.lee _ Ash Framework is the game-changing toolkit for Elixir developers. W...
New
CinderellaMan
Hands-on Elixir & OTP: Cryptocurrency Trading Bot by Kamil Skowron Want to learn Elixir & OTP by creating a real-world project...
New
New
AstonJ
by Fred Hebert This book intends to be a little guide about how to be the Erlang medic in a time of war. It is first and foremost a col...
New
AstonJ
by Benjamin Tan Wei Hao The Little Elixir & OTP Guidebook gets you started programming applications with Elixir and OTP. You begin w...
New
radar
:wave: You might remember me as the author of Joy of Elixir: https://forum.elixirforum.net/t/joy-of-elixir-self-published-free/ I’ve got...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New

Other popular topics Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New

We're in Beta

About us Mission Statement