Just began to participate in programming, heard of such a joke: A programmer critically ill, a long coma, all kinds of drug treatment, are ineffective. Family in every sense of anxiety, a colleague came to see him, but gently said: "Ni-ma, the demand has changed!" "The programmer was immediately awakened!"
We have more than once sigh: demand is fierce in the tiger, change demand is fierce in the female tiger! So these years the software industry has developed countless technologies, to resist such or such changes, understand that some of them do help to write programs, but the reality is cold to tell everyone who has experienced: those are the symptoms do not cure the things, so busy with a friend like a human! However, there are still some tricks in the world, today I talk with you about how to calm face.
Let's start with a simple little story. Xiaoming's mother bought fruit for the child (what's the name of the child, please?) ), there are oranges, pears, apples and so on, xiaoming naturally like to eat, because greedy, xiaoming want to eat one, mother think of winter can eat so much cool things, so:
Mother and Xiaoming said: Want to eat pears?
Xiao Ming replied: Think!
Mother said: "So if you want to eat pears, you can not eat oranges and apples!"
Xiaoming thought: Then I still eat an apple!
Mother went on to say: you just said you want to eat pears, you see, Mom is ready to give you peel pear, let's eat apple next time is not good?
Let's stop and see this little story, actually I deliberately arranged some dialogue mode, let's take a look at it in detail. First of all, Mom's first question, "Would you like some pears?" In fact, she could ask, "Would you like an apple or an orange or a pear?" "But obviously not as the first way to ask, mother first put a temptation-oriented issue to xiaoming, rather than up to let xiaoming fall into the choice, because the mother know that Xiao Ming may love to eat pears, so directly is such a question." When a positive answer is received, mother immediately blocked the other choice, the child showed hesitation, want to change his mind, then is wandering period, do not encourage these ideas, must be timely with certain reasons graceful refusal, so, this decision to eat what is likely to be perfectly finished!
A fruit is a small matter, not so used calculation, but the work of things, it is worth a little bit of a little skill, I think you can complete this analogy, let us continue to say the next content.
The requirements of the initial set down, the late change a non-stop how to do? As you may have guessed, we have to talk about the role of data as a panacea in preventing changes in demand.
For convenience, we continue to tell stories. For example, someone is greedy, took a bowl to dish, there is meat, fish, lobster, but his bowl is so big, in order to clip lobster, he had to put the meat down, in order to clip meat, he had to put the fish down. No matter how tangled and greedy he was, he could only eat the same. This is the root of today's approach: creating conditions for mutual restraint, so that the needs of the creator need to consider the pros and cons, because there is a can not have B, in order to save B, he will seriously consider not a.
How do you create mutual restraint? If the plan has AB surface, that is the most convenient! But in the absence of obvious ab surfaces, the simplest solution is to use the data to make the rules a layer! For example, a customer is very obsessed with several options in the end who put the first question, you add the choice of the history of the selected, who was selected the most, let who become the first. So, the question from "Who is first", became: "Let the choice of the most choice to become the first", the rules are higher, to change this demand, it is always a bit strange, and it is difficult to describe this strange, as if: Originally, if let a become the first, I will attack a, said it can not be the first! If B is the first, I will attack B, say it cannot be first, but you now say "the most selected items" become the first, I attack who? No one can attack, I will all deny it, but I still do not know who I deny! In this way, I can only attack the rule, such as I said, "can not only consider the most number of choices!" "Oh, let's stop and see how we've been conditioned to many options!" Maybe you can see that any of the options and rules are contradictory, because the rules tend to be dynamic, and the option is static, they must be contradictory, valuable and magical is that the final choice of rules or from one of these options (there is a strong understanding of the ability, if you do not understand, please read it several times, after reading, You may not be afraid of demand! If the analogy to martial arts words: The world's most powerful shield, is invisible!
The rule is a layer, want to change, forcing the urgent I will again, we all know that the higher the level, variability is smaller, slowly not a few, easy to change this conclusion!
Well, the story is supposed to be over, and as usual, I'm thinking of a little bit of data. It is mentioned here that you must use the data to make the rules a layer! What is this for? In fact, you can use anything to make up levels, even you can imagine, but based on the data has unlimited charm
1, data can be read, and unreadable! Readable is the fact that a single piece of data exists, small-scale data can be summarized to see the effect, but the actual size of the data, users think they understand, in fact, he is far from seeing, the data scale will occur qualitative change, and the data are constantly changing, guide your program to stabilize automatic change, very appropriate!
2, the data is based on natural accumulation, without the need for mind construction, you originally want to save trouble, this is like your wish not to say, still can make the rule easier to describe, the province also to discuss the basis of the rules is what, based on the data is based on the facts, are the facts, but also what basis, ah, said can be resounding!
3, the data is more conducive to higher levels, mathematics is determined in the abstract, open mouth to a string of concepts, what the most, what the recent frequent, what proportion to achieve, much went. This thing is born of Johnson's, not envy.
4, more, you explore it yourself.
Come on, contradictions are not so embarrassing, because the embarrassment is not yourself, ask three high customers: Fish and Bear's paw, which do you want?
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/project/