1, the preface

First of all, I think learning summary, to have a total, knot, is after induction, can tell others with their own words! Generally speaking, I think it is mind mapping. Therefore, BEFORE each article, I will give the brain map of the article:

2, the body

Before you study any article, you must have a workable methodology, otherwise it will be difficult to make a breakthrough. In the brain map above, I have listed some of the methodologies that I think are very good, so before you start a course, it will be helpful for subsequent self-study and other learning.

A point of knowledge

  1. Why is it neededXXX
  2. What is theXXX
  3. How to useXXX
  4. useXXXWhen pay attention to the problem
  5. XXXApplication areas of
  6. XXXThe advantages and disadvantages of
  7. XXXOne instance

This theory is in the computer (programming) teaching video recorded by Teacher Hao Bin mentioned, very suitable for beginners, interested in you can search by yourself.

Why does this work? Because with a simple application, you’ll know if you’ve got a point!

For example:

  1. Why is it neededThe singleton pattern
  2. What is theThe singleton pattern
  3. How to useThe singleton pattern
  4. useThe singleton patternWhen pay attention to the problem
  5. The singleton patternApplication areas of
  6. The singleton patternThe advantages and disadvantages of
  7. The singleton patternOne instance

What are we talking about when we talk about performance tuning?

  1. CPU
  2. memory
  3. network
  4. I/O

Have you found that the above four points correspond to the basic composition of the computer principle, when talking about performance optimization, is actually talking about the bottleneck of the computer! So, when we talk about performance optimization, what we can do is improve or transform the bottleneck of the computer.

If a single CPU can’t handle it, we add a new GPU. One CPU can not process, we 8 cores, 16 cores! Multi-core CPU processing can not come over, we can cluster! Distributed! Cloud!

When we run out of memory, we add memory! Memory compression! Memory replacement!

When the network bandwidth is insufficient, we increase bandwidth! Let’s add servers! We add remote multi-terminal!

When I/O is too high, we choose I or O! We split the I and O!

In the depth of the program, code, all optimization, is not the same, you have to reduce the number of calculations and loops, you have to save memory overhead! You want network data cache! You have to ration time storage!

All the performance optimizations, but no more! Does that make sense?

In the era of mobile devices, another performance problem is that there is no large battery in a small space, which is actually a battery bottleneck! But most developers don’t care, because they feel like they’re just building apps, and it’s the users and their devices that use apps! The bottleneck of the battery consists of two problems: consumption and loss. Consumption refers to whether the program we write can reduce the amount of calculation while realizing the function, while the loss refers to the code we write that we do not need, which leads to unnecessary calculation. If you have noticed, In 2015, Samsung mobile phone directly forced the withdrawal of the App with too much power consumption, which may be the cause of the failure of localization in China, right? Because does optimization really have to do whatever it wants to do in order to solve lag or performance? This is something developers need to think about. In the absence of current breakthroughs in battery technology, power is still a matter of great concern. Now both iOS and Android are counting your App’s battery usage, so if you don’t start saving now, your App could be deleted by your users. Of course, in order to solve these problems, Apple has made a lot of system-level optimization for iOS/macOS system, which may also be the reason why few developers care about it. If you are interested, you can see wwDC-Apple Developer over the years. Apple has many strategies for power saving for reference.

In the space

  1. The compression
  2. shard
  3. The index

The performance optimization mentioned above, from the general direction, so, and then refined to the specific, there will be a lot of algorithms or techniques, among which the change of space is a classic problem.

I’m sure you’ve heard something like:

  • “How do 20 100MB images display on a 1GB device?”
  • “Find the non-repeating integers in 250 million integers. Note, there is not enough memory to hold these 250 million integers.”
  • “Given two files A and B, each containing 5 billion urls, each of 64 bytes, the memory limit is 4 gigabytes, let you find the common URL of a and B?”

These problems, in fact, the solution, basically can use the above 3 methods!

Does that make sense? Build your own development knowledge! In fact, it is not difficult, there is no shortcut to learning, but there are ways! So, understand and master more methodology, build their own knowledge system tree, so, is not passive every day in a variety of articles, people float!

Learn what

  1. Don’t be stumped — divide and conquer
  2. Don’t think too easy
  3. Learning curve steepness, skipping principle
  4. Question more, think more, summarize more
  5. Learning is not only knowledge, but also process
  6. It is better to teach a man to fish than to give him fish

I personally advocate teaching people to fish is better than teaching people to fish, learning is not to give you knowledge, but to learn how to acquire knowledge, how to connect the knowledge points, how to quickly and effectively master knowledge!

