Expert-level interviews in Fortune 500 companies are really a nightmare, vomiting blood to share successful experiences

1. Basic questions:


0.

In addition to the standard answers, IOC and AOP, I talked about the proxy mode.

Then the interviewer's question comes, talk about the AOP proxy mode you have implemented yourself.

To be honest, I haven't implemented it here, but it should be possible to refer to the multilingual internationalization writing method.

This is the difficulty of hell, come up and get off the horse first, and then talk about it after you are convinced.

In-depth understanding of spring is broad and profound. I think if expert programmers understand spring, they may end up being asked about the source code.





1. The difference between abstract class and interface:

After answering the concept, I gave examples of adapter and decorator patterns. The adapter is to convert the interface of an object for another interface call. For example, the character stream read and written by io is completed by the adapter calling the byte stream object.

The decorator mode is that the interface remains unchanged, and the function of an abstract parent class is enhanced. For example, the file io stream implements the io stream abstract object, calls the io optimization of file reading and writing, and enhances the io function.

Finally, I mentioned the adapter mode of using C language to do USB to serial port in my project.



2. Talk about the singleton mode:

After answering the concept, I talked about the implementation of the hungry and lazy singletons, and the default singleton operation of spring. Then list a bunch of singleton + thread pools used by open source projects.

Finally, I talked about the singleton used in my own project. Also talked about the scope of application, here the singleton is only applicable to the inside of the program, and the program in the system only allows the singleton implementation of one instance to be started.



3. Talk about the storage of strings in memory: After

answering the difference between strings and general value types such as int and double, they are stored on the heap of the JVM, and the references to objects are saved on the stack. Then quickly introduce the GC algorithm of jvm.

Finally, I talked about how to avoid memory leaks in the code.



4. Advantages and disadvantages of cookies and sessions:

After answering the standard answer, I talked about the implementation of session sharing in my own project, quickly drew a brief construction diagram, and then briefly talked about the nginx reverse proxy configuration tomcat cluster, the session configuration in tomcat is implemented by an open source plug-in, session The generation is done by the redis server.

The interviewer happened to have also studied it and asked me how to solve the single sign-on. After I solved the key problem of session sharing, I only need to add a user center server.

I actually didn't fully implement single sign-on, but it was innocuous to deal with this bunch of interviews. If you really want to implement a single sign-on environment, I believe you can make a demo within a week.

At this time, I found a detail. The interviewer wrote some technical points on the paper in the hand of the interviewer, and added a single sign-on after the design pattern and memory management.



2. Advanced Question



5, talk about multithreading

I will directly introduce the knowledge points in the book "Multithreading Programming Core", and then talk about the pseudocode of multithreading to achieve producer-consumer.



The point-to-point mode of the MQ message queue is similar to the implementation, and the publish-subscribe mode of the MQ message queue is extended. This time, it was a bit too much. When it came to some fair locks and thread scheduling, the interviewer was a little stunned. I quickly stopped and waited for the interviewer to ask.



