"The best way to learn is to read books." This is my first experience after studying on my own and gaining some experience. Personally, I think there are two benefits to reading books:
Published books must have gone through repeated thinking, polishing and review. Therefore, from a professional point of view, the value of a good book far exceeds other materials
Look at the book It is convenient when you type the code yourself
"The best way to improve yourself after reading the book is to read some related good blog posts." I personally think this is the second step of learning, because a book often has hundreds of Page, good blog posts are some summaries and refinements after reading and studying, which are very useful for sorting out the content of study. Of course, this is not about my own learning methods, so I won’t go into details.
Many programmers often have the urge to read books, but don’t know which books to read. Below I will recommend some good books to all Java programmers (the author of each book will be highlighted in bold and red), most of which are It is a book that I usually read. It can also be regarded as a short summary and reflections on the books that I usually read.
There are many books on the market that explain design patterns. Although I said before that reading books is the best, for friends who are interested in design patterns, I recommend this blog. This blogger’s explanation of design patterns is very, very good. I think 90% of the content is problem-free and worth learning. The general route of his explanation of design patterns is:
1. Just start the article and point out the design pattern. Definition
2. Explain the structure of this design pattern with pictures and texts
3. Write the implementation of this design pattern in detailed code form
4. Supplementary content
5. Explain the advantages and disadvantages of this design pattern
For Aren’t the knowledge points we focus on and learn about a design pattern just the above?
However, I would like to remind netizens that there are many ways to write the same design pattern. It does not mean that only writing in a certain way is this design pattern. Take the adapter pattern for example. When we pay attention to the adapter pattern, we must pay attention to what the adapter pattern is and not how to write the adapter pattern. Don't think that if a certain piece of code is not written according to the adapter pattern, it is not the adapter pattern. Remember this, When you learn design patterns, you will definitely have a deeper understanding of the design patterns used in the code.
"In-depth Understanding of Java Virtual Machine: JVM Advanced Features and Best Practices"
If you are not satisfied with being a Java programmer who can only write if...else..., but want to go further, I will give you a few examples. Bar:
1. Understand the underlying operating mechanism of Java code
2. Locate performance problems
3. Perform performance tuning on the entire system
4. Solve various strange online and offline problems
5. At a more advanced level, tailor a virtual machine suitable for your own project
Then the Java virtual machine is a technology you must learn. The author of "In-depth Understanding of Java Virtual Machine: JVM Advanced Features and Best Practices" is Zhou Zhiming. This book can be said to be the best book about Java virtual machine written in China. In the past six months, I have at least read this book. 5 times. In addition to this book on virtual machines in China, there are actually some other books. I have also bought them, but at a rough glance, a lot of the content is also in the book "In-depth Understanding of Java Virtual Machines: JVM Advanced Features and Best Practices".
It is also worth mentioning that the book "In-depth Understanding of Java Virtual Machine: JVM Advanced Features and Best Practices" is available in electronic version and can be downloaded by searching online. However, it is recommended that interested friends buy the book and read it. The electronic version downloaded is usually an older version. Compared with the latest revised version of "In-depth Understanding of the Java Virtual Machine: JVM Advanced Features and Best Practices", there are many new additions by the author. There is no knowledge point.
"HotSpot Practical Combat"
All Java virtual machines follow the Java virtual machine specifications. There are dozens of Java virtual machines on the market. "In-depth Understanding of Java Virtual Machines: JVM Advanced Features and Best Practices" The virtual machine discussed in the book does not target a specific virtual machine, but explains the Java virtual machine from the perspective of Java virtual machine specifications.
Most of the Java virtual machines we usually use and even commercially use are Sun's HotSpot. You can enter the command line with cmd and use the "java -version" command to see it. If you want to have a more in-depth understanding of how some details of the virtual machine are implemented based on the Java virtual machine specifications, you can read the book "HotSpot Practice", written by Chen Tao. However, since the source code of HotSpot is written in C/C++, readers are required to have a very good foundation in C/C++. If you are not very familiar with these two languages, reading this book may not be of great help to you.
Finally, if you are interested, you may wish to download an openJDK online first. The source code of HotSpot is in it.
"Java Concurrent Programming in Practice"
This book is often included in the top ten must-read books for Java programmers, but I personally do not recommend this book very much.
The author of "Java Concurrent Programming in Practice" is Brian Goetz. How should I put it? I have read this book about two times. My personal feelings are:
1. More text and less code
2. More explanation and more practice Less
I think this may be the characteristic of foreigners writing books. Because Java is developed and maintained in North American countries (Canada, the United States), foreigners have a very clear and thorough grasp of all aspects of Java's theoretical knowledge system. Open this book and read, what is multi-threading, what is deadlock, what is competition, what is thread safety, etc. All aspects of knowledge points are explained in a lot of text, which makes people feel very boring and difficult to understand. Readers have made substantial progress. I have read this book twice and it has the meaning of ten lines in one glance. I will focus on the places I am interested in.
In any case, as a book that is often at the top of the top ten must-read books for Java programmers, I must recommend it to everyone.
"Java Multi-threaded Programming Core Technology"
"Java Multi-threaded Programming Core Technology" author Gao Hongyan. Friends who want to learn multi-threading, this book is highly recommended by me. More than 20 multi-threading blog posts in my personal blog are based on this book, and they are refined and summarized on the basis of this book. from.
This book is opposite to "Java Concurrent Programming in Practice". This book is characterized by large-scale code + small-scale detailed explanation. This may be related to the pragmatic style of books written by Chinese people. This book explains thread safety, synchronized, Reentrant, Timer, etc. with detailed code, and multiple small knowledge points under each big knowledge point are explained in detail, which is very practical value.
For those who are interested, I believe that as long as you follow the code in this book to type, run, and think about it in three steps, your use and understanding of multi-threading will definitely take a big step forward.
However, the shortcoming of this book is that it does not mention some classes under the Java concurrency package such as CountDownLatch, Semphore, CyclicBarrier, Future, Callable, etc. The key CAS and AQS are not touched, and the implementation principles of key classes are not mentioned. . Of course, this is very in-depth. If you can continue to study and research on this knowledge after studying this book, you will slowly grow into a very powerful multi-threading master.
"Effective Java Chinese Edition"
This is the only book I didn't buy. I first came across this book in my blog post Java Code Optimization (long-term update). A friend mentioned this book in the comments below. At that time, I said I wanted to buy it, but I haven’t had time to go shopping in the past two months. Bookstore, it’s a pity, I will definitely find time to buy this book in the future.
The author of "Effective Java Chinese Edition" is Joshua Bloch. This person is very powerful. He is the chief architect of Google, and he is at the level of a super technical expert, haha. Since I have not read this book, I cannot comment, but judging from the popularity of this book and the background of its author (one more thing, this book is also a book recommended by Dr. James Gosling, the father of Java) , I believe this must be a good book worth reading.
Good code is what every Java programmer should pursue. It does not mean that if I write a piece of good code today, it will improve performance compared to writing a piece of bad code. It should be more about improving the readability of the code. It is flexible and can avoid many potential and unknown problems, avoiding problems after the code goes online and spending time on maintenance - this is very high in terms of time cost, labor cost and risk cost.
"In-depth Analysis of Java Web Technology Insider"
"In-depth Analysis of Java Web Technology Insider", author Xu Lingbo, Taobao engineer.
I can sum up this book in one word: complete. It is really comprehensive, including HTTP, DNS, CDN, static, Jetty, Tomcat, Servlet, Spring, MyBatis, etc. It has everything. It covers a wide range of knowledge, but it is not like a book that focuses on a certain knowledge point. The explanation is very in-depth, and I feel that this book is trying to use a short length to explain some of the inside stories of the technologies used in Java Web, so that readers can have a rational understanding of the technical inside stories of these knowledge points.
However, although there is not much space for each knowledge point, the key points are basically covered. It is a book that is truly rewarding. If you want to know more about the technical details of these technologies, you have to buy relevant books or check the information on your own online. It feels like you are trying to attract new ideas, or you can say that a master leads you in, and you practice on your own.
"Core Principles and Case Analysis of Large Website Technical Architecture"
A one-word evaluation of this book is awesome; a two-word evaluation of this book is awesome; a three-word evaluation of this book is awesome. Haha, okay, if I continue talking, others may think that I am a pirate.
The author of "Large Website Technical Architecture Core Principles and Case Analysis" is Li Zhihui, a former Alibaba technical expert.
Most Java applications are used on the Web. Nowadays, any larger Web application must be a distributed system. So what technologies are used in a distributed system? How does a large website grow from a small website? How to keep your website secure? Distributed systems use caches. What caches are there? What are the things worth noting when using cache?
All the knowledge points about distributed distribution are reflected in this book. Only you can’t think of it, and it is very easy to understand. You can basically read it once or twice and take some notes to know what it is. It's happened. After reading it a few more times, your understanding of distribution will definitely deepen. And it not only contains distributed knowledge, but also writes in a very down-to-earth manner how to be a good architect. In fact, I think this is not just for readers who want to be architects, but also to give readers some suggestions on how to be a good architect. How to better express your opinions, how to make others pay more attention to your voice, how to see the advantages of others, and gain a lot from it.
"Practice of Large Website Systems and Java Middleware"
The author of "Practice of Large Website Systems and Java Middleware", Zeng Xianjie, is the technical director of Taobao. He should be at least P8 in Alibaba.
Part of the content of this book overlaps with the previous book "Core Principles and Case Analysis of Large Website Technical Architecture" by Li Zhihui, such as the evolution of distributed systems, CDN, CAP theory and BASE theory, etc., which also explains more These are the focus of a distributed system or a large website, and it is good to learn them again.
The key point to highlight in this book is the word middleware. Middleware is a very important thing in distributed systems. Its most important role should be decoupling and reducing the strong dependence between modules. Different When the dependence between modules is reduced, each module can independently develop its own functions. This can also be said to be the goal and driving force of software engineering development.
Therefore, part of the content of this book is based on middleware, explaining various knowledge of middleware and JMS in detail. It is suitable for readers who are familiar with distributed systems and want to do some research on middleware.
"From Paxos to ZooKeeper Distributed Consistency Principles and Practices"
"From Paxos to ZooKeeper Distributed Consistency Principles and Practices", author Ni Chao, Alibaba engineer.
This book is a book I have been studying recently. Like the above "Large Website System and Java Middleware Practice", it belongs to the category of distributed components and is somewhat in-depth content. Of course, it is also my own personal interest. . Of course, if you aspire to be an excellent large-scale website architect, technical director of a company, etc., you must master this knowledge.
This book starts from the basic theory of distributed systems, talks about the Paxos algorithm, and finally introduces it to Zookeeper, step by step. Of course, it is not convenient for me to express any further opinions at the moment, because I have not yet understood the second chapter of the Paxos algorithm in this book (the Paxos algorithm is indeed somewhat difficult to understand and not easy to understand), and the following chapters are not yet available. Read on.
If the company where netizens work is using Zookeeper, and you are interested in Zookeeper and want to study its principles, this book will be the best choice.
"Learn MySQL5.6 from Scratch"
"Learn MySQL5.6 from Scratch", written by Liu Zengjie and Li Kun.
As a Java programmer, I think we must not think that the database is a matter of DBA. Database is also a knowledge that a Java programmer must master. Rich experience in database performance optimization is a must for a top programmer. Prepare skills.
The current mainstream databases include Oracle and MySQL. Of course, MySQL is recommended to everyone. I think there are two main reasons:
1. Compared with Oracle, MySQL is more lightweight, smaller, and easier to install and uninstall. SQL actually They are all the same. If you want to learn databases, just learn MySQL. You can study it conveniently at home. If your company uses Oracle, just use the comparative learning method and pay attention to the differences between Oracle and MySQL
2 , with the progress of Alibaba's movement to IOE in 2009, many domestic Internet companies will now choose MySQL as the database they use. Because MySQL is free, it saves money and does not need to rely on Oracle if something goes wrong
MySQL What I recommend for learning is "MySQL 5.6 Learning from Scratch" which I read myself. I think this book is very good. The knowledge points in the book are very detailed and comprehensive. Most readers have different criteria for choosing books. Is it just these two points?
"In-depth Analysis of Spring Source Code"
"In-depth Analysis of Spring Source Code", author Hao Jia.
The Spring framework is so well done and its functions are so powerful that many developers only know Spring and don’t know what a factory, a singleton, or an agent is (my real experience in interviewing others). This powerful framework must have a very complex implementation inside. This will cause problems once your program uses Spring. It may be an Error, an Exception, or the result of the program is not what you expected. Problems like this may occur. Sometimes, it will make you feel confused. There seems to be no better solution except checking information online or asking others.
Studying Spring’s source code is a good learning method. I personally think this has many benefits:
1. After understanding the internal implementation of the framework, you can take the initiative to solve problems without relying on others
2. The internal implementation of the Spring framework uses many design patterns and good code design ideas. This will greatly improve your code writing and understanding of design patterns
3. Studying the Spring framework will greatly enhance your ability to read code. I believe that as long as you can study clearly how Spring is implemented internally, the source code of any other framework will not be difficult for you
In short, I think reading code The ability of programming is one of the biggest differences between an ordinary programmer and a good programmer. The former can only use what others have written, while the latter can not only use it well, but also clearly knows what others have written. How the bottom layer is implemented can be easily solved when problems arise.
Spring source code, I personally recommend the book "In-depth Analysis of Spring Source Code". If you really want to study it thoroughly and write down the Spring source code clearly, I am afraid that three or four books are not enough. The author tried his best to explain the Spring source code in nearly 400 pages. How to implement it is not easy. Although it cannot be explained completely, I believe that the author's explanation combined with the readers' own research will definitely give them a deeper understanding of Spring's implementation.
Postscript
The above are some good books worth reading that I recommend to Java developers. But there are no Java basics or Java tutorials in these books. It’s not that I don’t recommend it, but it’s been several years since I learned the basic Java technology myself. I forgot everything I read when I was studying, so I can’t I irresponsibly recommend some books to everyone that I have not read myself.