Posted on :: Tags: ,

TL;DR: Consider learning a new programming language. Some key concepts are only available in certain languages.

When I was a graduate student, Python was not as popular as they are now. Matlab was the ultimate sweet spot for much-needed speed, ease of programming, powerful visualization, and simulation. It was complete liberation. I no longer needed to deal with layers and layers of inheritance of Java classes. Even silly features like that I can type "why" on Matlab's terminal to get a nonsense answer were charm.

However, as soon as I embarked on projects involving graph-based traversal and classical graph algorithms, Matlab was no longer an ideal tool for me. Everything underneath quick and easy API needs to be implemented with C++ codes within a notorious MEX, trying hard to package with well-designed template libraries. I first turned to Python 2.7 and survived many years with it, but I was just not so happy with its indentation rule; often, my codes were barely running (at least, I felt like that). Later, I explored O'CaML to bring back the ultimate joy of functional programming. Back then, I had many versions of the same MCMC algorithm written in multiple languages.

Arguably, being bilingual or polylingual is beneficial in many ways. Also, arguably, learning a new programming language is like an abridged version of learning a new natural language. Learning a new language is perhaps far from mapping one to another language. If I had to think of everything in Korean and translate it into English sentence by sentence and word by word, well, then I would not have taken full advantage of every aspect of learning a new language.

Likewise, if I had to code up a prototype in R and convert it to C++, then I should seriously consider picking up C++ instead of attempting quick fixes by asking any chatbots. Key concepts like memory management are simply hidden underneath the rug, so-called convenience. If any chatbots do a wonderful job, it would brutally deprive us of any possible true learning opportunities.

There is no ultimate programming language, but many modern languages were designed to address diverse computing problems. For an applied scientist, having many things in their tool belts can make a big difference. It could shorten tasks from days to hours or even minutes. Learning awk will be an eye-opening experience if one needs to deal with tens of thousands of lines of compressed text files. However, I would not want to use awk (although I tried once) to transpose row-wise tabular data into column-wise ones. Although I heavily depend on well-designed and fast routines of data.table in R, I would never attempt to implement recursion in R and often get uncomfortable with messy and unsafe parallelization.

I think my brain has well past the peak age of agility and flexibility. It takes a substantially longer time for me to catch up with a new one. Nevertheless, I still feel some urgency. Language shapes the way I think. In many ways, a programming language is a language of science. It can teach us how to abstract away the underlying computing problems of real-world scientific problems. Some people might do computational thinking with pseudocode, but I do with some language I am currently into. Since different languages have been developed to serve different types of computing problems, it is definitely worth diversifying our thoughts.