[erlang-questions] Is there a good source for documentation on BEAM?

Joe Armstrong erlang@REDACTED
Fri Jun 1 09:03:02 CEST 2012


On Wed, May 30, 2012 at 11:39 PM, james <james@REDACTED> wrote:
>> If they aren't written down, they WILL be forgotten
>> sooner or later.
>
>
> I would also like to suggest that the act of writing down a design forces a
> degree of rigour that is hard to achieve otherwise.  I have several times
> thought that I had considered a design from 'every angle', only to find that
> when I *write it down*, some of the angles were imperial and some were
> metric, and some were just smoke and mirrors.

I agree 100% - when I get *really stuck* - I write out in clear
English what I want my program to do.

I often start programming without a clear idea of what my program is to do - I
"think" I have a clear idea but as the program evolves I find that the
original idea was
unclear. Writing down in another language (ie English, instead of
Erlang or C or whatever) forces
a cognitive shift in my brain - I suspect that actually *different*
parts of the brain are involved.
I can also feel the ideas moving around in my head - feel is too
strong a word here.

There is also another strange phenomena - until a program is
completed, the problem
is not really solved. But as soon as the program is completed in its
entirety, a strange thing
happens - then, and not sooner, I realise that a better solution was possible.

Why is this? - I suspect a different part of the brain is involved.
Some part of the brain
says "move on problem completed" and as soon as that happens the "move
on" part of the brain
realises that the solution you have just arrived at was flawed - so
throw it all away and start again.

Knuth, he of the wise ways,  says this rewriting process should be
repeated seven times.

In organisations this causes problems. Just about when the system is
to be delivered
you fix the final bug and then realize that it was
all wrong and needs a total rewrite, and you start the rewrite the day
before delivery ...
I have never met a project manager on the planet who understands this
(Project mangers are from Venus,
Programmers are from Mars)

I also believe in working in a distraction-free environment (no phone,
email, twitters etc) you have to
listen very carefully to catch the small fleeting thoughts in your
brain. When I solve sudoku I
get instant flashes where I see where numbers are to be placed - but
these are fleeting and easy to miss.
I suspect my right-brain instantly sees a solution and tries to tell
my left-brain, but since I wasn't listening I missed it.

Programming is actually a form of "applied thinking" where you can
actually test the results of the
thought process. Since all the real work takes place inside the brain,
a brain-friendly environment is
essential. I once worked in an open-plan office, after a while I
noticed my (programmer) productivity
dropped to zero and that all my programs were written at home.

I could wax on but i'm supposed to be writing a book, but have been
distracted by the Erlang mailing
list ...

Cheers

/Joe



>
> When something is written down, the handwaving stops and the engineering
> starts.
>



More information about the erlang-questions mailing list