Review Code table |
Review content |
Review results |
Overview section |
1) Does the code conform to requirements and specifications? |
Complete top three points calculated for top five score |
2) is the code design considered comprehensive? |
No, no change of performance function is provided to prevent accidental error |
2) How readable is the code? |
Strong |
3) is the code easy to maintain? |
Easy to maintain |
5) are each line of code executed and checked? |
Is |
Design Specification Section |
1) Does the design conform to a known design pattern or a commonly used pattern in a project? |
Use waterfall mode |
2) are there hard codes or strings, numbers, etc.? |
Yes, the score is hard coded when calculating the total score. |
3) Does the code depend on a platform and will affect future porting? |
The author uses windows+vc++6,. 0 development, but low block coupling, portability |
4) Can the developer's new code be implemented with the functionality of the existing library/sdk/framework? Is there a similar feature in this project that can be called without all re-implementation? |
There are a lot of sorts in this project, you can make the sorting function into a module and then call it in other programs. |
5) is there any useless code that can be deleted? |
No |
Code Specification Section |
Does the modified section conform to code standards and styles? |
(shown in the document) |
Specific Code section |
1) Are there any errors to be dealt with? For the external function that was called, did you check the return value or handled the exception? |
There are errors to be handled Call external function no return value check |
2) are the arguments passed with or without errors, the length of the string is the length of the byte or the length of the character, is the count starting at 0 or starting at 1? |
Parameter passed correctly No string passing |
3) How is the boundary condition handled? How is the default branch of the switch statement handled? Is there a possible cycle of loops? |
Switch does not write the default branch, only the input is the 0~7 case; No |
4) Is there an assertion to ensure that the conditions we think are not changed are really met? |
Assertion not used |
5) The use of resources, where is the application, where to release? |
When starting from the life cycle of a variable, it is allocated by the operating system and released at the end. |
6) Are there elements in the data structure that are not used? |
No |
Efficiency |
1) How effective is the code? What is the worst case scenario? |
Because of the use of sorting, the data is slow when it is large. O (n^2) |
2) is there an obvious and optimized part of the code, especially in the loop? |
Yes, the code uses a large number of sorts and is a bubbling sort, which optimizes |
3) is the call to the system and the network timed out? How to deal with? |
This code big data, time consuming, did not call other system, do not need network |
Readability |
What is the readability and the code? Is there enough comment? |
Highly readable Have enough comments |
Testability |
Does the code need to update or create a new unit test? |
Unit testing is sufficient |
Signature of review person |
|