The Interview Guide for Android Engineers

The Interview Guide for Android Engineers #

Hello, I am Sun Pengfei. It is once again the traditional peak season for job changing known as the “golden three, silver four.” In the winter of the Internet industry, seizing opportunities becomes particularly important. As Android engineers, what aspects should we prepare for? For example, should we include unfamiliar skills in our resumes? What Android component knowledge should we review? Is it helpful to practice algorithm problems? Perhaps you have carefully considered these questions before the interview. Now, I will combine my own experience and understanding to help you organize the content you need to prepare for resumes, interviews, and algorithms, and share some of my insights.

Resume #

A resume plays a crucial role in the job interview process, so we need to pay close attention to its writing.

During the interview process, interviewers usually focus on three main parts of your resume: work experience, project introduction, and skills. If the company you are interviewing for does not have specific questions, many of the questions will revolve around these three parts of your resume. One thing to note is the writing of relevant skills. First, you need to make it clear to the interviewer what level you are interviewing for. Often, a position corresponds to multiple job levels. When submitting your resume, you need to provide the interviewer with a clear job level, otherwise the interview process will be more passive and it will also affect the interviewer’s judgment of you. Therefore, this part of the content needs to highlight your expertise and also include some issues that the current company is relatively concerned about. For example, if you are familiar with plugins, hotfix, componentization, and performance optimization, you can clearly state that. However, if you are not very familiar, it is better not to write about it. If you are very familiar with a certain aspect of Android, you can write about it in more detail. For example, if you are familiar with the Handler and Binder mechanism, you can write “Familiar with common Android mechanisms, such as the Handler and Binder mechanism.” When the interviewer sees that you are familiar with this part of the content, they may ask deeper questions, so you definitely need to prepare in advance how to explain this part, which can be based on the advantages, key points, and difficulties of the mechanisms.

Regarding project introduction, the main focus is to highlight your role in the project or team, and emphasize your contributions and the difficulties of the project. Many students who have been doing development according to requirements in the company may feel that their project experience lacks highlights and is not so challenging, and they may feel disadvantaged in this part of the content. In fact, when each requirement comes down, you will definitely have your own design for this requirement. In this process, you will consider how to minimize the impact on the existing code, how to quickly and clearly implement the functionality, and how to encapsulate components and controls during the development process, and consider how to optimize performance, and whether there are new technologies that can help develop this requirement… I think each requirement is implemented through a series of considerations and designs. You can go back and review your code, and then consider how to reflect these designs and considerations in your resume. This would also be a good explanation.

Interview #

For Android engineers, the interview usually starts with questions about algorithms, and basic knowledge of Android and Java. Regarding basic knowledge of Java, I recommend you to read these three books: “Efficient Development: Java Development Manual,” “Understanding the Java Virtual Machine,” and “The Art of Java Concurrency.” As for Android interview questions, most of them are related to the system principles. However, there are also many questions without precise answers, such as questions about the principles of the four major components. For such questions, you need to explain the four major components from a macro perspective or break them down and explain each component separately.

Before the interview, you need to prepare in advance to avoid answering questions in a disorganized manner, which may lead the interviewer to make negative judgments about your logical thinking ability and language expression. You must have a clear understanding of the commonly used components in Android, such as the mechanism of Handler and postDelay, touch event mechanism, custom views, calculating view sizes, how container controls layout child controls, basic database operations, Binder mechanism, LMK mechanism, etc. The interviewer may also ask about the principles of some open-source frameworks. I suggest you to learn more about excellent network frameworks, image loading frameworks, log recording frameworks, EventBus, and AAC frameworks. As for relatively complex topics like pluginization and hotfix, you can read the book “In-depth Exploration of Android Hotfix” for hotfix, and read the article series “Android Pluginization Principle Analysis” by Weishu on http://weishu.me/2016/01/28/understand-plugin-framework-overview/ for pluginization. Performance optimization is also an important area that companies have paid a lot of attention to in recent years. Some students may have specialized in performance optimization or have developed some tools and summarized some methodologies. This can be a good answer to some questions. However, most students may focus on business development in their daily work, and may not have much practical experience in performance optimization. I suggest you find some points from the business development process, such as paying attention to performance during initialization when working on common business components, or ensuring smooth scrolling performance in complex list views. I believe that you have your own thoughts and reflections during the development process, which can be explained based on specific scenarios.

In most cases, the interview will focus on your projects later on, so you need to prepare your projects in detail before the interview. For example, the interviewer may ask you to introduce your project, and you need to highlight the difficulties of the project, your contributions to the project, and the specific implementation of the project. They may also ask some specific details, so it is recommended to be truthful in your response and have a clear understanding of your module. In addition to technical interviews, sometimes there may be assessments of soft skills, such as cross-department collaboration, communication skills, time management, task allocation, and career planning.

