Bottom layer and upper layer, bottom layer
Today, I chatted about the underlying and upper layers of programming. In terms of computer systems and even the whole human society, layering can be said to be the most basic architecture. The more underlying the module, the more core the problem is resolved. Then, the upper layer calls the underlying interface to implement some relatively responsible functions. This layer-by-layer encapsulation method is used. We use a transistor to achieve the current cool information age.
For the current impetuous software industry. When coding, programmers can use upper-layer interfaces, and even find third-party libraries when upper-layer interfaces cannot provide the desired functions. This is also normal to improve efficiency. However, for a real programmer, it is necessary to understand the underlying layer as much as possible.
The most direct advantage of understanding the underlying layer is that you can implement the functions not provided by the upper layer interface. Take Apple Software Development as an example. You can call the UI Layer and NS layer to implement most of the functions. However, you must call the coreGraphics library to implement the functions when complicated plotting problems are involved. CoreGraphics is an underlying layer relative to the UI Layer. It provides the drawing function required by the UI Layer. Furthermore, the coreGraphics library must be implemented by openGL. When it comes to higher-end functions, for example, when you need to implement pixel-level control over a graph, coreGrphics cannot provide such functions. You must call openGL functions to do this. This is the underlying layer. This is also why the exciting online animation effects are directly done using openGL. I saw a ripple animation with hundreds of lines of code. It was so cool that people who didn't know openGL could not do it. This was the Internal Skill of programmers.
For example, for the computer network, HTTP, and tcp implementation, if you know TCP, you can choose not to use the web method at a specific time, use TCP to design and implement a network architecture that is more in line with the current business logic and with higher performance. Further, if you know the IP layer, you can even skip TCP and design your own transmission control protocol.
The more you understand the underlying layer, the more efficient or awesome functions you can achieve. Think of it, the server of a certain game company that I heard of was calling the most frequently used modules for writing directly, even specific computing logic units are directly made into hardware.
Maybe many people now think that the upper-layer interface can be implemented. Why study the underlying layer. This is why JAVA. NET programmers are pseudo programmers on the Internet, because these systems are encapsulated so well that they have powerful functions that programmers can make programs without understanding too much. There should be a lot of people who only know HTTP, don't know TCP, and UDP. That's why there are too many enterprising people, so the whole JAVA and. net programmers are lowered, and the reason for the C language to despise them is also given. But in fact, people who really understand the. net runtime and find out the entire famework architecture are still great. JAVA, let alone struts hibernate Spring, the three powerful frameworks. If one can tell how these three frameworks are designed and implemented, can you say that they are not awesome ?, From the perspective of the language itself, it is estimated that anyone who understands the language from the compilation principle level can become an artist. The more you look at the design and implementation methods of a system from the bottom layer, the more open your mind.
When should I learn the underlying layer? I think, as a programmer, as a person who is interested in getting rid of the pseudo-programmer's identity, I should go to the underlying knowledge when I am free, instead of checking it when it is used. Sometimes, it seems that you can call an interface to implement the function. If you can understand the implementation principle of this interface, there are many advantages. In addition, if you never use it, and never learn it, the level will never improve.
I was wondering how I would talk to an ios programmer if I was an interviewer. Do you know the principle of delegation. Do you know about notifications? Do you know how notifications are implemented. What do you do if you implement the same function in a system without notification. Do you know block? Do you know what the system has done before the block is compiled. What kind of classes in OC become after preprocessing? There is no class in C language, and OC is extended from C language. How does it implement the class function. I suddenly remembered that when I was looking for a job a long time ago, the hardware-born buddy told me about the underlying principles of Linux, the compilation process of Linux programs, and the role of makefile files. I suddenly felt so sad.
Zookeeper