Today I’m going to share with you some of my methods and ideas for learning Android, not limited to which part of Android to learn. It’s a general, universal approach to learning. I hope I can help you solve some problems.

Note that this article is from Zhihu Live, the knowledge points are relatively scattered, the latter part contains some questions raised by the audience, but does not affect the overall reading and understanding.

What programming fundamentals Android needs to lay down

  • Java based (Kotlin) (see the skill tree olabqc6d8.bkt.clouddn.com/Java_skill_…).
  • OOP ideas and design patterns
  • Android based (reference Android skill tree 7 jpolu.com1.z0.glb.clouddn.com/android_ski…).
  • Data structures and algorithms
  • Others, such as JVMS

In addition to the programming foundation, what skills do we need to supplement

  • An interest in studying
  • Good understanding of English
  • Good at thinking and summarizing habits
  • Efficient learning methods
  • Be able to use Google search intelligently
  • Be good with tools
  • The ability to relate analogies to real things
  • Attitude towards problems

1. An interest in delving, although the advent of high-level programming languages has allowed us to focus more on the business than on the details of programming. Just as the so-called know what, know why, study the details can better help us to achieve business, do know.

2. Good understanding of English. For some reasons, some technical data we have access to are secondary data, and these secondary data often have some discounts or even deviations in the effect of knowledge transmission. English is the accelerator of programming. At the same time, good English can help us write more self-explanatory code.

3. The habit of thinking and summarizing. The more you argue about the truth, the clearer you think about technology. That’s often the question we need to ask about a technology

  • What is it in a sentence
  • What is the meaning of existence solved
  • How is the problem solved internally
  • What is the disadvantage of multi-angle analysis

