This post originated from an RSS feed registered with Ruby Buzz
by Jeremy Voorhis.
Original Post: Three Eye-Opening Programming Language Experiences
Feed Title: JVoorhis
Feed URL: http://feeds.feedburner.com/jvoorhis
Feed Description: JVoorhis is a Rubyist in northeast Ohio. He rambles about Ruby on Rails, development practices, other frameworks such as Django, and on other days he is just full of snark.
As a professional programmer I am devoted to my ongoing education, and sometimes this leads me to learn new languages. My criteria for learning languages does not hinge on their practicality for my everyday use – in fact, it is likely that I will only use one of the following languages for profit – but new languages can arm me with new problem solving skills and deepen my understanding of programming in general.
Each of the experiences I am setting forth here are accessible. That does not mean they are easy, but language implementations and tutorials I will reference are all freely available online.
Ruby – The (Poignant) Guide
I won’t repeat here how I learned Ruby, but I will give some credit to Why’s (Poignant) Guide to Ruby. The guide is presented in a surreal comic book world with talking foxes and man-eating goats, but highlights many crucial aspects of Ruby including blocks and meta-programming. If you are learning Ruby, have a playful attitude and want to learn Ruby quickly, spend a few hours with the Guide – and don’t say I didn’t warn you!
I was vaguely aware of Erlang as a functional language for some time, but my curiosity was aroused after a discussion with Jason Watkins about object-orientation in Erlang. Erlang’s distinguishing feature is its process model (Erlang processes, not operating system processes). Once established, Erlang processes can then communicate with each other via message passing, and closely resemble the Actors Model. Each process can maintain some state through recursion and communicate with outside processes by passing them messages, making them very similar to objects in common OO languages.
The Erlang tutorial is well-written, although it helps to have some prior knowledge of functional programming. If you are interested in challenging your understanding of object-oriented programming, take a look at Erlang.
Note: Ian Bicking wrote a good article about Erlang processes.
I’ve known about Prolog for a long time and understood some of its principles, but trying it out was completely different. After googling one day, I found a good tutorial that introduced me to the language. I learned about constraint programming, programming with goals rather than statements and expressions, and running the program “backwards” to find the parameter-space for a given solution. The tutorial also challenged my knowledge of destructuring and recursion.
The example programs in the tutorial are good, and include such problems as coloring regions on a planar map and identifying animals by their attributes. It also explains how Prolog does what it does and includes more advanced topics, such as prototyping and processing a grammar that resembles the English-language.
Note: for an interesting constraint programming example in Ruby see Jim Weirich’s solution to Ruby Quiz #70.