Ant interviewer: After interviewing more than a dozen candidates, sum up a Java interview preparation skills

Last week, I interviewed several candidates for Java back-end intensively, with work experience ranging from 3 to 5 years.

My criteria are actually not complicated:

  • Work first
  • The second Java foundation is better
  • Third, it’s best to be familiar with some distributed frameworks

I believe that when other companies recruit junior developers, they should also follow this standard.

I also know that many candidates are not bad in ability, but they are not prepared or will not say during the interview. Such people may indeed meet their expectations after joining the team, but they may not pass the interview. The interviewer only comes according to the interview situation. judgment.

You know, we usually work more on business, and it is impossible to get a lot of contact with algorithms, data structures, and underlying code that must be asked in interviews.

In other words, the interview preparation points match the usual work points very little.

Ali interviewer: After interviewing more than a dozen candidates, sum up a Java interview preparation skills

 

As an interviewer, I can only determine the outcome of the interview based on the candidates' answers. However, it is convenient to be with others.

So in this article, I will introduce interview preparation skills through some common questions.

After reading it, everyone will sigh: As long as the method is right, it is not difficult to prepare for the interview first, and the second time will not be too much.

1. The framework is the focus, but don't make people feel that you can only copy other people's code

Before the interview, I will read the resume to check the candidate's project experience in the framework. During the candidate's project introduction, I will also focus on the candidate's recent framework experience. The most popular one is SSM.

However, candidates who generally work within 5 years are mostly only able to "copy" other people's code, which means that they can expand new functional modules based on the existing framework and follow the process written by others.

For example, if you want to write a functional module for a stock pending order, you will imitate the existing ordering process, and then from the front end to the back end to the database, write it in the same way, and change the code points related to the function at most.

In fact, every one of us came here like this, but in the interview, if you only show this ability, you will be at the same level as most people. At this point, you will not be able to show your advantage.

We know that if you simply use the SSM framework, most projects will have pain points. For example, the database performance is poor, or the business module is more complicated, and the amount of concurrency is relatively high. The Controller in Spring MVC cannot meet the needs of jumping.

So I usually ask: In addition to writing business code in accordance with the existing framework, what changes have you made?

The answers I heard are:

Redis cache has been added to avoid frequent calls to constant data.

Or, in MyBitas xml, the select statement where condition has isnull, that is, if this value is present, a where condition is added. For this, a query condition without isnull is added to any where to prevent the statement from being used as a parameter. When it is null, perform a full table scan.

Or to put it simply, the backend asynchronously returns a large amount of data and takes a long time. In the project, I increased the maximum asynchronous return time, or compressed the returned information to increase network transmission performance.

For this question, I don't care what answer I hear, I only care that the answer is not logical. Generally, as long as the answer is correct, I will give an interview evaluation of "I have my own experience and a certain understanding at the framework level".

Otherwise, I will only give "the framework code can only be written under the leadership of the project manager, and I don't know much about the framework itself".

In fact, when preparing for an interview, it is not difficult to summarize the main points in the framework. I don't believe that everyone has accumulated nothing when doing projects. As long as you say it, you can say that you have crushed nearly 70% of the competition in this regard. By.

2. Don't just look at the stand-alone version of the framework, but also understand the distributed version

In addition, when describing the framework technology in the project, it is best that you bring some distributed technology. Below I list some distributed technologies that you can prepare.

Ali interviewer: After interviewing more than a dozen candidates, sum up a Java interview preparation skills

 

  1. In terms of reverse proxy , the basic configuration of nginx, such as how to set rules through the lua language, and how to set session stickiness. If you can, look at the underlying nginx, such as protocol, cluster settings, failover, etc.
  2. In terms of remotely calling dubbo , you can look at the knowledge points of dubbo and zookeeper integration, and then take a deeper step to understand the underlying transmission protocol and serialization method of dubbo.
  3. In terms of message queues , you can look at the use of Kafka or any of the components. To be simple, you can look at the configuration and working group settings. If you go deeper, you can look at the Kafka cluster, the persistence method, and the use of long messages to send messages. The connection is still short intercepted.

 

The above is just an example with 3 components. You can also look at Redis cache, log framework, MyCAT sub-database and table, etc.

There are two main types of preparation methods:

  • The first is to know how to use it. This is relatively simple. It can be built into a functional module through the configuration file.
  • The second is to read some low-level code appropriately to understand advanced knowledge points such as protocol, clustering and failover.

If you can talk about the bottom layer of distributed components in the interview, you will get better evaluations, such as "understanding the bottom layer of the framework" or "experienced in the framework", so you can even go to the interview with the architect. Not to mention advanced development.

