XX Thinking in a Week (Issue 12)

Hello, everyone, here is a record of what I encounter or think of every week, and the thoughts of things that are touched or moved. This is the 12th issue of [One Week XX Thinking], not necessarily all right, but it is always good to start thinking.

 

Reference and inheritance

 

The first SOA, and then microservices, then in fact microservices are the sublimation of SOA.

 

Take the front-end development again, from the native direct drawing interface of Windows to QT-based Web hybrid development, and then to mobile cross-platform solutions such as applets and Flutter.

 

Then there are more examples like N, and there will be endless new technologies and new architectures.

 

But these metropolises inherit and learn from.

 

"My life has boundaries, and knowing has no boundaries. If there is a limit, there is no limit.

 

Therefore, we must be good at finding unchanging content and thinking about what is unchanging in order to respond to the changes with the unchanging.

 

Why can a computer perform infinite possibilities

 

The computer here can be understood as our PC.

 

How is the computer composed, PC=CPU+Storage+I/O device.

 

What is the principle of computer operation? The CPU reads instructions from the storage, then executes the instructions according to the instructions, and then executes the instructions one by one.

 

How does the computer execute the infinite possibilities? The infinite possibilities here are not fixed. Whatever you enter, he can execute anything, as long as no error is reported.

 

To achieve this goal, the most important thing is programmable.

 

Read the article "A Macro Perspective of Architectural Design" in the geek column this week and see the following description.

 

The CPU instruction is a very limited instruction set, but the execution sequence executed by the CPU, we also call it a program, is not fixed, but depends on the data stored in the storage-determined by the software written by the programmer.

 

However, the possibilities of the sequence of instructions are endless, which means that the possibilities of what the computer can do are also endless.

 

The role of architecture

 

There can be many dimensions when talking about the role of architecture.

 

This week, I saw the following sentence, which was also read in the "Macro Perspective of Architecture Design".

 

"With the stronger infrastructure support, the more convergent the issues that need to be paid attention to in application development, the higher our development efficiency"

 

To understand this sentence, as we often say, one of the main purposes of the layered architecture is to isolate concerns, which are somewhat the same. The "convergence" mentioned in this sentence is actually a concern to a certain extent. the taste of".

 

To give an example to illustrate the point of view of the above sentence, there are many ways, such as whether it is a layered MVC architecture, or an inwardly dependent on a clean architecture, or a hexagonal architecture, which can explain this point well.

 

However, I cited an example in the article, which I think is very good.

 

The reason why a programmer can program comfortably and make the code run on the computer is based on the von Neumann architecture at the bottom, with the operating system and programming language on top, and the middleware basic software on top , Such as Dubbo, MySQL, etc., and then application frameworks such as spring framework, etc., what is on the top is our business architecture.

 

Just imagine, if we don't have the infrastructure of the various layers under the business architecture, can we write code comfortably? Is there any code that allows us to write code to interact with other software systems easily?

 

 

What is the essence of programming

 

Sorry, there seem to be more questions this week, but when you think about it this way, how do you understand it?

 

The output of programming is software, and the role of software is to solve problems. How do we generally solve problems? Decomposition.

 

That is, if we encounter big problems, we will break them down into small ones, and if we find that small problems are still big, we will continue to break down into smaller ones. "Trivialize".

 

Then, we will give solutions to these small problems, that is, we write code to solve these small problems.

 

Finally, there is the essence of programming: we have to combine these code fragments to produce the solution to the original big problem.

 

Conversely, if we can't combine these code fragments and restore them back, then our original decomposition of the problem would be meaningless.

 

For this argument, you can search the article "Functional Programming and Object-Oriented Programming [5]: The Essence of Programming" for a more detailed description.

 

At the same time, this article also mentioned the area and volume of the code, which is indeed the first time I saw this statement.

 

Code area and volume

 

Personally, I think it’s a bit too good. I will directly introduce the original content:

 

So, what is the correct code block for program composition? Their surface area must grow more slowly than their volume. I like this analogy because the surface area of ​​a geometric object grows at the rate of the square of the size, and the volume grows at the rate of the cube of the size, so the surface area grows at a rate less than the volume.

 

The surface area of ​​the code block is the information we need when compounding the code block. The size of code blocks is the information we need in order to realize them. Once the implementation of the code block is over, we can forget about its implementation details and only care about its interaction with other code blocks. In object-oriented programming, the declaration of a class or interface is the surface. In functional programming, the declaration of a function is superficial. I simplified things a bit, but that's the point.

 

