Personal blog Job Week2

Source: Internet
Author: User

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.

Code specification is not due to bureaucratic system, not wasting everyone's programming time, there is a unified code standard, only the basis of the work of programmers, to improve the efficiency of the work of programmers. Perhaps the code specification wastes a certain amount of time when you write your own program. But in the team work, code specification is essential, with code to allow the entire team to have a unified basis to write programs, so as to improve the efficiency of the team and the readability of each person's code.

2. I am an artist, a craftsman, I have my own norms and principles.

Their own norms and principles are not desirable in the context of programming. It's a very selfish act to be a burden to others when they read their code.

3. Norms cannot be enforced, and many exceptions should be allowed.

Although the norms are stipulated, they are not uniform. Exceptions are definitely there, but there can be too many exceptions. If there are many exceptions, then the code specification disappears.

4. I am good at coding specifications, you can listen to me.

This is even more unacceptable, but it is also possible for the entire team to do so if the code specification can be specified in the team.

Procedure review:

General

Does The code work? Does It perform it intended function, the logic is correct etc.

The program does not run properly, click on the runtime will throw an exception, the console cannot input, from the code to see that most of the functionality has been implemented, but the parentheses function is not fully implemented, the logic is clear and complete.

Is all the code easily understood?

Object oriented thinking, code style is very distinct, clear structure, more comments, good code readability.

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.

Variable name settings are used in English, much stronger than I usually use pinyin or letters

Is there any redundant or duplicate code?

Calculate class processing arithmetic, each function is longer, you can consider simplifying

is the code as modular as possible?

The number of rows in the Main function is very small, which means that the code is nicely encapsulated and modular

Can any global variables be replaced?

No, but you can change the global variable to a class variable

Is there any commented out code?

contains commented out code

Do loops has a set length and correct termination conditions?

loop set length, can end normally

Can any of the code being replaced with library functions?

There are no alternative library functions

Can any logging or debugging code be removed?

No logging and debugging code

Security

Is all data inputs checked (for the correct type, length, format, and range) and encoded?

Because the program can't run on my computer, I can't tell the input

Where Third-party Utilities is used, is returning errors being caught?

non-use of third-party programs

is output values checked and encoded?

No output

is invalid parameter values handled?

Cannot enter

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

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.