Ask HN: How do you decide which language/tech stack to learn?

93 points by thisiswrongggg ↗ HN
Hi, I'm a senior dev who currently found himself working with C. On one hand I love it as it is familiar to me and I "get" it. OTOH I'm afraid it is regressing my future prospects as many consider it obsolete language and I'm in a market dominated by web dev and java enterprise.

So I'm thinking of investing in learning a more contemporary tech stack to stay relevant and employable. Doing mostly systems work (performance matters which is why we write in C) I was thinking maybe rust is a natural step for me but then again I worry that it won't get much traction in companies (lots of pushback from devs and management invested in older stacks, learning curve, not time tested etc).

Anyway. The real question is how you decide where to invest your time/energy next? I don't know of any method to attack this problem other than let the circumstances choose for me.

Thanks

86 comments

[ 0.23 ms ] story [ 161 ms ] thread
If you're sticking with systems programming, Rust is the way to go IMHO.

If you're doing server-side app programming, especially, in k8s, then golang.

Web apps, you would do well with TypeScript.

Data & AI: Python.

Just my 0.02p worth on the matter

I would say rust for all except Data/AI; for now.
Unless you want to leverage Arrow heavily in your data engineering pipeline, then Rust can replace Spark.
Do you have any further reading or crate recommendations? I have slowly been getting into rust but haven’t really used it for data engineering.
Polars and data fusion
Not really my domain, but the arrow2 crate seems to be high quality work.
Re: web apps - is yew production ready? Searching about it gives some ambiguous results.
The good news is that this list very closely describes the job market. Even better news is that at least Python and golang are trivial for experienced people because they are just a subset of a Java/C++-like big boy language. From what I understand Rust and TypeScript would require more effort for developers not familiar with modern languages.

But this answer doesn't cover frameworks at all. React and PySpark come to mind, many people say golang doesn't require more than its standard library. Depending on your background those are at least as time consuming to learn. It would be interesting to know what other people think about it.

If I could give myself advice as a younger programmer it would be to focus more on C or even lower level paradigms. Once you learn some Python and Javascript it’s no big issue to jump around, get rusty, or move to something else higher leveled. It would be even easier if I were more experienced at the C level. Hope that helps.
I find I'm most efficient learning a tool if i have a project i can conduct while learning the new tech. So i look for projects and attach tech rather than the other way around.

I find this is what helps me convert from potentially learning 10 things (but going through with nothing) to learning 1-2 things actually.

Unless it's a joke tech you pick up it will surely enhance your "employability / market value".

The only thing I consider is whether it is needed for my current project.
Your question is interesting to me. As a software architect, I study various tech stacks and programming languages. I concentrate mostly on open source and microservice architectures. I usually start with implementing the same feature identical rudimentary news feed microservice. Over time you start to see the similarities and differences between the various implementations. I blog about this over at https://glennengstrand.info and the source code can be found in https://github.com/gengstrand/clojure-news-feed

You are looking for a decision on what programming language and tech stack to learn next based on career mobility. Here are some questions to consider.

What kind of company are you most interested in working for? Think about the size of the company. Is it in a growth market or is profitability more important? Is it a technology company? Does the CEO view technology as a profit center or a cost center? Do they have a CTO? If they do, then who does the CTO report to, the CEO, the CIO, or the COO?

What kinds of programming languages and tech stacks are on the career pages for the kinds of companies that you are most interested in? Different kinds of companies tend to cluster around different tech stacks. There are other factors to filter for such as how deeply do they embrace remote work or commute distance to where you currently live or are willing to move to.

These are lagging indicators. They are going to be more accurate than leading indicators but that also might indicate that whatever you learn next based on these factors might have a shorter shelf life.

Finally, you should ask yourself what about your current programming language do you like? Try to pick something that you would also like. The Go programming language was originally invented as a better C and is enjoying some marketability right now. Maybe that would be something to look at.

The short answer is - there is no good answer. The best thing that worked for me was to just pick a popular stack that can help me achieve specific some goal. And, possibly one with wide adoption and a thriving community and ecosystem, especially if you are looking for career prospects.

Spend a little bit of time with a couple of stacks to understand what you feel comfortable with.

