The best language for your career

Which programming language should you learn in 2022?

A guide for upcoming developers on the lookout for their first, second or third language.

Karsten Eckhardt
Geek Culture

--

For developers today, including myself, either Python or JavaScript is the first programming language. Maybe it’s because you went through a Bootcamp, transitioned from a Big Data analytics role, or taught yourself. But once you become more proficient, the question becomes — what’s next? Yes, both languages are amazing and probably haven’t reached their peak yet. However, there are advantages to learning extra languages. Learning a strictly object-oriented language like Java or C++ will give you a better understanding of OOP. Lower-level languages like C or Rust can help you to get insights into concepts like memory management.

At this point, we have already talked about 6 different languages, with many more out there. So what should be your pick? It depends. In this article, I group languages on two axes: What field you want to work in, and what type of company you want to work for. For every point, I will give one or two recommendations. The first one is what I believe will bring you the most value, but there is always a runner-up and possibly, some honorable mentions. Let’s get right into it:

What engineering field interests you the most?

While general-purpose languages like C, C++, Python, etc. can do everything, they all show their strength in different areas. Based on that, we can group them into professions and engineering disciplines.

Frontend Engineering: JavaScript and TypeScript

Top 10 Frontend Frameworks (by Usage) in 2020 visualized (Source: StateOfJS)

When it comes to frontend development, JavaScript, and by extension TypeScript, is second to none. JS is the language that powers the modern web as we know it. Running natively in every browser, developers have used JavaScript since the early 2000s. Early releases of libraries like jQuery (15 years ago) were focused on adding animations to static HTML websites. Since then, the appearance of frameworks like React has switched this order onto its head. Modern websites are first written in JavaScript, which then generates the HTML that is served to the user. Right now, all major frontend frameworks use JavaScript. Thus, making it the language of choice for everyone trying to break into frontend development.

Usage of JavaScript flavors in 2020 visualized (Source: StateOfJS)

The dominance of JavaScript doesn’t mean everyone is satisfied with the language. Over the past years, many “flavors” of JS came up that try to solve the perceived issues. What they all have in common is, that at the end of the day the code is compiled back into JavaScript. The undisputed winner in this category is TypeScript. First released in 2012 and now maintained by Microsoft, TypeScript adds static typing to JS. A feature that makes development safer and the language better suited for large-scale projects. As a strict superset, every valid JS program is also a valid TypeScript program. As a result, moving from JavaScript to TypeScript and vice versa is much easier than picking up a completely new language.

If that isn’t enough for you, I also want to give an honorable mention to Dart. As the language behind the Flutter framework, Dart is an object-oriented language maintained by Google. Using Flutter, you can develop programs that compile into native mobile apps, as well as web applications.

Backend development: Go and Python

Server-side development has probably the largest array of sensible options in languages. In the class of high-performance languages, Go (or Golang) is the most interesting. What sets Go apart is that Google developed it for the challenges of a modern age cloud environment.

What does that mean? Go sits right in-between high-level languages like Python and system-level languages like C++ and Rust. On one hand, Go is a compiled language and can offer blazing fast performance. That also gives you compile-time error detection. Furthermore, Go contains a strong and strict type system, making it type save. Those two feats together can prevent many production errors during development already. On the other hand, Go also offers many of the bells and whistles of high-level languages. The language offers, among others, a build-in concurrency model in the for of channels and garbage collection.

If all that matters is development speed, Python is my go-to option. Now prevalent in all kinds of fields, Python has a strong background on the server-side. Point and case: Instagram’s backend is written in Python. A combination of community-driven frameworks like Django and FastAPI combined with extensive standard libraries lets you focus on the core application logic. And the past years added features like (optional) type-hints and protocols — keeping Python relevant and more suited for large-scale projects. However, what you sacrifice is performance. As an interpreted language, a compile process has to happen at runtime, which makes Python ~10 times slower in many typical use-cases compared to Go.

Blockchain development: Solidity and Rust

Ethereum is currently the most popular platform for Smart Contract

Unlike the other general-purpose language presented so far, Solidity exists to write smart contracts. Developed by core members of the Ethereum team Solidity is open source. As a result, today not only Ethereum smart contracts use Solidity, but many, smaller competing chains as well. Solidity is object-oriented, statically typed, and brings out-of-the-box solutions blockchain relevant topics like voting, crowdfunding, blind auctions, and multi-signature wallets.

Back to general-purpose languages. In the blockchain world, Rust is mostly known for powering Solana. As a compiled, system-level language, Rust can archive speeds other higher-level languages like Python and JS can only dream of. As such, it is also a more powerful, well-rounded language compared with Solidity.

