Writings on various topics (mostly technical) from Oliver Hookins and Angela Collins. We currently reside in Sydney after almost a decade in Berlin, have three kids, and have far too little time to really justify having a blog.
I notice my pace has yet again slowed between the last chapter of the book - Erlang - and this one. Another five months has passed since I finished the chapter on Erlang! In actual fact, I haven't been slaving away on the next language that whole time - decompression of sorts has to follow each chapter, and dealing with a manic three-year-old, finding some time for a bit of exercise and trying to learn a spoken language (German) all take a decent amount away from my free time.
The sixth chapter of Seven Languages in Seven Weeks is Clojure - a challenging language, but after getting through the previous five chapters this one only took me about three weeks of real world time (spent on-and-off) to conquer the last exercise of the chapter.
Since I tend to ramble on about the experiences I had while learning the new language, I'm going to break it down into a series of (hopefully) short points - what I liked about it and what I disliked. Do bear in mind that I'm no expert in Clojure, with only a brief learning period dedicated to it.
What I liked:
What I disliked:
If this all seems like I'm not in favour of the language, that's not the case at all. Despite its challenges, I see Clojure as a very tempting and powerful language. If I were suddenly in a position where I had to do 100% of my coding in this language, I would see it as a good thing. For the moment though, there are simpler languages that accomplish everything that I need, and I don't feel the desire to become an expert in every language I have managed to familiarise myself with.
After doing this much study on a variety of programming languages I don't use on a day-to-day basis, and having been learning German for a few years now (with varying levels of dedication) I've naturally been comparing how learning and knowledge of the two different types of language differs. I'll preface everything I say below with the fact that I'm not a linguist and haven't researched this topic academically whatsoever.
Firstly, there exists a certain type of programmer, computer nerd, systems engineer, etc. that will list (somewhat facetiously) their known languages (e.g. on Facebook, LinkedIn etc.) like this - English, German (or some other spoken language), Pig Latin, C, Python etc. etc. Maybe even Klingon. Their argument is that all languages are equivalent and that they know C just as well as they do English. The intent of listing languages in these data fields is usually just for natural spoken languages, but they have mixed the two "types" of language together.
To the majority of us, this argument is plainly false. I recall briefly reading some discussion on this from actual linguists, and at a purely biological level, using spoken languages and computer languages exercise completely different parts of the brain. There are different amounts of reasoning, analysis and plain communication going on depending on whether you are speaking to another human being or expressing an algorithm to a computer.
The grammar of spoken languages is complex, has many exceptions, idioms, and is constantly evolving, whereas in computer languages it is extremely well defined, seldom changes and must be understood by the computer and programmer in 100% of cases. Spoken languages have tens or hundreds of thousands of words, whereas computer languages often have just dozens or hundreds of identifiers at their core. Fluency is defined in a spoken language as basically needing no assistance to communicate with anyone in that language, whether it be spoken or written; even warping the language outside of its usual boundaries while remaining understood by other fluent speakers. Fluency in a computer language, it could be argued, might still permit a user of the language to consult references from time to time. Computer languages are also almost exclusively written, permitting more leisurely consideration of the correct grammar, syntax and vocabulary with which to express one's self.
This seems like a fairly compelling argument for the two types of language to be vastly different, but recently I've been thinking more and more about another level of similarities beyond those points I've raised above. I would argue that true fluency in a computer language would in fact allow you to converse (perhaps not exclusively) with another fluent "speaker" of that language in actual spoken words, without aid of references. Anyone who has taken an interview at Google would know the requirement for whiteboarding a solution to a given problem in the language of your choice. You have no option but to be able to express yourself instantaneously, without references, and without making any mistakes - much like natural spoken languages.
Once you take into account all of the standard libraries, commonly used libraries outside of that, frameworks, extensions, plugins etc of a given computer language, the vocabulary is extended dramatically past the dozens or hundreds of words barrier. You can even draw a parallel between learning a given framework in a computer language, and becoming a specialist in a given occupational field - medicine for example introduces a new range of specialist language, just as the next new web-app framework might in your computer language of choice.
When speaking a computer language, the barrier for understandability is actually in some ways higher than than for natural spoken languages with a human partner. A human has the benefit of context, shared common knowledge and culture, observable body language, and can grant understandability concessions when the grammar, vocabulary or syntax is not entirely correct but can be inferred. A computer knows none of these and will not accept anything less than 100% accuracy.
Computers are hard, cold, reasoning machines and computer languages are expressly designed to convey meaning as efficiently as possible and with little room for interpretive error. Spoken languages are the result of centuries or millennia of evolution and culture, not to mention the development and psychology of the human brain itself. In some ways it is amazing that they are able to be compared at all, given their origins are so vastly different.
After dedicating my little free time over the last three weeks to Clojure it is now back to German until I have finished the current teaching book I'm working through. The unifying factor for me personally is that I find learning both spoken and computer languages challenging, mind-bending but exciting. I have no intention of becoming "fluent" in more than a very small amount of programming languages (a passing familiarity is probably sufficient) but I would be significantly upset if I never become fluent in German.
On a related note, if you haven't yet checked out Hello World Quiz, it is frustrating but simultaneously a lot of fun :)