10 Tips to Become a Better Java Developer
10 Tips to Become a Better Java Developer
From learning JDK 8 to studying the JVM's internals, getting more efficient with your IDE, and trying your hand at Kotlin, here is some advice to be a better Java dev.
Join the DZone community and get the full member experience.Join For Free
I often receive emails from my readers about how they can become a better Java developer, what things they should learn, and which area they can work on to become a rockstar Java developer. After answering them individually over the last few years, I thought to jot down a couple of points that I think will make you a better Java programmer and application developer.
If you haven't read them yet, you can read it after this article, they will help you to improve your programming and coding skill which is essential to becoming a better Java developer.
These tips are equally useful for both core Java developers as well as Java web developers.
1. Learn Java 8
This is the most important thing for a Java developer right now. It's a good 4 years old and even Java 9 was released 6 months back and people are now talking about Java 10 features. Regardless, I know many programmers who have not written a single line of code using Java 8 features like lambdas and the Stream API.
Unfortunately, most of them are experienced Java developers with good 7 to 10 years of experience under their belt. I understand that at some point in your career, learning becomes slow, but if you don't act now you will be left behind.
Almost all Java development jobs now require Java 8 skills, and if you don't have them, it will be very difficult to do well.
2. Learn Spring Framework (Spring Boot)
It's almost imperative nowadays for a Java developer to learn about Spring, as most companies prefer to do development using Spring frameworks like Spring MVC, Spring Boot, and Spring Cloud for developing a web application, REST APIs, and microservices.
It also promotes best practices like dependency injection and makes your application more testable, which is a key requirement for modern-day software.
3. Learn Unit Testing
If there is one common thing that separates a good Java developer from an average Java developer, it is unit testing skills.
A good and professional Java developer almost always writes unit tests for their code, and if they are really a rockstar developer, you can see that from their code and tests.
Testing has also come a long way, with several tools for unit testing, integration testing, and automation testing available to Java developers.
You can spend a good amount of 2018 honing your testing skills in Java, but for those who are new to the Java world and unit testing, JUnit is the best library to start with. The most recent version (JUnit 5) is both powerful and flexible and every Java developer should know that.
4. Learn APIs and Libraries
If you have worked with great Java developers, you might have noticed their overall knowledge of the Java ecosystem, and APIs form a major part of it.
Java is the world's most popular and mature programing language, and there are tons of libraries and APIs available for doing almost everything.
Of course, you are not expected to know all of them but you should be familiar with some key APIs, e.g. JSON processing APIs like Jackson and Gson, XML processing APIs like JAXB and Xerces, and unit testing libraries like Mockito and JUnit.
If you don't know them, you can learn or at least get an overview of them in 2018. To start with, you can check out my list of 20 Java libraries every Java developer should know, which covers libraries from key areas like parsing, bytecode manipulation, concurrency, collections, etc.
5. Learn the JVM's Internals
If you are serious about becoming a rockstar Java developer, then you must spend time learning JVM internals, e.g. what are the different parts of the JVM, how they work, JIT, JVM options, Garbage collection, and collectors, etc.
If you know the JVM well, you can write robust and high-performance Java applications, and that's what rockstar Java developers do.
As part of this, you should also learn how to profile your Java application and how to find performance bottlenecks.
For a structured learning, I recommend The Definitive Guide to Java Performance by Scott Oaks, which is a great book I have read in the last few years.
For those who prefer online courses over books, Understanding the Java Virtual Machine on Pluralsight is also a great collection to master JVM internals.
6. Learn Design Patterns
If you are writing a Java application from scratch, then most of the time, you are writing object-oriented code and design patterns are tried and tested solutions of common problems.
By knowing and incorporating them into your code, you make your application more flexible and easier to change in the future.
It also improves overall code quality and documentation because other Java developers are also familiar with design patterns. Thus, they will understand your solution rather quickly.
If you are looking for some resources to learn design patterns then this list of design pattern courses is a good place to start with. And, for those who like books, my recommended books on design patterns can be found here.
7. Learn DevOps Tools
For a modern Java developer, knowledge of DevOps is essential. You should be at least familiar with continuous integration and continuous deployment and how Jenkins helps to achieve that.
It becomes even more important for senior Java developers, who are often responsible for setting coding best practices and creating environments, build scripts, and guidelines.
I also suggest you spend time and learn more about DevOps in general and tools like Docker, Chef, Kubernetes, etc. along with Maven and Jenkins.
If you need some resources then Master Jenkins CI For DevOps and Developers on Udemy is probably the best course to start with. You will not only learn about CI and CD but also about Maven and Jenkins in depth.
8. Learn Kotlin
A couple of years of back, I read a book called The Well-Grounded Java Developer, which highlighted the advantage of becoming a polyglot programmer.
It inspired me to learn Scala, and later I also tried Groovy because of its increased usage in creating build scripts and unit testing.
That experience has helped me a lot, and that's why I encourage Java developers to learn a new JVM language. I have blogged about it previously on 3 JVM languages Java developers should learn in 2018 but if you are in hurry, just Learn Kotlin.
It's a great language from JetBrains, the company behind IntelliJ IDEA, and also the official language for Android development as announced by Google in 2017.
It will not only improve your productivity but also help you to get into Android development. If you are looking to learn Kotlin in 2018 and looking for some good resource then here is a list of Kotlin courses to start with.
9. Learn Microservices
Architecture is changing constantly, and many companies are moving from monolithic applications to microservices.
It's high time for Java developers to learn about microservices architecture and how to create microservices in Java to take advantage of this recent wave.
If you are looking for courses, then Master Microservices with Spring Boot and Spring Cloud is a good one to start with.
And, if you prefer books, then I suggest you check out Cloud Native Java by Josh Long, which provides a comprehensive guide for developing Java applications for the cloud.
10. Learn Your IDE Better
One of the most important traits of better Java developers is that they are very good with their tools. They not only know more tools than an average developer, but they also know their tools well.
Since IDEs like Eclipse, NetBeans, and IntelliJ IDEA are the most important tools for a Java programmer, it makes sense to spend some time to learn more about them.
You can learn about some plugins that make your tasks easier or some keyboard shortcuts, which helps you to navigate better.
Even some small tips go a long way because you can use them a lot more than you think. If you are serious about taking your IDE skills to next level and use Eclipse, then I suggest you check out Eclipse Debugging Techniques And Tricks on Udemy, a perfect course to improve your knowledge of Eclipse.
That's all about my tips to become a better Java developer in 2018. I know it's difficult to follow all these tips, and I am not asking you to do that — it's simply not practical. You can focus on more important tasks first, e.g. learning Java 8 and learning Spring Framework if you don't know them yet, but if you are good at those, then you can pick other topics, e.g. unit testing, JVM internals, and DevOps.
All the best, and don't forget to share the tips that you think have made you a better Java developer. If you have any suggestions or feedback, then you are most welcome to share — we all learn from each other.
Published at DZone with permission of Javin Paul , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.