3. For the database, don't just know about additions, deletions, modifications, and queries, you have to know about performance optimization

In actual projects, most programmers may only use additions, deletions, modifications, and checking. This situation is more common when we use Mybatis.

However, if you also behave like this during the interview, it is estimated that your ability is about the same as other competitors.

In this regard, you can prepare the following skills.

  1. SQL advanced aspects, such as group by, having, left join, subquery (with in), row to column and other advanced usage.
  2. In terms of table building , you can consider whether your project uses the three-paradigm or the anti-paradigm. What are the reasons?
  3. Especially for optimization , you can prepare how to view the improvement points of SQL statements through the execution plan, or other ways to improve SQL performance (such as indexing, etc.).
  4. If you feel capable, you can also prepare some MySQL cluster, MyCAT sub-database and sub-table skills. For example, through LVS+Keepalived to achieve MySQL load balancing, MyCAT configuration. Similarly, if you can, also look at some related low-level code.

Even if your performance in the first three points is mediocre, you can at least surpass nearly half of the candidates, especially when you perform very well in SQL optimization, then when you interview for advanced development, the database level must be up to the standard.

If you even answered the fourth point very well, then congratulations, your ability in database has even reached the level of primary architecture.

4. Java core, prepare interview questions around data structure and performance optimization

There are many interview questions on the Java core, but in addition to this, you should also focus on the collection (ie data structure) and multi-threaded concurrency.

On this basis, you can prepare some rhetoric about design patterns and virtual machines.

Here are some of the questions I usually ask:

  1. String a = "123"; String b = "123"; What is the result of a==b? This includes many knowledge points such as memory, String storage method, etc.
  2. When do the hashcode and equal methods in HashMap need to be rewritten? What are the consequences if you don't rewrite it? In this regard, you can learn more about the underlying implementation of HashMap (or even ConcurrentHashMap)
  3. What is the difference between the underlying implementation of ArrayList and LinkedList? Which occasions are they suitable for? In this regard, you can also understand the relevant underlying code.
  4. What is the function of the volatile keyword? From this, everyone can understand the difference between thread memory and heap memory.
  5. CompletableFuture, this is a new feature in JDK1.8, how to realize multi-thread concurrency control through it?
  6. In the JVM, which area is the new object in? Go deeper and ask how to view and optimize the memory of the JVM virtual machine.
  7. What is the difference between Java's static proxy and dynamic proxy? It is best to combine the underlying code.

Through the above questions, I am not just staying at the "useful" level. For example, I don't ask how to put elements in an ArrayList.

As you can see, the above questions include details such as "multi-threaded concurrency", "JVM optimization", and "low-level code of data structure objects". You can also draw inferences from one another and prepare more similar interview questions by looking at some advanced knowledge.

We know that the current Java development is based on the Web framework, so why do we need to ask about the core knowledge of Java? I know it firsthand.

Before in my team, I met two people, one is good at work, the specific performance is to use the basic API of Java core, and there is no willingness to understand in depth (I don’t know how to understand in depth), and the other I usually read some advanced knowledge of Java concurrency, virtual machine, etc.

After half a year, the ability of the latter quickly upgraded to advanced development. Because of the thorough understanding of the core knowledge of JAVA, there is no major problem with the low-level implementation of some distributed components. The former has been repetitive work, and the ability has only remained at the level of "being able to work."

In a real interview, if you are not familiar with the core knowledge of Java, it is estimated that it will be difficult to advance to advanced development, let alone interview for an architect-level position.

5. For Linux, at least know how to look at the log to troubleshoot problems

If a candidate can prove that he has the ability to " solve problems " and " solve problems ", this is definitely a plus point, but how to prove it?

At present, most of the Internet projects are deployed on Linux, that is to say, the logs are all on Linux, and some actual Linux operations are summarized below.

  1. You can open the file through the less command, reach the bottom of the file through Shift+G, and then search for information based on the key through ?+keywords
  2. You can search for keywords by grep. The specific usage is grep keyword file name. If you want to search in the results twice, use grep keyword 1 file name | keyword 2 --color. Finally --color is the highlighting keyword
  3. Can edit files through vi
  4. Can set file permissions through chmod

Of course, there are more practical Linux commands, but in the actual interview process, many candidates did not even know a Linux command. Still this sentence, even if you know something very basic, you are better than the average person.

6. Read through a piece of low-level code as a bonus item

How to prove that I have a good understanding of a knowledge point? There is nothing better than being able to explain it through the underlying code.

