r/javahelp • u/Dhariann • Nov 15 '21
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?
14
u/tedyoung Java Trainer/Mentor Nov 16 '21
I don't think that roadmap is very useful. There's topics in there that I think aren't very important, such as:
Java 8 - that's an absolute minimum, but Java 11 is a better minimum these days. If you're lucky, you'll be able to use Java 17, so you should understand the differences.
Linux - sure, if you're on Linux, otherwise learn whatever command-line tools are on your platform (Windows? macOS?)
Data Structures & Algorithms - Big-O in general is useful, knowing about data structures is useful, but creating them is not nearly as useful as know *which data structure to use and when.
Maven/Gradle/Ant - Ant? Don't waste your time, it's obsolete. And learn Maven. Learn Gradle if you need to (it's used by your workplace).
Desktop - unless your job is building desktop apps or you want such a job, learning Swing/JavaFX is a waste of time. It's by no means essential, the opposite, in fact.
Spring via Spring Boot - yes, learn it. Start small and don't try to learn it all at once (you can't). But for sure you'll need to understand Dependency Injection/Inversion of Control container. AOP is much less important, though understanding it will help you understand things like @Transactional.
Dropwizard - I enjoyed using Dw, but it's obsolete.
Testing - JUnit. Learn it. In fact, learning how to unit test is one of the most important things you will learn. Mockito, avoid if you can, but that's another topic.
I could go on, but you get the idea.
Learning by working on your own project and let it guide what you need to learn more deeply.
2
u/Dhariann Nov 16 '21
So do you have some roadmap or something similar for do it? I want improve as a Java Developer and be a specialist.
1
u/Dhariann Dec 29 '21
And for write some web applications what do you recommend?
1
u/tedyoung Java Trainer/Mentor Dec 30 '21
Pick a project that is interesting to you and does something tiny, but useful. For example, creates flash cards for studying, or tracking the books you've read or games (video or physical) you've played.
The important thing is that it's something you, personally, would use. Learn just enough to get a tiny slice of the functionality working, such as displaying the information on a simple HTML page. Write tests.
Add on a bit more functionality. Write tests (maybe even learn Test-Driven Development). Get feedback from someone.
Store the information in a database -- this means you will need to learn how to do that. Read and learn just enough for you to implement the functionality. Deploy it to something like Heroku.
Take time to reflect after you've completed each little piece of functionality. Dig a bit deeper into understanding what's beneath the code you've implemented: learn about HTTP and status codes. Learn about databases and SQL (what SQL is Spring Data generating?), etc.
5
u/WisejacKFr0st Intermediate Brewer Nov 16 '21
Aw man, I like Mockito. What's the downside of it? Though I have a few guesses...
2
u/severoon pro barista Nov 16 '21
There's nothing wrong with Mockito per se, the problem is mocking as a test strategy.
Mocks are fragile, so they're really only good for writing tests that are not long-lived. Treating tests as second class citizens in a code base is surefire path to failure for a project, though.
Tests should be treated as first class citizens, they should be designed for, treated as valuable documentation, run frequently, etc. In this kind of environment, which is to say for any serious project, mocking is not a great approach.
Fakes are the way.
1
3
u/desrtfx Out of Coffee error - System halted Nov 16 '21
Unfortunately, you picked something from one of the lowest quality blogspammers around.
Many Java related subreddits have already blocked them.
While quite a lot of the information is not intrinsically bad, the whole conglomeration looks more as if a manager who had just seen the catchwords without real knowledge has written it.
Java 8 is the minimum standard one should aim for, yet, Java 11 is by far the better baseline.
He doesn't say "use Eclipse". He says that he has more experience with it, but now uses IntelliJ - the only other point where he talks about Eclipse is the "Eclipse Microprofile" - a framework that is unrelated to the IDE.
2
u/Dhariann Nov 16 '21
Oh i dont know that do you have some pages, blogs or similar for want information?
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
varkeyword.And I want to reiterate - always use
java.time.*classes instead ofjava.util.Datefor new code. If you have to interop with legacy code based on Date, useDate.from(Instant)andDate.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 likejava.nio.file.Path,java.nio.file.Paths, andjava.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 youKafkaFutureandio.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.
5
u/Wafflelisk Nov 16 '21
Interested about the justification for DSA before general programming skills - I'm going through a couple DSA textbooks now and the new information is already a lot to take in. I couldn't imagine reading/understanding/implementing all those data structures without having a couple basic projects under your belt.
While I can't claim to be an expert, I'd personally recommend getting something to work before you start worrying about how a linked list works or whether or not one of your methods can be changed from O(n2 ) to O(n)
3
u/djnattyp Nov 16 '21
Why he choose jdk 8? Why eclipse and not intelliJ?
I feel that the general items added to the roadmap are OK... but the coloring and ordering of them is very arbitrary...
I mean, SOAP is also on there as *essential* for 2021...
and "Spring Core" is essential, but "DI and IOC" is just good to know...
learn Git before Linux?
HTTP/HTTPS, TCP/UDP and Design Patterns are under "General Programming Skills"?
Log4J/SLF4J are just good to know?
As far as the JDK 8 part - he isn't saying "don't use anything newer than JDK 8" but to learn all the "new" stuff added in JDK 8 instead of using "old" pre-8 versions. There have been some things added since 8, but 8 was the last "big" language/API change. 9 added modules, which are also a "big" change, but more at the packaging level, and isn't as widely used as the things added in 8. Here's a list of features added between 8 and 14. Records will probably be a big-ish change, but haven't been adopted widely yet.
1
u/nutrecht Lead Software Engineer / EU / 20+ YXP Nov 16 '21
Most of these roadmaps are pure trash. There's zero point in first learning Linux before you even start with Java for example. Literally every roadmap has issues like these.
Truth is; there is no roadmap. So the only thing that happens is people who think there can be a roadmap producing nonsense.
0
Nov 16 '21
[deleted]
1
u/nutrecht Lead Software Engineer / EU / 20+ YXP Nov 16 '21
If you want to respond to someone in particular, use the reply link under their comment.
1
•
u/AutoModerator Nov 15 '21
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
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.
Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar
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: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis) 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:
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.