Code specification:
1. These norms are a waste of time in a bureaucratic system that wastes everyone's programming time and affects people's development efficiency.
Encoding specification it contains the code format, also includes the coding style and other specifications, usually involves: indentation, space use, tab use
Annotations, propositional habits, code line lengths, and language feature styles make it easy to read each other's code to facilitate
Communications and communication within the team. It's not a waste of time.
2. I am an artist, a craftsman, I have my own norms and principles.
The artist's level of performance, if only on the norm, is clearly not a good artist, and can be easily accepted by everyone.
Let your creativity show up better.
3. Norms cannot be enforced, and many exceptions should be allowed.
I think as long as it is not too harsh norms, or try to do all the same, at least others do not seem to produce emotions.
4. I am good at coding specifications, you can listen to me.
To combine the characteristics of everyone, can not just rely on personal habits.
Code review:
This is the code review Form I gave to the peer group.
General |
Does The code work? Does It perform it intended function, the logic is correct etc. |
The program can run normally, and the functions are all complete. |
Is all the code easily understood? |
The code is structurally clear and Chew explains the code. |
Does it conform to your agreed coding conventions? These would usually cover location of braces, variable and function names, line length, indentations, formatting, and comme Nts. |
It looks like he's got a lot of code to look at. |
Is there any redundant or duplicate code? |
The Generate and compute functions are much more functional, and these two functions can be modular. |
is the code as modular as possible? |
No partitioning module |
Can any global variables be replaced? |
Global variables are more appropriate |
Is there any commented out code? |
The code is clean, and I can't find the place to delete. |
Do loops has a set length and correct termination conditions? |
Normal End |
Can any of the code being replaced with library functions? |
You can use the library function |
Can any logging or debugging code be removed? |
No, No. |
Security |
Is all data inputs checked (for the correct type, length, format, and range) and encoded? |
It's all done. |
Where Third-party Utilities is used, is returning errors being caught? |
Not used |
is output values checked and encoded? |
are correct |
is invalid parameter values handled? |
Input the wrong words do not proceed and end the program |
Documentation |
Do comments exist and describe the intent of the code? |
No documents written |
Is all functions commented? |
No documents written |
Is any unusual behavior or edge-case handling described? |
No documents written |
is the use and function of Third-party libraries documented? |
No documents written |
Is data structures and units of measurement explained? |
No documents written |
Is there any incomplete code? If So, should it is removed or flagged with a suitable marker like ' TODO '? |
No documents written |
Testing |
Is the code testable? i.e. don ' t add too many or hide dependencies, unable to initialize objects, test frameworks can use methods etc. |
Code can test |
Do tests exist and is they comprehensive? i.e. have at least your agreed on code coverage. |
No test code was designed |
Do unit tests actually test, the code is performing the intended functionality? |
No test code was designed |
is arrays checked for ' out-of-bound ' errors? |
Array cross-border check not performed |
Could any test code being replaced with the use of an existing API? |
No test code was designed |
Personal blog Job-week2 (code specification, code review)