Live data from Hacker News

How to choose what a programming language to learn first

news.ycombinator.com

1–10 of 20 posts

Re: How to choose what a programming language to learn first

#3
Python and Javascript are probably the most beginner-friendly general-purpose programming languages to learn (while still being real languages in common professional use).

It kinda depends on what you want to do, though (if you know). Python is often used in the sciences and data sciences and ML/AI stuff. Javascript powers the Web (among with some desktop apps, unfortunately, but that's a different story).

Once you know one programming language, it's a lot easier to pick up your second, third, nth ones... the syntax of any particular language isn't as difficult to pick up as the basic logic systems (booleans, conditionals, loops, etc.) and architectural patterns, etc.

If you're not sure what you want to do with a career in "programming" just yet, maybe look up some articles or watch YouTube videos about "what does a _________ do?". Or feel free to discuss it here if you know what you kinda like or don't like?

Some industries have a "standard" language in common use. If you have some ideas of interests of the types of companies or projects you'd like to work on, that would help narrow down the choices. Some random examples:

* Python is common in science, data science, statistics, sometimes finance, some web dev backends, ML/AI, GIS (mapping), robotics, etc. Side note: I recently discovered a fun game that teaches you basic programming with a Python-like language: https://news.ycombinator.com/item?id=40719279

* Javascript is essential for web programming, no matter what other languages you use alongside it

* Games typically use C++ (especially with Unreal Engine) or C# (for Unity).

* Mobile app dev is usually Swift (for Apple stuff) or Java/Kotlin (for Android) or React Native/Javascript (for cross-platform teams that don't want to use platform-native languages)

If you have some ideas of things you like or don't like, share 'em with us :)

------------

Check out the StackOverflow annual developer survey to see what programming languages are currently most popular: https://survey.stackoverflow.co/2023/#section-most-popular-t... (TLDR it's Javascript/TypeScript, SQL, Python, Java, C#, C++, PHP, and then all the others).

Re: How to choose what a programming language to learn first

#4
Instead of picking the language first, decide what you want to create. Having a project you are interested in is key to learning. If you’re just doing a bunch of tutorials you don’t care about, with no way to apply them, it’s hard to stick with it. Any language can teach you the basics and those basics will be transferable to any language.

If you want to make a website, start with HTML, CSS, and JS. If you want to make an iPhone app, start with Swift. If you want to make something for Windows, give C# a try. Knowing where you’re heading will narrow things down a lot.

While I had a Java and .Net class in college, I never used it after the class, didn’t have a project of my own, and forgot everything. Years later at work, I wanted to automate some stuff I had to do often, which led me to AutoHotKey. That was a painful way to learn, as the syntax and documentation were both difficult to deal with, but because I had a project I cared about, had quick results, and had reasons to keep adding more and improving it, I learned. Eventually I wanted to share some stuff with others and distributing a URL seemed easier than an exe, so I learned basic web dev. Then I needed some server side stuff, so I learned PHP, then needed something else and learned Python, and Ansible, and on and on… whatever I needed at the time. Was it “optimal”? No, but no path will be. You can only connect the dots looking back. The most important thing to keep moving forward is to have a reason to get excited about it. If you’re in tutorial hell, you’re probably heading in the wrong direction. Things are going to be hard at times. There will be a point where you’ll beat your head against the wall for hours, maybe days, because of a single brace that’s out of place. During these times, there needs to something you want that is worth going through the frustration.

Re: How to choose what a programming language to learn first

#5
Ask yourself what kind of project you want to work on, and go from there.

You want to do web stuff? Learn Typescript + HTML + CSS

You want to do iOS apps? Swift

You want to do Android apps? Kotlin

You want to do AI stuff? Python

You want to do backend servers? Lots of options here, but Typescript, Python and Kotlin are well-supported on the backend too, so I'd go for one of those.

You want to do database work? SQL + whatever database you're interested in. If you don't know, go with Postgres.

You want to do games? Ask someone else, because I don't know lol

Re: How to choose what a programming language to learn first

#6
What language would help you the most in your current role? The best projects are ones you actually need, and building scripts for work will teach you more than building a generic crud app.

I think the most important thing is to pick one language and stick to it (and only it) for as long as possible. Say 3 years. Don’t learn a second until you can do everything in your first with total fluency. Don’t be a dilettante or a framework hopper. Better to learn 1 thing well than 10 things poorly.

Last piece of advice (and there’s tons of arguments against this, so just my opinion) but pick a scripting language first, either python or js. After mastering it, then pick a statically typed enterprise lang like c#, go, or java. You’ll go very far very fast with js or python, and once you finally hit mastery in those languages you’ll start to feel their limitations and the need for static types will be apparent.

Re: How to choose what a programming language to learn first

#7
Honestly, I'd choose the one that the most people I know use. That way you have access to plenty of readily-available expertise.

Different languages are better or worse for beginners, but among the set of languages that you're likely to be thinking of, I don't think those differences are very large. The biggest part of the learning curve isn't the language itself, it's the common set of skills you need regardless of the language you're writing in.

Learn to program first. Once you have that, learning additional languages as needed (or wanted) is much, much easier.

Re: How to choose what a programming language to learn first

#8
Don't think about it too much. There are so many choices, that you'll end up trying to learn them all but master none. Start looking at the job descriptions for jobs you would like to get. Look at what they require for the jobs they post. Then look at the list of the most popular languages and decide by considering both the job descriptions and language popularity. Java and Python have been popular for a long time. You might want to start with those. The great advantage of learning those is that you'll get plenty of support online due to their popularity. Your initial goal is to understand how to put a program together that solves a problem. That's your most important goal at the start. I can tell you that no matter which you pick, you'll eventually wish you'd pick another. But the reality is that you can only pick one. Be a master at what you pick and you will get a job. So pick one and start.

Oh, pick a project too. Anything as long as it's challenging and it interests you.

Re: How to choose what a programming language to learn first

#10
everything you need to know about modern programming - most languages are similar to C

so by learning one you can move on to learning the other, the difference is mainly in syntax.

If we talk about management, don’t look at the labor market, it won’t tell you whether this is relevant today, something else tomorrow. you must understand that if you choose one path, it may disappear in 3-4 years

it is important to choose in which area you will program, the programming language is a field of work, and not like German or French in real life

Post reply on HN