I have two years of development experience and started to look for a job at the end of 2018. In the cold winter of The Internet, I successfully got offers from Alibaba, Toutiao, Didi and other companies. The post was Java back-end development, and finally I chose Alibaba.
I interviewed a lot of companies, and felt that most of them had similar points, so I wrote down my own experience, hoping to provide some help to my friends who are looking for or preparing to find a job. In addition, I am also working as an interviewer in Ali. My identity changes from a job seeker to an interviewer, and I have different perspectives on problems. Therefore, the following sections have both the perspective of a job seeker and the perspective of an interviewer.
More articles see personal blog: https://github.com/farmerjohngit/myblog
The interview process
Let’s talk about the interview process. In general, large companies have 3-4 rounds of technical interviews and 1 round of HR interviews. As far as Ali is concerned, I went through four rounds of technical interviews. The first two rounds were mainly about the foundation and project realization, and the third round was about the intersection. Two interviewers were mainly about project realization and expansion. The fourth round is the department boss interview, mainly asked some architecture, technology and business understanding, personal development more abstract things.
HR surface is mainly to chat with you, take a look at your personal initiative, values, such as stability, HR is not going to hang people commonly, but hung up after a lot of people in HR, the reason is not you on the HR performance is bad (except in the case a few), but a few the performance in general, before you is a little higher than 60 points, so he didn’t hang directly in front of the interview you), However, the score did not reach 80. At this time, the company will decide whether to offer you based on hc, talent ratio, comparison with other candidates and other dimensions.
In addition, toutiao will have a lot of investigations on algorithms. I have had four rounds of technical interviews, and I will ask 1 or 2 algorithm questions in each round, which are probably easy and Medium in Leetcode. So if you want to go to the headlines, you should go to LeetCode first.
Points to pay attention to
-
A resume of one to two pages is best, but two or three projects should be enough. Make sure you include your highlights
-
The beginning of the work experience to write clearly, in addition to the big companies have back tone, do not merge or omit some of the shorter work experience, the impact may not only this interview, but later may not be able to enter the company
-
If you don’t have a great blog post, don’t include a great project on Github
-
For the interviewer’s question, think clearly before answering, if you think it may take a long time, you can tell the interviewer I think about, I organize my thoughts and so on
-
Don’t pretend to know what you don’t know
-
When asked certain questions, be confident. Sometimes the interviewer will deliberately judge you with suspicion
-
Pay attention to your speed and articulation during the interview. After being an interviewer, I found that many people speak very fast or do not articulate their words clearly, which will make the interviewer feel that you have not answered the questions properly (especially on the phone).
-
Be confident but don’t argue with the interviewer during the interview
-
Don’t ask about the results directly after the interview
-
Be confident but not arrogant. I once asked a candidate if he knew all about Hashmaps, only to be confused when asked if he needed to recalculate the hash when hashmaps were expanded. For many people, the interviewer will find a way to knock you down.
-
After each interview are summed up what answer bad place, what knowledge blind spot, solve.
-
When asked why you want to change your job, you should do it from a personal development perspective rather than poking fun at your previous company.
In addition, in the process of applying for a job, I have also encountered a few unqualified interviewers, such as a pair of very contemptuous tone at the beginning, did not say two words to diss your project, give people a very bad experience. So please keep basic courtesy and respect during the interview. As Ali always says, when you are interviewing someone, they are also interviewing you.
Most importantly, don’t start doubting yourself just because you have failed a few interviews. Always remember that interview results = strength + luck. Sometimes you’re good at something that the interviewer doesn’t know at all, so it’s impossible for him or her to spend a lot of time asking questions about what he or she doesn’t know. Sometimes he may ask you you will, but because the other party may ask the way, tone and other reasons, the answer is not smooth.
Then we move on to technology related studies.
In general, technology-related investigations can be divided into two parts: one is the basis and the other is experience.
The foundation includes Java foundation, database, middleware, etc., which comes from daily accumulation and preparation before interview.
Experience includes projects done in the past, problems solved, and scenario questions (such as how to ensure your project is usable if traffic is 10 times heavy).
This article focuses on the basics, the next article will talk about experience.
basis
Here’s a rundown of what I think are frequently examined in interviews. It’s not complete, but most of them are frequently asked questions.
Java based
A collection of
The collection is divided into two large chunks: a non-thread-safe collection under the java.util package and a thread-safe collection under java.util. Concurrent.
List
ArrayList and LinkedList implementation and differences
Map
HashMap: Learn about its data structure, how hash conflicts are resolved (linked lists and red-black trees), expansion timing, and avoiding rehash optimizations during expansion
LinkedHashMap: Understand the fundamentals, which two orders, and how to implement LRU with it
TreeMap: Understand data structures, why their key objects must implement the Compare interface, and how to use it to implement consistent hashing
Set
Set is basically implemented by the corresponding map, simple look good
Q&A
-
How does a HashMap resolve hash conflicts, and why does a list in a HashMap need to be turned into a red-black tree?
-
When will hashMap trigger expansion?
-
Why is there an infinite loop when using hashMap concurrently in jdk1.8?
-
Do I need to calculate hash again for each entry during hashMap expansion?
-
Why should the array length of a HashMap be a power of 2?
-
How do I implement LRU with LinkedHashMap?
-
How do I implement consistent hash using TreeMap?
Thread-safe collection
Collections.synchronized
Understand the implementation principle
CopyOnWriteArrayList
Learn about copy-on-write, see where it applies, and wonder why there is no ConcurrentArrayList
ConcurrentHashMap
Understand the implementation principle, optimization during capacity expansion, and comparison with HashTable.
BlockingQueue
Learn about LinkedBlockingQueue, ArrayBlockingQueue, DelayQueue, SynchronousQueue
Q&A
-
How does ConcurrentHashMap improve performance while ensuring concurrency security?
-
How does ConcurrentHashMap allow multiple threads to participate in capacity expansion?
-
How is LinkedBlockingQueue and DelayQueue implemented?
-
How does CopyOnWriteArrayList keep threads safe?
concurrent
synchronized
Understand the concepts of biased, lightweight, and heavyweight locks and their upgrade mechanisms, as well as the differences between them and ReentrantLock
CAS
Understand AtomicInteger implementation principle, CAS application scenarios, how to implement optimistic locking
AQS
Understand the internal implementation of AQS and the implementation of aQS-dependent synchronization classes such as ReentrantLock, Semaphore, CountDownLatch, CyclicBarrier, etc
ThreadLocal
Learn about ThreadLocal usage scenarios and internal implementations
ThreadPoolExecutor
Understand how thread pools work and how to set several important parameters
Q&A
-
The difference between synchronized and ReentrantLock?
-
What’s the difference between optimistic and pessimistic locks?
-
How to implement an optimistic lock?
-
How does AQS wake up the next thread?
-
How does ReentrantLock implement fair and unfair locking?
-
What’s the difference between CountDownLatch and CyclicBarrier? What scenarios are they applicable to?
-
What to look out for when applying ThreadLocal? Like a memory leak?
-
What happens when you submit a task to a thread pool?
-
How to set several parameters of the thread pool?
-
When will non-core threads from the thread pool be released?
-
How to check for deadlocks?
Recommended articles:
https://github.com/farmerjohngit/myblog/issues/12 (depth)
reference
Understand the application scenarios and release mechanisms of soft references, weak references, and virtual references in Java
Q&A
-
When will soft references be released
-
When are weak references released
Recommended articles:
https://github.com/farmerjohngit/myblog/issues/10 (depth)
Class loading
Understand the parental delegation mechanism
Q&A
-
What does parental delegation do?
-
Tomcat classloader structure
-
How do I implement a classloader myself to break the parent delegate
IO
Understand the difference between BIO and NIO and understand the multiplexing mechanism
Q&A
-
What is the difference between synchronous blocking, synchronous non-blocking, and asynchronous?
-
The difference between SELECT, Poll, eoPLL?
-
How does Java NIO differ from BIO?
-
What is the Refactor threading model?
JVM
GC
Garbage collection fundamentals, features of several common garbage collectors, focus on CMS (or G1), and some important parameters
Memory area
Be able to specify the memory partition of the JVM
Q&A
-
What are the phases of CMS GC collection? What did you do?
-
What are the important parameters of a CMS?
-
When does Concurrent Model Failure and ParNew Promotion Failure occur?
-
Advantages and disadvantages of CMS?
-
What GC tuning has been done?
-
Why divide into young generation and old generation?
-
What is the Eden and Survivor zone of the young generation?
-
Why does the young generation use the copy algorithm?
-
Why the old era is the use of mark clearing, mark sorting algorithm
-
When is off-heap memory used? What should I pay attention to?
-
How is off-heap memory reclaimed?
-
How does the JVM memory region partition work?
Recommended article: https://github.com/farmerjohngit/myblog/issues/3
Middleware, storage, and other frameworks
Spring
Bean lifecycle, cycle dependency issues, Spring Cloud (if used in projects), AOP implementation, Spring transaction propagation
Q&A
-
The difference between Java dynamic proxy and Cglib dynamic proxy
-
What is the life cycle of beans in Spring?
-
Property injection or constructor injection, which has loop dependency?
Dubbo (or other Rpc framework)
Understand the implementation of a common RPC framework such as Dubbo: service discovery, routing, asynchronous invocation, traffic limiting degradation, failure retries
Q&A
-
How does Dubbo do load balancing?
-
How does Dubbo do limiting downgrading?
-
How does Dubbo gracefully log off?
-
How does Dubbo implement asynchronous calls?
RocketMq (or other messaging middleware)
Understand the implementation of a common messaging middleware such as RocketMq: How to ensure high availability and high throughput, message ordering, repeated consumption, transaction messages, delayed messages, dead-letter queues
Q&A
-
How does RocketMq ensure high availability?
-
How does RocketMq guarantee high throughput?
-
Are RocketMq messages in order?
-
How is RocketMq’s message local order guaranteed?
-
How to implement RocketMq transaction messages?
-
Does RocketMq have a problem with double spending? How to solve it?
-
What level of delayed messages does RocketMq support? How is it done?
-
Is RocketMq a push model or a pull model?
-
What is the load balancing for Consumer?
Redis (or other caching system)
Redis working model, REDis persistence, REDis expiration mechanism, common form of Redis distributed cluster, distributed lock, cache breakdown, cache avalanche, cache consistency issues
Recommended book: Redis Design and Implementation
Recommended articles:
https://github.com/farmerjohngit/myblog/issues/1
https://github.com/farmerjohngit/myblog/issues/2
https://github.com/farmerjohngit/myblog/issues/5
Q&A
-
Why is Redis high performance?
-
How does single-threaded Redis take advantage of multi-core CPU machines?
-
Redis cache elimination strategy?
-
How does Redis persist data?
-
What kinds of data structures does Redis have?
-
What forms do Redis clusters take?
-
There are a large number of small key and value data, how to save storage in Redis?
-
How to ensure data consistency between REDis and DB?
-
How to resolve cache penetration and cache avalanche?
-
How to implement distributed lock with Redis?
Mysql
Transaction isolation level, locks, data structure of indexes, clustered and non-clustered indexes, leftmost matching principle, query optimization (explain commands, etc.)
Recommended article: http://hedengcheng.com/?p=771
https://tech.meituan.com/2014/06/30/mysql-index.html
Q&A
-
What transaction isolation levels does Mysql(innonDB) have?
-
Which locks are placed at different transaction isolation levels?
-
Mysql row lock, table lock, gap lock, intent lock
-
What is leftmost matching?
-
How to optimize slow queries?
-
Mysql > select * from b tree; mysql > select * from b tree
-
How to select sub-table key
-
In the case of sub-table, how to do sorting when querying?
zk
The general principle of ZK (you can learn about Raft algorithm which is similar in principle), ZK implements distributed lock, ZK does cluster master election
Q&A
-
How to use ZK to realize distributed lock, and redis distributed lock has advantages and disadvantages
HBase (if written in resume)
HBase scenarios, architecture, merge and split, and data lookup and write processes.
Recommended article: http://hbasefly.com/2017/07/26/transaction-2/ and this blog articles
Storm (as in resume)
Storm compared with Map Reduce, Spark, Flink. Storm has high availability and message ack mechanism
algorithm
Algorithm words not all companies will ask, but it is best to prepare, mainly by brushing questions, in Leetcode to brush 100-200 easy and medium questions, and then look at the face of the corresponding company, the problem should not be big.
recruitment
My department is the International Division of Alibaba Cainiao Network, which mainly provides international logistics solutions for aliExpress, Tmall Overseas, Lazada and other cross-border e-commerce companies. Internationalization is one of the strategic goals of Alibaba Group in the next three years and five years. At present, the business is also in the stage of rapid development, and the group has invested a lot of talents and resources in the rookie side in recent years. In addition, cainiao P6 has options (group is P7).
Email address: [email protected]
Job wanted: Java Development, Base Hangzhou
Requirements:
-
1. Bachelor degree or above in computer related field, at least 3 years software development experience;
-
Solid Foundation of Java, familiar with JVM principle, Java advanced features, Java network programming, Java multithreaded programming;
-
Familiar with Java mainstream open source frameworks, such as Spring, Dubbo, Netty, etc., master the underlying principles and mechanisms;
-
Familiar with MySql, MyBatis and other database related technologies, experience in SQL performance optimization;
-
Knowledge of distributed system principles: CAP, final consistency, idempotent operations, distributed transactions, etc.
-
Familiar with large-scale network application architecture: MQ, cache, load balancing, clustering technology, data synchronization, high availability, Dr, etc.
-
Good team work spirit and communication skills, can actively seek challenges, take action, achieve goals;
-
Continuous learning, the pursuit of excellence, can introduce innovative technologies and solutions to the team, with innovative ideas to solve problems