The thinking of program design and fight

Source: Internet
Author: User
Tags abstract

The ultimate interpretation of fight is the way of attack and keeping, and the ultimate interpretation of program design is change and invariable.


The people who know how to cut the road are all aware that the philosophical thought of the cutting boxing is derived from the theory of Yin and yang, and the end definition of Bruce Lee's cut boxing Road is:

"To be unable to have the law, with infinite as limited." ”

But how can we understand these two words? Let me understand.

Nothing and there, this is opposites, the so-called can not be law, is the law, we all know that in the field of struggle, always have an opponent, and their own confrontation, if we set ourselves as none, and the other side for there, here is not the law, is their actions according to each other action, as Grandpa Mao said: The enemy into my retreat, The enemy returned me to fight. Thought is the same, the key is not me, but in each other. Bruce Lee in his "Cut boxing Road" there is a record of epiphany, is about water, if you treat water as your opponent, you can not overcome it, because it is based on your actions, and change their own form, to dissolve your attack, so you can not overcome it, so Bruce Lee on the display of the idea of the cut boxing Road, Be like water, according to the opponent's attack, to attack the opponent.

Established such a thought, you can measure a variety of fight technology, in line with the left, not in line with the elimination, so the cut boxing road does not set any routines, no routines, can be used any way, no door faction, to be absorbing.

What does this have to do with writing code?

We can apply the thought of the cutting-boxing way to the procedure, life, and study.

Program, change is the opponent, we learn all kinds of language, various frameworks, various models, the last code written out or not up to our requirements, in the face of new needs, still can not cope with, why. Because we learn these, but do not know what these things come from, and why, blankly, do not know the so-called, and this all the technology, and semi-finished, nothing but to solve a problem, is the problem of change, how to respond to change, and how to package the same, the past learning style, we are desperately grasp these things, In fact, it is by memory, and then in the place that should not be used, in the use of the place, and finally self-defeating, the project is not more robust, but more fragile, this is like we learn a lot of routines, but only learned the routine, in the enemy, or was suddenly defeated, how to do.

Cut the road told me: the elimination of flashy moves and routines, direct to the essence.

And what is the nature of the procedure? As has been said before, it is change. Use change to look at the process, use change to look at demand, use change to measure a variety of technologies, if one, we only need to know, change when how, unchanged and when, all with this training, can forget what frame, what mode. and change the way of handling, tossing and turning, only a few,

Abstract: interface, abstract class ... And what is abstract about it. Those things need to be abstracted. Classes are abstractions of reality, abstract classes and interfaces are abstractions of classes, and what are abstract abstractions? is to abstract the concept of a higher level of refinement.

Encapsulation: Abstraction is for encapsulation. The so-called only refined classification can be classified and stored. Thus, we can think of encapsulation as an abstraction of the concept of encapsulation, we abstracted out the concept, and want to let the concept of preservation intact from the outside world, then we must through some means, isolation, these means is the means of encapsulation.

Abstraction and encapsulation should be two sides of a coin, a constant iterative, evolving opposing side, an abstraction to respond to change, and the other side of the package that should change (that is, stable).

Program, many people just know the realization, but do not know how to achieve more elegant, only know to imitate, and do not know how to sublimate, and cut boxing Road, gave us another road:

1, determine the ultimate problem.

2. Solve the problem.


because no, so .

http://www.jianshu.com/p/81d42d88e01f

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.