"The beauty of Simplicity," the book is simple enough, 100 pages, there are a lot of white places. Now the publisher popular "XXX Beauty" of the wind, read the "Beauty of Mathematics", "architecture of the United States", "the Beauty of data" ... Several books of this name. At the beginning of the book, it seemed to be a philosophical analysis of what is most important in software design, and to incorporate software design into the field of science. The new content of the book is not many, but there are a few points of view left me a deep impression, more to emphasize the importance of software maintenance.
"It's much quicker to spend more time writing the program, and then spending a lot more time understanding it than at the beginning." ”
So you need to constantly refactor, or you don't want to look at the previous code.
"All software has a similar goal: to help others. ”
It seems that I put the software to make money is not a bit of a rush to do? If your software gives people a lot of help, the money may come with it, not making money, it means that the software is still useless.
"The highest priority should be given to which demand can provide the greatest help to people." ”
This is a good guideline for prioritizing requirements.
"The goal of software Design Science: to design software systems that programmers can develop and maintain as easily as possible, so that they can provide as much help as possible and continue to provide as much help as possible." ”
A little bit around, is to provide help, continuous help, maintenance simple.
The formula for Software design:
D is the feasibility of refactoring, VN is the current value, VF is the future value, EI is realized cost, EM is maintenance cost. When judging the value, you should consider: how many users will benefit from it? How often does a function play a value? How much value does a feature play when it comes to value?
Therefore, the software system needs to be maintained for a long time, in most cases, the future long-term return VF and maintenance costs EM is really need to consider, compared with the current value of VN and realize the cost of EI becomes insignificant.
In short, reducing maintenance costs is more important than reducing the cost of implementation.
We have developed too many 1.0 versions of the software, so we only see the left part of the equation D=vn/ei, but in fact if your software has to be maintained for many years, then the focus of this equation is on the right, d=vf/em.
Three major misunderstandings in software design: (1) Writing unnecessary code, (2) The code is difficult to modify, (3) over-pursuing general (over-engineering overengineering).
Do not write code that is not required, and you want to delete code that is not used. Otherwise, you'll create additional bugs that will cause problems for others, and you'll need to do a lot of work when you really need this code.
Avoid pre-optimization and avoid reinventing the wheel.
Don't solve problems that don't exist at all. Before you do that, you really get the evidence to prove that the problem exists.
Before adding new features, take the time to simplify any code that makes you or your colleagues feel less concise.
If you can't predict the future, what you can do now, and reduce maintenance costs, is to make the code concise.
now spend a little time to pursue brevity, in the future can save a lot of time.
How concise to what extent? Simple to fool all can understand!
No matter how stressed readability is: code is read much more often than written and modified.
Good design is not understand the code of the people can not see, so the software designer has become a thankless work, solve the major defects for you to win a lot of praise, but to avoid the occurrence of defects ... No one will notice.
There are already many products that have achieved great success because they are dedicated to a single purpose.
What resonates with me is probably so much above, if you want to see detailed notes, someone has been here to remember very detailed.
2015 10th: "The beauty of simplicity, the way of software design"