Don't Just Learn the Language, Understand its Culture

From WikiContent

Revision as of 22:09, 2 November 2008 by Anoras (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

In high-school, I had to learn a foreign language. At the time I thought that I'd get by nicely being good at English so I chose to sleep through three years of French class. A few years later I went to Tunisia on vacation. Arabic is the official language in there, and being a former French colony French is also commonly used. English is only spoken in the touristy areas. Because of my linguistic ignorance, I found myself confined at the poolside reading James Joyce's tour de force in form and language – "Finnegans Wake". Joyce's playful blend of more than forty languages was a surprising albeit exhausting experience. Realizing how interwoven foreign words and phrases gave the author new ways of expressing himself is something I've kept with me in my programming career.

In their seminal book "The Pragmatic Programmer", Andy Hunt and Dave Thomas encourages us to learn a new programming language every year. I've tried to live by their advice and through out the years I've had the experience of programming in many languages. My most important lesson from my polyglot adventures is that takes more than just learning the syntax to learn a language, you need to understand its culture. 
You can write Fortran in any language, but you have to embrace a language to truly learn it. 
Don't make excuses if your C# code is a long "main" method with mostly static helper methods, but learn why classes make sense. Don't shy away if you have a hard time understanding the lambda expressions used in functional languages, but force yourself to use them.


Once you've learned the ropes of new language, you'll be surprised how you'll start using languages you already know in new ways. 
I learned how to use delegates effectively in C# from programming Ruby, releasing the full potential of .NETs generics gave me ideas on how I could make Java generics more useful and LINQ made it a breeze to teach myself Scala.

You'll also get a better understanding of design patterns by moving between different languages. C++ programmers find that C# and Java have commoditized the iterator pattern. In Ruby and other dynamic languages you might still use a visitor, but your implementation won’t look like the example from the Gang of Four book.

Some might argue that "Finnegans Wake" is unreadable, while others applaud it for its stylistic beauty. To make the book a less daunting read, single language translations are available. Ironically, the first of these was in French.
Code is in many ways similar. If you write Wakeese code with a little Python, some Java with a hint of Erlang your projects will be a mess. If you instead explore new languages to expand your mind and get fresh ideas on how you can solve things in different ways, you will find that the code you write in your trusty old language gets more beautiful for every new language you’ve learned.

Personal tools