More streamlined code, more detailed comments, makes the project easier to maintain, because the nature of the project is not code, it is the algorithm, it is the implementation step,
If the code is not streamlined, very bloated, long time, the specific implementation process will be memory fuzzy, code bloated, and later it will take more time to read.
Sometimes you can do it while you're writing, and don't wait until later to refactor.
A few ways to streamline refactoring:
1 Extraction Method: Extraction of common functions, can be put into some general tool class
2 Extracting variables: Especially for variables that are used in many if-else structures, you can define an empty variable and then, depending on the situation,
To assign values.
3 Cut off variables: A complex system must have a lot of objects and variables, actually thinking carefully,
Some objects and variables can be cut off without affecting the principle of high cohesion and low coupling, a single principle
Two comments, if there is not too complex logic, it does not need to be too detailed, if there are more complex logic, it is better to annotate a bit more
More streamlined code, more detailed comments to make the project easier to maintain