HACKER Q&A
📣 kasani

How do I choose a programming language?


I'm a UX Designer and want to learn programming, mostly because I wanna build things myself with a focus on the web. But how do I pick a programming language?

Ruby - seems like a great choice but it's "dead" and it seems like it would be hard to get a job (I'm in Europe)

JS/Node - Seems to be something most people hate working with while also having tons of flaws

Golang - Seems much harder to learn and people don't seem to like it either

So how do I choose one? How do I start learning a language and which one would you recommend?


  👤 usrbinbash Accepted Answer ✓
Whether people "like" or "hate" a programming language is completely irrelevant. To quote Bjarne Stroustrup:

    "There are only two kinds of languages: the ones people complain about
     and the ones nobody uses."
Just a few examples;

C++ gets tons of bad words. It's still one of the most important languages.

Java is not exactly everyones darling either (eg. I hate Java with a passion), and is still among the top3 of highest in-demand languages in the World, and will likely remain so for the forseeable future.

Python (a language I love) is critizized a lot for its flaws (rightfully so) and is currently the top language in the TIOBE index.

Golang never hears the end of it for valueing simplicity and readability over complex features and "cleverness", and yet more and more big Software is written in it every day, the ecosystem is thriving, the positions are well paid, and there is no sign of slowing down.


👤 jstx1
JavaScript because you want to focus on web. As a UX designer I imagine you'll want to work on front end at least to some extent even if you learn backend too. The other languages are fine but they're only for backend work and at some point you'll have to learn JS for the front end anyway. So you might as well start with JavaScript which can do both.

It really seems like a no-brainer for your requirements; don't worry too much about other people complaining about stuff - you can find complaints about every programming language out there.


👤 ssss11
If you’ve never done it before I’d suggest understanding html and css first (or maybe you know them) and I’d follow it with javascript and either node or php (lamp stack) on the back end. I think this is the easiest way to begin.

There are many coding boot camp style websites - I’d probably get into a beginner one or just beginner JavaScript tutorials on the web.

There’s tons of options and unless you start with one you will not be able to compare when you try the next. Good luck!!


👤 gjvc
Golang - Seems much harder to learn and people don't seem to like it either

How do I start learning a language and which one would you recommend?

Find a small project you've already written in language X. Starting with the smallest, translate a single function from X to Y, then another and another. Note that nothing has to run yet, we are just looking for syntactic correctness. Keep doing this until you get back to the entry point (where the program starts, normally command line option parsing). Along the way you'll have learned not only the syntax and source code organisation of the new language, but also experimented with the libraries available in the new language, and hopefully have something which at least runs. At this point (probably before), you'll begin to feel confident enough to start using features in the new language which don't exist in the original one, and be able to agree or disagree with naysayers with confidence.

BTW, I used this approach from Perl to Python, and from Python to Golang, and have found it effective in both cases. Good luck!


👤 midrus
Do not choose a programming language, choose the framework. Choose the libraries, the availability of devs for hire, the documentation. Choose the approaches and the patterns. The language is totally irrelevant compared to those things.

For example, let's say you choose Go, or JavaScript/node. Now what? You're now lost and need to take thousands of decisions for building anything web related, from ORMs to how to do validations to how to do translations to background jobs, etc,etc.

You won't have those problems of you choose Laravel or Rails for example.

Now that's my "business" answer assuming you want to build and ship something on your own money/time.

If you only want to learn to get hired, then yes, any of the popular languages will do it.


👤 zkirill
Don’t be quick to dismiss “dead” or esoteric languages. They usually come with frameworks that solved virtually every problem imaginable over the years. Building a thing may involve programming but any veteran programmer would tell you that if they could solve a problem without writing a single line of code, they would gladly do so. However, if your goal was to find a programming language to fall in love with then my answer wouldn’t apply and I would suggest that you try all of them!

👤 darkbot
Plenty of Ruby jobs around, and good thing with hype gone, you don't have to compete for the jobs with a bunch of brogrammers. You'll get the jobs if you're good enough.

👤 WHA8m
Following applies to learning in general: Choose what motivates you. This is the only way of enabling a long lasting learning experience.

Choosing what motivates you is probably easier said than done. So you might have to spend a little more time on why you want to learn programming. After that, think about what exactly you want to create. What tools would you need to create that? You go from abstract to specific.


👤 vegai_
Typescript is a good compromise between practical and featureful. It's like JS/Node with a lot of bubblegum to fix the leaks.

edit that might have been the fastest comment-to-first-downmod I've seen, impressive :)


👤 AnIdiotOnTheNet
By measuring friction. Occasionally when I have a small project to do I try a new language to do it in. The easier my life is during that project the more likely I am to use that language going forward.

So far: Zig, PowerShell, and FreePascal via Lazarus have been standouts in this regard. Clarification: By which I mean they have been stand out languages for my usage, which is decidedly not webdev.