Orthogonal design

From a certain perspective, the essence of software design is separation and integration.

 

Why do we need to join after separation? We also mentioned in the above [Essence of Programming], but that is explained by code snippets, which you can understand as a micro-level perspective.

 

If you modularize a single system and combine it across processes, it is a macro-level perspective. By what combination, it can be an API.

 

These are combined, but orthogonal design is about how to divide when dividing, that is, orthogonal design is not a guide to combining.

 

The so-called orthogonal design means that when we split a system or a business module in two directions, changes in either direction cannot affect the other direction, which is orthogonal (in fact, it is mathematical A concept).

 

 

 

Three people must have my disciple

 

"Three people, there must be my teacher", from "The Analects of Confucius. Shuer", everyone knows the meaning, some people are together, others' words and deeds and even thoughts and knowledge, there must be a place for me to learn.

 

Humble, sensitive and studious, and not ashamed to ask, these are virtues.

 

So, now back to an essential question, the logic of learning, how to learn, and how to learn well.

 

The best way to learn is to learn actively. One of the best ways to learn actively is to share, then get feedback, and then revise. Such a path is optimal.

 

However, if I always feel that the knowledge I have so far, the thoughts I summarized, are very low, I share it, and others will not watch it, let alone give feedback, so I have to learn from others.

 

The obstacle here is that there is too much awe.

 

How to break this obstacle.

 

This week I saw an article "The Logic of Learning 3: Three People Must Have My Disciple", and I have a unique insight into sharing.

 

In fact, this obstacle can be easily removed by lowering the barriers to sharing and teaching. Don't think of PPT, projectors, and a crowd of audiences when you talk about sharing and teaching. Not that complicated, sharing is chatting . When you have an idea, you can talk to someone at random. If you understand it, you can give you feedback. If you don't understand it, you will be forced to find a more understandable expression. And if you have to chat more than once, chat with more than one person, chat more times, you will find that your ideas are more complete, and some new points have emerged.

 

For this, the article also gives a certain theoretical and logical basis:

 

Three people, there must be my disciple . Because the master and apprentice must appear at the same time and define each other. There is no teacher without an apprentice, and there is no apprentice without a master. Therefore, if you agree that the trio must have my teacher, you will naturally understand that the trio must have my disciple, and there will always be people who gain valuable knowledge from your sharing. Sharing comes with the sharer’s own experience and perspective, and no two people have the same perspective. As long as you are not surrounded by people who talk nonsense, there will always be people who combine your perspective to get new insights.

 

But there will be a "side effect", as described in the text:

 

One side effect is that you become a talkative person in the eyes of people around you :)

 

 

What is the relationship between reading and writing

 

If you read and read often, you will be able to write well.

 

The conclusion is that reading and writing are not causal, but related.

 

It’s not that you can write because you read, but if you read more and read more, you can work hard when you write. How to use words and how to make sentences can be used. A subtle effect.

 

I remember that I mentioned in my previous XX thinking that fetching water from a bamboo basket is not a waste of time. In the end, you will find that "the basket becomes clean".

 

The reason for this question is that when I got the column of "Compulsory Courses for Parents of Primary School Students" this week, I saw the reader's comments and the author's reply.

 

Yes, looking at family education, I didn’t expect such a gain. The specific content is as follows.

 

             

 

What is really understanding

 

Let us take a look at Li Dan’s understanding and interpretation. The following is an interview with Li Dan by China News Weekly. When I personally read it, I think it makes sense. The screenshot is as follows:

 

             

 

Lose-lose

 

I went to the high-speed rail station and took a taxi on Didi. I chose an express, taxi, special express, and special taxi. Among them, the special taxi showed 8.5 yuan, which was 4 yuan less than usual.

 

When you arrive at your destination, you are prompted to pay. As a result, you can only choose Didi Pay to have this discount, but you have to help with a bank card, which is a bit troublesome, because the WeChat payment was used before.

 

The driver said, try to pay before getting off the bus. Of course, I also want to get in quickly.

 

I had to give up and chose WeChat Pay. I didn't get the discount. Didi Pay did not add new users.

 

Lose-lose.

 

Then I was thinking, why didn't Didi choose the discount when I was choosing the car, and remind me that users should be allowed to tie a bank card in advance, so that I might be able to do it on the road.

 

End of this week.

Title picture: Gourd moment

Guess you like

Origin blog.csdn.net/wangxindong11/article/details/109685417