Software process and project management The second week of work

Source: Internet
Author: User
Tags sorts

Select a job: review yourself or someone else's code to find out some problems

This code review selects the http://wenku.baidu.com/view/d827a62de45c3b3567ec8baa.html?from=search code, thanks to the author's material contribution, It is also hoped that the author and readers will point out and apologize for the bad words below.

Reviewer : CLX Review Time: 2016/03/12

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

Software process and project management The second week of work

Related Article

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.