The decision between those two comes down to your goals. If your main goal is to get into Blockchain-/Smart Control development right now, Solidity is your first choice. However, if you are planning to learn a new language first and applying it to Smart Contracts is an after-thought — pick Rust.

System development: Rust and C++

You are drawn deeper? You don’t just want to develop apps but develop the platforms other people use to develop their apps? In this case, low-level languages are your weapon of choice. Here you are trading readability and development speed for speed of execution and control.

Rust leads the “most loved” category for 6 years in a row (Source: Stack Overflow Developer Survey 2021)

A good and modern starting point in 2022 is Rust. As mentioned before, Rust is used to develop modern platforms like the Solana blockchain. Compared with other low-level languages like C++, Rust is more readable and offers memory safety. This is a huge benefit that made Microsoft rewrite some of the lowest level routines of Windows in Rust. Another example case study is AWS Firecracker, a system that powers the tenant assignment of a small tool called AWS Lambda.

Where C++ completely trumps Rust is in how far spread it is. Windows OS, MySQL, the Spotify, and YouTube backend — all systems written in C++. Originally developed as “C with objects”, C++ came to fruition in the 80s and 90s. A whole suite of new tools and libraries made it attractive to everyone that needed to write high-performance applications. As a strict superset of C, the only wait to get close to how a computer operates is to write Assembly. With that C++ is still a popular choice when it comes to developing embedded systems. For example, when you want to write for the popular microcontroller Arduino you will come across it. The Arduino IDE uses C++ as its default language.

Who do you want to work for?

Not just your profession determines which languages you are working with. Different company types will have a completely different tech-stack. In general, we can distinguish them into start-ups, large, traditional corporations, and FAANG.

Start-Ups: JavaScript

In start-ups all that matters is speed. The faster you can write an MVP and iterate on it, the sooner you will find your market fit. Secondly, the talent pool plays a big role as well. A company with 5–10 engineers can’t afford to spend their time training people in a language they are not familiar with. The language of choice for most early-stage start-ups is JavaScript. JS is perfect because it allows a small team, or even a single full-stack developer to write the frontend in i.e., React and the backend in NodeJs. All while staying in one language, avoiding context-switching. In a similar vein, JavaScript developers can also switch between different roles and parts of the product when needed. Lastly, JavaScript has an unmatched ecosystem of libraries. Utilizing those can save precious time writing code and, again, increase your speed.

Big Corporations: Java

Must watch: Interview with a Senior Java Developer in 2022 (it’s hilarious)

Java is the language of choice for some of the largest corporations in the world. Developed (and heavily marketed) by SunMicrosystems in the 1990s, Java is now owned by Oracle. It promised portability and to keep large codebases easy to maintain. The use of the Java Virtual Machine means, in theory, that the same code will run in every environment. That together with a focused marketing towards IT executives and universities made Java one of the most used programming languages in the world. This is where it persists today. True, complaints about Java range back 25 years ago. However, the continued development by Oracle and the user base means even in the cloud age, Java stayed performant option.

FAANG, Microsoft & Tesla: Do your research

The scale at which FAANG operates means they have very different options than your typical startup or corp. Google is most noteworthy here since it even developed its own language in Go in 2007. It’s also the main driver behind Dart, the language used in Google’s Flutter. But they are not the only company with their own language — Apple has SWIFT and Microsoft .NET. Furthermore, most companies with a small developer team (up to a few hundred) settle on two or three languages for the sake of efficiency. Apple, based on their job posts, uses at least 7 with Python, JavaScript. C++, Java, Objective-C, Swift, and even Perl.

On the plus side, for these companies, it’s also much easier to find blog posts describing their activities. So if your main goal is to for FAANG (+M), do your own research. Listen to talks at their conferences, read their blog posts, or even their job postings. What sets these companies apart is also that they think in longer time horizons. If you are an amazing Java developer, but Google is looking for a Golang job, you will have a leg up on a mediocre Go dev. A startup can’t spare 3 months for you to learn the syntax of a new language — Google can.

Closing remarks

So far we touched on the six different languages that IMHO are the most important options out there for 2022. Of course, there are myriad other languages out there, and many that I haven’t mentioned are widely used. For example take C, PHP, or even COBOL. On the other side, new languages are coming out every year and will shape their niches in the years to come. Take Julia in the scientific computing space for instance.

My personal advice — whatever you pick, make sure your next language falls in a different category than your first. If you already know Python (high-level language, great for prototyping), don’t learn JavaScript. Better start looking at Rust or C++ to start learning about memory management and have an alternative for when performance matters.

Whatever you chose — learning another language will extend your horizon and make you a better engineer. Good luck!

--

--

Karsten Eckhardt
Geek Culture

Data Architect and Deployment Specialist at FPT Software. Let’s connect on LinkedIn: www.linkedin.com/in/karsten-eckhardt