Hard constraints of Software Development

Source: Internet
Author: User

Hard constraints of Software Development

During the supermarket checkout, the cashier will give us a small ticket. Sometimes we buy two or three items for the same item and print them on the ticket. Sometimes there is only one record, and the number is three, but sometimes there are three records, and the number is one. This phenomenon is very interesting. Why is it not uniform? And I have observed that there are more situations in the latter case. It is clear that the previous method saves more paper. Why is it less used?

I once imagined that the Cashier's machine has poor performance and few memory. It can only maintain a simple array structure and cannot maintain a set, you cannot scan the array again for modification every time you add the same item. However, if you continue to observe, you will find that this statement is untenable-the performance of the modern cash register is good enough, and even the performance of mobile phones is advancing by leaps and bounds. So what is the reason for this? Just as I was puzzled, an occasional opportunity unlocked my doubts.

At that time, we had to develop a shipping management system. In order to save paper and pursue the "Beauty of the program", I decided to select the "single-line multiple records" approach, that is, "one row of records, the number is 3 ", because the hardware performance is more than enough. After the program development is complete, the test is completely normal and everything goes smoothly. However, after practical application, my colleagues in the warehouse were very dissatisfied with this. They strongly demanded that each row correspond to only one piece of goods, and multiple items of the same goods must have multiple records. Well, I have a chance to see why.

When I saw it on the ground, I instantly understood what was wrong with the record of multiple items. First of all, you are used to scanning a piece of goods once. You need to print a line of records on the corresponding list to confirm that the scan is complete. Of course, we can say that you can use other methods to prompt, such as flashing the screen or making a sound. However, the list generated by the scan will be used by the employees of the next process. When dealing with the goods in the list, he certainly wants to drag a line from the list when each item is ordered. If this line corresponds to more than one item, he can only write the word "positive" next to it to count, and the efficiency is naturally greatly reduced. if you carefully observe the restaurant waiter's serving process, you will also find this point, but few people will take two portions of a certain dish ).

I was very touched by this discovery. Probably because I have been working on "pure" software products for a long time, although I have to consider dividing boundaries, separating responsibilities, and designing the architecture, these are all "soft, there is no "hard" constraint: a function and a responsibility are put here. Although there are architectural considerations, if you really want to modify it, there will usually not be too many problems, so even from the logic and beauty perspective, there is no problem. The most typical message transmission mode can be "push" or "pull". Generally, there is no big difference. However, many problems in the real world are not as simple as this. Limited by devices and scenarios, you can only "pull" or "push" in some cases ". For example, some mobile devices are limited by power consumption, so "pushing" is certainly better than "pulling ". For example, in the face of such "hard" restrictions, if we only shut ourselves down in the office to build a car, even if the program is well written and the architecture is beautiful, it would not really solve the problem.

Do not think that only the software is "hard" constrained by the environment. Sometimes, the environment is also "hard" constrained by the software. If you have paid attention to the product manuals, you will often find that many products provide multilingual manuals. The texts described in this article do not require too much space and the versions of each language are printed, the cost of the Manual is many times higher. In fact, the target market language of the product is almost definite. Why do we need to waste the cost of multiple language manuals?

It wasn't until I visited the production line in the factory that I realized why: software can be freely separated and combined, but production lines cannot. According to the actual situation, the production management system used by most processing plants can only support "single raw material table, single process, single product production ". If the product is sold to different target markets, the production management system will not be able to separate the "put into the Manual" link as a variable and put it into the "template" of the production process, "the production process of the ontology is the same, and the specifications used for packaging are different ". Even if the production system supports this, the production assembly line cannot be arranged as the station combination of the entire assembly line is fixed. Yes, the advanced production management system and production line can support this "template + variable" mode, but the cost for implementing it is too high.

Therefore, if you do not need a multi-language manual, you can only assign different production processes to different markets). In this way, if a process needs to change, all production processes need to change, the cost is too high. Therefore, we can only go back to the next step. simply spend more time and print the only variable, the instruction manual, into multiple languages. Although it seems to be a waste, it is the most economical and convenient way.

This type of problem seems very simple. I still think it is worthwhile to talk about it because I found that with the development of the Internet, especially the mobile Internet, software is increasingly involved in all aspects of life, and more and more will be constrained by the reality of "hard. In the past, software development was more independent, so everyone had to learn how to "use the software". Software developers were entitled to the right to "change and change" at will. However, since software is "soft", it should be like water, there is no fixed form, but it can penetrate into every corner of the real world-many times, what determines the value of software is no longer an advanced technology or a complex architecture, but whether it can get along with reality. As a software developer, We need to repeatedly ask ourselves what problems are to be solved and what restrictions are imposed, and then propose a solution that focuses on the direct pointing problem. In this regard, I have also encountered examples that impressed me.

At the shipping position of the parcel, the receiver must weigh the weight of the parcel and scan the barcode above. The Electronic Scale and scanning gun are connected to the computer, and the cursor will automatically move in the normal process without manual intervention. However, in some cases, cancellation, rollback, confirmation, and other operations are required. According to the common solution, a keyboard or at least a keypad is required. As a result, not only is one additional device configured, but the operator also needs to transfer hands to operate multiple devices. Later, a member of my team gave me a clever solution: to take the common operation conventions such as cancellation, rollback, and confirmation as an operation code and print it out with a bar code and paste it on the console, the operator can do all the work without leaving the scanner: scan the barcode to cancel it; scan the barcode to return it; scan another barcode to confirm it ......

I must admit that although I have been developing software for many years and solved many problems before, the solution I came up with was "How to simplify keyboard operations ". It wasn't until I saw the code scanning solution. It turned out that the software could do the same thing!

Then, the software should be able to do so in the future.
Link: http://www.cocoachina.com/programmer/20150228/11184.html

Related Article

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.