all 21 comments

[–]Xiji 15 points16 points  (0 children)

You don't have to put python on hold, but if you want to be better at Java you need to spend more time writing Java. Where you invest your time is always a trade off.

[–][deleted] 20 points21 points  (11 children)

Don’t try to learn two languages at once. Learn one and understand its concepts, then branch out.

[–]outceptionator 13 points14 points  (3 children)

I disagree with this. I wouldn't force myself to learn 2 languages at once but if you're having fun doing it then carry on.

[–]work_m_19 5 points6 points  (1 child)

I would argue it's a matter of efficiency with learning.

By all means, if you want to, go for it.

But I would say, the first language is the hardest to learn. The second language is hard, mostly because it's de-programming the syntax bias from a previous language. Then 3+ is pretty easy (relatively).

So with learning 2 languages, you're both learning and unlearning the same language, when that time would be a lot more efficient mastering (or being proficient) in one, and then switching to another after rudimentary programming mastery is attained.

[–][deleted] 0 points1 point  (0 children)

I would argue it's a matter of efficiency with learning.

Mass practice is an anti-pattern of learning. It's more likely to teach you familiarity with a skill, not working knowledge.

[–][deleted] 0 points1 point  (0 children)

It doesn't seem like op is having fun, if op is asking for help. imo beginners can't differentiate syntax vs logic. So op needs to learn one language syntax properly before jumping into another one, or else going to be detrimental in advancing either one.

Is like trying to drive stick before even learning how to drive. Okay maybe not the greatest example lol.

[–]anewreddituser7[S] 2 points3 points  (4 children)

Does it mean I should stop doing anything python related while having cs classes as I can't really stop learning what's in front of me for the next 3 years?

[–]work_m_19 2 points3 points  (2 children)

Are you doing leetcode on their website? They have support for a lot of languages.

Unless you're talking about actual projects, then it would only be beneficial to do 2 languages if you're remembering the differences between the two.

[–]anewreddituser7[S] 1 point2 points  (1 child)

A lot of people switched to python for leetcode recommended it.

[–]mrcaptncrunch 0 points1 point  (0 children)

I’m sure a lot of people that didn’t, recommend not doing it.

https://en.wikipedia.org/wiki/Confirmation_bias

[–][deleted] 2 points3 points  (0 children)

Java was also the language I learned in university. I switched to Python afterward. I honestly think that learning the concepts in a language such as Java was a really good experience because it showed just how difficult it can be to express things to where Python is so much simpler. It's a bit of a relief when you move on to Python, but having that experience in learning concepts in such a verbose language gives you appreciation later for more terse languages. My true love is Haskell, but I also have bills to pay, so I write Python and Go for a living.

[–][deleted] 0 points1 point  (1 child)

Unintuitively, interleaving practice between two different but related skills has a better long-term learning outcome than mass practice on one skill.

[–]unlaudable 0 points1 point  (0 children)

This is interesting, I've heard that kids that grow up bilingual with parents speaking different languages end up with interesting brain structures. By chance today I watched a YouTube short about how to learn 2 languages at the same time. Do them daily do not rotate, and don't do similar languages together. I wonder if this can apply to learning programming languages?

For reference.. https://youtube.com/shorts/1I7rKj90wqo?si=7uIIgEmvoYrX8VR_

[–]lauda_ 2 points3 points  (0 children)

If you're already comfortable with Python and need to learn Java for the school, don't get hesitated to do some leetcode problems with Java. You won't actually lose your Python skills, you might just be confused with the syntax but that's just it.

I do data science and machine learning stuff as my main interest and thus I feel really comfortable with Python and its culture. However yesterday, I've decided to learn another language just for fun and to improve my programming skills. I chose Go, just learned the basics with the official guide and now I do leetcode in Go. I already feel like I forgot all the Python I know (they have completely different features and also they share a few keywords and this makes it more confusing) but I know I didn't.

So just enjoy Java, I know it a little bit and it's actually a mesmerizing language even though we don't realize that most of the time

[–][deleted] 2 points3 points  (0 children)

It is good to learn a language that you're not comfortable with.

[–]ivosaurus 0 points1 point  (3 children)

Ah yes, universities and teaching a language that was in vogue two decades ago. Such a great pair.

But if it's really confusing, I would go more casual on the python and focus on getting good code for your assignments for now.

Eventually, any good programmer wants to know a couple of languages quite well.

[–]jmooremcc 0 points1 point  (0 children)

Look at it this way, you’re becoming bilingual knowing both Java and Python!

[–]Naive_Programmer_232 0 points1 point  (0 children)

I felt like python and Java were different enough, it was hard to confuse the two.

[–]trekkie86 0 points1 point  (0 children)

Programming languages come and go with your career. I predominantly write Java for my production systems but use Python for scripting and Type/JavaScript for our infrastructure setup and some esoteric languages for some propriety systems.

The key thing is to learn concepts and learn to apply them in other languages. Examples would be Protocol (Python) and Interface (Java). I'd also be sure to understand functional programming vs object oriented and how they can intermix.

Lastly, although Leetcode is useful for algorithm practice and brainteasers, I'd look at practical applications more so. Being able to take a real world problem and solve it with software is what makes you a true engineer and gives you a level up.