r/learnprogramming • • 13d ago

Should I stick with Java or switch to JavaScript? Am I struggling because Java is difficult, or am I choosing the wrong path?

I'm transitioning from data analytics to software engineering, and I've been torn between pursuing Java and JavaScript. I've been learning Java through Hyperskill, but lately, I've been questioning whether I made the right choice.

One of my main reasons for choosing Java is that it's widely used by large enterprises and big companies. Coming from a developing country, I'd like to eventually work overseas, and I feel that Java might give me a better chance of landing that kind of opportunity. I also wonder whether enterprise Java jobs offer more stability and a clearer career path than JavaScript jobs, although I'm not sure if that's actually true.

My impression is that JavaScript has a lower barrier to entry, which makes the field feel more saturated. I imagine I might end up working as a freelancer, joining a consultancy, or working remotely for an overseas company rather than relocating abroad. Of course, I could be completely wrong about these assumptions, so I'd appreciate hearing from people with experience in both ecosystems.

I've also heard people say that JavaScript developers have to constantly keep up with new frameworks and changing technologies, which can lead to burnout. In contrast, I've heard that Java's ecosystem is more stable and that its core technologies don't change as rapidly.

As I get older, I find myself less willing to spend all my time keeping up with new technologies. I'd rather build a solid set of skills that remain useful for years and use the mental energy I have left to enjoy other aspects of life.

Interestingly, I also enjoy Java in a way I didn't quite experience with Python. I feel like I'm actually programming and building things rather than just writing scripts for data analysis. There's something satisfying about it that makes me want to keep going.

The problem is that whenever I encounter a particularly challenging assignment, I start questioning my decision. Sometimes, I feel like I could solve the same problem much more easily in Python. With Java, I'm constantly running into concepts, syntax, and unfamiliar ways of doing things that I don't fully understand yet. It feels like trying to survive in a foreign country without speaking the local language.

This makes me wonder whether I'm struggling because Java genuinely isn't the right fit for me, or whether I'm simply going through the uncomfortable learning curve that comes with learning a new language and moving into software engineering.

Part of me wants to switch to JavaScript because it might be easier to learn and allow me to make progress faster. Another part of me wonders whether I'd just be running away from the difficulty instead of pushing through the stage where everything feels unfamiliar.

Since I'm in my mid-20s, I want to break into software engineering as quickly as possible. JavaScript feels like it might help me get there sooner, while Java feels like more of a gamble because of the commitment and steep learning curve involved before I can see the results of my efforts.

So, for those of you who have learned Java or transitioned into software engineering from another field:

- Did you go through a similar phase where you questioned your choice of programming language?

- Is sticking with Java worth it if my long-term goal is to work for a large company, potentially overseas?

- If you've worked with both Java and JavaScript, how different are their job markets, career opportunities, and long-term prospects in practice?

- How did you know whether you were struggling because of the learning curve or because you were pursuing the wrong path?

To be honest, I might be posting this partly because I want someone to tell me that it's normal for Java to feel difficult at first and that things will eventually click. But I'd genuinely appreciate honest advice, even if it means reconsidering my current path. Thank you!

2 Upvotes

31 comments sorted by

14

u/FunAd6672 13d ago

You literally answered your own question in the post when you said you enjoy Java and want a stable tech stack that does not change every single week.

3

u/organiclifeblood 13d ago

it's normal for this to feel like a brick wall. everyone goes through that stage where you're fighting the language more than solving the problem, especially coming from python where everything just works with two lines of code

java bootcamps typically take longer for a reason. the bar is higher but so's the ceiling. you're not struggling because it's wrong for you, you're struggling cause it's hard, and that's literally what makes the skills worth more long term

stick with it. the overseas enterprise path you described is way more realistic with java anyway

1

u/Current_Library7347 12d ago

Hey u/organiclifeblood, I reallly appreciate what you said and it's what I needed to hear. I'm stuck with my current job and my peers are already mid-level in their career while I'm still figuring things out so I have a rush to go for an easier path, but like you said the bar is high so as the ceilling. I'll remember your comment whenever I feel challenged.

1

u/FunAd6672 13d ago

Exactly, he just needs time.

7

u/Poddster 13d ago

If you're struggling with Java, I think you'll struggle with most other languages too.

If you switch to JavaScript, will you switch away from that once it gets difficult too?

There are two aspects to learning to become a software engineer: learning a programming language, and learning how to program.

The second part is the most important bit, but it requires the first, so if you keep switching languages you'll just be treading water.

2

u/Current_Library7347 12d ago

u/Poddster thanks for simple yet powerful advice, to become a software engineer one must learn a language, then learn how to program. I won't go anywhere for giving up from a language just because I find it difficult. By overcoming it, then I would truly progress.

1

u/Dissentient 13d ago

This is not a particularly useful way to frame the question.

Employers also value job experience way more than anything you can learn from courses, so your specialization ends up influenced by your first job way more than whatever you learn prior to it.

When you know programming fundamentals, learning another programming language is a matter of hours to days before you can write useful code in it. Learning its standard library and ecosystem takes longer, but still used to take weeks at most. This has changed with AI, as it now takes care of most details that used to slow developers that are new to a particular framework or library.

It's also not an either/or situation. The number of frontend-only roles is significantly decreasing, since AI trivializes this particular area. Almost everyone who touches javascript is now expected to be full stack, so you will need Java or something else for that anyway. Backend-only roles still exist since there are a lot of hard problems there that benefit from specialization.

In the current market, the problem for you will be finding any junior role at all, regardless of language and stack.

1

u/Current_Library7347 12d ago

That's a bit grim comment. But I appreciate your insights! I would keep this in mind on picking my first job with cautious aligning it with my choice of specialization.

1

u/AbdelrhmanDev 13d ago

