Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts
Tuesday, 1 July 2014
A short review of some Erlang books
Erlang is one of those languages that I always meant to dive in to, but never did. At the peak of the last hype wave, I bought the books but they got put aside because ... well, life got in the way. I decided to give it a go, by the book(s). Usually I just skim books and get cracking but I thought it'd be a good idea to do it properly this time.
In the books defense, if you are new to programming or need a bit more talking through some things then it might be OK but even then I feel some things might be confusing.
The emphasis on good idiomatics was a positive thing, as was the parts that basically said "I know you're thinking X but we won't cover that because it's best not to use it". Diving straight in to OTP with a relatable project was great as was the depth of coverage of the OTP "way" in general. Though I understood the code, implemented their projects and didn't have questions about the material ... I was left scratching my head when working out how to use this knowledge easily when my requirements stepped outside the examples.
Even better, there's tons of material that reflects Erlang's growing user base in the web backend. There's examples on embedding a webserver, using websockets, parsing JSON and other goodness. Another good thing covered early is how to properly include other Erlang code using Rebar.
My review is slightly biased as I normally take a "learn by exhaustive hacking" approach to new languages. It's often the wrong approach but it does mean my expectations might not be ideal when cracking open a "Program X" type book.
Erlang Programming - O'Reilly
If you're at all familiar with concurrent programming, either from a CS course in Haskell or having spanked the JVM with Scala ... skip this book. It does a really good job of drawing out material over many pages, but fails to hit key points or make good relationships to things people already know.In the books defense, if you are new to programming or need a bit more talking through some things then it might be OK but even then I feel some things might be confusing.
Erlang and OTP in Action - Manning
This books is much better than "Erlang Programming". Not only does it keep things clear, but it doesn't baby you when it isn't required. This book covers A LOT in a quick space of time.The emphasis on good idiomatics was a positive thing, as was the parts that basically said "I know you're thinking X but we won't cover that because it's best not to use it". Diving straight in to OTP with a relatable project was great as was the depth of coverage of the OTP "way" in general. Though I understood the code, implemented their projects and didn't have questions about the material ... I was left scratching my head when working out how to use this knowledge easily when my requirements stepped outside the examples.
Programming Erlang - Pragmatic Programmers
I have saved the best until last. This book is written by Joe Armstrong, one of the creators of Erlang. As you'd expect it covers a great deal. What sets this book apart from the others is the way everything is presented. Joe does a really good job at relating core concepts to OOP concepts we migh be more familar with.Even better, there's tons of material that reflects Erlang's growing user base in the web backend. There's examples on embedding a webserver, using websockets, parsing JSON and other goodness. Another good thing covered early is how to properly include other Erlang code using Rebar.
Summary
In short, if you have been programming a while, especially if you're from a C background or have done lots of sorting/searching/tree-walking code then just get the Pragmatic "Programming Erlang" book. That said, I did enjoy the examples (a web cache) in Erlang and OTP in action and I don't regret buying that one either. If you already have a strong functional programming background, or are specifically looking to start a project as part of a web stack, then you can't go wrong with "Programming Erlang" to get startedMy review is slightly biased as I normally take a "learn by exhaustive hacking" approach to new languages. It's often the wrong approach but it does mean my expectations might not be ideal when cracking open a "Program X" type book.
Labels:
erlang,
programming
Tuesday, 1 May 2012
Golang ... it's amazing
Now that Go/Golang has reached it's 1.0 milestone ... I have given it another ... Go.
I love C and I adore the Unix philosophy ... so when you are like me and hear Rob Pike and Ken Thompson are involved in a new language it is quite exciting to say the least. I have a habit of putting a wallpaper on my desktop of the language i'm currently learning. I couldn't find one for Go, so I made one. Here it is to download:
When writing (a lot of ) C, you hit a certain point where you are doing odd things with the language that would look scary to programmers raised on a diet of PHP, Python, Java and friends. You are slinging binary blobs through structs, firing pointers from a six-shooter and getting drunk in the Bison saloon after starting a fight with Flex. Quite often you are locked in the non-local threaded Sheriff's office hoping GDB will post bail. I paint a picture of the old wild-west not because programming is anything like that ... but because that's the atmosphere that C has.
In today's modern world of Java, Python, JavaScript and others C looks .... old fashioned. C's wizard-like beard soaked in Jack Daniels, its bum leg, its bullet ridden body ... these things don't feel all that compatible with the today's moccafrappochinnolatte coding approach.
I know one thing though, if Java and pals got into a fight with C ... C would pull out its pointy knife and cause them to wet themselves. C is in short, Al Swearengen ... who would want to fight with Al? Not me.
What has any of this got to do with C? Well, unlike other C derivatives that seem to lack charm and charisma ... the Golang team at Google have managed to do something amazing:
They sort-of updated C. I don't say this lightly, because I thought that C was perfect. Go though, is pretty close to being a perfect improvement. Go isn't just another curly-brace language, it feels like C. It has C's character. Go didn't do what would be so easy and pretend to be a Starbucks language ... instead, it is true to its heritage and much better for it.
Something is niggling me though ... I have not been coding Go very long, but it just feels like ... the mustache is missing?
Go seems is something beautiful being born. A new C, what C++ and D never were. A really amazing language that is the result of old wisdom and modern lessons. Yes it is still not 100% right, but it is early days. There are tons of features I would like to see (or do exist with little documentation) and it could be better documented.
I hope it continues going in this direction (see what I did there?)
I love C and I adore the Unix philosophy ... so when you are like me and hear Rob Pike and Ken Thompson are involved in a new language it is quite exciting to say the least. I have a habit of putting a wallpaper on my desktop of the language i'm currently learning. I couldn't find one for Go, so I made one. Here it is to download:
| 👁 golang wallpaper |
| My Go wallpaper. |
When writing (a lot of ) C, you hit a certain point where you are doing odd things with the language that would look scary to programmers raised on a diet of PHP, Python, Java and friends. You are slinging binary blobs through structs, firing pointers from a six-shooter and getting drunk in the Bison saloon after starting a fight with Flex. Quite often you are locked in the non-local threaded Sheriff's office hoping GDB will post bail. I paint a picture of the old wild-west not because programming is anything like that ... but because that's the atmosphere that C has.
In today's modern world of Java, Python, JavaScript and others C looks .... old fashioned. C's wizard-like beard soaked in Jack Daniels, its bum leg, its bullet ridden body ... these things don't feel all that compatible with the today's moccafrappochinnolatte coding approach.
I know one thing though, if Java and pals got into a fight with C ... C would pull out its pointy knife and cause them to wet themselves. C is in short, Al Swearengen ... who would want to fight with Al? Not me.
What has any of this got to do with C? Well, unlike other C derivatives that seem to lack charm and charisma ... the Golang team at Google have managed to do something amazing:
They sort-of updated C. I don't say this lightly, because I thought that C was perfect. Go though, is pretty close to being a perfect improvement. Go isn't just another curly-brace language, it feels like C. It has C's character. Go didn't do what would be so easy and pretend to be a Starbucks language ... instead, it is true to its heritage and much better for it.
Something is niggling me though ... I have not been coding Go very long, but it just feels like ... the mustache is missing?
Go seems is something beautiful being born. A new C, what C++ and D never were. A really amazing language that is the result of old wisdom and modern lessons. Yes it is still not 100% right, but it is early days. There are tons of features I would like to see (or do exist with little documentation) and it could be better documented.
I hope it continues going in this direction (see what I did there?)
Labels:
golang,
learning,
programming
Subscribe to:
Posts (Atom)
