Java Coding Best Practices and Standards
1.1.
Is adequate inline documentation available?
2.
Does the file header include the following:
1.
Program header
2.
Application name
3.
Dependencies
4.
Limitations
5.
Copyright information
6.
Modification log
3.
Have meaningful naming conventions been followed? Do they reflect the hierarchy
of the procedures/paras?
4. Do naming conventions identify global, common and external functions?
5.
Has code been adequately indented?
6.
Has a common set of routines been written instead of replicating code for these
routines in various programs?
7.
Is there any redundant code? (There must be no redundant code.)
2. Labels and
Mnemonics-related Issues
1.
Has any label not been referenced?
2.
Have meaningful mnemonics been used for constants?
3.
Is the usage of mnemonics correct? (Multiple mnemonics should not be used for
the same purpose.)
3. Arrays-related Issues
1.
Are all the array indexes within bounds?
2.
Are all the array indexes correctly initialized?
4. Looping/Branching-related Issues
1.
Are all the branch conditions correct?
2.
Does a loop always terminate?
3.
Is the condition for terminating a loop correct?
4.
Have the divisors been tested for zero (where applicable)?
5.
Can statements placed in the loop be placed outside the loop?
5. Structure-related Issues
1.
Have the portions of the code that the thread of execution never reaches been
identified?
2.
Have too many nested ‘IF’ statements been used? (This should be avoided.)
6. Function-related Issues
1.
Has imported data been tested for validity?
2.
Do the actual and formal interface parameters correspond?
3.
Have all variables been used? Have the output variables been assigned?
7. Database-related Issues
1.
Do queries on tables enforce the use of indexes?
2.
Are add/modify mode screen attributes correctly set and reset?
3.
Has error status been checked after each SQL statement?
4.
Has locking been performed prior to updates?
5.
Have the following conditions been checked in expressions?
1.
Rounding off (if required)
2.
Possibility of division by zero
6.
Only one open connection exists.
8. Performance-related Issues
1.
Will the requirements of execution time (if applicable) be met?
2.
Is there a more efficient alternative?
9. Usability-related Issues
1.
Are information messages provided during processes that take a long time? (This
is optional.)
10. File-related Issues
1.
Have the following checks been performed?
1.
checks for empty file
2.
checks for I-O error
11. Error Handling Issues
1. Are the error messages understandable? Are the error messages adequate?2. Have all errors/exceptions been trapped and handled?
3 comments:
Useful post.
Thanks,
JAVA Training in Chennai | JAVA course in Chennai
Very much useful article. Kindly keep blogging
ES6 Corporate Training in Chennai
JavaScript Training Online
This is the awesome post and I have huge information from your creative blog. The admin presented the content is very interesting and also comprehensive. Thank you for your sharing, Keep updating...
Oracle Training in Chennai
Oracle Training institute in chennai
Tableau Training in Chennai
Oracle DBA Training in Chennai
Primavera Training in Chennai
Unix Training in Chennai
Power BI Training in Chennai
Oracle Training in Chennai
Oracle Training institute in chennai
Post a Comment