Learning skills

  1. It is better to learn theory after practice
  2. According to the needs of work, work is practice, after all, the most easy to have a sense of achievement
  3. Practice & Thinking
  4. Experience & Summary
  5. Direction is important, and sticking to it is even more important
  6. Deeper and deeper, understanding and cognition are updated
  7. Sort out the logic and process to make it clearer
  8. Try being an API provider
  9. It’s not about being good at everything, it’s about being good at something.
  10. Achieve mastery through a comprehensive

Many people may be infatuated with/superstitious learning shortcuts, every time to learn a knowledge point, always want to find a shortcut in learning, often not the way! Necessary, you can see the year-end summary 2020, before I love you love you | iHTCboy ‘s blog, here I am not much said. As for learning, I first dig deep into a certain field and understand the nature of programming after a lot of learning and practice, so that I can flexibly deploy and use the knowledge I have accumulated. Remember that! Remember that! Remember that! There is no shortcut to learning! But there is a way!

knowledge

  1. Componentization is an architectural pattern that isolates the upper layer of business and provides common capabilities for the lower layer
  2. Componentization, thermal repair, dynamic, big front-end, Flutter, small program
  3. Improved compilation speed, memory optimization, performance optimization, battery optimization, test-driven development, architectural design patterns and use of algorithmic data structures in iOS

Although we are programmers, engineers, but, the industry is different, the reality is very different! Understanding and familiar knowledge is not different! How to apply computer technology to your industry? Everyone’s energy is limited, but there is no limit, when someone tells you impossible, it must be that he has a different ruler than you! We measure one thing, to try to put the long line, magnify the vision, put high perspective! For knowledge, there are too many things, choose their interests and work needs, do not care too much about other people’s comments, the vast majority of events, not to do, but need to do for a long time!

The interview

  1. You can’t tell why you’re asked about underlying principles
  2. 1. Anyone can write business code. What else can you do?
  3. 2. I think iOS development is not worth this price, and our company’s customers at this price are all background, so the front-end is not needed.
  4. The company doesn’t think about the growth of employees
  5. Systematically improve their internal work, improve themselves, and then feed back to the work, so that the work efficiency and quality to achieve qualitative improvement, and then calmly deal with the update of technology iteration
  6. When interviewing candidates, it’s common to ask them about the overall structure of the project.
  7. Being articulate about the project you’re in charge of, but hesitantly answering questions about the project as a whole, will not lead to a successful interview.

If it is not a free worker, I think most of the domestic students have no chance to choose, so, the interview is always a problem to face, every time resign, be resigned, we will pick up the test set to brush, brush the topic! Brush algorithm! Brush brush!

All problems can not be simply cut into one size fits all! After so many years, in my understanding, questions are not right or wrong, good or bad. Same thing with brush questions. I want to say that internal force is not a day two days to grow, so for the interview, to establish their own development knowledge system, the interview question is to learn from the West, each topic is a monster, you can not beat all monsters in one day, so, do not ignore the cycle of 77, 49.

books

  1. The Code Clean Way
  2. The Myth of the Man-month

Books are many, good books are many! I’m not going to list all the technical books that are worth reading, because I’m afraid you’ll suddenly go back to square one, buy a bunch of books, and don’t know where to start! So, I don’t recommend buying books! Buying a book is when oneself want systematic study to buy! Buy when you’re afraid of hurting your eyes, but don’t buy because others recommend you or you feel good about yourself! We should start from ourselves, from our own work, from the industry we are engaged in, from our own planning and development, from our own interests, the starting point of any thing, is the original aspiration, do not forget the original aspiration!

3, summarize

Knowledge about how to set up their own development system, the above is what I think of the more important points (and still has a lot of methodology, but much must be a good thing, in summing up after opportunity), through the development of every detail, to be studying for a long time for a long time, the research and experience, to create a tree of knowledge of their own, tell you can copy any knowledge, You can copy! But you can never paste it in your mind!


More about iOS development and program development related, can look at the series, the present is still in serial iOS development master class – learning summary 】 【 (serial) | iHTCboy ‘s blog, above, in the hope that useful to you!

reference

  • IOS Developer Class – Geek Time
  • IOS development master class – learning summary (serial) | iHTCboy ‘s blog
  • 2020, love you love you (year-end summary) | iHTCboy ‘s blog
  • Hash table algorithm for massive data Processing interview questions


  • If there is infringement, contact must delete!
  • If there are incorrect places, welcome to guide!
  • If you have any questions, feel free to discuss them in the comments section!


Note: this article was first published on iHTCboy’s blog, if reprinted, please note the source