Programming horizons revisited
In my second post on this blog, I wrote about my interest in learning new programming languages and my thoughts on how to choose the next language to learn. It’s been over a year since that post and I thought it would be worthwhile to reflect on what I’ve learned.
In that old post, I identified the four features of a programming language that I thought were most relevant to my goals and interests: (1) friendly and accessible, (2) GUI capabilities, (3) scientific computing libraries, and (4) capable of expanding my programming horizons (which is a low bar given my limited programming experience).
I think that #1 still holds, but I have taken the plunge with Emacs (see here and here), which doesn’t exactly have the reputation of being friendly and accessible. I’m reasonably productive when I use Emacs, even without extensive modification, and find the experience quite pleasant. In general, I’m more persistent when it comes to installing and setting up new programming environments than I was a year ago. I have noticed, though, that I prefer a programming language to feel lightweight (so to speak) and it is hard for me to imagine becoming productive without a REPL. Surely, that is a largly a product of my experience (i.e., primarily an R programmer). But I also wonder how much of that preference is inherent to my personality. One of my produtivity challenges is starting projects. When writing, I struggle with the blank page. When faced with a big project, I struggle to decide where to start. My suspicion is that REPL-driven development facilitates tinkering that gets me over that initial hump.
The 2nd feature on my list, GUI capabilities, followed from, at the time, having recently built some large shiny apps (DSM2 Viz Tool and Shiny Scorekeeper) that were designed for desktop, not web, use and realizing that I didn’t like using web technologies to build desktop apps. Or, rather, reading that using web technologies to build desktop apps was suboptimal, which rang true to my limited experience, and wanting to learn how to build proper desktop apps. Although I still want to learn more about building desktop apps, I don’t have any desktop GUI apps that I’m eager to build. However, I am drawn to the idea of implementing Shiny Scorekeeper in other languages to see which language provides the most pleasant experience for building a desktop GUI application.
The 3rd item on my list is no longer a priority for my hobby programming goals. When I wrote the original post, I wasn’t laser focused on learning things that would improve my productivity at work and advance my career (which is obvious from my candidate programming languages to learn), but I was hopeful that the hobby programming would have the side effect of making me a more valuable employee and more attractive job applicant. I’ve subsequently become much more comfortable with the idea of programming as a hobby and tinkering for fun without any expectation that it will open new doors for my career. Moreover, R has a strong foothold in ecology and there is incentive to build ecological models in R because those models are accessible to a wider range of ecologists.
In the last year, I’ve learned that the 4th item on my list was the most important one. My experience with Chez Scheme has been particularly enlightening. The small ecosystem surrounding Chez Scheme proved to be a feature because it forced me to better understand core concepts (e.g., reading/writing files, algorithms for descriptive statistics). When I was learning Racket, which has a relatively large ecosystem, my primary approach was to take tasks that I do in R (e.g., stochastic population model) and learn how to do them in Racket. When I switched to Chez Scheme, my primary approach was to take functionality available in R and build it in Chez Scheme (e.g., dataframe). I found the latter approach much more fulfilling and engaging.
Red has completely lost my attention. Development as stalled for over a year at version 0.6.4 as the core developers have taken an extensive detour into the realm of blockchain technologies. Even if the pace of development picked up, it is hard to imagine wanting to use Red over Racket.
I still casually follow Elm, but I have no strong yearning to spend more time with it. In fact, I’ve started keeping an eye on Elixir and Phoenix LiveView as an alternative option for building web apps. Elixir is a dynamic, functional language with macros, which are appealing features to a Scheme enthusiast. This video makes a compelling case for Phoenix LiveView.
I really want to like Clojure, but I think the weight (see above) of the JVM is too much of a deterrent for me. It is hard to imagine choosing Clojure over Chez Scheme or Racket for a hobby project.
One language that I think I should try is Rust. I’m not particularly drawn to Rust as a hobbyist, but I think it is the most relevant C++ alternative for an R programmer that occasionally needs more speed in their R programs. And the foundation for calling Rust in R is already laid.
It’s been a fun year of hobby programming. It will be interesting to see if, in a year from now, I’m neck deep in Chez Scheme code or if I have branched out to other languages.
In my short time in the Scheme community, I’ve observed that Schemers are inclined to bounce around a lot among the different Scheme implementations. Maybe I will end up there one day, but, for now, my focus is on becoming an expert Chez Scheme developer and building that community.↩︎