The function name does not reveal the function's purpose.Modify the function name.
Motivation: A strongly advocated programming style is to break down complicated processing into small functions. However, if you do not do well, this will make you fail to understand the respective uses of these small functions. To avoid this problem, the key is to give a good name to the function. The function name should accurately express its purpose. There is a good way to name a function: first consider the comments that should be written to the function, and then try to convert the comments into the function name.
You often cannot name a function for the first time. If you see that a function name cannot express its purpose, you should modify it immediately. YourCodeFirst, it is written for humans, and second, it is written for computers. A function with a good name is required. If you give each function a good name, you may save a lot of time. It is not easy to start a good name and requires experience. To become a real programmer, the level of name is crucial. Of course, other parts of the function signature are equally important. If you reschedule the Parameter order to help improve the definition of the code, you can do it boldly. There are also the Add parameter and remove parameter weapons.
Method: 1. Check whether the function signature has been implemented by a superclass or subclass. If yes, perform the following steps for each instance.
2Declare a new function and name it the new name you want. Complicate the code of the old function into the new function and make appropriate adjustments.
3, Compile.
4Modify the old function to forward the call to the new function.
5, Compilation, and testing.
6Find all the reference points of the old functions, modify them, and make them modify and reference the new functions. Compile and test each modification.
7And delete old functions.
8, Compilation, and testing.