Rain and snow outside the window, the winter of 2018 seems particularly cold.

Domestic economic downturn, capital chain fracture, personnel optimization, freezing HC and other news, the winter of 2018 was shrouded by a layer of haze, Internet employees once panic. Only when the tide recedes do we know who is swimming naked. This means both enterprises and individuals.

There is no doubt that the competition in the Internet industry is more fierce. As an ordinary developer, in the absence of a better opportunity, the first thing to think about is how to make money, not how to make money.

2018 is a very important year for me. I have been confused, entangled, self-doubt and ecstatic. This post is a summary of my tech advancements for 2018 and a share that is not limited to the tech stack.

One, omnipotent or expert

In early 2018, I was excited to install Android Studio, WebStorm, and buy two books with the intention of polishing Android, ReactNative, and the Web front end to become a big front end engineer. Learning new things really brings a lot of sense of achievement, and I feel very interesting. Later, after communicating with an experienced technical expert, I quickly stopped my learning plan.

At the moment, I can’t remember the different apis.

These are application layer things, basically memorization and practice can be learned, through one or two projects can be familiar, but to achieve mastery is very difficult. One is that human energy is limited, and the other is that mastery requires things that are not supported by this application-level knowledge.

Therefore, if a person chooses to do full stack at the beginning of his coding career, he or she is likely to become a “total loser.” A programmer who knows what is going on but doesn’t know why might be more appropriately called a “coder farmer.” Very few companies will want you to be able to code across technology stacks, and there’s only one place a versatile programmer can fit in — an outsourcing firm.

So, does full stack really make no sense?

In fact, there is. When an engineer is skilled in professional skills, qualified in basic technology and has reached a certain level of thinking ability, he is likely to dabble in other technical fields in order to seek a breakthrough in technical ceiling. The purpose of this study is not to learn the superficial apis, but to understand the differences and connections between different technology stacks, focusing on the mental level, so as to understand the technology from a broader perspective.

When I had a deep understanding of these, I decided to use a more effective learning method to fundamentally improve myself, including basic skills and thinking ability.

Second, in-depth professional foundation

I spent some time sorting out the professional basics, such as iOS Runtime fundamentals, RunLoop, memory management, Block principle, KVC, etc. In fact, there are a lot of learning materials on the Internet for these things, and the underlying things are also readily available source code. Learning these things is still in the comfort zone, and it only takes time and effort to gain something.

As it involves the bottom layer, C and C++ languages need to have some understanding of the basic syntax to be familiar with, or it will lead to the illusion of looking at the bottom code like reading a book from the outside. But my point of view is that the underlying source code research to moderate, and pay attention to programming thinking, a lot of strange language skills do not understand it doesn’t matter, such as some time to review, the so-called review of the old and new.

I read a book called The Complete Solution to Objective-C Programming. I also looked at Swift grammar when I was free. Since it was not implemented in the project, I just understood its grammatical features for the time being.

I’ve written a couple of blog posts about apps:

  • Thorough understanding of NSNotificationCenter notifications (with implementation code)
  • Thorough understanding of KVO observer mode (with Runtime implementation code)
  • IOS architecture components: Make your TableView elegant
  • (Deprecated) Design a simple iOS architecture
  • (Deprecated) iOS architecture: Proxy implementation partial modularization (Demo attached)

Three, algorithm

As a friend said, the biggest point of algorithms is to improve one’s thinking ability.

Fortunately, with the help of the algorithm is very powerful friend, let me quickly into the door. I probably learned the whole algorithm in less than one month’s spare time, and then I did intensive practice for about two months (of course, I also used my spare time).

The application scenarios of algorithms are the most common in data processing, so the back-end theoretically requires more algorithmic knowledge than the mobile and Web front-end. Don’t be surprised when you hear programmers say that algorithms don’t work, but many people do it in a very low level way and don’t know how to do it more efficiently. Crucially, perhaps they don’t know the difference between low and good (a tradeoff between time and space complexity).

The importance of algorithms to software engineers is self-evident.

