r/javahelp • • Nov 15 '21

Roadmap Java

Roadmap Java

Hi guys. Im a Java developer with 2 years of experience and want to improve on the Java stack. I found this roadmap on Internet about Java. What do you think guys?

Why he choose jdk 8? Why eclipse and not intelliJ?

19 Upvotes

16 comments sorted by

View all comments

8

u/lclarkenz Nov 16 '21 edited Nov 16 '21

Firstly, the author (if there even is one) looks like someone who engages in widespread low value programming "advice" spam, with a bunch of affiliate links (or links to their own Udemy courses) so don't read too much into their advice.

Google "javin paul" (with and without a space) to see what I mean.

Anyway:

  • Eclipse is essential? No. While Eclipse is free, so is VS Code, and it's not Eclipse, so winning on points already. Generally, Intellij IDEA is the most ubiquitous , and any company that won't shell out for an IDEA licence for you is a very bad place to work. You can use IDEA Community Edition for free to learn it. There's a few great plugins that help you learn the short cuts. E.g., Key Promoter X.

  • The features the author illustrates of Java 8 (streams API, java.time APIs, lambdas etc.) are significant differences between Java < 8 and 8, so definitely worth learning if you're only familiar with Java 6. However, they're included in all subsequent Java versions. Just be aware that a lot of existing code-bases are still stuck on Java 8 for various horrid reasons (usually that dependency upgrade hell that moving to Java 9+ can bring), so using Java 17 might ruin your developer experience when you have to drop back to Java 8 and can't use records, text blocks, or the var keyword.

    • And I want to reiterate - always use java.time.* classes instead of java.util.Date for new code. If you have to interop with legacy code based on Date, use Date.from(Instant) and Date.toInstant() to bridge the APIs.

  • IO - definitely always ideal to understand how to wire various implementations of InputStream / Reader together to get shit done when need, but that roadmap has java.nio.* marked as "good to know" - IMO, things like java.nio.file.Path, java.nio.file.Paths, and java.nio.file.Files, all available in Java 8, are definitely essential, as they make IO far less boilerplatish, and far more convenient.

  • Spring/Spring Boot/Hibernate etc. Yep, definitely very commonplace, even if I hate them all.

  • DB - the chances that you'll be using JDBC APIs directly are pretty much slim to none. If you're not using a library like Hibernate, or Jooq, it'll be something like Spring's JDBCTemplate, or a library like JDBI. (I like JDBI personally). The most important thing to know in this regard is how to write good SQL, and how to parameterise queries to avoid SQL injection holes - and to know some of the ins and outs of your company's database. Postgres and Mysql/MariaDB are pretty common in Java land.

  • Jackson, yep, it's a very common JSON serialisation library.

  • Guava... hmm, maybe. They do some custom collections that can be useful at times, like MultiMap, but so does...

  • Apache Commons - a broad church, it has lots of convenience libs for different use cases, some are old as hell and no longer needed. When it comes to Guava and Apache Commons, know that they're there for some edge cases, and only dive into them when needed (or your employer is already using them).

  • Testing - JUnit, most definitely. Most code seems to be using 5, but some testing code bases are stuck on 4 due to dependencies on things like test runners from stagnating libraries like...

  • Powermock - only learn this if you end up on a codebase still using it. It breaks on Java 16+ as it takes terrible liberties with to the internals of the JDK, and Java 16 started enforcing modular separation by default. It doesn't seem to be under much active development and for 98% of use cases can be replaced by

  • Mockito - I know another commenter said not to learn with this, and I understand why - excessive mocking in a test is a good sign that your code needs to be refactored. That said, there are quite a few times where you'll want to provide a mock implementation of a dependency to the code under test (we're doing dependency injection / inversion of control, after all), and Mockito is the leading library for this.

  • Build tools - Maven, yep, Gradle, yep, learn the basics of building code / testing code with both. You can dive more into the specifics of the given build tool when you end up working on a project using them. Just learn the basics of working with them on a project. As for Ant... I haven't seen that in a looooong time, and I've been doing JVM dev for 13 years. In fact, last time I had to work with it, was on an ActionScript project.

  • Concurrency - as Java concurrency is always underpinned by threads, learning how Java's threading model works will help you when using the multitudes of concurrency abstractions over them. Generally, you'll very rarely use threads directly, usually you'd be using an ExecutorService, or similar which is managing threads for you. So yeah, threads are to Java concurrency as understanding the DOM is to Angular 2 / React etc. A fundamental you need to understand, but won't be working with directly that often.

  • On the above - futures. Especially CompletableFuture/CompletionStage. Learn these. You want to understand the semantics of these, you'll hit them, or things like them quite often in highly concurrent code. And even if the futures you're dealing with aren't java.util.concurrency.CompletableFutures, (looking at you KafkaFuture and io.vertx.core.Future) their semantics are similar, and you can often convert a framework's custom future to a CompletableFuture or CompletionStage - e.g., io.vertx.core.Future.toCompletionStage()

Think that's about all my feedback.