Java and Python are some of the most popular programming languages, so we will start with them.
Of course, everyone should choose based on their goals and intentions, and I can give some important hints.
Language use in the market
When choosing a programming language, look at what it is used for in the market. Java has two main uses. First and foremost, of course, is Java Enterprise: developing serious large-scale enterprise solutions, automating huge corporations. In principle, we could finish here, but there is another sphere of Java application – Android development. There is little in common between them: mobile development in Java is more similar to development in Swift for iOS. There are different solutions and different constraints there, compared to Java Enterprise.
Python is used in a more diverse way. It is the most popular scripting language, and you can quickly nail some script and send it to production. So it is used almost everywhere. We are not yet considering DevOps, Data Scientists, Automation QA, but any programmer will definitely find Python useful, because it is used for e-commerce solutions.
The fact is that many small and medium-sized businesses are quite enough solutions based on ready-made CMS – OpenCart, WordPress, WooCommerce, thousands of them. For example, FoxmindEd’s website is written on WordPress. But there are other businesses – sports clubs, beauty salons, others – that need the user to have a personal profile. The user should be able to view their profile, pause a subscription, pay, and perform other actions specific to that business. Writing such solutions in Java is considered mauvais. Such solutions are written in either PHP with a framework, Ruby, or Python.
Enterprise systems vs. fast solutions
So, to decide whether you would like to be a Java developer or a Python developer, take a look at what’s in store for you. Java is complex solutions, huge, with lots of integrations, with business logic so convoluted that it’s hard to explain to people I know what I do.
Python is plus or minus understandable solutions, your work can be easily shown to someone. Here is a website, look, admire, you can show off to a client. And while Python solutions are more presentable, Java calls are more serious. In Python, it may happen that you will have to build more or less the same type of sites.
Legacy support or new projects
The legacy factor should be taken into account. In Java, 8 or even 9 projects out of 10 are legacy projects written by someone before you. And you need to support it, improve and extend it. Often projects are written by Indians and Koreans, and it is not easy to understand them. On the one hand, it’s not very pleasant, on the other hand, it’s a challenge.
And in Python, 8 out of 10 projects you will start from scratch. On the one hand, this is good, on the other hand, you’ll be doing roughly the same thing all the time, and you’ll hardly be able to do the same project for several years.
Toolkit
Java probably has the best toolkit in the world. It’s many years old, there’s backwards compatibility, every tool is debugged to a state of perfection. Even free tools like Eclypse are full-featured and not bad.
Python seems to use similar tools, but they look a bit poor for a Java developer. Considering that Python is not a strict typing language, you can do quite a bit with its toolkit automatically. In Java you can do complex refactoring and object removal, but in Python it is simply risky to do it automatically.
Salaries of specialists
Probably the first thing a future developer is interested in is salaries. Today we see the following on the market: a developer in any language earns about the same if they have the same skills. Java just has a higher threshold of entry, and while javist salaries look higher, there are higher requirements to get started. Upgrade your skills to the same level in another language, and you’ll earn that much too. So, I don’t recommend you to choose a language based on salary level.
Temperament and programming language
You can try doing the following: write an application in one language and in another, and see what you get better at. You’ll probably see right away that Python is easy and quick to get started in. And Java is a very strict language, and it feels like nothing will work unless you do it right. I get a better feeling from Java because it’s so serious, fundamental, a step to the side and the code just won’t compile. So if it compiles, then most of the problems are not there anymore. But in Python, you can compile everything very quickly and get it into production, and the problems will appear later. A lot depends on your character.