Jia Yuhin: Design Form
Li Xu: writing code
Work together to refine the form and write code to see if there is a problem with the code structure and work together to correct code and structure errors.
1. Overview section
(1) Can the code meet the requirements and specifications?
Basically in line with, but many people draw a little lack.
(2) Does the code design have thoughtful consideration?
Yes, the input to the code is well thought out, but there must be some missing.
(3) What is the readability of the code?
Readability is OK, basically a look can understand the program's ideas and intentions.
(4) is the code easy to maintain?
OK, the structure is well-organized.
(5) Did each line of the code be executed and checked?
Check it out, no problem.
2. Design Specification Section
(1) Does the design conform to a known design pattern or a commonly used pattern in a project?
Follow the usual patterns and place the space where the user is accustomed to using it.
(2) Are there hard codes or strings/numbers that exist?
No hard coding, more trouble.
(3) Does the code depend on a platform and will affect future migrations (such as Win32 to Win64)?
No
(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 being fully re-implemented?
Some functionality may be implemented. Exist.
(5) Is there any useless code to erase? (A lot of people want to keep as much code as possible, because it might be used later, so there are a lot of commented-out code in the program file that can be deleted because the source control has saved the old code.) )
There are no clear, useless code in the code.
3. Code Specification Section
(1) Does the modified part conform to the Code standard and style (detailed provisions slightly)?
Code writing standards and styles are written in strict accordance with the code.
4. 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?
The error message is output in the code.
(2) is the parameter passed with or without errors, the length of the string is the length of the byte or the length of the character (possibly single/double byte), whether it starts at 0 or starts at 1?
Character, 1.
(3) How is the boundary condition handled? How does the default of a switch statement work? Is there a possible cycle of loops?
There is no dead loop.
(4) Is there an assertion (assert) to ensure that the conditions we think are not changed are really satisfied?
Not used.
(5) The use of resources, where is the application, where released? Is it possible to cause resource leaks (memory, files, various GUI resources, connections to database access, and so on)? Is there any possibility of optimization?
Called when it is used, and is freed after it is exhausted.
(6) Are there any useless elements in the data structure?
No
5. Efficiency
(1) What is the performance of the Code (performance)? What is the worst case scenario?
The worst case scenario is a program crash.
(2) in the code, in particular, whether there is a clearly-optimized part of the loop (in C + +, the class is repeatedly created, can the operation of string in C # be optimized with StringBuilder )?
did not do so.
(3) Will the system and network calls time out? How to deal with?
Does not appear if a call is turned off again.
6. Readability
How readable is the code? Is there enough comment?
Readability is basically possible, and annotations can be used to understand the program's ideas and intentions in a single glance.
7. Testability
Does the code need to update or create a new unit test?
Don't need
Random Draw Program Report