Serialization: Object-oriented sunflower collection: thoughts, skills, and practices (35)-Nop principles

Source: Internet
Author: User

NOP, no overdesign priciple, do not over-Design Principles.

 

This should be the first time you have seen this principle, and you do not need to check the Internet, because it was not created by the masters, but by me :)

 

The reason why I put forward this principle is that I have suffered a lot and many people have suffered a similar hardship at work.

 

You may have seen the following scenarios:

The product puts forward a demand. The designer's vision is very long-term. He even proposed and designed the possible business changes in five years, so that you have to admire the designer's foresight, and I sincerely admire it from the bottom of my heart: Awesome!

 

But soon you will find that the designers are awesome, but you are very hard-pressed during development. The design scheme is extremely complicated, and the workload is huge. Even if you carry forward the spirit of being hard-pressed and tired, I have worked overtime for three months every day and finally made it. But you have been forced to finish the test, and the test has been followed by the hard work: there is no way to test a lot of things!

 

How can this happen? Isn't we doing object-oriented to cope with changes and embrace changes?

 

The answer to this question is actually very simple. Confucius has already answered the question for us in the Analects of Confucius: "Zi Gong asked: 'The Teacher and the Merchant are also wise? 'Zi Yue: 'The Division has passed, and the business is inferior. 'Said:' But the teacher is getting better and better? 'Zi Yue: 'is too late. '"

 

When something goes too far, it will have the same effect as failing to achieve it. The object-oriented design is no exception. Although the original intention of object-oriented is to embrace changes, this change also has a degree, rather than the longer the prediction, the better. The reason is simple: the longer the prediction, the less accurate the prediction result! Who can predict the decline of sun in 2000? Who can predict the rise of Apple in 2005?

 

In addition to the problem that the longer the prediction time, the worse the accuracy, the excessive design will lead to unnecessary complexity of the design scheme, a large amount of code, the input and output are not proportional, the project plan cannot be completed on time ...... And so on.

 

Sometimes over-design has a greater impact and harm than insufficient design, because if there is insufficient design, we still have the powerful tool of "restructuring", and there will be no waste of human and material resources;

If the original design is incorrect or unreasonable, the original investment will be wasted first, and the reconstruction will require more manpower and material resources.

 

Therefore, the NOP principle should be kept in mind during the design process to avoid over-design!

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.