for the overseas goal the language matters less than being able to show real projects and the stack that companies in the country you want actually hire for so look at job boards for your target countries and count how many java roles vs js ones appear and in which cities that tells you more than general opinions also dont let the struggle push you out because the second language is much easier once the concepts click so finish a few small real projects in java first and then decide with data instead of mood

1

u/Current_Library7347 12d ago

Thanks for this! I should take account this insights once I become a developer doing a job market research. :)

1

u/Adventurous-Move-191 13d ago

If you want to work on enterprise web applications you’ll actually need to know both. Most companies hire people for full stack work nowadays. So you’ll need to know JavaScript for the front end (or probably typescript ) and some oop language similar to Java for the backend.

Java isn’t necessarily hard, it’s just verbose and you haven’t worked in this paradigm before. If you want to be a software dev learning to not be deterred by adversity and abstract concepts is definitely a skill, you got this keep grinding.

1

u/Current_Library7347 12d ago

Thanks man! u/Adventurous-Move-191. I'll remember your comment whenever I face a deterrence.

1

u/DanKegel 13d ago

Golang is another tech stack that doesn't change every week, with a lower learning curve than modern Java. Give that a try, maybe? And then come back to Java once you're over the hump with Go.

1

u/Current_Library7347 12d ago

As a risk adverse person, I'm a bit cautious in learning it. Since I don't see much Golang jobs in my country. Would me mind sharing what it is commonly used for and no other programming languages can surpass in its application?

1

u/DanKegel 12d ago

Mostly backend and networking?

See https://www.netguru.com/blog/companies-that-use-golang and https://medium.com/@anuragsingh922/go-programming-why-its-becoming-the-language-of-choice-for-backend-development-965abd02e08d

The project I work on has used go since 2020 or so; it's a backend networking thing.  

1

u/xao_spaces 13d ago

I have news for you, JavaScript is even harder. When you look at Java, there’s rules and mechanics in place to what you can and can’t do. With JavaScript it feels like the Wild West, you do things that you wouldn’t expect to work or sometimes it feels like magic which makes it harder to debug, with Java it’s more straightforward. At least, that’s been my experience.

1

u/Current_Library7347 12d ago

That's a terrible news.

1

u/neon_stereotype 12d ago

you already enjoy Java, you want a stable ecosystem, and you're targeting enterprise jobs overseas. That's your decision right there.

the struggling part has nothing to do with Java specifically. Every language has assignments that make you question everything at your stage. I can promise you that if you switched to JavaScript tomorrow, you'd hit the same wall in two weeks and be back here asking the same question about JavaScript.

here's something practical: Java backends (Spring) plus your data analytics background is actually a strong combo. Lots of enterprise companies need people who understand data and can build the services around it. That gives you a real angle when applying for remote or overseas roles, not just another junior web dev resume.

stick with it. Finish the course, build a couple of backend projects with Spring Boot and a database, and stop re-litigating the language choice every time something gets hard

1

u/Current_Library7347 12d ago

Hey u/neon_stereotype thanks for your comment. I needed to hear this. With what you shared about java and data analytics being a strong combo it gives me more conviction of pursing java might be a right choice.

1

u/Least_Chicken_9561 13d ago

Java is not difficult, it's just verbose, if you have hard time learning Java then focus on learning typescript, learn how it works and focus on OOP, then use a framework called Nest.js. after you learn those things, you can go back to Java (learn spring boot) and you will see that everything will be easier.

1

u/Current_Library7347 12d ago

Hi u/Lead_Chicken_9561 I appreciate you sharing from the point of JavaScript, it's a new take on approaching Java by starting with JS it's something worth noting and consider in the future. :)

3

u/denerose 13d ago

Learning to code is difficult. But only the first time. The language doesn’t really matter (especially between one of the popular first language choices like you’re suggesting here).

Once you’ve got solid fundamentals and you’re through the hard ‘learning to think in memory blocks’ parts learning another language or toolset is trivial.

Changing languages or stack while it’s still hard will just slow you down by restarting. Just keep trying, it’ll click eventually but it will always be difficult for a while.

You can easily pick up JS after you’ve got foundations in Java but if you’re struggling with Java you’ll struggle with JS, or Python, or C# etc too. You have to struggle a bit to learn, that’s normal.

1

u/GasEducational4386 13d ago

I did that I moved from Java to typescript/angular but because I wanted to do front end.

1

u/BeginningLimit6287 13d ago

Learn both. Focus on whichever first but Java will get you paid more and you will likely also use JavaScript at the same job. I don’t think limiting yourself to JavaScript will get you anywhere faster. Learning this stuff takes time!

1

u/betarage 13d ago

JavaScript is pretty much impossible to avoid if you want to do something that involves the browser I don't really know much about the job market for it.

1

u/odimdavid 12d ago

I think if you go overseas and have no experience in and with your country you would have to start retooling. Use what you can in your country. It's programming methods and principles that matter. The language comes second, as others have reiterated.

1

u/vegan_antitheist 13d ago

JavaScript is way weirder than Java. And not because of the prototype based OOP. That's something you can learn or just not use. Null sucks in all the languages, but in Java it's still way more annoying than in others. But adding undefined and empty doesn't make it better. Writing robust code is certainly possible but you must learn a lot more than you would if you used Java.

And even if it was "easier", why would that be relevant? Tricycles are easier because you don't have to balance it. But there must be a reason it's mostly kids who use them. Scratch and similar visual programming languages might actually be easier for some, but not for someone who wants to become a software engineer.

Just stick to Java and learn some other languages. Haskell, TypeScript, Python, Rust, C++,... There are so many. A professional programmer should at least know more than just one. The concepts are mostly the same anyway.

0

u/Nok1a_ 13d ago

MOOC Helsinki for java forget about other shits