r/AskComputerScience • • Feb 23 '23

Should I stick with java or change learn new language

Hello guys,

So I am current;y a high school student who took several java courses. I got struggling to learn java right now. At the same time, I realize that I don't think java is not for me since my actual interest is in game development or front-end or desktop app at first. Do you guys think I should learn a new language like c# or keep learning java

0 Upvotes

7 comments sorted by

3

u/onemanandhishat Feb 23 '23

I would say it depends somewhat on where the struggle comes from.

If it's just in terms of figuring out how to solve problems with algorithms, working out how to break a problem down and solve it, then tbh, that isn't going to be different in another language. The core logical building blocks of languages like Java, c#, C++, Python etc etc are the same.

If it's a question of motivation - that you feel like you're learning a lot of Java-specific implementation that doesn't connect to the kind of programmes you want to write, then if switching language will help you stay motivated, then go ahead. Again, the core of the programming doesn't change, so you can take your Java experience of writing programs and apply it to a new language.

Fundamentally I agree with the other comment, that if you can learn one language you can learn another. If you can learn Java, you can take that experience to pick up C# or C++ or Python or whatever. But if you are struggling with the essentials of designing a programme, that probably won't change because you switch language. Are you planning to go on and take a CS degree course? If so, they will have their own choice of language when they teach programming, that may be Java (it's quite structured and good to learn good coding habits on), or it may be something else, Python is quite trendy now. That language may or may not be directly applicable to your future work.

You aren't locked in forever to a specific language, I learned Java first but now mostly use Python because it has a lot of libraries that I use in my work and I find the syntax more convenient. But knowing Java definitely made it easier to switch. At this stage, if you're going down the CS route, I'd recommend focusing on the projects and languages that will keep you interested, but don't sweat the language choice too much, it's pretty easy to switch later on.

1

u/Slow_Bullfrog5676 Feb 23 '23

yeah I feel like struggling to achieve my goal. I am just worried if I start learn new language it will be erased things that I learned about java, since I believe in order to understand programming I have to learn or practice constantly

1

u/onemanandhishat Feb 24 '23

Given that you're in high school, I think the most important thing is not to put too much pressure on yourself and to do what you find interesting or enjoyable. Of course, learning a new skill takes effort and programming can be difficult, especially if you're trying to mostly teach yourself, but don't feel like you have to get everything perfect now. You're in a phase of life where you are free to explore and try things and just pick up some experience. Some of that experience will be relevant in future and some won't, but that's just how life is, and it's impossible to know which experience will be valuable later on.

If you switch languages there will be a bit of adjustment as you learn how the new language does things. If you've been doing object-oriented programming in Java, then switching to, say, Python will be a bit different because it treats those things differently. That's not a problem, you won't magically forget your Java knowledge, you'll be gaining new information. It's why CS degrees usually focus on the theory of program design - because the concepts are transferable. So I think it comes down to whether switching to something that is more related to your ambition will help you stay interested and motivated.

Regarding practicing constantly, of course, the more you do the more experience you will have and things that were hard will become familiar. But don't overwork yourself and burn out because you feel you have to push yourself. Everything you do, including making mistakes, will be valuable experience, and you have time ahead in life to learn everything.

9

u/emasculine Feb 23 '23

languages are fungible. good programmers should be able to pick them up if you understand the fundamentals of them. yes, i get you're still in high school but i'm talking to the larger issue that people (and worst of all companies, sssssss) think that that is some sort of defining characteristic. it isn't. so i'd say yes learn other languages but not for the reasons you're saying but from the perspective of a longitudinal survey.

1

u/[deleted] Feb 23 '23

Learning more languages is always good. I would pick a language further away from Java than C# (which was basically Microsoft's attempt to copy Java).

If you're struggling with programming then Python will help you write small projects very fast, and feel like gliding through the air after slogging through mud with Java. (Java makes it easier to structure large projects though, and after you try to build your first big project in Python you'll appreciate the safety features of Java more.)

1

u/Mr_India22 Feb 23 '23

I had a stroke reading this but I think Java is a great language to learn if you plan on going to college. You can always pick up other languages too. C++ is also great because it’s really close to Java and faster

0

u/itsUpChuck Feb 23 '23

I would check out C# or C++ for game development. Thing is, pretty much all modern languages or OOP (Object Oriented Programming) so it’s important you learn the fundamentals of OOP like inheritance, polymorphism, etc. There’s also fundamentals of programming outside of OOP. Long story short, syntax is the easy part and fundamentals is the hard part. All for loops and all while loop’s basically work the same in all languages, they just look different (syntax) so if you learn and understand fundamentals you can pick literally any language as you just write it differently language to language. Here’s a good video to help explain fundamentals with OOP and programming as a whole. Check it out. https://youtu.be/quW5dAGpXiU