Problems encountered in improving development efficiency and summary

Recently, in the course of developing AI sports, because there are many course actions, the following attempts have been made to improve development efficiency:

1. Encapsulate some codes with high similarity into functions, which can improve the efficiency of writing codes and reduce the error rate of code typing errors, making the course codes clearer.

The problem I encountered: When I put the new function in the Base class, I missed a return, which caused some inexplicable problems when I called this function in the subclass. For example, the app often flashed when calling the algorithm model. Back, due to the long state transition inside the program, it took me a long time to find this problem.

2. Added action subdivision time synchronization function.

The problem I encountered: Since the product manager temporarily decided not to add this function for testing, I had to roll back the code to the previous version or block the new action subdivision time synchronization function on the original basis. At that time I chose to roll back the code to the previous version, but a functional module could not be rolled back to the previous version due to optimization, so I manually blocked the newly added action subdivision and time synchronization function. I was lazy here and just blocked it. The time module that needs to be used is lost, which eventually leads to the probabilistic flashback of the app when testing AI actions. After analysis, it is caused by the continuous timing of the remaining time module.

Guess you like

Origin blog.csdn.net/wzhrsh/article/details/118661634