Hacker News new | ask | show | jobs
by vbezhenar 1735 days ago
I don't have an answer to your question, but I would suggest the following:

skim over Java 5 syntax. It should be very easy to understand for anyone with programming experience.

Explore Java 8, 11, 17 features, but try to map all the syntax to Java 5, because those features usually are just a syntax sugar and I think that it's easier to understand those features this way.

Do not dive into standard library too much. It's vast and you can spend a lot of time studying it, but that's not necessary to start.

It should take few days of learning and experimenting.

After that you have to choose a framework, because Java applications are very framework-heavy ones. And that's where most of complexity comes from. People usually use Spring these days, so that's probably would be the most reasonable choice. There's no easy path, you'll struggle a lot and that's unavoidable. Modern Java Frameworks are full of hard to grasp concepts, tricky magic code and 20-year old roots buried in the depths of stacktraces.

Stackoverflow a lot, and you'll eventually naturally learn most things you need to know.

At some point I'd recommend to prepare for Oracle Java Certification (Oracle Certified Professional). It's a very good exam with lots of core Java topics and with some gained experience you'll structurize everything in your brain and you'll learn few things that avoided your attention before. I don't suggest to actually pass the exam, as that would cost some money and effort, so it's up for you to decide, but preparing to exam is very worthwhile time investment.

1 comments

> After that you have to choose a framework, because Java applications are very framework-heavy ones. And that's where most of complexity comes from. People usually use Spring these days, so that's probably would be the most reasonable choice. There's no easy path, you'll struggle a lot and that's unavoidable. Modern Java Frameworks are full of hard to grasp concepts, tricky magic code and 20-year old roots buried in the depths of stacktraces.

Honestly that does not sound like a culture/ecosystem it is pleasurable to work within. Why wouldn't people choose something more modern and lightweight than Spring?

One of the strongest points of using a framework is that it's easy to find other people who already know that framework. And that depends on framework popularity. It's like old motto "nobody was fired for choosing IBM".

Spring is not well suited for modern microservices running in the cloud. Its startup time is slow and its memory usage is high. There are other frameworks emerging, optimized for GraalVM native image, most notable ones are Quarkus, Micronaut, Helidon. But their popularity is nowhere near Spring. May be in 5 years things will change.

> Honestly that does not sound like a culture/ecosystem it is pleasurable to work within.

I agree. Of course I’ve heard people criticizing and making fun of java over the years, but I didn’t realize the (very helpful and thoughtful) answers to my question would be so depressing.

Spring is largely "Java: the missing parts", implemented in a very poor way. It's semi-standard, even though it's not part of the core language.
What's weird is that every app in Java uses a DI container, while just about no apps that I've encountered in the rest of the world worry about anything that heavy. Most apps just cheat and use a bit of global state or maybe roll their own service locator pattern and don't worry about it. From the outside it seems like Java's sweet spot is really massive applications where you can't just cheat in one or two well-known spots in the code and call it good.
The sad thing is that DI doesn't need to be heavy. I looked into this for some projects I was planning, and there are some lightweight (if technically off-putting, IMO - see Dagger 2 syntax) ways to achieve this. But everyone just reaches for the big frameworks in the first instance.