Three Eye-Opening Programming Language Experiences
Posted by Jeremy Voorhis Wed, 27 Sep 2006 17:55:00 GMT
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!
Text: Why’s (Poignant) Guide to Ruby
Language: Ruby
Important Concepts:- Fundamentals of Ruby
- Blocks
- Meta-programming
Erlang
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.
Text: Getting Started With Erlang
Language: Erlang
Important Concepts:- Concurrency, actors model
- Object-orientation
- Functional programming
Prolog
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.
Text: prolog :- tutorial
Language: Prolog – SWI-Prolog worked well for me.
Important Concepts:- Logic programming
- Constraint programing
- Destructuring and recursion

Nice article, I agree that all three languages you mention above are absolutely enlightening to play with. I would add Haskell or ML to the list as well.
I have always wondered about this crazy idea of using Erlang for implementing a Neural Network. In which each “neuron” is essentially an erlang process, and they all speak to each other via Erlang IPC.
It’d be nice to get around to it one of these days.
For me FORTH was one such eye opening language experience. Completely different from all the stuff I had ever worked with.
And Learning Forth and Thinking Forth are such gems of books. A pleasure to read. Both freely available now on the web.
@Amr
I’ve never investigated Forth; I know it is based on postfix notation and relies on its stack rather than a conventional grammar.
If you do attempt the neural net simulation, please let me know :) I’d like to see how you implement activation and suppression.
@Rudi Cilibrasi
I’ve never used ML, so it couldn’t yet put it on my list. Haskell, on the other hand, would have been a good candidate. Haskell served as my introduction to many functional programming concepts – destructuring, multiple dispatch, guards, list comps, etc. My grasp of monads, however, is still a little shak – perhaps Haskell will make the next list after learning it a little better.
It looks like Jamis Buck blogged about prototyping a personal project with Prolog here: http://weblog.jamisbuck.org/2006/9/29/d-d-knowledge-bases-and-prolog-oh-my