Online shopping is now more and more popular, and the most important basis for online shopping is logistics, is the Express company! We may have received more or less express, as a courier items, each has a single number, usually we log on the corresponding website, according to this number can be queried to transport the details of the transit process.
However, choose which express company to consignment is generally designated by the network merchants, need to know the courier company Information, and then according to the number of inquiries logistics information. Later, the Special Express Inquiry site found: Each Express Company's number have their own rules, generally have their own characteristics of the beginning or fixed mode! This leads to: although independent numbering, but different companies will not be heavy! Conversely, according to the courier number, experienced friends can guess which express company! So, some express inquiry site in order to facilitate user inquiries, simply do not need to choose Express Company, and directly from the system read the number of a number after their own judgment, they call it intelligent query.
The above process said some too smooth, usually, we need to slowly analyze the statement, along the way, I would like to share with you today a little data derivative significance.
Let's go back to the topic of Express, analyze the traditional query way:
1, designated a courier company
2, enter a number inquiry information
There are only two steps in simplicity, but this exposes a fatal flaw, not from the software but from the developer who developed the software! What kind of flaws? Let's take a look at the real life as a person, how to query The Courier information:
1, get the courier information, to see which home, personally to The courier company's network, or call its phone
2, ask if there is a specific number of information
Very similar, isn't it? As a person, this is reasonable, if you do not know which express how to check? Do you want to go all over the city for every express network? So logical thinking has been brought into the world of the program by the developers without hesitation! Need to emphasize that: human beings think their limitations are all limitations, people can not do things, the procedure can not do! You may have to retort that you have never thought of it that way, it's just that the idea is so ingrained that it's already undetectable! We said: The program is willing to run through the whole city of each express outlets, in order to help you inquire about this courier information, exhausted also willing to, can it? (here can refer to my blog before: "The world Martial arts, invincible, only fast and not broken")
Break through the limit of thinking, only later stories, this is particularly important, we fully consider the power of the program, will really think about the problem of the program and it should face the challenges! Of course, the challenge here is: Check every courier company's database, find a number!
We follow this train of thought, we can do subtraction in the world of the program! Suddenly, "brute force solution" has become some problems and even a panacea for many problems, the difficult things become seemingly simple, the so-called "juchongruoqing" may be the meaning of it! But more importantly, "brute force" is the source of motivation and knowledge, when you do a violent job, you'll find that the program presents you with a huge opportunity, which is probably the performance bottleneck for the entire system, and then it's optimized, for example, to retrieve 100 million of the data, and the conventional approach takes 3 seconds. You feel slow, very distressed, and do not want to lose the brute force solution brought about by the concise operating interface. Please allow me to congratulate you first, as long as you have really done this, you will fully understand a lot of things, including but not limited to caching, hotspot, indexing, parallel algorithms and so on.
Look back, what is this? This is the structural feature of the data that leads to the existence of brute force solutions, the brute force solves the infinite Temptation, it makes the interface concise, but it lets the procedure be slow, but the person is not only will dry stare, the person will go to the way, optimizes, goes diligently, therefore, we said: The data has driven the human development!
Well, the story is supposed to be over, and as usual, I'm talking about the idea of the data. Sometimes, want to use some concise words in this link, like today's topic, want is concise, isn't it? Then say: The data is the memory of mankind, but also the ladder of human development, this is a data age!
Come on, those who hold this tutorial that treasure of colleagues, learned things, far less than you do a vote of violence to solve the truth! Yes, by the way: which Express is still important?
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/project/