On programming ideas

    From the birth of the first computer to the present for more than 70 years, the computer has always followed the architecture proposed by Brother Feng, which is based on binary computing, and is composed of five components that control storage and input and output. The development of hardware has ranged from transistors to small and medium-scale integration. From circuits to large-scale and ultra-large-scale integrated circuits, the volume is getting smaller and smaller, the energy consumption is getting lower and lower, the function is getting stronger and stronger, and the price is getting lower and lower. Portable networking and intelligence will be the future development trend.

    My personal experience with hardware is still in the good memories of overclocking the Pentium 166 jumper to 200 200 years ago without opening the cover, not getting hot, and not crashing (unfortunately, the motherboard does not support it, otherwise I will definitely challenge a 233 water cooling). Compared with the hardware system that has remained unchanged for decades, the idea of ​​software engineering has undergone tremendous changes, from process-oriented (POP) to structure-oriented (SOP) to object-oriented (OOP) to interface-oriented (IOP) to service-oriented ( SOA) and then the evolution of Aspect Oriented (AOP), but the emergence of the latter is not to eliminate and replace the former. Jianghu schools always like to argue which ideas are advanced and which languages ​​are excellent. In fact, each programming idea and language has its own application. Each application scenario has its own solution.

    Process-Oriented (POP): The idea of ​​process-oriented programming first appeared with the birth of the computer. The summary in one sentence is what to do first, then what to do, then what to do, and finally what to do. The program looks like a collection of data plus algorithms. The form of variables is scheduled to flow and process between algorithms. This pattern is very similar to human daily activities, so it is easy to understand.

    Structure-Oriented (SOP): The essence of structure-oriented programming is still process-oriented, but it pays more attention to the independence of logic, pursues top-down modular design, and partially solves the problems of standardization and normalization. A project contains several programs, the program contains several files, the files contain several functions, the functions contain several statements, and the statements are converted into several machine instructions and executed in sequence. When there are higher requirements for data complexity and security, the structure-oriented programming idea becomes insufficient.

    Object-Oriented (OOP): The idea of ​​object-oriented programming is to change the developer-oriented position in the process-oriented programming idea into the dominant position of all things in the world, isolate the internal attributes of things from the external environment, and emphasize the relationship between things. Contact and give them affiliation, define the scope of the object's responsibilities and capabilities. To sum up, you have me and you have me, you don't have me - inheritance; how much does it cost to do - overloading; you can do it better than you - coverage; who can do it - polymorphism. Object-oriented programming ideas, like the dinosaurs of the Jurassic era, quickly ruled the earth, and will not disappear until the next asteroid hits the earth.

    Interface-Oriented (IOP): The interface-oriented programming idea and the structure-oriented idea are similar to a branch system of the mainstream programming idea. Its essence is that as long as the developer strictly follows the definition (specification and constraints) of the interface, they can definitely get what they want. As a result of consistency, it weakens the concept of object attributes and methods, understands the object as an abstract body, and calls or extends interface functions to meet actual business needs.

    Service-Oriented (SOA): The idea of ​​service-oriented programming is to go further on the idea of ​​interface-oriented programming. The granularity of the two is different. The former encapsulates an overall function, while the latter encapsulates an object. This kind of thinking is more reflected at the architectural level rather than the coding level, and is mostly used as middleware for inter-system calls rather than intra-system calls.

 

    Noodle-Oriented Programming (AOP), the first time I heard the term Noodles, I felt strange. I have heard of noodles, noodles, and knives. The practice is fried, stewed, braised, and deep-fried sauce. Has the software industry developed to the point where it is necessary to eat noodles at the same time? Has writing code reached new heights? Later, an investigation found that the meaning was full of twists. The cut surface means the cross section, the wound surface and the cross section, and it has nothing to do with eating. I remember being often praised by the teacher when I was a child: This child remembers eating and does not remember hitting, and he has always been proud of it until now.

    In fact, the word section is quite vivid. The operation method is similar to that of plant grafting. A deep wound is artificially opened on the branch, so that the receptor and the ligand are closely attached, and the principle of cell proliferation is used to make the two wounds. Healing slowly, to achieve the goal of repaying a peach in return.

    The highest realm pursued by the aspect-oriented programming idea is to achieve the largest autonomous function with the smallest intrusion cost. In order to achieve this goal, several new concepts have been introduced: reflection, interception, chain of responsibility, dynamic agency and inversion of control. Knowing each concept is enough to write a book. Understanding is one thing and using it well is another. There are too many pits, one less to fill, and one to fill up as soon as possible to welcome the arrival of new technologies. In a few days, I plan to share the aspect-oriented programming ideas with a basic framework, which can also be regarded as a little incentive for myself.

    There were many programming ideas in front of me, but I didn't quite understand them. I didn't regret it until the interview. The most painful thing in the world is this. If you can give me a chance to do it again, I will say that I have to study hard, and if someone asks me what my future programming ideas are, I hope it is money-oriented!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325072388&siteId=291194637