庖庖 羊 ---- Division

zhaozj2021-02-17  77

庖庖 羊

---- Crowd Programming Thoughts

Author: HolyFire

After years of programming, I found that the idea of ​​programming is crucial to a programmer. I have got a problem. I will start thinking about how to implement him at a point, so I am smashing. It's ecstatic every time you get a bitter. The compilation and found that there was not enough to make a small program in the East to make up the West, and the feelings of the abnormally, the feeling of the time was like I completed the world, perhaps the era is my happiest.

I completed four or five programs, I started to find that I did a lot of repetitive labor, so I started to do my library, write a functional module. I think of these modules, as long as I write, I can use it to be infinite, maybe I am smart in that era.

When I wrote five or six thousand lines of code, I found that the function module I wrote is nothing wrong with what is done, and I am used to using others to write more than I have a good module, I began to confuse, I do Everything is for what. At this time, I started studying the code of others, and I started to understand what is optimized, what is the data structure, what is mathematical modeling, I started researching application mathematics and software engineering. At this time, I started using C to write programs, perhaps I wise that era.

When I wrote four or fifty * .h and * .cpp, I started to find that the class I wrote is not universal and cannot be used. I have begun to learn from learning and object-oriented, understand inheritance and packaging, then I have been thinking about what is important, so I started analyzing the problem rather than a startup code. Maybe I used to be a fool ^ _ ^.

I spent more than three years for more than three years. I was wasting my youth. Others need a year. (Of course, I have accumulated experience in three years, I can't do it a year, but for programming I waste time is too much), if you don't realize this, maybe a lot of time.

Analysis capabilities are an important attribute for a programmer. It directly related to your ability to understand things and organizational capabilities, and programmers do to decompose a matter into mathematics elements and reissue reappear in your computer. So how to be a matter of party is a point.

When we understand one thing and describe, we often deal with part of it, followed by another part, and then all parts are processed, the specific things will be reproduced. For example, give a person who don't know the goat, if you say that goats are goats, he will not understand anyway. If you say goats are two corners on their heads, there is a short tail, then he has some image in the mind, if there is a fleece, ridiculous Beard, 咩咩 咩咩 食 食 动understand. If you don't know what your computer doesn't have to explain, but if you can understand your document, you can see your documentation, and the detailed explanation is necessary. From the above process, it is a good way to divide things into small pieces. We call this process. Of course, the division can continue and continue to divide the divided small block until it cannot be divided. Of course, it is necessary to divide a goat that needs a comprehensive understanding of the goat, so it is necessary to have a comprehensive understanding of the problem when you divide your questions. It looks like a person who has not understood this problem is a contradiction, which is a matter of help to understand this thing and have to be well partitioned, but it needs to be fully understood. So we have to change, to change our approach. Let's know the problem first, then roughly divide it, learn about it, then roughly divide it, wait until you become a small piece that is unparalleled, let's organize it. And this time, we have a comprehensive understanding of the problem. At this time, we will throw away the repeating part of the small pieces (usually some repetitive parts), then combine these small pieces, think about it Only unloading eight goats combine, haha, must be alive, but there are lamb to eat. If you have a smooth combination, you have a good division of this problem and understand it very much. The future will be smooth, you must be full of solutions to this problem in your head. Don't worry, smart people will carefully see the process several times, and reorganize several methods. This is not only good for future and programming, but also the starting point for better solutions. Now let's dissect a goat, if you are willing to fine, animal enthusiasts please avoid.

Goat -> Brain -> Somatic -> Flood -> Tail

Brain body -> 五 官 -> chest -> Two forelimbs -> Tail -> Beard -> Abdominal-> Two hind limbs -> 毛 -> 毛 -> back -> Skeleton -> Skeleton -> Turn -> 毛-> Skeleton

Wasu -> Ears -> Eyes -> Nose -> Mouth

Containing -> Heart -> Spleen -> Liver -> Pulmonary -> Stomach -> Intestines -> Kidney Fruits -> Feet -> Feet -> Pavilic -> Skeleton-> Skeleton-> Skeleton

Finally, we get:

Goat's head body, the end of the head, the top of the pheasant

Remove the repeated part:

Goat's head body limbs tail 5 facies mustache fluffy skeleton chest abdominal back internal organs two front limbs two hind limbs tail ear eye nose mouth heart spleen liver lung kidney gastrointestinal foot foot

The final unparalleled submodule:

Beard velvet skeleton chest belly back tail ear eyes nose mouth heart spleen liver lung gastrointestinal foot

Now we re-combined it, it is not very simple. And there are not many things we need to deal with. Now let's describe the mathematics elements.

Beard: There are not many contours of many shapes, there are various colors.

Fluff: Very many contours of various shapes, there are various colors

Skeleton: a variety of shapes, there is a color

Chest: a shape of the contour, there is a color

Abdominal: a shape of a shape, there are various colors

Back: The contour of a shape, there are various colors

Tail: Silhouette of a shape, there are various colors

Ears: up to two contours of a shape, have a variety of colors

Eyes: the contour of one of two shapes, there are various colors

Nose: The contour of a maximum of one shape, there are various colors

Mouth: Silhouette of a shape, there are various colors

Heart: Silhouette of a shape, there is a color

Spleen: a shape of a shape, there is a color

Liver: a shape of a shape, there is a color

Lung: a shape of a shape, there is a color

Stomach: a shape of a shape, there is a color

Intestine: a variety of shapes, there is a color

Feet: Silhouettes of a variety of shapes, have a variety of colors

Now we have drawn quantities, outlines and colors. They are all common to all elements. We found the minimum division of the combination goat, although this is not the right answer, but roughly express a goat. This is enough. Ok, although there are not many, we have solved this problem in your mind.

2001/8/05

Ding Ning

转载请注明原文地址:https://www.9cbs.com/read-28802.html

New Post(0)