Algorithm is supported by data structure, learning the basic data structure is the primary task, I see a book during dahua data structure “, this book is domestic, to be shallow, as me without the basis of the data structure, also spent a few days time, if you have a data structure, the book essentially meaningless.

Then friend recommend a book “challenge competition of process design 2”, get a look at the book is really good, should be a university ACM favorite books, is the basis of the data structure before, look is not very easy, just take time to understand the advantages and disadvantages of each data structure, then can play their value in application. I haven’t finished reading this book yet, and I will study more in-depth things in the future when I have time.

It is necessary to brush the questions, you can understand a knowledge point to find the corresponding questions to do, or you can finish the basic knowledge before doing the questions. Of course, the first choice for the platform is LeetCode, which has nearly 1,000 questions so far. It is recommended to use C or C++ because they are general enough and have concise syntax.

At the beginning, try to choose all Easy questions, and then move on to Medium and Hard (you may find that some Hard questions are easier than Easy 😆).

You should take it as a process to exercise your thinking. Don’t go to discuss at the very beginning. Try to ask for help after thinking for at least an hour without any results. It doesn’t matter when you are busy, you can look at a problem in the morning, and then think about the behavior of taking the light rail, going to the toilet, which will not be distracted and appear security risks. In the evening, you can summarize and knock on the code to achieve it. In fact, many times you may have ideas before the evening.

Remember that algorithm learning is based on thinking rather than memory, must cultivate the ability to draw inferences.

I have brushed about 100 questions back and forth. Due to other study plans at present, I did not continue to brush questions. But I will resume the habit of brushing one question every day after some time. Software engineering can be said to be the composition of data structures and algorithms. Learning them has fundamentally changed my thinking, which will make me more efficient and cut to the “key” when THINKING about problems.

This is also an important aspect of performance optimization, that is, algorithm optimization, through more efficient algorithms to reduce the time complexity, thus reducing the CPU computing pressure, a typical example is to replace violent sorting with “fast sorting” and other advanced sorting.

I also wrote a simple blog post: Algorithmic Thinking: Quick sorting and Merging of Singly linked lists

Read excellent open source code

Reading excellent open source code is an effective means to improve professional ability, and the process of learning source code is also a process from “code farmers” to “engineers”.

In fact, open source projects involve a lot of things, including algorithms, operating systems and other knowledge, so when certain knowledge is needed, it is necessary to learn it first, which leads to the understanding of an open source project with few codes may take a month. I chose to learn YYKit before, because the author’s code is elegant, efficient, standardized, and looks good, and can indeed be used as a fine source of choice.

Later, I found a lot of things are common, this common from why to do, rather than what to do, for example, YYKit inside a lot of things are for a point – optimize performance. With this purpose to think, it is not difficult to find the author’s code intention, understanding will get twice the result with half the effort, which can achieve a resonance with the author’s thinking.

So reading open source code is like learning algorithms. You should focus on thinking, not memorizing. It’s easy to read a programming language that knows the technology stack, but it’s not easy to get a deep understanding of the ideas behind open source.

In the end, I spent a lot of time on in-depth reading, did a lot of research and experiments, and consolidated one skill: performance optimization, and produced several blogs:

  • YYModel source code analysis: focus on performance
  • YYCache source code analysis: highlights
  • YYImage source code analysis: image processing skills
  • YYAsyncLayer source code analysis: asynchronous drawing
  • YYWebImage source code analysis: thread processing and caching strategy

Behind I also went to read about other source code, such as SDWebImage, FDTemplateLayoutCell, etc., from the efficiency of reading is really greatly improved, and a lot of things I do not want to look at, because the truth is that truth, when you need to go further.

Through reading the open source code, I have formed a habit. When I use someone else’s code base, I always like to look at his code when time permits, so that I can see the rigor and professionalism of the library through the code. If the code is too bad, pass it. If it is average, you can do some optimization appropriately. It’s a good habit to avoid becoming a COPY expert.

Another benefit of reading good code is that you will have a deeper understanding of code quality, which will make you more strict with yourself in future code, for the benefit of your teammates 😏.

That is, if you really understand it.

The Code Quality Blog I wrote: What is Code Quality? Write code in your head

