Saturday, November 8, 2008

Knowing Your Languages

You may only speak one language, but how well do you know your tools?  There are likely many similarities between learning a language and learning the tools you use daily.

Today I was thinking about the difference between someone who is just learning a spoken language and someone who knows it well, and how this may at times be seen by their knowledge of it's vocabulary.  For example, imagine someone explaining "I need a tool that you use to hit those little metal things that connect two pieces of wood together.  It has a wooden handle about 12" long and has a metal part on top.  You know?  The tool that people who build houses use."

Do you know what tool they are talking about?  Probably.  When I was learning Spanish, this is the sort of description I would find myself having to use at times. (To all the patient people who put up with me, Thank you.)

Of course, a person who knew the language well could have conveyed the same thought more concisely and clearly: "I need a hammer."

This same idea goes beyond spoken language.  

I use VIM on a daily basis.  Until recently my VIM vocabulary consisted of :wq, dd, i, /, :%s and esc.  Not a vary wide vocabulary at all for such a powerful tool.  I could get most anything done, but it was more like that first long-winded description of a hammer.  I am continuing to work on expanding my VIM vocabulary, and in doing so finding that what previously took many keystrokes can now be done nearly instantly with a single command.

However, the real value of a rich vocabulary is much more than simply the ability to be concise.  A rich vocabulary allows you multiple options to express your thoughts depending on the intended goal.

Instead of simply stating that it was "humid", a story-teller may choose to describe the air as "thick with moisture, soaking one's clothes and sapping one's strength."  Not as concise, but perhaps adding important details.

The same is true with our programming language vocabulary.  The goal of a rich vocabulary in Ruby, Erlang, or (insert your favorite language here)  is not always to write the least lines of code.  Our goal may be to increase maintainability, expose intentions, improve performance, etc.  By improving our vocabulary and grasp of the language, we are able to express our thoughts both efficiently and in the way that best fits the specific situation at hand.

How is your vocabulary with the tools that you use?  What are you doing to improve?