I got Ali offer (Java development) after reviewing in two months, sharing my review ideas and resources

After two months of review, I got an offer from Alibaba. I have some luck. Of course, I have to thank my former supervisor for supporting me. I have some experience, hereby share.

Simply sort out my review ideas. At the same time, I hope to discuss and study together with you. If there is something wrong, please correct me and study together. This article is a review idea, and it can also be used as a study idea.

I roughly divide the review of JAVA into the following directions.

JVM;

Sorting algorithm and Java collections & tools;

Multi-threaded consolidation and contracting;

Storage related: Redis, Elastic Search, MySQL;

框架:Spring,SpringMVC,Spring Boot

Distributed: Dubbo;

Design Patterns;

Let me briefly talk about how to review the above knowledge. First of all, it is clear that the editor will not explain specific knowledge points, but an idea



JVM

JVM is an indispensable skill for every developer. It is recommended to read the more classic JVM books in China, which contain the basic knowledge of JVM memory interface, class loading mechanism, etc. Do you think these are familiar in the interview? Therefore, for the consolidation of JVM knowledge, it is better to read this book than to read some fragmentary articles on the Internet. "In-depth understanding of the Java virtual machine: JVM advanced features and best practices (3rd edition)" , of course, if you have good English, it is highly recommended to read Oracle's latest JAVA virtual machine specification. When gnawing books, remember not to be fast. Your accumulation of knowledge is not determined by the number of books, but the depth of the books .

Share the "In-Depth Understanding of Java Virtual Machine: JVM Advanced Features and Best Practices (3rd Edition)" written by Zhou Zhiming

Those who need the e-book "In-depth Understanding of Java Virtual Machine: JVM Advanced Features and Best Practices (3rd Edition)" can forward and follow a wave, and then add my VX [tkzl6666] to get this e-book for free collection method. thanks for your support



Sorting algorithm and Java collections, tools

This classification is something that everyone must master and use skillfully, so why do I put them together?

Because tools and collections are derived from algorithms, you must understand why you must test algorithms before preparing for algorithm review. It is precisely because the sorting algorithm is closely related to our programming. Give two "chestnuts".

You can look at the mergeSort and sort methods in Collections, you will find that mergeSort is the implementation of merge sort, and the sort method combines merge sort and insertion sort, so that the worst O(NlogN) of the sort method can best achieve O(N )Effect. So only if you understand the implementation of the sorting method, can you better use the collection classes in JAVA?

The second "chestnut", everyone has heard of the TopN problem. Please write about the implementation of TopN when you often encounter it in interviews. When it comes to algorithms, it is a big top heap. When it comes to JAVA, it is an implementation of PriorityQueue. After understanding the TopN problem, knowing its time complexity, advantages and disadvantages, can I use JAVA tools to write more efficient programs?

The reason why sorting algorithms are as important as JAVA collections & tools is because they are closely related to our daily programming. The interviewer always asks that the sorting algorithm is not trying to trouble you, but is examining your programming skills. So you need to study the sorting algorithm and basic algorithm with JAVA's collection class and tool class carefully, so as to understand their relationship more deeply.

Share two source notes from Mogujie Daniu's pure handwritten liver, namely "Sort Algorithm and Data Structure Source Notes" and "Java Collection Source Notes"

Friends who need "Sorting Algorithms and Data Structure Source Notes" and "Java Collection Source Notes" can forward a wave of attention, and then add my VX (tkzl6666) to get the free way to receive these two source notes. thanks for your support



Sorting algorithm and data structure source notes

Java collection source notes

Multi-threaded merge and dispatch

The importance of multithreading and concurrent packages will not be exhausted. Let me just talk about the learning method. You must first understand that multithreading is not only as simple as Thread and Runnable, but the tools under the entire concurrent package are all serving multithreading. For multi-threaded learning, you must not read a few interview articles, or a few keywords CountDownLatch, Lock Barabara thought that you understand the essence of multi-threading, the editor compiled a big picture

 

You need to focus on this big picture or sort out a big picture yourself, break down the classes inside, their usage scenarios, advantages and disadvantages. Of course, you need to look at the source code. The source code is each source code in the big picture. It is the same as the JVM mentioned above. Don't read it in a hurry, but understand why each place is. If you look at it almost, you will find that, in fact, it is inseparable from the JAVA collection class and the tool class. Then it is self-evident that it is listed as an important knowledge point.

Share a copy of "Multi-threaded High Concurrency Study Notes" handwritten by Teacher Ma Junjun

Friends who need "Multi-threaded High Concurrency Study Notes" can forward and follow a wave, and then add VX [tkzl6666] to get a free way to receive this study note. thanks for your support



Redis、MySQL、ElasticSearch