Operating system and compilation principle

Operating systems and compilation principles are very basic knowledge that is rarely covered in application-level business development, but can play a vital role in some of the more advanced requirements.

Performance optimization is usually to reduce the CPU/GPU pressure, which requires a deep understanding of processes and threads, as well as the memory pressure caused by space conversion and the efficiency of reading and writing I/O devices. As for some operating system theory things, knowledge is definitely the improvement of thinking ability and architecture ability.

Startup speed optimization is a deeper topic because you need to be familiar with the whole process of compiling and linking, which is not something an average engineer can do well.

Of course, there are many scenarios where operating systems and compilation principles in application level development are still technically knowledge barriers, and learning them will distance you from the average developer.

I bought a huge book on operating systems called “Understanding Computer Systems in Depth.” I skimmed through some of it and found it a little confusing, so I skimmed through and only looked at some of the things I needed to know so far. This book I think it is necessary, can be used as a reference book, when the need to turn over.

The compilation principle is “Self-cultivation of Programmer – Linking, Loading and Libraries”, which is recommended by five stars and is neither too obscure nor too simple. I have read about half of the book so far, and found that some things I didn’t understand before are now clearly understood. This book must be read closely, because many parts are related, and when you see something that you don’t understand, you should review the previous chapters in time. It is also worth reading it several times.

I wrote a simple blog post about multithreading: How iOS uses multithreading efficiently

6. Design mode

Architecture needs to be supported by design patterns. An excellent code architect must be an expert in design patterns. Design patterns are the summary of software architecture ideas in the history of software development.

One of the books I read was The Path of Objective-C Programming for iOS Design Pattern Analysis, which slowly began to sort through my scattered understanding of design patterns. Since I already knew and applied some design patterns, it seemed very fast. It was worth noting that the concept of design patterns was very simple. The hard part is being flexible in your business and being familiar with the strengths and weaknesses of various design patterns. The book is very careful, with case studies for every design pattern.

The trick is to learn design patterns not by memorizing concepts, but by memorizing class diagrams to understand their applicability and limitations.

7. Computer networks

Every engineer should understand the principle of computer network, as long as the software development almost have to contact the computer network, if the principle is ignorant, when the emergence of professional network problems or the need to do network optimization at the bottom of the time will be at a loss.

To understand it is not to master it, just to have a rough idea of how a complete network architecture works.

I chose to read two books: Illustrated HTTP and Illustrated TCP/IP. Speak very easy to understand, can basically establish the knowledge structure of the computer network.

Open source projects

This year, I made a practical open source project: YBImageBrowser, and wrote two articles to introduce its principle: iOS ImageBrowser (powerful/excellent performance) to build a high performance iOS image browser (support video). The first is the old version, the second is the new version. Between the first version and the second version, IT happened to be the time when I learned the algorithm and read the open source code. After the technical improvement, I really could not bear the garbage code before, so I rewrote it.

Of course, now look back, the new version of the code or some bad places, such as time to optimize it 😆.

Building your own open source project is a great experience. It’s like raising your kids to work for bosses who are demanding and you have to educate your kids to make them better.

It is also an improvement of my ability to make appropriate optimizations and errata based on the opinions and suggestions of the open source community.

About blogs

Articles have been posted on most of my blogs, and they are basically the product of a learning process. Consider the purpose of blogging first, whether it is to attract fans or to summarize and improve your skills. If the former can write some basic popular science articles, if the latter try to write some technical depth or ideological depth of the article.

My goal in blogging is simple – make sense.

What is meaningful? A search engine can find almost the same article, there is no original understanding of the ideological level, there is no depth of technical level, that is meaningless; As long as the integration of their own ideas or a certain technical depth of the article is meaningful.

Of course, this is my opinion, no one else’s.

conclusion

In general, 2018 has been a full year, with technology making great strides at the expense of reducing entertainment time. I gradually got used to this way of life, maximizing the value of my time while maintaining proper entertainment.

One of the most comfortable lifestyle is to pursue into a hobby, which is probably the best guarantee for me to stick to it.

‘.

Happy New Year.