When I communicate with many programmers who have work experience within 5 years, many people think this is difficult? Indeed, if you want to understand distributed components by reading the underlying code, it is not that difficult, but if the underlying code of the following part is not difficult to understand.

  1. The underlying code of ArrayList and LinkedList contains implementation methods based on arrays and linked lists. If you can explain clearly the expansion, "traversal through enumerator" and other methods, you can definitely prove yourself.
  2. HashMap directly corresponds to the data structure of Hash table. In the underlying code of HashMap, it contains operations such as put and get of hashcode, and even in ConcurrentHashMap, it also contains the logic of Lock. If you look at the ConcurrentHashMap during the interview, and then combine it with talking and drawing on the paper, then you will surely conquer the interviewer.
  3. You can look at the implementation of static proxy and dynamic proxy, and then go deeper, you can look at the implementation code in Spring AOP.
  4. Perhaps the underlying implementation code of Spirng IOC and MVC is hard to understand, but you can talk about some key classes and how to implement them according to the key process.

In fact, the preparation of the underlying code is not necessary, and it is not limited to any aspect, such as the TreeSet based on the red-black tree in the collection, the open source framework based on NIO, and even the Dubbo of distributed components can be prepared.

And it is not necessary to recite all the underlying layers when preparing (in fact, it is difficult to do), as long as you can combine some important classes and methods, and clarify your ideas (for example, explain clearly how HashMap can quickly locate through hashCode).

So in the interview, how do you find a good opportunity to tell the above-mentioned low-level code that you have prepared?

In the interview, you will always be asked about collections, Spring MVC framework and other related knowledge points. When you answer, by the way, " I still know the underlying implementation of this piece ", then the interviewer will definitely ask, then you can Speak up.

Don’t underestimate this help to candidates. Once you speak, as long as the meaning is in place, you can at least get a "positive professional" evaluation. If the description is clear, then the evaluation will be upgraded to "familiar with Java core skills (or Spring MVC), and the basic skills are solid".

You know, in the interview, few people can explain the underlying code clearly, so you throw out this topic, even if the expected results are not achieved in the end, the interviewer will not lower your evaluation.

Therefore, preparing this piece is definitely a "profitable but not harmful" business for making money.

7. Remember to embed the above skills into your project

In the interview process, I often hear some regretful answers. For example, the candidate speaks very well about SQL optimization skills, but finally learned that this is what he usually mastered during self-study and was not used in actual projects.

Of course, this is better than nothing, so I will write "I have taught myself SQL optimization skills in peacetime", but if I have practiced it in a project, then I will write "I have practical database SQL optimization skills".

You can compare the differences between the two. One is more theoretical, and the other is directly capable of doing things.

In fact, in many scenarios, I don't believe that SQL optimization skills must have not been practiced in actual projects.

From this case, what I want to tell everyone is that the many skills and rhetoric that you have spent a lot of hard work (in fact, the method direction is obtained, it does not take too much energy) to prepare, should finally be implemented in your actual project .

For example, if you have the experience of querying keywords in the Linux log to troubleshoot problems, you can bring a sentence when you describe it. I did it in the previous project.

Another example is that you understand the difference between TreeSet and HashSet and their scope of application by looking at the underlying code. Then you can recall the project you did before. Is there a scenario that only applies to TreeSet?

If so, then you can properly describe the needs of the project, and then say that by reading the underlying code, I understand the difference between the two, and in this actual demand, I used TreeSet, and I also made a special comparison Sex test found that using TreeSet is xx percentage points higher than HashSet.

Please remember that " practical experience " must be more valuable than " theoretical experience ", and most of the theoretical experience you know must have been used in your project.

So, if you just make the interviewer feel that you only have "theoretical experience", then it's a shame.

8. Summary: This article describes more methods of preparing for an interview

The purpose of this article is to let everyone stop repeating the mistakes of others, so it gives a lot of ways to prepare for the interview.

Your abilities may be better than others, but if you prepare for the interview in the same way as others, or use your work in the project as an example, without summarizing the highlights of your project, then the interviewer is really good. Will look down upon you.

Due to space limitations, there are not many interview questions given in this article, but the interview questions and answers have been sorted out and interview thematic documents have been compiled. Friends who want to get it: After forwarding the attention, add VX [MXM9809] to get it for free

Ali interviewer: After interviewing more than a dozen candidates, sum up a Java interview preparation skills

 

In addition to these interview topic documents, there is also an Alibaba interview scene and interview answers (document summary)

Ali interviewer: After interviewing more than a dozen candidates, sum up a Java interview preparation skills

 

 

Guess you like

Origin blog.csdn.net/Sqdmn/article/details/115141644