Thursday, August 29, 2013

The Start of Mastering Erlang

I like programming in the Telecom world because most of the folks involved in Telecom are pretty bright. They understand the need for speed and accuracy in the systems software. They understand the true costs of five nines or 99.999% up time.

Searching for work I found that good salaries are being paid to Erlang developers. I picked up three books on learning Erlang from Amazon.


I found the second and third books in this list to be better suited to my needs. The Introduction book is more suited to someone for understanding Erlang. The other two books provide a good combination of explanations filling in where the other book is weaker for me.

I read the first few chapters of each book before installing Erlang itself on my OS X machine. Each of these books has extensive instructions on where to go to download and install the Erlang virtual machine.

I use vi/vim via a terminal window to write my Erlang source code. I usually open a few terminal windows for editing source files and then a one or two more to run the environment in. The use of terminal work allows me access my OS X desktop from SSH sessions throughout the house or while I am on the road.

After about 20 hours of programming Erlang I can get it to do what I want it to do for the most part. The transition from years of procedural programming languages to a functional language is building muscles in my brain where I never thought I had muscles.

What threw me at first was that Erlang does not allow variables to be assigned more than once. This takes a bit of modern thinking to get past but it does work surprisingly well. My test design that I learn new languages with shows that what took several hundred lines in Perl is only going to take about 25 lines in Erlang.  That is one of the advantages of that I am seeing straight away is the shortening of source files means less mistakes from less typing and shorter files to maintain.

The advantage of shorter source file in Erlang seems to also translate into much faster computing. My test design is still very procedural in nature. I have not done a direct comparison as of yet but it does seem to be a good 50% to produce the same result in Erlang.

At the same time I am also reading books on Lisp and Clojure with an eye on Haskell and Schema soon after. Erlang is to me a language cross between Prolog and Lisp with its use of recursion and lists to get the work done.

I still need to begin work on distributed Erlang design and system. I have a few OS X machines available but I need to reassemble 2 or 3 Linux machines to have a good half dozen nodes to work on. Though I have been distracted this week by a desire to download the Android environment and do a little work there.

No comments:

Post a Comment