Sure enough, the interviewer may be a little unhappy and say that multi-threading is just theoretical, and you have not used it in actual projects, right? I quickly said sorry, I forgot about the environment when I mentioned my area of ​​expertise (of course I don't really have multi-threading experience like game programming).



The interviewer's attitude improved, so I took the patent project as an example, saying that in addition to asynchronously waiting for time-consuming operations, multi-threading can also be used in scenarios where pure computing consumes CPU. There are several CPU cores and several threads to occupy the CPU. full to speed up the calculation.

Multithreading was successfully added to the list.



6. The MQ message queue was mentioned earlier, so what experience do you have with distributed?

I admit that distributed is just what I have been learning recently. I drew a simple diagram and briefly talked about the distributed architecture composed of dubbo, zookeper, activiedMQ, redis, and FastDFS.

Distributed knowledge of this skill has been added to the list again.



7. Talk about the performance optimization in your project architecture. The

state is getting better and better, and I have been thirsty for performance optimization for a long time. The outline here is based on the architectural design mind map.

It is divided into three aspects: front-end, back-end and database optimization.

In the end, I combined the norms and standards for writing code. I have concluded that I am not more powerful than people in large companies. As a wild programmer who is alone, it is almost the same.



8. Our data security is very high, tell me about you Security Design

I talked about the technologies used in my login system, password MD5, RSA encrypted user input data, AES decrypted database connection, etc.

Moderately.



9. Talking about the principle of springMVC and how to inject the

non- basic aspects may not be able to ask anything, so the interviewer suddenly threw a basic question. I couldn't switch from the state of the system architecture for a while, and I couldn't remember it after thinking about it for 10 seconds.

Under the guidance of the interviewer, I said injection through package scanning. The interviewer said it was normal and he also often forgets some basic things.





10. The difference between final, finally, finalize?

Basic keywords, if this answer is wrong, points should be deducted (where the finalize method is called before the garbage collector deletes the object).

Of course, how could I forget the basic knowledge. By the way, I said that try catch finally is generally not used in service. If you handle it yourself, the configured transaction processing will not work.





The killer problem



11. Looking at your project experience, most of them are developing enterprise applications, and there is no experience in Internet and e-commerce projects. Now I ask you if it is an e-commerce project, if you split it into distributed projects.



This question directly hits the weak point. In fact, it is not an examination of whether the ability matches the job requirements. It should be an additional question prepared for the selection of the best among the best.

I couldn't answer, so I talked about my thoughts on the distributed split of my project, because from the day I built my project, I wanted to use it for all tens of thousands of users in the enterprise, and the draft has long been available.



Then infer that users, payments, and transaction records in e-commerce projects are also registered as basic services. Use distributed cache to improve performance and distributed file system to store massive data.



Expert-level interviews at Fortune 500 companies are indeed abnormal. At that time, I didn’t know the concept of distributed databases, which led to attacks against massive data and distributed databases later.





12. Speaking of massive data, what do you know about massive data?

The killer problem is really a series of traps, it depends on how many levels you can pass to get extra points. Fortunately, every time I answer, I pay attention to the relevant concepts that appear in the answer, at least I understand it, in order to defend against attacks on weaknesses.



I said massive data plus algorithm = big data, and I talked about several typical algorithms for massive data. When I mentioned the massive data algorithm, I also talked about the distributed eventual consistency algorithm that is confirmed by secondary submission.



It was interrupted again when it came to areas that the interviewer didn't understand, and the interviewer asked me the next killer question. The labels that the big data algorithm understands are added.



13. Our company's data center often encounters scenarios where millions of data are written in a short period of time. How would you deal with it?

The answer should be a distributed database. The distributed database was not mentioned before. Here again, we are asked about weaknesses, cleverly hiding concepts and preventing fish in troubled waters.



At the beginning, I said to use the MQ message queue to eliminate high concurrency peaks first, and delay the operation like the booking system. The interviewer said that real-time processing is required, and your idea is just postponed.



I thought about it for a while and then added distributed caching. The interview said that the real-time performance was not enough.



I suddenly thought of adding a few more IO ports to transmit together in order to increase the amount of data transmission when making a single-chip microcomputer. I talked about using the principle of NIO to increase the data throughput by adding more ports.



The interviewer said yes and then asked one last killer question.



14. Have you ever written an open source framework yourself?

Sure enough, it is the ultimate question. Generally, if the Daniel wrote open source, it would have been marked and promoted on the conspicuous position of the resume, and he would have taken the initiative to raise it during the interview. I won't wait for the interviewer's question until the end.



I think if the answer is written, it will definitely be labeled as dishonesty, and then there will be a sudden death.



Of course, I said I haven't written it before. The interviewer continued to ask what if the open source framework you encountered was not suitable, so you had to write it yourself?



I said that I haven't been able to write a framework, but it is said that the observation of open source frameworks must meet these standards, such as elegant code, singletons for creating and destroying resource-consuming scenarios, and then enumerating the use of singletons and thread pools. frame.



I continue to say that spring is standard, and boldly use spring for elegant development. Finally, I talked about how to use angularjs to implement public factroy and controller when learning phogap, and then develop a functional mode. Only need to pass in the request url and parameters like ajax to automatically realize the list page and view page.



Then migrate some JS class libraries in, which is barely a development framework.

The interview gave a thumbs up, but he doesn't know angularJs, so he may not get this additional point.



After the interview was over, I checked the time. The time of the two competitors combined was about an hour. I came all the way by high-speed train, so I came in last, and it took about 50 minutes.



After the interview, I was still in the mood for a quick answer. After returning home, I kept returning to the process, and I understood the distributed database that did not answer well.



And I plan to read the source code of a typical open source framework. In the future, it can be said that I am reading the source code of the open source framework to prepare for writing my own framework as soon as possible.



But I know very well that I am not a Megatron who can be a big guy and create a path. I am just a mass-produced T800 Terminator fighting for survival.



However, I received a notice from HR the next day:

I'm sorry, your interview went well, but due to academic qualifications, you were not notified of the re-examination. Efforts have been made to fight for you with the director, but the director does not agree.



It's another bloody fate. I know that my education is a flaw, and I have already re-studied TV University. I told the school early on that I came for a degree, but after paying the money, the teacher forgot to register for the degree English test.



Because over the years, I was the only one who studied for a degree in computer science, so the teacher habitually ignored it.



It is a bit difficult to get a degree from Beijing Jiaotong University in computer science, requiring more than 80 points in all core courses, such as linux system, data structure, discrete mathematics, and graph theory. Professional requirements are not worse than a book. I studied discrete mathematics carefully before I got 80 points in the test, which just reached the standard.



Could it be that the meaning of my existence is to finally do the evil Doctor Octopus to take revenge on the world and wait for the righteous Spider-Man to bring me down. Finally, in the sequel, I will perform my cup of life again to make a few tears, and play a commercial movie for the audience with high-dimensional existence?



Of course, I can't follow the script. I study hard to better study the world. Obviously, I will not succeed in borrowing from heaven for another 500 years. But if there is reincarnation, as long as you keep your original technical aspirations unchanged and accumulate in continuous reincarnation, there will always be a day when you will be free from the sea of ​​misery.



Finally, my dream is that there will come a day in the future when a person's power and power will depend on his knowledge of the universe.

It was an era when technology changed the world and code changed the world.

It was an era when scientists and technologists were the ruling class, and as in "Arcane Throne", the power of mages depended on an understanding of scientific principles.



If you have the patience to see here, then please click the mouse to support me. Whether you've had a hell of a job interview experience, want to give me some encouragement and share a bit of luck, or you have similar technical dreams.

Please give me a support for the code to change the world.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326225884&siteId=291194637