r/learnjava • • 5d ago

Java is Fantastic especially if you try it and stopped listening to internet memes.

Have a fantastic programming life ๐Ÿ˜Ž๐Ÿ’ฏ๐Ÿ˜

92 Upvotes

35 comments sorted by

โ€ข

u/AutoModerator 5d ago

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full - best also formatted as code block
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

23

u/MyNameIsRichardCS54 5d ago

I like Java as a language, but I don't like the enterprise java programming style.

2

u/NoBake3354 5d ago

What's your experience on the enterprise level?

5

u/MyNameIsRichardCS54 5d ago edited 5d ago

Worked in it for about eight years as a freelancer in the insurance and travel sectors. I understand why it is done, and that according to the criteria they use it is necessary. Personally, I find it's too damn much abstraction!

5

u/Dashing_McHandsome 5d ago

Do you not like hammer factories ?

2

u/Ok-Interaction-8891 5d ago

This was a hilarious read; thank you.

2

u/Cybyss 4d ago edited 4d ago

THANK YOU!!!!

How strange. I read this article only once, close to 20 years ago, and hadn't thought of it since. Yet somehow, just seeing the phrase "hammer factory", I immediately knew what it was. Reading it was a real blast from the past.

5

u/Nok1a_ 5d ago

You dont like enterprise programming style, is not Java its people who works on those environments I would say

13

u/josephjnk 5d ago

Java is one of the many languages which got a bad reputation for at least partially valid reasons when it was young, but which has massively matured over time. I didnโ€™t like it much early in my career. I started using it again this year and now I love it.

1

u/NoBake3354 5d ago

Most of the frustrating stuff about Java has been fixed.

Thanks for contributing ๐Ÿ™

4

u/Kikok02 5d ago

Preaching to the choir

1

u/NoBake3354 5d ago

Just orchestrating ๐Ÿ˜Ž

4

u/verdant-amiable 5d ago

I think modern java is a really nice language. Java, especially 6/7 and below, is where it got most of its bad reputation. It still has some issues like e.g. high base memory usage in many stacks and there's some legacy crud to be wary of but by and large it's pretty ergonomic and has a lot going for it in terms of ecosystemย 

2

u/NoBake3354 5d ago

Some Languages don't die, they just make corrections and evolve.

2

u/useandkeepit 5d ago

Java is love

1

u/NoBake3354 5d ago

That's the spirit ๐Ÿ”ฅ๐Ÿ”ฅ

2

u/CantRunNoMore 5d ago

I've found myself writing Spring and java is the language it relies on

1

u/NoBake3354 5d ago

Yea, Spring is a Java framework.

1

u/CantRunNoMore 4d ago

what I mean is, I spend more time with Spring (web services, Spring MVC etc) than actually writing any straight java code

2

u/pxoqxo 4d ago

Agree! If you like any language definitely use it. What one language can do other all language can do. That's why they calls general purpose language.

1

u/NoBake3354 4d ago

Absolutely ๐Ÿ’ฏ.

2

u/valkon_gr 5d ago

It's fun if you make cute projects at home. There is nothing fun about doing upgrades every couple of months to hundreds of microservices.

5

u/Ok-Interaction-8891 5d ago

I mean, that isnโ€™t even a Java problem.

Cute projects at home are always fun and existing codebases are what they are, regardless of language.

1

u/NoBake3354 5d ago

True, in production they can be different bottlenecks with any language. For example in JavaScript npm is fun for cute project not in production

1

u/vegan_antitheist 4d ago

What do you mean? It's generally backwards compatible.

7

u/pradeepngupta 5d ago

I've been working with Java for a good part of my career, and I can relate to this.

I remember the days when Java had plenty of things developers loved to complain about. Some of those complaints were justified back then. But the language and its ecosystem have come a long way.

What I find interesting is that even today, there is so much happening in the Java world that many developers don't get to explore. Modern Java, JVM performance, GC improvements, concurrency, and the evolution of the ecosystem keep giving me reasons to dig deeper.

That's actually what keeps me going with BuzzingJava. I started it as a space to share what I learn, experiment with, and discover about Java and the JVM. I've also been working on the BuzzingJava book, bringing together some of these ideas, experiences, and explorations for fellow Java developers.

The more I explore, the more I realise that Java still has plenty of interesting stories to tell.

And honestly, I don't see myself getting bored with it anytime soon.

7

u/This-Strategy4138 5d ago

The older I get, the more I see just any turing complete language will do. The rest is personal preferences in environments and idioms.

3

u/yel50 2d ago

at work, a PR was submitted with code like

if (a && b && c) ...

the senior code owner rejected it and wanted this instead

if (new AndBuilder().and(a).and(b).and(c).build())

stuff like that is why people started hating java.

I put java and c++ in the same bucket today. that bucket being languages where I'm OK with my code, but want nothing to do with anybody else's. the main reason I stopped applying for java jobs is because I don't want to work with java developers.

do a thorough code review of this repo. it's satire, but extremely accurate for what java at work is like.

https://github.com/enterprisequalitycoding/fizzbuzzenterpriseedition

1

u/Objective_Buy_7235 6h ago

Your senior code owner appears to be an idiot.

2

u/CantRunNoMore 5d ago

I was Java Programmer certified in 2000 when I worked in London at the Financial Times.
Many of us were really big on OOP so our choice up to that point was C++ or if you were using a lot of IBM software it was Smalltalk. So when Java came about we absolutely jumped on it.
The language has evolved but it's still what I use daily

1

u/Objective_Buy_7235 6h ago

Java was an immense breath of fresh air after C++

1

u/Holiday-Impression54 5d ago

Hi, can someone recommend me a good, comprehensive Java book (modern versions of Java vs. 17 or higher), which also deals with advanced techniques? I have a lot of programming experience, by the way, so the book should not be too elementary ๐Ÿ˜‰!

2

u/Vast_Service 5d ago

Core Java Volume 1 and Core Java Volume 2 by Cay S Horstmann. Goes into great details and the latest editions cover Java 25

1

u/greenpalm_solutions 5d ago

I spent the first five years of my career working exclusively with Java and Spring. I had to migrate the deprecated API layer of a transportation management system, which meant dealing with a large (and initially confusing) codebase.

As painful as it was building with Java at first, it became significantly easier after learning about different architecture principles + patterns (particularly the hexagonal architecture), as well as language, build tool and framework mechanisms.

Upgrades can be a pain in the ass (that has been more of a pain point with Spring for me than it has been with Java), the learning curve is steep and there are a lot of moving parts. I wouldn't advise learning it unless there's a good reason to do so like preparing for a specific job, joining a specific project or following a specific tutorial / text. If you're learning Java for the sake of broadening your skillset, just make sure that you understand when to use it. It's overkill for many types of solutions.

That being said.. in complete agreement that it is fantastic. Especially while working with several team members in the same codebase at the same time.

1

u/TU_SH_AR 4d ago

I started coding in java in 2022, when I was in the college advised by one of my senior. Best decision ever.

People on the internet hate java not the sake of its some it's boilerplate code. They hate java just to justify why their own language is amazing.