In general, interviews rely more on your accumulation in daily work and your performance on the spot. Summarization is essential because if you don’t frequently use certain content, you may forget it after a period of time. This may result in not being able to demonstrate it well during the interview. For example, for technologies like pluginization and hotfix, the principles are relatively simple, but there are many pitfalls in the development process. If you don’t have some key points documented, you may forget what a certain piece of code is used for after some time. Therefore, it is best to summarize the difficulties in your project, the frameworks used, the principles behind these frameworks, and the areas where you spent the most time after completing a requirement. It is also important to analyze the reasons behind the most common bugs. This way, you don’t have to go through your code again before the interview, and you can have a thorough understanding of your project details.

As for review, first, you need to have a self-assessment. I do this by drawing mind maps. I would mentally go through the overall knowledge system and draw something similar to the figure below. I would recall the possible content of each knowledge point, record the areas where I am unclear, and then look for interview questions summarized by other students online and answer each question. This is an iterative process. When you can answer the questions you anticipated, you need to delve into the technical details and depth. For example, I developed a PLT Hook tool at work, which may be a modification of an open-source project that I referenced. However, I did not have a deep understanding of its details. At this point, you need to study the content related to this open-source project systematically.

On the other hand, you need to improve the level of evaluation by the interviewer during the interview. For example, most people answer questions about garbage collection (GC) by paraphrasing the content from “Understanding the Java Virtual Machine,” which is a valid way of answering. However, there are some differences between the GC of the Java VM and the Android VM. If you have read relevant articles or analyzed source code related to Android VM’s GC, you can explain the GC from the perspective of the Android VM, such as explaining the incremental collection and concurrent collection algorithms in the Android VM’s MarkSweep algorithm, background GC and foreground GC, the execution process of VisitRoot, trigger methods for GC, TLAB processing, principles of ConcurrentGC, heap trim process, memory fragmentation solutions, handling of references, and finalization function calls. If you are familiar with a mechanism, you can steer the conversation towards that topic and then delve into it layer by layer, which can elevate the interviewer’s evaluation of your level.

Algorithms #

Algorithms are something that must be reviewed, as they often appear in many interview processes. The algorithm questions in interviews are generally not very difficult and can be divided into basic data structures, such as arrays, linked lists, stacks, queues, binary trees, and heaps. You must be familiar with the basic operations of these common data structures, such as reversing a linked list, deleting elements, getting the K-th element, and determining whether there is a cycle. You should also know how to flip a binary tree, perform depth-first and level-order traversals, calculate tree depth, and find common ancestors.

Another category is common search and sorting algorithms, which appear frequently and you need to know several common implementations, such as bubble sort, quicksort, insertion sort, merge sort, and heapsort. Note that you should not simply memorize the algorithm implementations because in interviews, you may not be asked to directly write the corresponding algorithms. Instead, you may be given problems that can be solved using search or sorting algorithms. You can filter out such problems using tags on LeetCode.

Another part of algorithm questions may focus on greedy algorithms, dynamic programming, divide and conquer algorithms, depth-first search (DFS), and breadth-first search (BFS). These types of algorithms generally require some techniques. However, interview algorithm questions usually do not require a lot of code and can typically be completed within a few dozen lines. So, you can start by solving some classic problems, such as climbing stairs or finding the maximum subarray sum. But there may also be relatively complex problems that combine multiple algorithms, such as finding the maximum path sum in a binary tree, which involves both DFS and dynamic programming. In addition, you may also encounter some algorithm questions that are derived from other problems, such as implementing a red-black tree based on a HashMap. You should be prepared for these scenarios, as they may not become stumbling blocks in your entire interview, but they could become a bargaining chip to earn a high evaluation.

Cramming at the last minute does not have much effect on learning and accumulating algorithms, so we need to find some time to review in our busy work. You can also practice on LeetCode or LintCode. Additionally, although most of the algorithm questions in interviews are simple problems on LeetCode, you should also pay attention to some medium and hard difficulty classic problems.

Summary #

Today, I did not cover many specific interview questions. Instead, I focused more on how to prepare for an interview. Interview preparation is actually an accumulation of our daily work, and reviewing is just a means of consolidating knowledge before an interview. The process of reviewing mainly involves organizing and summarizing our knowledge points. You can think about the questions you may encounter during the interview, as well as how to express yourself. However, I would like to say that although last-minute cramming may be useful at times, it is difficult to understand the deeper aspects of a certain knowledge point in a short period of time. Moreover, the breadth of knowledge also requires time and experience to accumulate. So whether or not you need to interview, it is important to think, train, and summarize more in your daily work. This will greatly benefit you when the need arises.

Finally, if you are also preparing for an interview, you can share your preparation situation and interview experience in the comments section. Of course, you can also leave the interview questions you encountered and share them with other students.

Feel free to click on “Share with a Friend” to share today’s content with your friends and invite them to learn together. I have also prepared a generous “Study Boost Package” for students who think and share actively. I look forward to improving together with you.