So perhaps the right approach is to do a kickstarter to fund someone writing a deep dive Erlang/OTP internals book?
Complexity: roughly the level of writing a Linux kernel book, at a quick guess. Perhaps a bit easier.
There is not a temporary space leak in practice, because the compiler
will insert an instruction that will clear (set to NIL) each dead register
below K before any allocation point.
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
---------- Forwarded message ----------
From: Joe Armstrong <erl...@gmail.com>
Date: Mon, May 7, 2012 at 10:46 AM
Subject: Re: [erlang-questions] Is there a good source for
documentation on BEAM?
I *completely* agree with this. At my work we *have* to write down
our systems, the API's, interfaces, backend, everything, as we code
it. It really does help to solidify how the system should work, helps
us to consider angles that we would not have considered before. Even
if we never use the documentation again, the fact that we are forced
to write it in *detail* and keep it up to date really does have a
great boon on the quality of code. If you do not find problems in
your code when writing documentation, then likely your documentation
is not detailed enough.
When you don't understand something you can't write the documentation, while when you understand you see no need to write the documentation. So you never write the documentation.
Robert
That depends. As a personal rule, I see 3 general levels of documentation:
1. Beginner guide/tutorial
2. Reference Manual
3. Architecture
1. The first type is the one that scratches the surface, gives a few usage examples, and generally helps newcomers and users.
It explains why you'd use the library/module/thing, and directs in how to do so. It holds the user's hands so they can quickly solve whatever problem they have.
The raw version of this is either reading test cases or Open Source code that uses the product.
2. The reference manual is a listing made to help those who already know the item. It details everything but gives few explanations. It can be used to deepen one's knowledge, but won't do any hand holding, or very little.
EDocs and the general javadoc-style stuff fit this well.
The raw version of it is 'read the source, Luke'. It works for experienced users, and is of nearly no use to others.
3. Architecture is the doc that explains why the app was built the way it is, a view of how it works from 10,000 feet. It shows how to understand the app were you to dive in its source.
This kind of doc explains the rationale of some choices made, and is especially helpful to developers or contributors to your code, so that they do not undo future plans, respect trade off decisions you made, and know where to dive in to extend things without causing headaches to anyone.
I know of no raw version of this; it's experience and in-depth knowledge of the product's life. Writing this doc is often vital to raise the quality and relevance of contributions received.
----
In my opinion, you don't have great documentation until you covered the 3 aspects. You can have poor, decent, or good docs without all of them, but greatness requires to cover all bases.
A self-proclaimed complete book, in-depth tutorial, or course, should touch all 3, for example.
Understanding your code well and making it self-explanatory sadly rarely helps with more than one out of 3 points.