Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 KB | None | 0 0
  1. - General
  2. [x] The code works
  3. [ ] The code is easy to understand
  4. [x] Follows coding conventions
  5. [x] Names are simple and if possible short
  6. [x] Names are spelt correctly
  7. [ ] Names contain units where applicable
  8. [ ] Enums are used instead of int constants where applicable
  9. [x] There are no usages of 'magic numbers'
  10. [x] All variables are in the smallest scope possible
  11. [x] All class, variable, and method modifiers are correct.
  12. [ ] There is no commented out code
  13. [x] There is no dead code (inaccessible at Runtime)
  14. [x] No code can be replaced with library functions
  15. [ ] Required logs are present
  16. [x] Frivolous logs are absent
  17. [x] Debugging code is absent
  18. [x] No System.out.println or similar calls exist
  19. [ ] No stack traces are printed
  20. [ ] Variables are not accidentally used with null values
  21. [x] Variables are immutable where possible
  22. [x] Code is not repeated or duplicated
  23. [ ] There is an else block for every if clause even if it is empty
  24. [x] No complex/long boolean expressions
  25. [x] No negatively named boolean variables
  26. [ ] No empty blocks of code
  27. [x] Ideal data structures are used
  28. [x] Constructors do not accept null/none values
  29. [x] Collections are initialised with a specific estimated capacity
  30. [ ] Arrays are checked for out of bound conditions
  31. [ ] Catch clauses are fine grained and catch specific exceptions
  32. [ ] Exceptions are not eaten if caught, unless explicitly documented otherwise
  33. [ ] APIs and other public contracts check input values and fail fast
  34. [ ] Files/Sockets/Cursors and other resources are properly closed even when an exception occurs in using them
  35. [ ] StringBuilder is used to concatenate strings
  36. [x] Null/None are not returned from any method
  37. [x] Floating point numbers are not compared for equality
  38. [x] Loops have a set length and correct termination conditions
  39. [x] Blocks of code inside loops are as small as possible
  40. [x] Order/index of a collection is not modified when it is being looped over
  41. [x] No methods with boolean parameters
  42. [x] No object exists longer than necessary
  43. [ ] Design patterns if used are correctly applied
  44. [ ] No memory leaks
  45. [x] Law of Demeter is not violated
  46. [x] Methods return early without compromising code readability
  47. - Java only
  48. [ ] Appropriate JCIP annotations are used
  49. [x] No use of Object class, use generics instead
  50. [x] Uses final modifier to prevent mistaken assignments
  51.  
  52.  
  53. - Documentation
  54. [x] All methods are commented in clear language.
  55. [ ] Comments exist and describe rationale or reasons for decisions in code
  56. [ ] All public methods/interfaces/contracts are commented describing usage
  57. [ ] All edge cases are described in comments
  58. [ ] All unusual behaviour or edge case handling is commented
  59. [ ] Data structures and units of measurement are explained
  60.  
  61. - Threading
  62. [ ] Objects accessed by multiple threads are accessed only through a lock, or synchronized methods.
  63. [ ] Race conditions have been handled
  64. [ ] Locks are acquired and released in the right order to prevent deadlocks, even in error handling code.
  65. [ ] StringBuffer is used to concatenate strings in multi-threaded code
  66.  
  67. - Security
  68. [ ] All data inputs are checked (for the correct type, length/size, format, and range)
  69. [x] Invalid parameter values handled such that exceptions are not thrown
  70. [x] No sensitive information is logged or visible in a stacktrace
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement