Demystify! What happened to the senior Android engineer who was fired by Tencent? Recommended collection

The pressure of competition in the IT industry is increasing, especially in the Android development industry. But many Android programmers repeat CRUD every day, wandering in place!

At the beginning of this year, you wanted to change the status quo, so you swiped a lot of interview questions on the Internet, and after forcibly wrote down, you started to participate in the interview! But you find that interviews are getting harder and harder now.

I submitted 10 resumes and only one offered an interview invitation. Interviewers don’t ask about the content of their work. They ask about terms that have not been heard very much. What are hybrids, NDKs, and they rarely ask memorized questions, but they don’t follow the principle of asking questions. Cannon, caught you off guard! **I even suspected that I was a fake programmer and didn't know anything!

Everyone has become more and more impetuous and owes too much technical debt. When it comes to the interview, they start to go to the doctor in a hurry, blindly learn some interview questions for the interview, or accept various technical groups/blogs /Information website about technology/ about life bombardment, but can't accumulate solid and in-depth technical knowledge or application experience. If this continues, it will only become more and more anxious without real technical improvement

Interview Department + Position : Commercialization-Senior Android Development Engineer
Interview Feelings : The overall face is relatively tired, basic face, cross face, Boss face, and 6 interviewers (from the 3 sides that I told me at the beginning + HR The face seems to be a little far worse (¬_¬). The algorithm is still being written to the Boss, but fortunately the interviewer did not embarrass me (I honestly explained that the algorithm did not prepare much, hey...), the algorithm is not too difficult. The overall project has more questions than the basics.
Interview suggestions : Algorithms and foundations are the stepping stone, projects are touchstones, and a good interview image is a bonus item.
Think about the items listed on your resume, why did you do this project? What is the goal of this project? What is my plan? What are my advantages over other programs? What are the benefits of the project? Can the project architecture diagram be drawn? Are the main framework principles used in the project clear before and after? (I probably saved myself from the project, and the basic preparation is a bit hasty T^T).
If it is an on-site or video interview, a good interview image is still more necessary. In the department TL interview, I mentioned that my better than many other interviewers is that the image of the whole person is better, and it does not make people feel very tired.

[ 1 side-basic side ]

  1. When you developed Android, how did you adapt the px of the UI draft?
  • dpi: Screen pixel density, refers to the number of pixels per unit size specified on the system software , it is often a fixed value written in the system factory configuration file;
  • ppi: It is also the pixel density of the screen, but this is a physical concept, and it exists objectively and will not change. dpi is a value manually specified by the software after referring to the physical pixel density, which ensures that the physical pixel density in a certain interval uses the same value on the software;
  • dp plus adaptive layout and weight proportional layout can solve 90% of the adaptation problems . Because not all 1080P mobile phones have a dpi of 480, for example, the dpi of Google’s Pixel2 (1920*1080) is 420;
  • Width and height qualifier adaptation: Exhaust the width and height pixel values ​​of all Android phones on the market, set a reference resolution, and other resolutions are calculated based on this reference resolution. In different size folders, according to Write the corresponding dimens file for this size. But it has a fatal flaw, that is, it needs to be accurately hit to fit, and the size of the App package will also become larger.
  1. Two Integer objects with equal values, == compare to determine whether they are equal?

  2. Activity A jumps to Activity B, Activity B then presses the back key to go back, the life cycle of the two processes

  • In the process of ActivityA jumping to ActivityB, the execution order of their respective life cycles. For example: A.onCreate A.onStart A.onPause A.onStop B.onCreate B.onStart B.onPause B.onStop B.onDestroy?
    ActivityA and ActivityB life cycle execution order is as follows: A.onPause -> B.onCreate -> B .onStart-> B.onResume-> A.onStop
  • ActivityB press the back button?
    After pressing the back key: B.onPause->A.onRestart->A.onStart->A.onResume->B.onStop->B.onDestory
  • When ActivityB is a window Activity, what about the conclusions of 1 and 2?
    If ActivityB is a window, when ActivityA jumps to ActivityB, the part of ActivityA that loses focus is visible, so onStop will not be called. At this time, the life cycle sequence: A.onPause -> B.onCreate -> B.onStart -> B.onResume
    press After the Back key: B.onPause->A.onResume->B.onStop->B.onDestory
  • Will onCreate be called when switching between horizontal and vertical screens? several times?
    When the program is running, the configuration of some devices may change, such as: switching between horizontal and vertical screens, keyboard availability or language switching, etc. At this time, Activity will restart. The process is: before destroying, it will call onSaveInstancestate() to save some data in the application, then call onDestory(), and finally call onCreate() or onRestoreInstanceState to restart Activiy. When switching screens, each life cycle will be called again. OnCreate will be executed once when switching to a horizontal screen, and onCreate will be executed twice when switching to a vertical screen.
  1. Can child threads be context.startActivity() (such as ApplicationContext), will there be any problems?

It is possible to write a demo and try it. But what will be the problem hasn’t been figured out yet...

  1. The overall process of the Handler mechanism; why Looper.loop() does not block the main thread; IdHandler (idle-time mechanism); the specific implementation of postDelay(); the difference between post() and sendMessage(); what problems need to be paid attention to when using Handler and how to solve it ?

The questions are very detailed, so you can prepare as much as you can. They encapsulated a set of Handlers to avoid memory leaks

  1. When Native, H5, and RN pages are mixed to jump, how does the page clearing bridge work?

For a project made by yourself, just explain the principle clearly, and draw the picture if you don’t explain it clearly.

  1. How to calculate the percentage of the visible part of a View on the screen?

  2. ClassLoader's parent delegation mechanism

  3. Briefly introduce the principle of Https

  4. What causes the memory leak and how to fix it?

  5. How can I ensure that I download a large picture without oom?

  6. Have you done any UI optimization and what have you done?

  • Debug GPU overdraw, reduce Overdraw to a reasonable range;
  • Reduce the nesting level and the number of controls, keep the view tree structure as flat as possible (use Hierarchy Viewer for easy viewing), and remove all views that do not need to be rendered;
  • Use GPU to configure the rendering tool, locate the specific step where the problem occurred, and use TraceView to accurately locate the code;
  • Use tags, merge to reduce nesting levels, viewStub delayed initialization, reuse of include layout (used with merge)
  1. What is the difference between WebView and JS interaction, shouldOverrideUrlLoading, onJsPrompt use

  2. Have you been in contact with Flutter and Kotlin?

  3. Other project related issues

  4. Algorithm-Binary tree outputs k-th level node elements

2 Sides-Project Special

  1. When the Native, H5, and RN pages are mixed to jump, the page clearing bridge is implemented

  2. Design and Difficulties of Page Hybrid Framework

  3. Design of RN universal container

  4. User behavior monitoring program design

  5. JS error management program

  6. RN page monitors user behavior and JS error management, what are the gains and optimization points of problem discovery

  7. What are the advantages of Meituan RN over native RN

[ 3 sides-deepened foundation ]

  1. Have you ever used Picasso in your company? Let me introduce

  2. Picasso single engine, how to ensure data isolation in the case of multiple Bundles?

  3. The difference between Meituan RN and Picasso

4. Omit some project related issues...

  1. How RN's page tracking is implemented

  2. Is the Meituan home page an RN page? MTFlexBox principle

  3. Synchronized modified static method, ordinary method, class, method block difference

  4. Synchronized underlying implementation principle

  5. The role and principle of volatile

  6. An int variable is modified with volatile and multi-threaded to operate i++. Is it thread safe? How to ensure i++ thread safety? The underlying realization principle of AtomicInteger?

Use AtomicInteger to make i++ thread safe

  1. Talk about the understanding of the thread pool, and several key parameters to create the thread pool

  2. The Handler mechanism asks again...

  3. What is the difference between the Binder mechanism and the memory sharing mechanism?

  4. Java collections, introduce the usage scenarios of ArrayList and HashMap, and the underlying implementation principles

  5. The difference between ArrayList and LinkedList

  6. Algorithm-the merging of two ordered linked lists

  7. Algorithm-Input a string (excluding * and .), regular (any combination of letters, * and .), and judge whether the string is legal

  8. Briefly introduce some technical difficulties encountered in the project

4 Sides-Crossing Sides

  1. In the following code, what is the final value of str? What is the value of Integer? Will it be changed?
  • Test site : Java value transfer (same for question 2). Write a code test, modify the input parameters in the changeValue() method, and it will not change the previous value;
  • Principle : The method gets a copy of all parameter values, that is, the method cannot modify the content of any parameter variable passed to it. The basic type parameter is passed a copy of the parameter, and the object type parameter is a copy of the object address;
  • Solution : In changeValue(), for the object type parameter, directly modify the value of the object address copy , so the address of the variable has not been modified before! If you modify a value in the object instance, the previous variable will be modified
public void test() {
    String str = "123";
    changeValue(str); 
    System.out.println("str值为: " + str);  // str未被改变,str = "123"
}

public changeValue(String str) {
    str = "abc";
}

  1. In the following code, does it need to be null when using the object student again?

Summary of the usage of method parameters in Java:

  • A method cannot modify a parameter of a basic data type (ie numeric or boolean);
  • A method can change the state of an object parameter;
  • A method cannot let the object parameter refer to a new object
public void test()  {
    Student student = new Student("Bobo", 15);
    changeValue1(student);   // student值未改变,不为null! 输出结果 student值为 name:Bobo、age:15
    // changeValue2(student);  // student值被改变,输出结果 student值为 name:Lily、age:20
    System.out.println("student值为 name: " + student.name + "、age:" + student.age);
}

public changeValue1(Student student) {
    student = null;
}

public static void changeValue2(Student student)  {    
     student.name = "Lily";    
     student.age = 20;
}

  1. Several types of references in Java, and the use scenarios of weak references?

  2. Thread pool classification, explain a few core parameters?

  3. What is the packaging process of APK?

  • The aapt tool packs resource files and generates R.java file
  • The aidl tool processes AIDL files and generates corresponding .java files
  • The javac tool compiles the Java file and generates the corresponding .class file
  • Convert .class files into .dex files supported by Davik VM
  • The apkbuilder tool is packaged to generate an unsigned .apk file
  • jarsigner signs unsigned .apk files
  • The zipalign tool aligns the signed .apk file
  1. Why do APKs need to be signed? Have you learned about the specific signature mechanism?

In order to confirm the identity of the apk developer and prevent tampering of the content, Android has designed a set of apk signature schemes to ensure the security of the apk, that is, the developer signs the apk when packaging, and the Android system will have corresponding development when the apk is installed To verify the correctness of the user’s identity and content, the apk can be installed only after the verification is passed. The design of the signature process and verification is based on the idea of ​​asymmetric encryption.
A set of signature schemes used by Android before 7.0: generate signature files in the META-INF/ folder in the root directory of the apk, and then verify the signature files in the system's PackageManagerService during installation.
Starting from 7.0, Android provides a new V2 signature scheme: using the apk (zip) compressed file format, a data area for storing signature information is added to the original content area, and then the same in the system during installation The V2 version of the signature verification is performed in the PackageManagerService. The V2 solution will be more secure and make the verification faster and faster to install.
Of course, the V2 signature scheme will be backward compatible. If the V2 signature is not used, it will default to the verification process of the V1 signature scheme.

  1. Why divide dex? SDK 21 does not divide dex, will there be any problem with loading all directly?

Seek the right answer from the passing gods...

  1. What are the common design patterns? What design patterns did you use for the JS error management solution you provided?

  2. Algorithm-Binary tree layer order traversal, odd-numbered layer reverse order traversal of nodes, even-numbered layer positive order traversal

  3. What is the plan for the next 3 to 5 years?

  4. What do you think are your strengths? What are the disadvantages?

  5. What is the current rank and recent performance

5 Sides-Department TL

  1. Business introduction related to the commercialization department (the core is probably that the commercialization department has high barriers, the cost of training a person is high, and it is more valuable than doing other businesses, and can accumulate a lot of business strategy knowledge), and then ask him to ask questions

  2. Planning for the next few years? What's the plan in life?

  3. What do you think are your strengths? What are the disadvantages?

  4. What is the current rank and recent performance

  5. Why give you such a good performance?

  6. Are there any other opportunities? The situation of Ali interview

6 sides-Big Boss

  1. Algorithm-array insertion, consider expansion

  2. What are the more challenging things encountered in the project?

  3. What are your business in Meituan?

  4. What are the plans for the next few years?

  5. What do you think are your strengths? What are the disadvantages?

  6. What is the current rank and recent performance

[HR surface]

  1. Both undergraduate and graduate majors are partial to hardware. Do you have relevant software experience?

  2. Are postgraduates undergraduate or take the exam by themselves?

  3. Do you have Android development experience before going to Meituan?

  4. Why did you choose to go to Meituan? Why choose to come to Beijing?

  5. Why change jobs? What are your expectations for your future work?

Golden sentence: Now I have encountered a bottleneck in my technology growth, and I have always admired your company.

  1. What is the recent performance for your current rank?

  2. With such a good performance, why not choose Meituan to change departments to see opportunities?

  3. What was the highlight of the performance during several promotions?

  4. Where is the home? Are there any plans to go home and develop there?

  5. Are you planning to see job opportunities like Kuaishou again?

  6. Ask some about Ali's current interview progress and situation

  7. Expected salary

At last

At the end of the article, I will put a small benefit for everyone, click on my GitHub to receive

There are many technical experts in the group. If you have any questions, you are welcome to communicate with all netizens. The group still shares high-level Android learning video materials and interview materials for free from time to time~

Secretly say: The masters in the group are like clouds, welcome everyone to join the group and discuss with the big guys!

%BC%80%E5%8F%91%E4%B8%8D%E4%BC%9A%E8%BF%99%E4%BA%9B%EF%BC%9F%E5%A6%82%E4%BD%95%E9%9D%A2%E8%AF%95%E6%8B%BF%E9%AB%98%E8%96%AA%EF%BC%81.md)**

There are many technical experts in the group. If you have any questions, you are welcome to communicate with all netizens. The group still shares high-level Android learning video materials and interview materials for free from time to time~

Secretly say: The masters in the group are like clouds, welcome everyone to join the group and discuss with the big guys!

[External link image is being transferred...(img-J5V42o3l-1611044208624)]

Guess you like

Origin blog.csdn.net/clhcowboy/article/details/112845701