For example, our summary of WebView considerations

  • Whether js is supported
  • Whether mixed Content is supported (LOADING HTTP images from HTTPS web pages)
  • Communication issues with JS, such as adding JavaScriptInterface annotations to methods
  • Whether it handles some urls itself (different protocols, don’t let flipboard://showSection, etc.) or hand them over to an external program
  • Whether to add a specific logo in UA, such as Flipboard
  • Whether to add a specific header

With thinking, we need to write it down in the form of words, which also answers the old saying that a good memory is better than a bad pen. Suggestions are summarized in the form of a blog.

4. Efficient learning methods.

  • It’s important to get the concept right
  • Do a good control variable method
  • More hands-on practice, combined with theory
  • Get to the point and eliminate distractions

In fact, anything complex is made up of simple things, and programming is no different. In the process of programming, we will be exposed to a lot of concepts, these concepts are very important, for the concept of the half-understanding often makes us slower, the more difficult to learn. Therefore, the concepts in programming must be understood accurately and deeply.

Control variable method: When we did experiments in junior high school, we often used control variable method. So is red in programming. When we solve a problem, we also need to control a change. For example, we need to fix a webView-related bug in our project. We need to think whether we can separate ourselves from the current large and responsible project and write a simple sample with a single variable to reproduce it, so as to achieve fast and small-grained verification.

More hands-on practice and theory: most of the time, when we learn a new technology, we should learn to use it first, with a preliminary cognition, it is convenient for us to better understand and in-depth research. For example, with GUI stuff, it’s best to do something from time to time, and theory and practice should complement each other.

Get to the point and eliminate distractions:

  • Anything that’s complicated is simple problems that are intertwined and broken down
  • Remove extraneous or distracting factors
  • Supplement the knowledge necessary to understand the problem
  • Representational analysis: look at the implementation principle and operation mechanism (for example, by analyzing the source code, we know that HandlerThread is nothing more than a built-in and initialized Handler thread)
  • Abstract summary: To generalize from a moderately abstract point of view

5. Use Google wisely. Using Google is a must for programming. It’s not accessible domestically, but it’s not a problem for smart programmers. Usually, I will talk about the knowledge points I want to search in English form, not including Chinese. Prioritize stackOverflow and Google Groups content. In contrast, Chinese resources are not very reliable and generally of poor quality.

6. Make good use of tools, use terminals more, try to write some scripts to solve repetitive work. Python, Ruby, and Shell scripts can all help you write great things.

  • Such as full-text search keyword toolsgrep -E $1 --exclude-dir={.git,lib,.gradle,.idea,build,captures} --exclude={*.png,*.jpg,*.jar} . -R --color=always -nFind the number of lines and files under the Android project that contain a keyword.
  • Quickly get the name of the current Activityadb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp' --color=always
  • Quickly check whether the JSON file is valid
  • Github.com/androidyue/…

7. The ability to relate analogies to real things

The longer we program, the more we realize that many of the concepts in the program are similar to things in real life.

  • Such as database indexes and real life dictionary indexes we use. The advantage is that it is easy to find quickly. On the downside, too many indexes will increase occupancy, increase, delete, modify at the same time index modification will be slower.
  • The object pool, for example, is similar to the communal cutlery in a real restaurant. We all need to clean up dirty data when recycling to avoid affecting the next use.
  • For example, the dishware collector in KFC has a similar idea of when to recycle the plates, and the JVM’s GC is similar. An object can be reclaimed if it is not held by another object. A table with no one on it and only cutlery is usually recyclable.

How do you make connections and analogies

  • Understand the specific concepts in programming, and grasp the key points of the problem and the key behavior
  • Choose analogies to things and actions that are routine in reality, not vague ones.
  • Extract common points and check for matches.

8. Be Positive about problems. One cannot muddle through. For example, if the problem is not easy/cannot be reproduced, even if there is no machine available to reproduce, we should try to reproduce it through simulation/using cloud equipment.

For the current doing only their own known problems, do not hide, as far as possible to expose, so as to facilitate their own and others better discovery and solution.

As an Android programmer, how to grasp the breadth and depth of the technology

There are too many temptations for Android, like React Native, applets, hot updates, and plug-ins.

My understanding should be to expand from the width first, and then study in depth.

When do you need to expand horizontally

  • A beginner
  • Various business, such as browser development (common App development technology, HTML+Javascript and other technologies)
  • Their own interests

When do you need to go vertical

  • Intermediate and advanced development
  • Pursue deeper details and ideas
  • Job Requirements

What are the horizontal developments

  • ReactNative etc.
  • Simple background development Java/PHP/Python/Ruby
  • IOS and other application development
  • All in all, more

What are the vertical developments

  • System source code
  • Implementation mechanisms for various technologies
  • Knowledge of operating system
  • All in all, it is to learn well, to know what is and what is.

Personally, I prefer to spend more time doing in-depth research. In this process, I will gradually develop an ability to understand technology thoroughly, which will make it easier to learn other technologies by analogy.

In addition, there are important factors that affect which dimension you move in when your job requires it. So choose a company carefully.

  • Usually in big companies, having a good team will allow you to drill down vertically
  • Small companies, startups are more likely to influence you laterally.

How to get the most out of your day job

In our daily work, we are working on the company’s projects. We need to do that in order to maximize revenue

  • Don’t limit your requirements to feature fulfillment (completing an interface doesn’t mean you get the most out of it, it just means you get the job done)
  • Understand the rationale and nature of the technology you are using. Don’t stick with API usage, otherwise you won’t be able to enhance your competitiveness. For example, we all use LRUCache to load bitmaps, so we need to at least understand how LRUCache works and, if possible, how it works internally.
  • Think about what is good in the project. Think about common scenarios for this technology.
  • Think about better solutions in your project. Compare the advantages and disadvantages of the two schemes. For example, if you listen to the explanation of ArrayMap in Android Performance Pattern, and consider the space footprint of HashMap, don’t rush to replace it. Do comparisons (know both HashMap and ArrayMap) and choose the one that works best in combination with the business scenario.
  • If you encounter problems on a project, it is recommended to solve them first, and then study the principles and details of the technology in your spare time. Follow-up research must be done.
  • Be good at summarizing and share your experience and lessons with others in a blog.

Daily work provides many good practices and bad problems, and is a valuable source of technical improvement.

Android has so many libraries, which ones should I choose, how to learn, and to what extent

Libraries exist to encapsulate details, simplify caller implementations, or help us find problems more easily. ButterKnife, for example, uses annotations to simplify things like looking up views and converting them to types.

How do you select those libraries

  • Determine if the library is required
  • Can this library improve the development efficiency and reduce the maintenance cost of code
  • What is the learning cost of this library like RXJava actually is a little bit higher.
  • What is the quality of this library, not only to see the star, but also to see the handling of the issue

Flipboard common libraries (part)

  • LeakCanary A memory leak detection library for Android and Java.
  • Stetho Stetho is a debug bridge for Android applications, enabling the powerful Chrome Developer Tools and much more.
  • ButterKnife Bind Android views and callbacks to fields and methods.
  • Baber A custom view styling library
  • GoldenGate An Android annotation processor for generating type safe javascript bindings
  • MaterialEditText EditText in Material Design
  • .

As with libraries, we need to understand how they are used, but also how they work.

What advice do college students have for beginners

  • More and more news comes out about the cold winter of the Internet
  • I hear more and more people complaining that Android is getting harder to find a job and is reaching saturation.
  • The Android development dividend is fading, especially for entry-level and mid-level developers
  • I have no objection to joining the Android development team now.
  • There are containers, machine learning and artificial intelligence that can still catch the dividend.
  • But no matter which technology you choose, even Android, you should have a good foundation, strong programming skills and enough interest. Don’t just pursue material things.

Always wanted to learn, but it was hard to stick to it

  • It’s good to have the will.
  • If it is difficult to stick to it, the possible reason is not to learn, or poor self-control
  • For failing to learn, refer to the study method mentioned above
  • If it is self-control, it can be improved through self-supervision and supervision by others.

Do not know where to learn Android, can learn at the same time work

  • There are many ways to learn Android, from self-learning (video sites, books, blogs) to training (not recommended).
  • It is usually possible to study and work at the same time, but it depends on the circumstances, such as time, determination and self-learning ability of the learner.

Spring recruitment preparation, data structure and algorithm do not understand how to do

Whether it is spring or autumn, the degree of mastering basic knowledge is a very important criterion to measure, after all, graduates have less practical experience.

Data structures and algorithms should be an essential part. It is recommended to do more preparatory work.

Look your best for the job interview.

What kind of individual project do you have to be competitive

If this project is App

  • First of all, there are enough users, such as tens of thousands of monthly lives
  • Good interface and interaction, in line with Android UI/UE specifications
  • Smooth and stable operation, no low-level errors (such as lag and other problems)
  • Apps can obviously solve users’ pain points

If the project is an open source project

  • – There are enough stars (however this one is already broken)
  • Handling of issue
  • The number of the contributor
  • Whether the design idea is good
  • Is the code self-explanatory
  • Keep learning and maintenance costs to a minimum

How can I choose a study material pass

  • Use Google and StackOverflow, Medium
  • If it is a blog article, in their own ability to understand the premise, try to choose English
  • The easiest way to judge an article is to look at the comments (Good, Execellent,Awesome) and the number of shares on Google+,Facebook, and Twitter at the bottom of the article
  • Try to choose articles that are clean (that show seriousness)

Poor learning effect problem pass

  • Long-term viewing of MOOCs and forums, I feel that the effect is very poor
  • I feel that I have made great progress through video learning, but even after learning, I still feel like a rookie
  • I have watched the video and read the book, but it is still very difficult to write. How to become proficient and advanced in the next step

The reasons for these results are:

  • Usually video sites teach people are often immediate skills.
  • Lack of thinking in learning, unable to do by analogy. He only knows how to imitate others
  • The foundation is weak and the concept is not clear. It makes it hard to do things on top.
  • There are no good auxiliary tools or good auxiliary content can’t be found.

How to improve the core competitiveness of Android programmers, project understanding ability or technical ability, which is more important

  • What is the core competitiveness? It is manifested in the ability of learning technology, attitude towards problems and technical solutions to problems. The same is true in other industries.
  • Specifically how to improve the core competitiveness, I mentioned above, reference programmers need to have those other capabilities.
  • The two abilities go hand in hand, making it difficult to decide which is more important.

Older Android programmers

Often received some Android programmers mail, which has a lot of problems is, do Android for many years, for the future career choice melancholy. For example, In the cold winter of the Internet, Huawei dismissed employees over the age of 34.

Indeed, the demand for Android-related engineers is not as good as it used to be, and the older you get, the less likely you are to work as hard as a young person just out of school. The annoyance is understandable.

Some ways to get out of trouble

  • Continue to learn, consolidate the foundation, expand the technical side. Why always mention this, because in fact there are many programmers, logical thinking is not strong, but also do not love learning. Constant learning is essential for programmers.
  • Be competitive. Don’t just be an API programmer. To be diligent in thinking, to pursue higher. He that seeketh above shall take it, and he that seeketh therein shall take it below. You have to change from who you were five years ago, or even 10 years ago. You can’t just do the same thing five years ago, 10 years ago.
  • Build your personal brand: blog, book, open source project, indie App, etc. Note that any one of these is a long-term endeavor. About blogging, I in previous zhihu live about some tips and ideas, address is www.zhihu.com/lives/79677…
  • Many of the worries of modern people, whether they are programmers or not, are about material fears. Buying a car, buying a house, family expenses and so on. And the fear and worry that they will not be able to meet material expenses. In their own unable to change the situation, appropriate adjustment of the state of mind.
  • Try to realize knowledge, but it takes time to accumulate. You can’t do it overnight.
  • The theory of comfort zones, learning zones and fear zones

The theory of

  • A comfort zone is a place where you can be comfortable without learning difficult things or taking things for granted.

  • “Learning zone”, for their own certain challenges, and feel uncomfortable, but not too uncomfortable.

  • The “panic zone”, where too much work or knowledge is beyond one’s ability, causes severe psychological discomfort and may lead to a breakdown and abandonment of learning.

The ideal situation for a person is to be in the “learning zone”, learning something that is moderately challenging. After a while, the “learning zone” gradually becomes the “comfort zone”, the “comfort zone” becomes bigger and bigger, and part of the “fear zone” becomes the “learning zone”.