Java-Programming

SHould you learn programming in Java? (Yes)

Back in the days (1995) Java`s main selling point was its cross-platform capability. Nowadays, many programming languages like Go or Python can match this. The same is true for other features when viewed in isolation. Indeed, it will be hard to find a feature that is unique to Java. But the same is true for many other modern languages. Some might have their strengths in certain areas, and a general decision on what programming language to use is always dependent on what you want to do, on what platform you want to do it and very often it depends on what people before you have been doing.

But there are also things you have to consider on top of that. When you venture into programming it could be to make a living, or it could be for fun, maybe both. If you want to be a professional programmer long-term job security certainly is a factor that helps to decide what programming language to learn. If your interests and/or career aspirations are in the areas of web backend development (Cloud, finance) or certain types of desktop applications like industrial control systems, choosing Java is certainly a no-brainer. Since job security mostly manifests itself by the amount of production systems/applications running with a certain language, additionally considering the longevity of those applications, Java gives you plenty of opportunity to work on interesting and important stuff now and in the future. Java is widely used by small or big corporations. For example, AWS is famously known to use a lot of Java. Likewise, a lot of financial institutions, banks or insurance companies rely on Java. Even if Java would be dying for some reason soon, I am sure there would be decades long job security. Why? Just look up COBOL.

If you are just digging into programming for fun that is fine as well. It is an invaluable skill to understand how computers work. Even, or especially in the age of LLMs. Because they potentially add a huge layer of abstraction, which in turn could lead to a deterioration of in-depths knowledge. If you are going to learn stuff for fun the choice of language is really mostly a question of personal taste. Intriguingly, there are compelling arguments to learn Java. In fact, the Java language is relatively easy to learn, and you can basically do whatever you want with Java (remember that the original Minecraft is written in Java). On top, there is a vast and rich ecosystem and a huge, thriving community surrounding the ecosystem. This also leads to the existence of many open-source and production-ready frameworks and libraries to solve common challenges, which you might need down the road. The thriving community and the resulting vastness of information also plays a role for your general productivity. If you are not a 10x programmer, programming usually means integrating a lot of information provided by others to solve a problem. Eventually you will become a 1x or 2x programmer, but the richness of available information will still serve you well.

Java has developed ever since it made its first appearance on stage, meaning Java has integrated many modern concepts into its feature set and is one of the most mature programming languages out there. Most importantly, Java is very versatile in the way it allows you to do things. Originally, Java has been developed with a strong focus on object-orientation (OOP), but Java also has support for functional programming since Java 8 with Lambda expressions and the Stream API. Additionally, multiple useful features were added at different timepoints to the Java language, that really help me and other Java programmers to solve problems with modern concepts. Most notably this is the introduction of Enums and Generics (Java 5), Try-with-resource functionalities to simplify resource handling (Java 9), Local variable type interference (Java 10), Records (Java 16) and in general its decent garbage collection which frees you of any responsibility to manage memory by yourself. You are not required to understand what these things are right now. They will appear along the way and help you make your code “good” (whatever that means). The above list of decent language features list is by far not exhaustive and might depend on personal preferences, but be aware that Java already ships with a rich feature set to rely on.

It is clear that Java is not perfect. It has its strengths and weaknesses. It had and will have its fair share of poor or half-hearted feature implementations like other languages. And while you progress on your journey as a developer you will naturally work with other languages. So do not be afraid of any lock-in.

For me Java is a good starting point or another language to add to your resumé because:

Depending on your familiarity with programming in general you might already know that there is always a multitude of opinions floating around. Someone will most certainly always come forward with a reason why some other language is better, whether it is less verbose, more performant or what not. And that is fine. In many, many cases these are academic discussions with little to no meaning for the real world. What matters is “How productive can you be?” And with Java you can be really productive.

(From here onwards this page is work in progress)

Getting started

Your first program

References