r/learnprogramming • • 2h ago

Should beginners learn one programming language first or try different ones?

I'm new to programming and not sure if I should focus on one language or explore different ones. What would you suggest based on your own experience?

4 Upvotes

15 comments sorted by

5

u/0dev0100 2h ago

If you try to learn too many different things at once then your brain will get confused and you along with it.

My personal experience is that if I try more than 4 things in a small amount of time then it's not going to go well

1

u/jakingo 1h ago

That makes sense. Focusing on one thing at a time definitely makes things easier. Thanks for sharing.

•

u/SprinklesFresh5693 14m ago

I tried learning R and python at the same time 3 years ago and it was a mistake. I chose R, bece good at it, and now after 3 and a half years, im actually considering learning a bit of python now.

2

u/Stock_Test2326 1h ago

One first, many things are common, but you will confuse the syntax and end up in a way you can read code and understand but not write. FML.

1

u/N7Valor 2h ago

One first is the common recommendation. Similar concepts tend to carry over such as loops, conditionals, variables.

Importing external libraries such as Powershell modules is a similar pattern I see across Python and Golang. That kind of help gets the ball rolling. What you typically deal with next is how each language handles complex data structures, types, and testing.

Plus, if you know a language well you begin to appreciate the advantages of each. Python has a ridiculous number of libraries for just about anything. Golang has interesting features with memory management and I typically see some simplicity and benefits when it's compiled into a binary like common CLI tools such as Terraform or Packer. I also appreciate going back to strong typing when Python might leave such things ambiguous.

1

u/mkhanwrites_ 2h ago

Focus on one. Once you learn one, you'll know a decent amount of concepts that will be applicable to other programming languages. Not all, mind you. But some. (If you want to know the reason: look up the term "programming paradigms" - different languages are designed according to different paradigms)

1

u/widebrant67 2h ago

The real headache is switching paradigms later. Going from Python to something like Haskell feels like starting over.

1

u/mierecat 1h ago

Try different ones but settle on one.

1

u/Whatever801 1h ago

Languages are all very similar. If you cast a wide net, you'll have a shallow understanding. Learn the fundamentals of programming deeply, and trust you can pickup a new language quickly

•

u/ThatDistantStar 51m ago

Do not be ADHD. Being able to stay on task for a singular task or topic is a skill.

•

u/gm310509 38m ago

My advice would be learn one first.

Try to separate out the concepts from the syntax in your mind. What I mean by that is consider a loop that uses a variable "i" to count from 1 to 10 and print each of the values of i.

All of these will do that, but the syntax is very different:

BASIC (note that some versions may require every line to be numbered (e.g. 10, 20, 30 for this program):

for i = 1 to 10
  print i
next i

Python:

for i in range(1, 11):
  print (i)

C:

for (int i = 0; i < 11; i++) {
  printf("%d\n", i);
}

So, learning multiple languages simultaneously will likely just confuse you, but if you can isolate the concepts (loops, conditional processing and so nn)< then you will understand the building blocks - then all you need to do to start learning a new language is to understand that if you needed a specific construct, e.g. a loop, then you just need to find the syntax for that new language.

There is a bit more too it and different languages do provide features that others don't, or they might take a quite different approach to something that is conceptually the same (dealing with lists for example), but the basic concepts will be similar across most languages.

•

u/BeastWael_YT 35m ago

one first, and stick with it until you can build a small project without copying a tutorial. python is a fine pick. after that a second language is way easier since loops, functions and variables carry over. hopping around early just means you restart the basics every time.

•

u/bird_feeder_bird 10m ago

When I was first starting, I focused on Python for like 4 months. Then I did Javascript for another 4 months making web projects, then C and assembly for low level projects. I also dabbled in Forth, Lisp, and Ruby, before settling on C and Javascript as my main languages depending on the project.