Mint health collapse. What caused it?

On April 13, some netizens reported the healthy collapse of Mint. In this regard, Weibo, the official of Mint Health, said: The programmer's little brother is repairing it, and he will go to worship the heavens when it is finished. Thank you. Mint health collapse. What caused it?

Mint officials didn't say what caused it, so we roughly guessed that there were only six kinds:

1. Memory management

One of the problems is memory management. The application may be running too many threads and occupying memory resources, or there are too many open applications running on the system.

2. Software lifetime

Iterative application development process and its frequent release open the door to bring feasible products to market, and then improve them over time to build an audience. However, due to the dependence on operating system and third-party API, the loss of traditional software life cycle will bring serious complexity.

3. Insufficient testing

The need for testing is obvious, but getting enough coverage, especially in the case of too many Android versions and devices, can be challenging. There is an emulator, but the software running on the server may not show the same performance limitations. For example, one thread of an application may try to read a database and another thread may try to modify the same database. ? This is a matter of time, which can be covered up by simple log statements. ? Simulators usually do not show the same basic performance limitations as mobile devices, so the competition conditions are not obvious. Some services can run pairing of different devices and operating system variants and make them available, but this may be more expensive than emulators. Choice becomes a trade-off between budget and demand.

4. Network management

With the increasing dependence of applications on network access, whether it is data or third-party services, network management has become a source of trouble.

5. Error conditions and exception handling

In view of the complexity of mobile development, some mistakes are inevitable, whether it is unexpected API changes, avoiding previously detected memory problems, network conditions leading to connection interruption, or even slowing down data speed when transmitting large files such as images or videos.

Between this situation and crash is good error and exception handling. In this way, the application will not be triggered by an accidental attempt to divide by zero, an incorrect response from the user, or a temporary loss of an API or connection that suddenly starts to provide text instead of numeric values.

6. Too much code

But maybe a good suggestion is to keep the application simple. Provide a single-purpose tool that people want, and write the necessary code only by practice. ? Okay, error-free code is code that you don't write.

Postscript: To sum up, after all kinds of software detect anomalies, developers need to optimize them. The optimization process requires personal experience, care and patience. Generally speaking, solving performance problems is persistent and boring, and you need to calm down and feel it. Therefore, programmers really need patience.