The Benefits of Being a Polyglot Programmer
Do we really need to be a polyglot to be a good programmer?
Have you ever come across anyone who calls himself or herself a polyglot programmer? And have you wondered what the hell does it mean?
That said, I am not really a fanboy of many bizarre terms that have crept into the world of software development. Some of the examples can be.
“Code Ninja”
"Rock Star developer"
"Power Programmer"
"Open Source Pundits"
"Multiprocessing Moguls"
"Server Monks"
and so on......
But I make an exception for the Polyglot programmer.
Merriam-Webster defines ‘polyglot’ as a mixture or confusion of languages or nomenclatures.
Sounds like a promise that comes with a warning, right? It is.
Neal Ford is often credited with coining the term polyglot programming, in a 2006 blog post. His thesis was further explained in greater detail by Dean Wampler in a 2010 presentation in which he reiterated that different languages have strengths in different areas, and programmers should use the best tool for the job.
And the philosophy of polyglot programming emerged in the mid-2000s, from programmers associated with the Java ecosystem. This was a time when Java, the language had stagnated but the JVM was the base for a flourishing community of “non-Java” languages. Groovy in 2003, Scala in 2004, and Clojure in 2007 are some of the well-known examples. And all of these languages offered things that Java did not, higher-order functions being one of the more obvious. Given these new abilities, it was obvious that programmers made a beeline to adopt them: to use Groovy for XML processing, or Scala to process nested structures and so on.
It has been 10 years since then and the concept of the polyglot programmer is still going strong.
That said, a polyglot programmer is somebody who has expertise in at least three distinct languages. Done right, such a mix provides strength, depth, and variety. Distinct is the keyword word here. Someone who knows Java, C++, and ABAP may be technically considered a polyglot programmer. However, since all three languages have similar object-oriented concepts and structures, learning would not be pragmatically diverse.
As Richard Pattis, a senior lecturer of Informatics at UC Irvine tells us.
“Not only are languages different tools for different jobs, but they are technologies that shape how you think about programming. Learning similar languages might not progress your thinking much.”
To expand their minds, Pattis recommends that versatile programmers learn languages from different language paradigms, whether it be object-oriented languages (e.g., C++/Java), functional languages (e.g., ML and Haskell), scripting languages (e.g., Lisp and Python), logic-based languages (e.g., Prolog), or low-level languages (like C, the Java Virtual Machine or a machine language).
The key is not necessarily acquiring fluency, but gaining a conceptual vocabulary to attack problems in new ways. Good programmers don’t just code but they keep learning key concepts that help them to resolve problems in new ways and find the most efficient solution possible.
Being a polyglot programmer or even making an effort towards being one, in my opinion, has too many benefits to not take note of them. Let me proceed to address a few of them.
It increases your employability
Being proficient in multiple languages not only looks good on your resume but also indicates to employers that you are flexible, adaptable, and have the ability to use the best possible tool for the job.
It provides you with multiple opportunities and makes you recession-proof at the minimum. You feel happier and productive because of your ability to explore multiple programming paradigms and this reflects in your style of coding. You develop much better ways to write code taking the best out of all the worlds. Polyglots get to try out different syntaxes, get to know different communities – and this constant exploration is one of the best things that can happen to any programmer.
Another exciting possibility can be when you want to start your own business at some point. When clients come to you with the problems that they need your expertise to solve, you’ll have more tools in your arsenal and you can give the best possible value to them.
You become a problem solver, not just a programmer
If I were to define a programmer’s job in two words, it is to “solve problems”. A good programmer does not write cool code. He needs to solve the business problems using the best possible tools available at his disposal.
You might argue here;” Hey, I am the best in Java, I know how to solve every problem using java”. If you are thinking like this, then you are suffering from the “hammer and nail” syndrome. This syndrome states that if you have a hammer, then every problem appears like a nail to you. In this case, you have only one hammer (i.e. Java) and your mind will eventually get adjusted to the best possible way to solve a problem only using Java. This is a fancy way of saying that you may get stuck in a problem-solving rut if Java does not solve your problem.
While this is not always a bad thing but situations do come in real life when you’re faced with a problem, unlike anything you’ve had to solve before? You might come up with an inefficient solution because it is the only thing you know.
Learning a new language expands your problem-solving ability. Your mind will get freed of language constraints and you start looking at problems from a different perspective. This difference in perspective will remarkably increase your ability in your current language, and you just may find yourself bubbling with new ideas on how to solve problems more efficiently.
You are in the learning mode
What happens when you start to learn a new programing language?
You pore through books. You devour the sample code. Your try out multiple examples. You find some forums, a local group, a co-worker, or anyone else with more experience in the new language who can help you learn it the right way. These are the very people who can help guide your thought process as you’re learning. You become active in the language’s community forums and start asking questions regularly.
In short, you are instantly transported in the learning mode. It is like doing a workout at the gym. Initially, your muscles scream in agony but in due course of time they adjust to your schedule and you no longer get the wear and tear as you had experienced before. The muscles grow and so grows your stamina and strength.
Learning does the same thing to your brain muscles. Once you take your brain through the learning curve of a novel concept like a new programming language, you end up making it more agile and adaptable. What it means is that it will help you work more efficiently with your routine work as well as to adapt to the nuances of your main technology more easily. For example, A Java developer who knows a business language like ABAP can relate to the shared object concept very easily in business terms and appreciate its usefulness.
And the end result is an enhanced ability to learn. Your ability to learn anything new becomes easier, faster, and quicker with time.
A word of caution
While there are many benefits of learning multiple programming languages, this constant learning comes with its own set of challenges.
In his book “ JavaScript: The Good Parts,” Douglas Crockford talks about good and bad parts of JavaScript. Similarly, every language has its own set of challenges. If you’re frequently changing programming languages without spending enough time to go deep-dive into it, you might end up being “jack of all trades and master of none”. Your very polyglot ability might become your Achilles’ heel if you are not having the required proficiency in the new language.
Constantly learning and adapting to new languages and technology may also result in developer fatigue. It’s hard to keep abreast of all technologies and you might find yourself running in all directions and getting nowhere as a result. The key is to bite just what you can chew comfortably and be content once you have reached your limit. Once you’ve picked the best tools for the job and you have reached the maximum performance possible, just stop and focus on only consolidating the gains. Do overdo; it will not work anyway.
Remember, wisdom lies in understanding the cost of introducing a new language. The benefits we get out of it should always outweigh the cost.
As Alan Perlis has rightly said.
“A language that doesn’t affect the way you think about programming is not worth knowing.”
Ravi Shankar Rajan is an information technology program director working in Mumbai, India. .He writes on a variety of subjects ranging from programming, leadership, creativity, and even dabbles a bit in poetry. Connect with Ravi on LinkedIn and Twitter. Subscribe to his blog “The Perfect Programmer” for the latest articles on programming, creativity, and much more…...