Though I'm still not much more than a self-taught amateur, I've so far picked up about three programming languages, been using them in various contexts, and now feel confident in considering myself past the absolute beginner stage for each of them. (Haskell, of course, is not one of these. 😅)
It has been an interesting journey, to say the least, and I feel passionate and excited to keep going. In the meantime, I'd like to take a step back for a moment and document what I've been through so far. Perhaps I can learn a thing or two from the very steps I took...
So the following is my tale of three languages.
It all started with R
And it's been four years already! To keep it 💯, my initial motivation for learning R was to pick up a marketable and transferrable skill. The term "data science" was at all rage in the summer of 2016 and I was about to begin my one-year MA program in social sciences.
As a sociology & anthropology major, I felt my undergraduate training focused heavily on qualitative research had not sufficiently equipped me to do well in the job market. Having read about "the sexiest job in the 21st century", I was determined to use my Masters year to switch gears. Fortunately, the MA program was light in requirements and flexible as to what classes I could take. So I filled up my schedule with classes on computational and statistical methods for social science.
In those classes, I was exposed to R and Python. At that moment, R felt a lot more intuitive for working with tabular, structured data, which was the data format I found most relevant to my own interests and experiences. R really made it easy to work with tabular datasets, draw good-looking plots, and run simple statistical tests or fit regression models on them.
One thing I appreciate most is the overall ecosystem of working with R as non-programmer. The RStudio IDE's convenient UI and the intuitive syntax of the
tidyverse packages really helped me to ease into working with code. Plus, with R Markdown, coding and programming were fused into the familiar work of writing. And Shiny introduced me to the pleasure of building a simple web app without having to fully understand what was going on.
I definitely had my share of sleepless nights working with R to complete my school assignments before the deadlines, but all in all, I had much fun felt empowered to do some amazing stuff I never dreamed of before. The fact that the R community largely consisted of amateur programmers also made me feel at home.
Looking back, this feeling of empowerment was what motivated me to venture further into the world of programming and software engineering.
Then came Python
I was also exposed to Python during my graduate year but without any formal introduction to the language. Because of that, I was rather intimidated by the language at first. It came to me as more of a challenge than fun.
My knowledge in R was both a blessing and a curse. I could quickly pick up the basic control flow and such, but much of Python looked still foreign to me--from its assignment operator (using
= instead of
<-) to indentation-based syntax (no curly braces?) to object-oriented features (defining classes and using method calls).
Once I started investing my time and energy in learning Python, however, I began to realize that Python is much better suited for more generic, non-data-analysis-specific tasks. And the "PyData stack" packages offer a mature and comprehensive solution for most data analysis needs.
Personally, I was particularly pleased to see that organizing code in modules and packages was baked into the very design of the language. (Accomplishing the same in R still requires a lot more effort.) Python's elegant comprehension syntax is something else I began to miss when working with R.
Its ecosystem also seemed a lot more, well, organized.
numpy is the numerical computing package,
pandas is the tabular data analysis package,
scikit-learn as the machine learning package, and so on. The quality of documentation of these packages impressed me, too. And, of course, there is PEP 8 as the style guide. Despite the growing prominence and popularity of
tidyverse packages, R ecosystem is still lagging behind Python in this respect.
To be clear, this is not to say that "multiple solutions to the same problem" is inherently bad. I believe that competing solutions can often lead to innovations and better quality. From a package user's perspective, however, being able to rely on the quality, standard package for my problem is certainly a lot more convenient.
Thanks to Python, I might have finally peeked into the rigor of software engineering.
Is using multiple tools making me, as the saying goes, a "jack of all trades, master of none?" Maybe. At least for now, however, they all help me to get things done and I appreciate that. 🙏
- I might be little biased and unfair here because I never truly ventured into the Web when I was writing Python previously. Still, I'd argue that what's hot in the Pythonland today is not so much the Web but the AI/DL.↩