(1) twinning link address members of the blog:
Pair Members: 2 --2 Ban Ban Tao Yiming Zhao Ying Hong Kong
Zhao Ying-Hong Kong blog link address: https: //www.cnblogs.com/zyg777/p/11735707.html
(2) members of the four pair operation program code peer review and the results are given in Table code review:
Tao Yiming code review checklist (completed by the Zhao Ying Hong Kong):
1. Summary section |
1.1 Code in line with the needs and specifications do |
meets the |
1.2 Is the code thoughtful design |
Yes |
|
1.3 How to code readability |
readability |
|
1.4 code is easy to maintain it |
easily |
|
1.5 Each line of code is executed and checked yet |
Yes |
|
2, the code design specifications
|
Are 2.1 design patterns designed to comply with known or commonly used in project mode |
Yes |
2.2 or hard-coded strings absence / presence numbers, etc. |
no |
|
2.3 code is dependent on a certain platform, whether it will affect the future impact of migration |
no |
|
2.4 developers added a new feature / function similar if you can use an existing debug |
Yes |
|
2.5 There is no dead code can be deleted |
no |
|
3, the code Specification
|
Modify the code in line with the code of standards and style it |
meets the |
4, the specific code portions
|
4.1 whether the error is processed for external function calls, check the return value or exception handling |
Yes |
4.2 if an error parameter passing, a string of characters in length or a byte, the count is 0 or 1 starts counting |
no 0 |
|
4.3 How to boundary conditions, how the default branch of the switch statement processing, circulation there is no infinite loop may occur |
no |
|
4.4 whether the assertion (Assert) to ensure that we believe have the same conditions are met |
no |
|
4.5 application for the release of resources, leaks and optimize space |
Have |
|
4.6 less than or absence of the data structure element |
no |
|
5, performance
|
Code 5.1 effectiveness of how, how the worst case |
it is good |
5.2 code, especially for visible signs of circulation can be optimized |
no |
|
5.3 for system and network of call is timed out, how to deal with |
no |
|
6, readability
|
How to code readability, there were enough comments |
it is good enough |
7, testability
|
If the code needs to be updated or create a new unit test |
Yes
|
Zhao Ying-port code review checklist (completed by the Tao Yiming):
1. Summary section |
1.1 Code in line with the needs and specifications do |
meets the |
1.2 Is the code thoughtful design |
Yes |
|
1.3 How to code readability |
readability |
|
1.4 code is easy to maintain it |
easily |
|
1.5 Each line of code is executed and checked yet |
Yes |
|
2, the code design specifications
|
Are 2.1 design patterns designed to comply with known or commonly used in project mode |
Yes |
2.2 or hard-coded strings absence / presence numbers, etc. |
no |
|
2.3 code is dependent on a certain platform, whether it will affect the future impact of migration |
no |
|
2.4 developers added a new feature / function similar if you can use an existing debug |
Yes |
|
2.5 There is no dead code can be deleted |
Have |
|
3, the code Specification
|
Modify the code in line with the code of standards and style it |
meets the |
4, the specific code portions
|
4.1 whether the error is processed for external function calls, check the return value or exception handling |
Yes |
4.2 if an error parameter passing, a string of characters in length or a byte, the count is 0 or 1 starts counting |
error From 0 |
|
4.3 How to boundary conditions, how the default branch of the switch statement processing, circulation there is no infinite loop may occur |
no |
|
4.4 whether the assertion (Assert) to ensure that we believe have the same conditions are met |
no |
|
4.5 application for the release of resources, leaks and optimize space |
Have |
|
4.6 less than or absence of the data structure element |
no |
|
5, performance
|
Code 5.1 effectiveness of how, how the worst case |
effectiveness |
5.2 code, especially for visible signs of circulation can be optimized |
Have |
|
5.3 for system and network of call is timed out, how to deal with |
no |
|
6, readability
|
How to code readability, there were enough comments |
it is good Have |
7, testability
|
If the code needs to be updated or create a new unit test |
Yes |
(3) select one of the members of the project as the basis for pair programming. Twinning project blog written request:
(This selection Taoyi Ming the pair programming code based)
(A): combine classroom teaching content, the development of the basic norms of a coding 2 people to abide by (at least annotation norms and variable naming conventions).
Indent: 4 spaces
Line width: 100 characters
Brackets: Use
Line breaks {} with blank lines: a clear distinction between the lines properly
Branch: semicolon shall prevail
Name: name EENOW see, easy to understand and subsequent modifications
Case: important specifications are case sensitive
Note: classes, methods, variables, named after the comments clear meaning
(B): Description of the junction programming experience.
This is the first time that pair programming, in this process, fully aware of the advantages of the two together, of course, there are some shortcomings. They cooperate with each other to improve each other's code, the others look at their code, their own can not find other possible BUG is very easy to find, the other amendments proposed to humbly listen, and then make a reasonable modification. Two people can supervise cooperation and mutual supervision, there is a problem encountered teammates can help, so you can enhance self-confidence of the team, they work together to make the team moving in a better direction!
(C): Pair scene photos:
(4) twinning projects programming requirements:
github connection address: https://github.com/tym1996/tym
Increased demand:
(A) consider the data exception handling issues such as when the task generating input data range, input "abc" and other character data, how to program processing.
Using try {} catch () {} function statement, the control specification input user data, if not, such as the input ABC, other symbols, will prompt: Input Error! please enter again! Then the program will re-cycle and re-let the user input value specification!
(B) increase the range of the number of generated equations (e.g., an integer less than the number of memory), how to handle the program.
The solution is to deposit no less than if the integer number, the program will prompt error!
The pair programming code improvements:
① original program written in a class, and now the separation of the functions of other free writing alone!
② Main Test method for improving write category, generating functions written subject other classes, such that the program is easy to understand and maintain.
③ delete redundant code is more efficient execution efficiency.
④ increases try {} and catch () {} statement to handle user input error does not result in accordance with the specification.