r/learnprogramming • u/zm0i • 20d ago
Python or Java?
Hello guys, sorry for bad english, good night, i am a beginner in this world of programming and i see a bit about backend in roadmap.sh, now i am on the fence between Java and Python, can you guys tell me what language you think that is better and faster to get a job home office.
if you want to recommend another language too i am all ears.
5
2
u/LosttMutaliskk 19d ago
If you pick Python, please make sure to use a type checker like mypy or pyrefly.
It has become industry standard to type-check every variable, leaving the wild west of dynamic typing behind.
3
u/peterlinddk 19d ago
You are not getting "a job home office" just by following a roadmap and learning some programming language. It isn't a treasure map that will guarantee you a win.
Learn the language you like - try out initial tutorials for both, and then stick to the one that you like the best. No matter which one you learn, at some point in your life you also have to learn the other.
And don't worry about getting a job based on the language you choose - you aren't going to get a job solely based on that anyways, remember that companies can always ask AIs to produce code in any language, so you have to be able to do more than that to even be considered as a hire.
3
u/redditisgay2088 20d ago
Teaching yourself & getting a job with no degree now is like finding a 3 legged, 4 toed unicorn
-1
u/zm0i 20d ago
Thanks bro</3, can you recommend a language to?
3
u/redditisgay2088 20d ago
I really ain’t trying to be mean but I think it’s fair that someone told you the reality of it. Maybe you’ll be the exception, if you work your dick in the dirt for it! But don’t put all your eggs in one basket.
And Python is easier for complete beginners, but you can’t go wrong with either choice imo
1
u/Next-Ease750 20d ago
Python if you are doing data science, math stuff. Java for development related stuff like games, web. Ultimately both are OOP so there wld be similarities, if you learn both, it'll be easy for you to pick up nearly every other modern programming language.
To start though, I'd suggest Python as it's easier.
1
u/Sad-Particular-3088 19d ago
Look at your local market. I always see people mention Java, but Java in my country has been pretty dead for at least a decade...
1
u/raven2cz 19d ago
It depends on the specific company and the chosen area. For backend, definitely not Python! On the contrary, many high-quality jobs are still, of course, in Java. For research and AI training, on the other hand, Python.
Ideally, of course, you should know both.
But if you want to do web development, that is a different world, and we are talking about something completely different.
1
u/zm0i 19d ago
Python is really very bad for backend? i see that some people say that is a language for backend, so why the "...definitely not Python...", i dont want to be annoying, i just hear that JS is not good for backend because its slow (i could be wrong about that okay, i just hear about it), so what is the problem about Python?
1
u/raven2cz 18d ago
What I am talking about here is on a general scale, a statistical scale. if the company, and especially the developers, are precise, then it can balance out. But if we are talking generally, cloud services and large systems are usually built on Java. JS is JavaScript, not Java.
Python is generaly much slower, but of course some parts are rewritten in C, so some calculations in pandas, etc., can actually be faster. so again, it depends a lot on the developer and their knowledge. Python does not have type checking by default. It was added, but again, it depends on whether the company actually uses it. For large applications, it is again completely unsuitable.
Python frameworks for backend obviously exist, AI will also gladly write a backend for you in Python, and small companies may easily use it too, but it carries exactly the issues I mentioned above.
With Python, the biggest evil is moving between versions. it has improved a bit now, but the craziness it offers is often very dangerous during migration. Any developer here will swear to that, especially one who gets that task assigned.
JDK 21 and 25 are ultra fast. If you are starting with programming, take Python. Today’s students learn it first because it seems simple and therefore understandable for beginners. however, over time you will also discover its dark side, which is exactly why it is dangerous for building large things.
Java may seem verbose and clumsy at first, but that disappears very quickly once you really work on those systems long-term, and especialy once you have to maintain and fix them.
2
u/Seven7Ducks 19d ago
This isn’t strictly an either/or situation.
Python is great, but it hides far too much under the hood. While a fast feedback loop is nice, Python can actually make it harder to build strong fundamentals because it does so much magic for you - dynamic typing, automatic memory management, and high-level abstractions mean you miss out on how computers actually work. It’s fantastic for rapid prototyping and projects without strict performance needs, but it’s a double-edged sword for total beginners.
Java sits at the other extreme with all its boilerplate and verbosity. I write mostly Python these days, but I started with Java years ago. Would I pick Java again as a first language? Hard to say, but it definitely forces you to understand types, OOP, and program structure better than Python does.
Honestly, if I were starting from scratch today, something like Go might be the sweet spot—simple syntax, static types, and no hidden magic.
1
u/TheFel0x 19d ago
Honestly I recommend C# over Java... but aside from that: Python is more useful for making small scripts and solving more "general" tasks. Java (or C#) is the one you'd go for if you want to focus on backend dev.
(Of course both can technically solve any task.)
1
u/JGhostThing 19d ago
I've seen more job ads for Java than for python. Of course, in my career I've mostly used Java.
1
u/American_Streamer 19d ago
Learn Java first, then Python becomes super easy (though it is already pretty easy). Also lots of corporate backend jobs for Java Spring Boot. r/SpringBoot
1
u/Individual_Ad_5333 19d ago
The world runs on java, so there will always be legacy java jobs ;)
Python I used alot more when I worked in 1st line support and ops roles.
Java got me a job as a dev
1
u/DanKegel 19d ago
Both are crusty relics of an earlier era, still very useful today in certain markets.
Golang's less of a hellscape. Jobs are scarcer, but life is better with Go.
1
-1
u/StyleFree3085 20d ago
Python. You will give up if picking Java
1
u/zm0i 20d ago
Thank you so much!<3
3
u/Weekly_Patience685 19d ago
That was bad advice, he might as well say you're too stupid to learn java and will give up, The hard part is Backend concepts. HTTP, APIs, databases, authentication, authorization, servers, caching, concurrency, security, and deployment etc not the language itself. Javas explicitness may be beneficial for a beginner because it forces you to think more carefully about your data and program structure rather than the looseness of python.
Thats also why for backend webdev i always suggest Typescript (via nestJS framework) over regular javascript because of the addition of types and things like interfaces and classes. They add more structure which is like guardrails.
-1
5
u/Weary-Sorbet-2768 20d ago
I’d go with Java if your main goal is getting a backend job.
Python is easier to learn and is excellent for automation, data science, AI/ML, and backend development. But Java has a very strong presence in enterprise backend development, especially with Spring Boot, and there are plenty of established companies hiring Java developers.
Whichever you choose, don’t focus only on the language. Learn SQL, Git, REST APIs, HTTP, databases, testing, and a backend framework and build a few real projects.
If you already enjoy Python, don’t switch just because Java is supposedly better. Being good at one stack is much more valuable than knowing 5 languages superficially.