+++
date = "2020-07-01T00:00:00+01:00"
title = "The Erlanger Playbook"
type = "erlanger-playbook"
+++

The Erlanger Playbook is an upcoming book written by
Loïc Hoguin, author of Cowboy, Ranch, Gun, Erlang.mk
and other Erlang/OTP projects. It provides a general
exploration of Erlang/OTP; advice on writing Erlang
code, writing tests and documentation and provide
other Erlang-related insights.

In the _Erlang_ section of the book, we learn about
the building blocks of the Erlang language; we introspect
a running Erlang/OTP system to understand how it functions;
we learn about behaviors by writing our own `gen_server`
and `supervisor` modules; we explore `gen_statem`; and
we build and discuss process regitries and process groups.

In the _Code_ section of the book we learn how to
start a project; we discuss version control, project
structure, code style and best practices; we
delve into various technical topics such as the
"enter loop" mechanism, special processes, IOLists
and the process dictionary; and we discuss how to
deal with compilation warnings across Erlang/OTP
versions.

In the _Tests_ section we cover success typing analysis,
manual testing, unit testing and functional testing; we
also learn what to do about timeouts when testing an
application and how to write client/server tests.

In the _Documentation_ section we gain insight on
how to write better tutorials, user guides, manuals
and README files.

The _Design_ section covers public interfaces, REST
APIs and other lessons learned. The _Workflow_ and
_Selling Erlang_ sections end this book with short,
non-technical advice.

The book is roughly:

* 80 pages for the _Erlang_ section
* 60 pages for the _Code_ section
* 70 pages for the _Tests_ section
* 20 pages for the _Documentation_ section
* 20 pages for the _Design_ section
* 10 pages for the final two sections

You may currently buy lifetime access to the book's
git repository. This lifetime access will give you
access to the pre-release builds and to any future
release of the book.

The plan is to continue to add content to this book
for a long time after its initial release, and to
occasionally produce a proper edition of the book.
The _First Edition_ will feature the same content as
is currently available in the most recent pre-release
build. The _First Edition_ will be released after an
editing pass has been done.

The _First Edition_ and any subsequent editions
will be available both as an ebook and on a
print-on-demand service. It will be possible to buy
the _First Edition_ at a price lower than the lifetime
access, though the price remains to be determined.

Buyers of the lifetime access of the book will
receive all releases and pre-releases as ebook
versions. A coupon code will also be provided on
demand for those that want to print the book. The
coupon will reduce the price to the printing
costs (you do not have to buy the content twice).

The lifetime access costs 50€ (EUR) and may be
bought using Paypal:

++++
<div id="paypal-button-container"></div>
<script src="https://www.paypal.com/sdk/js?client-id=AdR1GuV-1nyPWjltERgKbL4c3V1VrpjdpA9SI7yrBJADAdSXKaiMrKnc6TAWkM9miArbsFC5gpR_4zs0&currency=EUR" data-sdk-integration-source="button-factory"></script>
<script>
  paypal.Buttons({
      style: {
          shape: 'rect',
          color: 'silver',
          layout: 'vertical',
          label: 'checkout',

      },
      createOrder: function(data, actions) {
          return actions.order.create({
              purchase_units: [{
                  amount: {
                      value: '50'
                  }
              }]
          });
      },
      onApprove: function(data, actions) {
          return actions.order.capture().then(function(details) {
              alert('Thanks ' + details.payer.name.given_name + ' for your purchase!');
          });
      }
  }).render('#paypal-button-container');
</script>
++++

There will be a *delay* between payment and delivery of
the credentials to access the git repository and download
pages for the book. This process is currently manual.

As the book is a pre-release, feedback is more than welcome. You can
send your comments to the contact address at the top of this website.
