[erlang-questions] Erlang and the learning curve

Robert Melton <>
Wed Jan 5 07:55:36 CET 2011


Jack--

DON'T PANIC!  You started a very lively thread, with some incredible
feedback from some very bright people too modest to toot their own
horns, but feel free to Google around for some of the people who
replied, a ton of them have heavyweight experience, great production
products you may well soon depend on, and at least one incredible
book.  This is a fantastic group.



> I've been reading/watching everything I can find (off and online) for
> learning Erlang for the past two or three weeks, but am just not getting it,
> in terms of being able to do anything with Erlang in the real world.

I am also a Erlang neophyte, learning as I go, by no means an expert.
Here is some of my advice:

#1. Don't be terribly discouraged if you can't find a library to do
exactly what you want.  One of my first little play projects after
reading the "big three" books was to do minor (tens of thousands) html
scraping.  In the past I have used TokeParser (perl) and Hpricot
(ruby) to do tasks like this, which are extremely userfriendly and
easy to get started with... I was discouraged, but decided to jump in
anyway, and was shocked by how easily the task broke down into
components... and yes, it was very fast comparatively to those, both
in development time and runtime.

#2. Look at the great projects (Basho is a nice place to start IMHO),
and really look at them, not just like you would a library in Perl,
Ruby or Python -- open them up and follow along, understanding and
integrating bits of Erlang out of major projects is very different
than what you might be used too... you find something you need, just
snipe it out and put it in your code, the joys of limited side
effects.

#3. Continue to use the community, I am overjoyed by how incredible
the community is in general... specifically #erlang on freenode has
been a wonderful place for me to idle and just get to listen to some
of the great discussions.  This community has a lot of people
experienced in a plethora of languages, with gobs of real world
experience (both in Erlang and other languages).



> I've watched some videos about functional programming where the hosts joked
> about people looking into functional programming deciding it's too hard and
> then never touching it again...

Functional programming in general is "different" (not harder) when you
first bump into it, but once you get over the "difference", I wouldn't
say it is any harder.  As Joe pointed out, in many ways it is simpler,
more straightforward and easier for a non-expert to understand (once
you get past those first few rough days).



> but seriously, how do people bridge the gap
> between understanding the basics and implementing real world projects with
> Erlang? I know the three major books are available, but none of them are
> really using Erlang for what I'd like to do...

The gap was non-existent for me, I have been doing development
professional on some mission critical type stuff (real time trading /
credit reporting, military command centers, live image tracking, etc)
for over a decade.  As I read up on Erlang, I was excited by the way
it would have simplified my prior work, as I had poorly implemented
parts of OTP multiple times over the years.  I started replaying those
projects in my head, and thought of the hundreds of hours I would have
saved building them in Erlang.  Most of them are in C++, but I did one
in C#, and even an odd Java/Perl/PHP Hybrid slipped in.

I would argue that the more real world stuff you have built, the more
you understand and appreciate Erlang and its trade-offs.  To me, the
entire language and OTP seem to be mercilessly focused on one thing --
getting real world production systems up and running and keeping them
maintained.  It is NOT a high and mighty ivory tower language, it is a
workhorse to its very core... beautiful at times, ugly at others...
compromised by real world requirements.  All these things together
make me appreciate the language so much more.

As for being unable to find your exact problem in a book, well how
boring would that be?  Anyway, if a book is written about your
specific problem, maybe it is well solved.  :)



> How have any of you who have come to know big-picture how great Erlang is
> been able to get enough knowledge of it to actually do what you'd like to
> do?

Well, the books give you an exceptional "core", you follow them and
use OTP to build out your core, and maybe a few noteworthy other
projects (in my case: webmachine, gproc, mochiweb, and various bits
pulled out of other places).  After you have all that in place, you
should be sitting squarely on your problem domain.  You problem domain
is what you are writing the code to do -- so get started and have fun.
 If there were projects that covered your problem domain, what would
we need you for?

Also, you might have a little bit more success if you work your way
along until you are "stuck" and then try to contact the community for
help, because I am not sure where specifically you got stuck, so I
can't reply in more than vague generalities, and for that I am sorry.

Don't give up, keep plugging along, we will be here to help when you get stuck.

-- 
Robert Melton | Contact Information @ http://robertmelton.com/contact


More information about the erlang-questions mailing list