It refers to the place where bugs may occur when writing code to a new project. It accumulates and avoids bugs.
(1) when using the control, it is easy to forget findview after declaring the variable.
In this way, when the program runs, a null pointer will be reported. Sometimes the business logic in the project may be complicated. If the test is not a crazy test, some logics will not be accessible, some settings in the project's launch background will let the program go to a code segment that may report null pointers. Silly!
(2) Various numerical conversion processes, such as converting a string to an integer, can easily throw an exception.
It is best to take necessary preventive measures, such as adding a try statement or some early judgment statements. If the background developers do not strictly control the data input, then wrong data will crash your application. In short, do not trust users because they are not developers.
(3) initialization controls and initialization of some data in wrong order
We may often write projects that like to divide the initialization control and the initialization data for the control into two function writes, so pay attention to the execution sequence of the two functions. Don't be so careless. This will also hide bugs in (1.