In private, readers often ask me: “Brother, how can I become an excellent Java developer like you?” If “how can ability be like you” take out, this problem is a good problem, otherwise, always have a bit rainbow fart suspicion. But then again, I love the art of asking questions.
Since I learned Java in college, I have accumulated more than 10 years of programming experience. Although there is still a long way to go before I am excellent, I can share some experience with you. It is not crucial for you, but it is somewhat useful, at least in my opinion.
01. Learn Java 8
Java 14, if I remember correctly. Unfortunately, the VERSION of the JDK configured in my IDE is still Java 13, and there is an alternate version, Java 8. The reason why I don’t follow the fashion is probably because I don’t study as hard as I did when I was young. Let me be ashamed for a while.
There is also an objective reason why Java 8’s new features are truly groundbreaking and unprecedented. Lambda expressions and streams, for example, are extremely useful. In fact, there are quite a few Java programmers who haven’t mastered them (sadly).
Prior to Java 8, starting a thread looked like this:
Thread t = new Thread(new Runnable() {
@Override
public void run(a) {
System.out.println("Before Java 8"); }}); t.start();Copy the code
After Java 8, all you need to start a thread is this:
Thread t1 = new Thread(() -> {
System.out.println("Java 8");
});
t.start();
Copy the code
It’s clear what’s good and what’s bad. It’s really hard to be a good Java developer if you don’t already know the features of Java 8. “The best time to plant a tree was 10 years ago, the next best time is now.” Take action!
02. Master Spring
Spring is now an integral part of Java development. It is no exaggeration to say that I am not a good Java developer without Spring. I’d bet a buck that almost every company that writes in Java is using the Spring framework.
I don’t have a gambling habit, but I’m sure I can win. I’m only betting 1 dollar, not because I’m being stingy, but for the sake of the loser, so I don’t want to lose money.
Architecture is evolving, and even development teams as small as two or three people are moving from single applications to microservices. This is called a tidal wave, and Spring Boot and Spring Cloud have natural advantages in this area.
Learn unit testing
When I was working in A Japanese company, testing was very important. Code review, unit testing, integration testing and so on were very busy. But when I came back to Luoyang, the team didn’t have a culture for this kind of testing at all, and although I tried to advocate it, it didn’t work well, so many questions popped up online and ended up getting overwhelmed.
If you want to be a responsible developer, hone your testing skills. JUnit and TestNG are very popular unit testing frameworks in Java. JUnit was designed to analyze units of code, while TestNG’s intended use is for advanced testing. The two frameworks are not equal, but at least they are different.
Familiar with API and class library
I have a college classmate named Shi Lei. His programming ability is definitely worthy of working in a big factory. Unfortunately, he chose zhengzhou, a second-tier city, which largely limited his development.
When I encounter any programming problem, the first person I think of is Shi Lei, who can provide me with a solution to almost any problem I throw at me, and who knows the entire Java ecosystem (its apis and open source libraries) much better than I do.
If you want to be as responsible as Shi Lei, you must first understand these libraries.
1) Logging class library, such as Log4j, SLF4j, LogBack.
2) JSON parsing libraries such as Gson, Jackson, org. JSON, and Fastjson.
3) Test libraries, such as JUnit and TestNG mentioned earlier.
4) General class libraries, such as Google’s Guava, Apache’s series of class libraries.
5) HTTP class libraries, such as HttpClient and HttpCore.
6) Word, PDF, Excel class library.
7) Database connection pool class library, such as DurID, HikariCP.
8) Message notification libraries such as RabbitMQ and Kafka.
9) Mail libraries, such as JavaMail.
10) Encrypt and decrypt class library.
Learn design patterns
Learning programming is like practicing martial arts. You need to practice martial arts very well. You can’t lose two things. First, internal work; Second, it is the secret book of martial arts. Internal work corresponding to programming is our basic programming ability, the design mode of programming can be imagined as the secret of martial arts.
Design patterns are about designing elegant (coded) solutions for different types of scenarios. There are many advantages to learning design patterns well. For example, it is easy to understand the logic in classic code (many good open source frameworks make extensive use of design patterns). Answer fluently in the interview (design model is the focus of the interview); You can write elegant solutions (or code).
If you want to learn design patterns, I recommend Qin Xiaobo’s Zen of Design Patterns, which is fun and easy to read.
06. Master development operation and maintenance tools
If you’re familiar with continuous integration and deployment tools like Maven, Git, Jenkins, and Docker, you’ll feel like a miracle when it comes to development operations. Let me solemnly introduce these four students:
Maven is a (specifically Java) software project management and automated build tool, provided by the well-known Apache Software Foundation. Based on the concept of the Project Object Model (POM, you know where that XML file comes from), Maven uses a central repository to manage the build and documentation steps of projects.
Git is a distributed version control software originally created by Linus Torvalds and released under the GPL open source license in 2005. Github, a large dating platform, is a code hosting platform that uses Git for version control.
Jenkins is an open source continuous integration tool written in Java that frees developers from the complexity of integration to focus on the more important implementation of business logic.
Docker automates the deployment of applications under the software container to provide an additional layer of software abstraction on the Linux operating system, as well as an automatic management mechanism for operating system virtualization.
07. Proficient in IDE
Speaking of IDE, I can’t help thinking of an old saying: “To do a good job, you must sharpen your tools.” IDE is like a weapon and a knife in a soldier’s hand. If you are not skilled in using it, how can you fight the enemy?
Last year, I switched from Eclipse to IntelliJ IDEA. At the beginning, I was extremely rejected and resisted. Readers urged me to keep using IntelliJ IDEA for a period of time. If you’re going to label me as someone who doesn’t like new people, I have no reason to disagree. It works so well.
Last time, I recommended two IDEA plug-ins to improve the quality of the code. Unexpectedly, everyone said that if you want to become good, you should try them.
08. Learn about the JVM
In order to become a truly good Java developer, there is no getting away from the FOCUS of the JVM, just like you have spent generations of effort to participate in the children’s examination, the country examination, the national examination, and finally if you do not pass the Jinshi, it is a little wasted.
You need to understand how the JVM works, just-in-time compilation (JIT), garbage collection, and so on to write robust and high-performance Java applications. For a systematic study, I recommend Zhou Zhiming’s Deep Understanding of the Java Virtual Machine, one of the few books written by an acclaimed Chinese programmer.
Well, my dear readers, that’s all for this article, and the best programmers you can see here. Original is not easy, do not want a free ticket, please praise this article, it will be the strongest motivation for me to write more high-quality articles.
If you think this article is helpful to you, please search “Silent King ii” on wechat and read it for the first time. Reply [666] [1024] there are also 500G HIGH-DEFINITION teaching video prepared by me for you (classified), as well as a copy of the interview organized by the technical staff of DACHang.