{ The Rithm Blog. }

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.

 

Go Similar

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.

For example, if you're currently a JavaScript user, you might find it interesting to spend time with Python. They're both high-level, expressive languages with dynamic typing, object orientation, functional idioms, and garbage collection. Programs written in Python and JavaScript tend to have similar performance and similar lengths. 

Yet there are significant divergent design decisions made in the languages: Python had for two decades a strong leader guiding the language, leading to a lot of internal consistency and clean syntax. JavaScript benefitted from a wide variety of collaborators and corporations, leading to lots of language experiments and different idioms. If you have no current ambitions to write a language yourself, seeing how the leadership styles of the language affected the design path of it can give you ideas for how you handle technical projects, and which styles work well for you.

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.

Some languages similar to Python and JavaScript could include Ruby or Lua. If you're a Java developer, you could learn some Kotlin, to see a different take on a similar foundation.

 

 

Go Low

For many programmers, the first language is often a higher level language, like JavaScript, Ruby, or Python. These languages can be more approachable, especially for developers who didn't come from a Computer Science program, where concepts more common in lower level languages are often taught.

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.

 

Go Different

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

Back to all posts

Get Started with Rithm School