Java programmers jumped and were rejected on three sides because they could not afford to recruit

Programmer Xiao Li has worked in coastal cities for 8 years. The rapidly rising housing prices there limit the programmer Xiao Li’s idea of ​​relocating in first-tier cities. In addition, the sudden outbreak of the epidemic has exposed the inconvenience of working far away from home, due to various factors. , Programmer Xiao Li decided to go home to work.

Now that we have made up our minds to bid farewell to the first-tier cities and go back to their hometowns, it means that they are ready to lower wages.

It happens that an Internet company is hiring people, Java development engineers, and the salary range is 18K~25K .

Programmer Xiao Li took a look, oh, it's not very low! So I submitted my resume and waited for the interview invitation.

Within two days, the interview invitation came... Programmer Xiao Li went to the appointment as scheduled. After the first two interviews, the following situation occurred...

Java programmers are changing jobs, and they have gone through all three aspects. Interviewer: We can’t afford to hire you like this

 

Interviewer: Tell me about the difference between sleep and wait?

Programmer Xiao Li: Oh, this is simple

1. For the sleep() method, we must first know that the method belongs to the Thread class. The wait() method belongs to the Object class.

2. The sleep() method causes the program to suspend execution for the specified time, giving up the other thread of the cpu, but its monitoring state is still maintained, and it will automatically resume its running state when the specified time is up.

3. In the process of calling the sleep() method, the thread will not release the object lock.

4. When the wait() method is called, the thread will give up the object lock and enter the waiting lock pool waiting for this object. Only after the notify() method is called for this object, the thread enters the object lock pool and prepares to acquire the object lock and enter operation status.

Interviewer: Well, yes, talk about thread pool.

Programmer Xiao Li: Uh~ Are you talking about those four thread pools? Or how does the thread pool work?

Interviewer: Uh~ Then change the question! What is middleware?

Programmer Xiao Li:

Middleware is the software between the operating system and the application program. When used, a group of middleware is often integrated to form a platform (development platform + running platform). There must be a communication middleware in this group of middleware. That is, middleware = platform + communication. This definition also restricts that it can be called middleware only when used in distributed systems.

 

Main categories: remote procedure call, message-oriented middleware, object request agent, transaction processing monitoring.

Interviewer: So if you were to design a middleware yourself, how would you design it?

Programmer Xiao Li: I will consider the following aspects:

1. Remote procedure call

2. Message-oriented: Use an efficient message transfer mechanism for platform-independent data communication, and provide data communication for integration of distributed systems. It has the following three characteristics:

·The  communication program can run at different times

·  Communication Chenxu Home can be one-to-one, one-to-many, many-to-one or even a mixture of the above methods

·The  program puts the message into the message queue and takes out the message from the small drug column for communication

3, object request broker: providing different forms of communications services, including synchronization, queuing, subscription publishing, broadcasting and so on .

Various frameworks can be constructed such as transaction processing monitor, distributed data access, object transaction manager OTM, etc.

4. Transaction processing monitoring has the following functions:

· Process management , including starting the server process, assigning tasks, monitoring its execution and balancing the load

· Transaction management to ensure the atomicity, consistency, independence and durability of transaction processing under its supervision

· Communication management , providing multiple communication mechanisms between client and server, including request response, conversation, queuing, subscription publishing and broadcasting, etc.

Interviewer: Well, very good, how to do that MySQL optimization?

Programmer Xiao Li: MySQL optimization can generally start from the selection of storage engine, the selection of field types, the selection of indexes, partitioning and sub-table, master-slave replication, separation of read and write, SQL optimization, etc.

Well, for example, in terms of storage engines, we use SQL statements when creating tables...

Interviewer: It's alright , it doesn't need to be too detailed, I don't understand, well, let's talk about Redis!

Java programmers are changing jobs, and they have gone through all three aspects. Interviewer: We can’t afford to hire you like this

 

What are the Java clients supported by Redis? Which one is the official recommendation?

Programmer Xiao Li: Redisson, Jedis, lettuce, etc., Redisson is officially recommended.

Interviewer: How does Redis optimize memory?

Programmer Xiao Li: Use hash tables as much as possible. The memory used by hash tables (that is, the number of stored in the hash table is small) is very small, so the data model should be abstracted into a hash table as much as possible.

For example, there is a user object in the web system. Don't set a separate key for the user's name, last name, email address, and password. Instead, store all the user's information in a hash table.

Interviewer: Do you also know the Redis cache avalanche and penetration ?

Programmer Xiaoli: Well, I know, cache avalanche is a large area of ​​cache failure at the same time, so...

Interviewer: It's okay, ahem~

The interviewer took out the tissue in his right pocket with his left hand and wiped his sweat.

Java programmers are changing jobs, and they have gone through all three aspects. Interviewer: We can’t afford to hire you like this

 

Interviewer: Well, your performance is very good and your technical skills are also very solid. Including me, the first two interviewers are also very satisfied...

The programmer Xiaoli was delighted, and he was already sure about the job.

Interviewer: But, it’s like this, as far as your situation is, we can’t afford to recruit, we want to recruit a cheaper one

Programmer Xiao Li: Huh? It doesn't matter, you just follow the salary range you issued...

Interviewer: Let me tell you the truth, that is what is attractive to write on it. In fact, we can't even reach the lowest one. So, if you accept 10K, you will come to work tomorrow.

Programmer Xiaoli: That's it~ It's been a long time for me, so let me go home first, you can wait for notice!

Java programmers are changing jobs, and they have gone through all three aspects. Interviewer: We can’t afford to hire you like this

 


Gossip time

In the above story, programmer Xiao Li actually has strong technical skills. However, the Internet company interviewed is only a small company and cannot afford talents like him. It can be seen that even the interviewer's technical level Not high. However, you will find that no matter how big the company is and whether or not the technology is needed, they will ask broader and deeper questions.

In any case, only by mastering broader and deeper skills can programmers crush the interviewer and take the initiative in their own hands.

Let's share some e-books, real interview questions with first-line Internet companies, and architecture videos to help you learn and interview. Friends who want to get: After you like, you can send a private message to [learning materials] (be sure to follow me, otherwise there is no way to reply to a stranger's private message)

Ebook

 

 

Thematic classification of real interview questions

 

Architecture video 

Guess you like

Origin blog.csdn.net/bjmsb/article/details/108518154