Code Review Checklist

Source: Internet
Author: User

our crew: 28 Zhang Yang, 20 Wang Kaiwin, 30 He Yuxiang

Task Division: Zhang Yang responsible for the code, Wang Kaiwin responsible for the form, He Yuxiang responsible for review.

1. Overview section

(1) Can the code meet the requirements and specifications?

The description code basically does not have many errors, but does not mean that the code is completely correct, there are other conditions, including whether to achieve the purpose after execution.

(2) Does the code design have thoughtful consideration?

The design of the code is relatively comprehensive, but not absolute, our ability may be limited, and can not take into account all aspects, if there is a certain omission still need to pay attention to.

(3) What is the readability of the code?

The code has some readability.

(4) is the code easy to maintain?

because of the unknown vulnerability in the program, the Code of the program is modified and maintained in order to supplement the new function due to the accumulation problem arising from the use. We haven't done that yet, and we're not seeing an unknown bug in the program.

(5) Did each line of the code be executed and checked?

for readable code, we take a step-by-step check, and in addition, we execute the program to check if there are problems in the code. It turns out that the program is no problem, but there are some potential problems that have not been detected, and we may not have found it, so this kind of problem is not checked.

2. Design Specification Section

(1) Does the design conform to a known design pattern or a commonly used pattern in a project?

design conforms to known design patterns or patterns commonly used in projects.

(2) Are there hard codes or strings/numbers that exist?

There are hard-coded or string/numeric etc. exist.

(3) Does the code depend on a platform and will affect future migrations (such as Win32 to Win64)?

With the expansion of the software to the main memory of the computer, the 32-bit platform 4G main memory addressing space has gradually become the bottleneck of machine performance, in the long run, the best solution to this contradiction is to use the software running platform that supports the larger memory space. In the current case, the hardware platform that supports the larger address space on the PC is x64, and of course it requires 64-bit operating system and runtime library support in addition to the hardware to run 64-bit applications. It seems that this change is more complex, the code depends on a platform, affecting the future of the transplant, but this problem can be solved.

(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?

The newly written code is not implemented with the functionality in the existing library/sdk/framework, and there is no similar feature in this project that can be called without all re-implementation.

(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.) )

Yes, a lot of code does not have to add, the program is simple, neat, direct hit is the program we want, and the extra features of the code, can be applied directly to the future exercise.

3. Code Specification Section

(1) Does the modified part conform to the Code standard and style (detailed provisions slightly)?

Code Style Specification: Concise, easy to read, no ambiguity. on a certain basis, the modified parts conform.

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?

we handled the error and checked the return value and exception handling.

(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?

the parameter has no error, the length of the string is the length of the character, and is counted starting at 0.

(3) How is the boundary condition handled? How does the default of a switch statement work? Is there a possible cycle of loops?

there are no boundary conditions. Without the default of the switch statement, the loop does not have a dead loop.

(4) Is there an assertion (assert) to ensure that the conditions we think are not changed are really satisfied?

The assertion (assert) is not used to ensure that the condition we believe to be immutable is really satisfied.

(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?

this really can not ...

(6) Are there any useless elements in the data structure?

There are no useless elements in the data structure.

5. Efficiency

(1) What is the performance of the Code (performance)? What is the worst case scenario?

Code can directly complete the function, so that the performance is good, but the speed of the fast, and so on, we really do not reach this level, such procedures, should also be unnecessary performance testing, the worst case is not the code can not complete the requirements, errors, slow speed.

(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)?

There are not many loops in the code, so so-called optimizations are not necessary. There is no obvious optimization part.

(3) Will the system and network calls time out? How to deal with?

No network calls, this should also not consider ...

6. Readability

How readable is the code? Is there enough comment?

The code is readable and has enough comments .

7. Testability

Does the code need to update or create a new unit test?

No, unit testing is really superfluous for a program like this.

Code Review Checklist

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.