Storage related tools are our usual tools, Redis, MySQL, ElasticSearch. Its knowledge points are divided into two aspects. On the one hand, it is the experience you accumulate in the process of using it, on the other hand, it is your in-depth understanding of it. So the suggestion for this place is to consolidate technical knowledge through books,  "Redis Design and Implementation (Database Technology Series)", "High Performance MySQL", "ElasticSearch Authoritative Guide" these three books are not necessarily the best books in the field , But if you have a thorough understanding of it, it will certainly be of great help to your understanding of knowledge and program design. There is too much content in the book, so let's cite two "chestnuts".

The first "chestnut", you must not just use Redis as a key-value cache database. I learned that one of its five basic types is called sorted set. When the items content in the sorted set is greater than 64, both hash and skiplist design implementations are used. This will also optimize for sorting and search performance. Adding and deleting both need to modify the skiplist, so the complexity is O(log(n)). But if you are only looking for elements, you can use hash directly. Its complexity is O(1), and other range operations are generally O(log(n)). Of course, if it is less than 64, it is because ziplist is used. The time complexity of the design is O(n). In this way, query and update reading become simple in the future, can it be used to achieve TopN requirements? In this way, similar requirements do not require you to check the data, and then calculate and operate in the memory. For example, our simple weekly rankings and monthly rankings can be implemented using this data structure. Of course, this is not necessarily the best solution, but provides a way of solving problems.

Another "chestnut", PriorityQueue is the priority queue. We have already learned about it above. Then ElasticSearch also uses the priority queue to obtain each shard separately, and then merge the priority queues. Do you know? This "chestnut" tells us that the algorithm is actually figured out. If you understand one, you can draw inferences by analogy.

frame

When talking about frameworks, I think of Spring, when talking about Spring, I think of IOC and AOP. Because everyone is using this framework, so you don't need to look at some other frameworks, just have a deep understanding of Spring. Through the above narrative, you have already understood the idea of ​​the editor, and everything depends on his implementation principle, so I directly recommend you a book "Spring Technology Insider" and then Debug your existing Spring project, from the flow of requests Sort out the knowledge points. After Spring has been out for so long, everyone has already understood the basic knowledge. The important thing is to look at the ideas and principles of solving problems. Chestnut is here again.

For example, if you need to perform some operations when the Bean is just initialized, do you need to use InitializingBean? So how to use it, what is its principle, and what the life cycle of Spring Bean looks like, will be explained step by step through specific usage scenarios. The review effect will be better in this way, and then gradually think about the more knowledge points involved in each knowledge point, such as the principle of the Proxy in AOP and what are the advantages and disadvantages.

Share another "Spring AOP/IOC Source Notes" handwritten by Mogujie Java Daniel

Friends who need "Spring AOP/IOC Source Notes" can forward and follow a wave, and then add my VX [tkzl6666] to get a free way to receive this source notes. thanks for your support



distributed

This is a common topic, and it is also a hot topic in recent years. Speaking of distributed, it must have something to do with Dubbo, but Dubbo cannot be understood only. First of all, we need to think about the problem it solves and why we should introduce the concept of Dubbo. With the development of business and the growth of the number of users, the number of systems has increased, and the call dependencies have become more complex. In order to ensure the requirements of high system availability and high concurrency, the system architecture has slowly migrated from the monolithic era to the service SOA era. The emergence of Dubbo as an RPC makes it easy for us to build micro-service projects, but we need not only think about the framework support Dubbo brings. At the same time, it is necessary to think about the idempotence of services, distributed transactions, trace positioning between services, distributed logs, data reconciliation, retry mechanisms, etc. At the same time, consider the decoupling and pressure sharing of MQ to the system, and the distributed database Mechanisms such as deployment and sub-database sub-metering, current limiting, and fusing. So the final conclusion is not only to look at the use and principle of Dubbo, but also to think about the upstream and downstream and some system design issues. This piece of relative knowledge has many points and can be broken by the points thrown above.



Design Patterns

There are many design patterns, but only a few are commonly used. This place can be prepared in two places.

1. Apply what you have learned, design patterns are not memorized, but used. Usually pay more attention to the design of the current project, whether it can be applied to design patterns, of course, we must first understand the meaning of each design pattern.

2. Thinking about the reflection of design patterns in existing frameworks. I have already talked about how to learn the framework and use Spring Distance. There are 9 design patterns in it. Do you know where they are used? If you don’t know, try to find them out and think about why they are designed this way. After you find them all, you will understand the usage and principles of the basic design patterns.

3. How did I learn design patterns? After reading all the setting patterns in one week, just choose "Head First Design Pattern". After reading it, draw a big picture by yourself, carefully sort out their relationship, and then think about these design patterns in JDK, Spring Where did you use it and why you used it, and then think about where you can use it or where you can use it in your current project, so that when you interview, you will naturally have the theory and practice of talking about design patterns, and you will also have your own thinking.

Guess you like

Origin blog.csdn.net/JavaBUGa/article/details/108639130