Blog

Links

Polyglots have more fun

posted: September 4, 2021

tl;dr: For a more fun and rewarding career in software, I recommend being a polyglot...

I enjoy learning new computer programming languages. It’s good that I do, since that has allowed me to work in this profession for decades. It also benefits me in my current role, in which I dabble in a variety of projects for different clients. On a good day I might write some Python, JavaScript, TypeScript, and SQL, and top it off with a little HTML and perhaps a JSON or YAML file. Jumping from task to task and language to language can be a bit challenging, but it keeps things interesting.

I’ve moved from language to language throughout my career. I’ve had to, as have most software developers who have built a career in this industry. Of the languages in the preceding paragraph, the only one that existed when I graduated from college was SQL, and it wasn’t terribly widespread in that timeframe. Yes, there are probably a few contemporaries of mine who learned COBOL in college, spent their entire careers programming in COBOL, and today may still be in demand for programming legacy COBOL applications on mainframes that have not yet been decommissioned in favor of newer technologies. But how much fun have they had in comparison to me?

Some lines of computer code written in Python

Here’s an almost certainly incomplete list of the languages I’ve programmed in, in rough chronological order:

The primary reason I’ve used so many languages is that I’ve worked on many different types of products and projects, and no language is the best choice for all applications, systems, and environments. “The best tool for the job” is the choice I’ve often made, or that has been made for me. Even today, certain languages are the natural ones to use for certain applications. If you’re programming in the browser, JavaScript is natively supported; if you’re using a traditional table-oriented relational database, SQL is widely supported; if you’re doing data science or machine learning, Python is often the best choice; if you’re doing a native application for the Apple iPhone running iOS, Swift is what Apple provides and supports. Sometimes, especially when doing server-side code that does not interface with users, there is a range of options and you can choose what is best for you and the other developers you’ll be working alongside. But usually, if you want to work on different kinds of software products, you’ll need to learn different languages.

Another reason to learn different languages is that languages come and go, and the need for programmers who know a particular language rises and falls. I’ve lost track of the number of languages that claimed they were going to take over the world and become the one ubiquitous language for all programs, now and forevermore. The U.S. Department of Defense tried to do that with Ada, but failed. Java had grandiose visions of “write once, run anywhere”, but it didn’t ultimately make it into the browser, except to donate its name to JavaScript.

There may be some JavaScript, Java, or Python programmers today who think they’ve learned the last language that they need in their careers. While there’s a chance that may be true, I think it is more likely that each of these languages will be eclipsed over the decades ahead by something new, especially as parallel processing and multiprocessing becomes more important. Furthermore, the languages themselves often evolve at a rapid pace; this is notably true for JavaScript, especially given the recent onset of TypeScript. There’s a chance that a newer language could displace JavaScript in the browser, if browser vendors provide support for it.

Learning other languages sharpens your mind as a programmer. You get to see how different languages solve common problems, such as scoping, native types, user-defined classes and types, iteration, functions, modules - the list goes on and on. You see similarities and differences between languages, and can start to identify the better solutions and the tradeoffs between various approaches. You’ll also start to think in more abstract ways, such as “a closure would be an elegant solution here - now what is the syntax for that in the language that I’m using?” Being a polyglot helps you become a better programmer in whatever language you’re using at the time.

It’s also more fun to be a polyglot. You get to work on a wider variety of tasks, and don’t get pigeonholed into doing the same thing day after day, year after year. You also get to have some fun by writing multiple solutions to the same problem in different languages, and in translating from one language to another. It can be a bit like wordplay. Programming should be fun, after all, and polyglots have more fun.