When I was looking to transition from legacy technologies (think mainframes) while working at an established financial company, I had an itch to build a specific product on the side. To be able to build it, I had the option to choose any modern stack at that time (around 2012), and I chose the Java-Spring-Jquery. I could have chosen any other similar stack for my purpose (PHP, C#, etc on the backend and plain JS or any other library on the front end) that were widely used and had big ecosystems. I tried to build some basic functional products with both Java and PHP based stacks, and decided to go with the Java-Spring stack. These days there are even more options, so it boils down to trying a few and settling on one that excites you.

> The real question is how you decide where to invest your time/energy next?

I pick languages which seem interesting for one reason or another. Idris and Lisps seem interesting to me now.

What you should learn depends entirely on what you want to achieve. Do you want a stable career at your current employer? A shot at a lot of money? Or perhaps you want to learn something enlightening?

I would choose a language that effectively combines multiple paradigms and is modern. Using that as a headstart, it is very easy to learn other languages.

Typescript is a great language for this purpose because it has a rich type system, is ergonomic and actually used extensively in the wild.It also supports multiple programming paradigms, object oriented, procedural, functional programming, async code, everything is there.

Is it a perfect language to use in production? Not always because it transpiles to Javascript and that might not be good enough due to performance or the platform. However, I would argue that for a senior developer, it should be a great stepping stone to jump to Java or C# or some other popular language, in case it is needed for a job.

Rust in contrast is an excellent language to learn how to write reliable and performant software. Its design, supposing you don't ignore the compiler by abusing unsafe, helps you develop useful programming patterns that transfer very well into systems programming and all kinds of programming. Its patterns and strictness however mean there's a steeper learning curve and at the same time, may not fit sloppier environments like business applications, where reliability is often sacrificed for iteration speed.

(comment deleted)
What languages would you say maximize development speed? Fastest time from initial need to mvp deployed and working (working well enough at least).

I'll further constrain my overly broad question by saying this is for back-end business logic heavy code or even embedded code with few dependencies on databases or frameworks. So just pick up a language and its available libraries and/or bindings and go solve X.

Python springs to mind, maybe julia. C# maybe?

I'm most productive in matlab but deployment is kind of an issue, so I usually write it again in c++ or cuda.

Python seems really easy to do anything in, and unless I hit a performance shortfall I can't fix with calls into native, I'm done? Julia seems like a write once thing, but I'm still trying to find a sane workflow for julia between the repl and an editor. Ideally I'd be able to try stuff in the repl then easily copy the text that worked into a module. But copying from the repl isn't terribly easy for blocks of atuff, and then clearing that stuff out so ut doesn't conflict.

For development speed my vote would be on Ruby, along with Rails it is still unsurpassed by any newfangled stacks
Interesting! Ive never given it a look before. I always assumed it was a "web language" and as none of my work has ever been even peripherally related to web stuff I ignored it. I like the syntax, though the "everything is an object" makes me nervous. I dont like opinionated languages. I use OO when it makes sense for me.
People keep saying that, and I guess it must be rails making things like Auth, seeting up an ORM, sessions, etc easy right?

Because ruby itself, I find to not be a productive language. The lack of types means that the discoverability of methods is poor (especially when combined with the fact that gems can modify standard library classes, and rails takes full advantage of this); the lack of types also means I have a slower debug cycle because I'm bound to make silly mistakes (indexing with symbols into a hash with string keys, or typos).

So again, is it really rails that makes producing MVPs easy, or is it ruby, the language?

> Ideally I'd be able to try stuff in the repl then easily copy the text that worked into a module. But copying from the repl isn't terribly easy for blocks of atuff, and then clearing that stuff out so ut doesn't conflict.

For copying stuff from the REPL, `pickandcopy()` from DoctorDocstrings.jl is pretty nifty. [https://miguelraz.github.io/DoctorDocstrings.jl/]

There's also other options: you can send code line by line (or by whole blocks, or sections of code) from the VS Code editor to the Julia REPL if you have the VS Code plugin [https://www.julia-vscode.org/], so you can interactively build your code in the editor itself while trying it out piecemeal. Pluto is another option, where you get REPL like feedback, and because of its reactive nature, you get rid of conflicts as you write new code. And Pluto notebooks are just Julia code files (with extra markups for notebook functionality that don't affect the execution).

Which of these works for you depends on what suits your workflow and which tools you prefer, you can give them a try and decide for yourself.

There will rarely be one stack or tech stack for life or that’s the best.

It’s best to get started with something and don’t stop moving or learning. Avoid chasing shiny new techs and things, they are usually not stable or reliable. Spend time experimenting and learning something deep enough.

Get good at shipping. Anything that helps you do that faster and often is best for you. Customers and users generally don’t care what you code in, they just want a good experience and that is something you can do.

Most languages and frameworks are pretty decent with their pros and cons.

See it more as where you’ll begin and leaving it open to where you may end up. Transferable skills and learning how to learn is the most valuable skill.

If you’re starting off it’s hard not to look to what others are saying. A lot is personal preference and interpretation.

Depending on way you are building there may be things easier to learn with.

The languages I like working with I generally do not recommend, because creating a beginner who doesn’t stop learning how to code is more important. Im not using anything hard but if your goal is to have marketable and valuable skills that you can use to access opportunity to improve your life, I can share what I have mentored both peolel with and without any software development background.

First, it is completely possible to be self taught and a self directed learner. In fact, it is a valuable skill over formal education in that you get a track record and experience of shipping solutions. Having both is a magnifier.

Here’s the advice I give:

If I was starting out today, I would learn vanilla JavaScript first (JavaScript in 30) and help it to show me the benefits of libraries and frameworks. Lately there isn’t much you can’t do with JavaScript.

Once you have vanilla is, you learn about why libraries are important and helpful. In JS but any language.

Libraries will teach their complexity too, and that sheds a light on why there are frameworks and so many of them.

This would naturally lead me towards building website, web apps or hybrid mobile apps with JS. Massively transferable skills and keeps your options broad. Learning to connect and work with APIs is critical.

Beyond this the other thing I would learn immediately is Flutter. Luckily the syntax of its language dart is similar enough to JavaScript.

Two other technologies that can’t be ignored are webassembly and Rust.

There’s a lot of other great stuff going on. Python will come into your life sooner or later, as will others.

Ideally you'll have some problem to solve or something that needs built. Pick the tool that is right for the job and learn it.
I don't understand the concern that language X won't get enough traction. If you were advising a group of a thousand developers then sure, you need at least a few thousand jobs using language X (assuming people get rejected). But for one person, how many jobs do you need available? Realistically somewhere on the order of a couple dozen. Are there a couple dozen companies that use Rust? Sure! Do I think there will be a couple dozen companies using Rust in the next few years? Sure!

Now there are languages where this question is a little more pressing. OCaml and Haskell may not have a couple dozen jobs open. But for Rust? You can find something.

Sure you only need one job, but if there's 2 developers for every 1 job half of them are getting left out. Plus those that do get jobs get paid less. If the ratio is reversed then you get a pick of jobs plus a higher salary. Much better situation.
Do you get paid less? I’ve been working with Rust in my last couple jobs and I think I’m being paid very competitively, especially for my experience level.
Is it more useful than what I already know for the problems I (might) want to solve?

How many people can help when I face a problem?

How good are the ecosystem/libraries etc...?

Is it enjoyable to work with it?

Is it in-demand?

For most of my career it would be when a sales person tells a client that I already know it.
The world will require competent c programmers for many more decades, if not for the rest of your life. Being an expert in c will probably pay far more dividends in the future than any of the “modern” languages.

That said, if you’re worried you can’t write web software or develop an app with the latest stack, then try one, I’m sure you’ll excel at it. Pick up python or Go and start writing something, you’ll be surprised how easily it will come to you

> a market dominated by web dev and java enterprise

Which also means there are a ton of web devs and java enterprise programmers. If a technology is ubiquitous, the number of people doing it is also ubiquitous. A technology being too niche can be a problem, but a technology being too commoditized can cause other types of problems.

I would learn the one that gets you a job at a place that will support you learning more/other stacks.
I'd say give one of the broad categories a try, instead of languages/tech stacks. I don't know if you're employed and if you can either switch companies for this sake/choose within your current company or you do independent consulting. But whatever it may be, try web apps for a year you'd automatically learn JavaScript, HTML, CSS and some good enough framework, maybe try mobile dev for year along the way learning Swift/Java for Android or try enterprise projects in Java and learn a bit of spring/akka or something like that.

My story started a little similar to yours, I was a C++ developer working on modems and drivers, then worked on AngularJS in 2014, then rode the initial Big Data wave and learnt Hadoop, Apache Spark and a little bit of Scala (very scared even now), then went full on enterprise Java building batches, services, message daemons etc. for quite a long time. And now for a year and a half back to JavaScript after half a decade on a mammoth React based project, very surprising to see how much JS ecosystem has evolved. I enjoyed developing pretty much all the projects I worked on, learnt quite a bit of Java, JavaScript, small amounts of Python and Scala.

On the question "How to decide?", I went by 1. hype, 2. interesting and colourful stacks, 3. make me good money. Went just head straight into one of these based on what I felt that year/period

> The real question is how you decide where to invest your time/energy next?

Everyone is going to say they have X or Y good reason and their choice reflects the deep thoughts they have put into carefully weighing pros and cons, while coming up with this decision.

I picked the next language I learned by looking at the hype. Rust was the most beloved programming language of the year when I started learning it. That was it.

And how did that work out?
Very very well. I don't think I'll ever regret getting into Rust. The whole development experience is a great delight !

I'm now an sort of evangelist for data-heavy projects that want to use more Rust instead of Python.

Usually I learn whatever interests me and I also make project decisions (in personal projects) based on that[1]. I generally try to get jobs where I can learn what I want to learn, not "the other way around", if that makes sense. Not sure if that's useful for you though. I'm a junior so expectations are probably a lot different in your case. Plus, maybe my interests just kind of align with what's demanded right now.

"Senior C dev" doesn't sound like a bad prospect to me though? I was always under the impression that there was a solid layer of C openings when I looked for jobs.

[1] Okay, sometimes I make pragmatic decisions or someone else makes me work on something using currently popular tech. And I did gain a lot of "employment-relevant" skills from that I think.

By looking at HackerNews, Reddit etc to get a feel where the community (or bubble) is going. Then validating these information against what is actually happening in your company. And then it is mostly whatever you decide what you want to chose.

So for me Rust was the main contender so I read stuff about it. But also Ocaml, F#, Zig or Nim are interesting to me.

I think in the end my way to chose things is:

Are there good libraries for the language I would want to learn? Does the language fit into my current workplace and would my colleagues be able to adopt the language as well? Does it fit into the culture? What is the operating risk to continue supporting the tools I chose for a team/company, If I were to leave the company?

I learnt on PHP. It allowed me to learn the full stack of web development very easily. Deployment is dead simple. You couldn't ask for a better intro into web development.

There will always be a time and place for C/Rust. If you like embedded/firmware, or HFT stuff, I think rust would be a great level up.

Rust is fine and useful and has plenty of traction. You can build stuff with it that's more annoying with c and reach groups of devs that don't use c much.

Just learning other languages makes it much better to learn others making you a lot more flexible and faster to spin up. There's a certain amount of brain bending that happens as you encounter new paradigms in different languages which honestly is the hardest thing to learn. After that languages are relatively easy.

I think that if you are obsolete (and that's a big if), it's not because of languages you don't know, but because of jobs you can't/won't do. For me personally, that was writing (web) UIs. Learning JS/TS + React was the best thing that ever happened to me. The best decision I ever made. It basically enabled me to crush all such thoughts (about being obsolete) that I had. I no more have to rely on someone else in order to "talk to the world" (express my ideas with software/UI). Now I can market my ideas on a whole different level, even when they are backend/systems ideas. And I was astonished by how much "real programming" there is on the frontend.
Choose what fits your field. If you're doing ML you probably want Python. If you're doing web you probably want JavaScript. If you want fast native apps then Go, Rust, C++, C, and the rest based on what libraries you think you'll need and what you enjoy the structure of most.

I personally have had a career in Python for over 10 years at this point. What made me choose Python as my go to language was my friends and peers making fun of me using PHP for server side web development. Ruby and Python (Rails and Django) were the cool kids. So peer pressure could also help you with your decision as it did mine!

At this point in my career I care less about my language and more about what libraries are available as those determine how fast I can have an MVP. I'd determine what you are trying to build and come up with a list of requirements and see what libraries are already available for you to build off of.

Open source pet projects are a great starting point for learning. Come up with an idea, even if it's been done before, and build it.