In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how to be a good Java developer". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
01. Learn Java 8
If I remember correctly, it is already Java 14. Unfortunately, the version of JDK configured in my IDE is still in Java 13, and there is an alternate version, Java 8. The reason why I didn't catch up with fashion may be that I didn't study as hard as I did when I was young, which made me feel ashamed for a while.
Another objective reason is that the new features of Java 8 are epoch-making and unprecedented. Like Lambda expressions, Stream streams, it can be said to be easy to use. In fact, there are a lot of Java programmers who haven't mastered them.
Before Java 8, start a thread like this:
Thread t = new Thread (new Runnable () {
@ Override
Public void run () {
System.out.println ("before Java 8")
}
});
T.start ()
After Java 8, all you need to start a thread is this:
Thread T1 = new Thread (()-> {
System.out.println ("Java 8")
});
T.start ()
It is clear which is better or worse. If you don't know the features of Java 8, it's really hard to be a good Java developer. The same sentence can tell the cocoon in the ear: "the best time to plant a tree was 10 years ago, followed by now." Let's do it!
02. Master Spring
Spring currently occupies an important part of Java development, which can be said to be inseparable. It is no exaggeration to say that without Spring, you are by no means a good Java developer. I bet a dollar that almost all companies that write programs in the Java language are using the Spring framework.
Although I don't have a bad habit of gambling, I'm sure I can win. Only 1 yuan bet, not because I am stingy, but for the consideration of the losers, this money will not be defaulted.
Architecture is advancing with the times, and even development teams as small as two or three people are migrating from a single application to a microservice. This is the so-called wave bar, and Spring Boot and Spring Cloud have natural advantages in this respect.
03. Learn to unit test
When I was in Japan, testing occupied an important position, and code review, unit testing, integration testing, and so on were very busy. But when I returned to Luoyang, the team did not have this kind of testing culture at all. Although I was advocating hard, the effect was not good. Many problems were suddenly online, and finally I was tired to deal with them.
If you want to be a responsible developer, hone your testing skills. JUnit and TestNG are very popular unit testing frameworks in Java. JUnit is designed to analyze units of code, while the intended use of TestNG is for advanced testing. It cannot be said that the two frameworks are equally divided, but at least they have their own advantages.
04. Proficient in API and class libraries
I have a college classmate named Shi Lei. His programming ability is absolutely worthy of working in a front-line factory. Unfortunately, he chose the second-tier city of Zhengzhou, which to a large extent limited his development.
When I encounter any programming problem, the first thing that comes to mind is Shi Lei. No matter what problem I throw, he can almost always provide me with a solution. He knows the entire Java ecosystem (his own API and open source class libraries) much better than I do.
If you want to be as responsible as Shi Lei, you must first understand the following class libraries.
1) Log libraries, such as Log4j, SLF4j, LogBack.
2) JSON parsing class libraries, such as Gson, Jackson, org.json, and fastjson.
3) Test class libraries, such as JUnit and TestNG mentioned earlier.
4) General class libraries, such as a series of class libraries of Google's Guava,Apache.
5) HTTP class libraries, such as HttpClient and HttpCore.
6) Word, PDF, Excel class libraries.
7) Database connection pool class libraries, such as durid and HikariCP.
8) message notifies the class library, such as RabbitMQ, Kafka.
9) Mail class libraries, such as JavaMail.
10) encryption and decryption class library.
05. Learn design patterns
Learning programming is like practicing kung fu. You have to practice kung fu very well, and there are two things you can't lose. First, it is internal skill; second, it is the secret book of martial arts. The internal skill corresponding to programming is our basic programming ability, and the design pattern of programming can be imagined as the secret book of martial arts.
The design pattern is to design elegant (coding) solutions according to different types of scenarios. There are many advantages to learning design patterns, such as being easy to understand the logic in classic code (many excellent open source frameworks use design patterns extensively), responding to interviews (design models are the focus of interviews), and writing elegant solutions (or code).
If you want to learn design patterns, I recommend Qin Xiaobo's Zen of Design patterns, which is very interesting and easy to understand.
06. Master the tools of development, operation and maintenance
If you are proficient in continuous integration and deployment tools such as Maven, Git, Jenkins, Docker, and so on, you will feel like divine help when carrying out development, operation and maintenance. Let me solemnly introduce these four students:
Maven, a (especially Java) software project management and automatic build tool, provided by the famous Apache Software Foundation, based on the concept of the project object model (abbreviated to POM, know the origin of that xml file), uses a central repository to manage project construction and documentation.
Git is a distributed version control software originally created by Linus Torvaz and released as an open source agreement of GPL in 2005. Github, a large-scale dating platform, is a code hosting platform that uses Git for version control.
Jenkins is an open source continuous integration tool written by Java, which frees developers from the complex integration work and focuses on the more important business logic implementation.
Docker automates the deployment of applications under software containers, thereby providing 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 using IDE
Speaking of IDE, I can't help thinking of an old saying: "if you want to do good work, you must first sharpen its tools." IDE is like a gun and knife in a soldier's hand. If you don't use it skillfully, how can you fight and kill the enemy?
I only switched to IntelliJ IDEA from Eclipse last year. At first, I was extremely rejected and resisted. Readers advised me to stick to it for a period of time, but I fell in love with it a month later. If you have to give me the label of "like the new and hate the old", I have no reason to refute it. Who makes this thing work so well?
Last time, I recommended two IDEA plug-ins to improve the quality of the code. Unexpectedly, everyone agreed that if you want to be excellent, go and try it.
08. Learn about JVM
If you want to be a really good Java developer, JVM is doomed to get around this hurdle, as if you have spent generations' painstaking efforts to participate in the children's test, the local test, and the general examination, and in the end, if you fail to win Jinshi, then your previous efforts will be wasted.
You have to understand how JVM works, just-in-time (JIT), garbage collection and other related knowledge points in order to write robust and high-performance Java applications. If you want to learn systematically, I recommend Zhou Zhiming's "in-depth understanding of the Java Virtual Machine", which is written by one of the few highly acclaimed domestic programmers.
That's all for "how to be a good Java developer". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.