What You Can Learn From Learning A New Language July 21, 2020
Most programmers with more than a year or two of experience will know more than one programming language. This happens often because they joined a new work team or company that was using a different tech stack. Separately from work project requirements, learning a new language can be one of the most helpful things in your development career. New languages can introduce you to different ways to express problems, different tooling, and even different ways to think in code. You'll often hear advice on what others think is a hot new *must learn* language, but before jumping immediately to that, it can be helpful to think about what you want to get from a new language.
For some, it can be useful to move to a language that is similar to one you're very familiar with. This can let you understand and think more about the design choices made by your favorite language, and learn how others language designers tackled different syntax for the same kind of language.
Learning a language similar to yours can be helpful as you explore the library of the new language. This can give you ideas about libraries you'd like to write for your main language, or send you off to explore similar things in the code repositories for your language.
These are great choices for many people, particularly considering the number of jobs in web development. It can be very useful, though, to learn a bit about a lower-level language.
Lower level languages often require you to manage your own memory (either almost entirely, like C, or with a strict set of rules, like C++ or Rust). Doing that for a while can teach you to be a more careful programmer. They'll also get you thinking about raw efficiency of algorithms, because there will be fewer abstractions between your code and the computer.
The biggest advantage of learning a lower level language, though, is that it can, perhaps paradoxically, help you understand much more about your favorite higher level language. Learning some about common operation system concerns, like threads and locks can help you understand why concurrency or multiprocessing features in your language are designed that way, or how IO streaming works.
Of the common low level languages, C still remains a good choice here: it's small and easy to approach. You might not end up using it much outside of learning, but it's so foundational to operating systems, you'll benefit from a short visit with it. A more contemporary language here that is a good fit for newer learners could also be Go, which is becoming increasingly popular for writing servers and backend services.
A good choice can often be picking a language that is significantly different than what you are familiar with.
Are you working now in a primarily procedural, mildly OO language like Python? Are you interested in getting deeper in functional programming? Consider learning a deeply functional language, which will force you to rethink how your structure programs entirely. Racket is an approachable teaching language to introduce people into LISP/Scheme-style languages, with lots of free tutorials and a terrific built-in development environment. You can play with ideas with it like formal proofs of programs, or variable-free code, which can give you new ideas to bring back to your favorite language.
Or, if you're interested in learning more about secure coding or modern systems coding, you could dive into Rust, a fantastic systems language with strong controls that prevent many kinds of memory and concurrency bugs. It will force you to think carefully about how to design data structures that don't share ownership or have mutable references, which can make you think more deeply about new security concerns.
Find Your Motivation and Enjoy!
Whichever language you choose, remember to keep your focus on "why". When you start learning something new, it can be difficult to stay motivated if you don't have a clear sense of what's interesting to you about the topic. Being told "this is a great language to learn" or "lots of engineers are interested in this" doesn't really get your brain engaged in a way that will let you succeed. A good strategy can be to ask someone who's already familiar in this language "what's something that's so different in it from what I'm used to?" or even "what's your least-favorite part of this?" Having those kinds of curiosity questions really help.
Good luck with your learning and I hope your curiosity is rewarded!
Written by Joel