Pages

Tuesday 18 July 2023

Code Review

  •  SOLID Principles
    • S – Single Responsibility Principle
      • There should never be more than one reason for a class to change.
    • O – Open-Closed Principle
      • Software entities should be open for extension, but closed for modification.
    • L – Liskov Substitution Principle
      • Functions that use references to base classes must be able to use objects of derived classes without knowing it.
    • I – Interface Segregation Principle
      • Many client specific interfaces are better than one general purpose interface.
    • D – Dependency Inversion Principle
      • Depend upon Abstractions. Do not depend upon concretions.
  • Naming conventions (Class name, method name, variable name, constant name, function name, type declarations)
  • Variable initialization and reset
  • Caching
  • Pattern check/Null Check (@Valid/@Pattern/@NotEmpty)
  • Design Pattern (Creational, Structural, Behavioral)
  • Data structure (Eg. Collections)
  • Exception handling (@ControllerAdvice/Throw custom exception)
  • API Contracts (Request & Response)
  • Security
  • Reusability
  • Extensibility
  • Configurable
  • Check for hardcoding
  • Logging
  • Unused variables, useless declarations
  • Reducing unnecessary iterations (cognitive and cyclometric complexities)
  • New Features implemented (Eg. Java8 Features like stream API)
  • Unit Test Case coverages (JUnit, Karma Jasmine)
  • Documentation (Java Doc, Angular Documentation)
  • Markdown files update (README.md, BUILD.md, DEPLOY.md, etc.,)
  • Build and run the project
  • Run static code analysis tool (Eg. SonarQube/SonarLint)

No comments:

Post a Comment

Code Review

 SOLID Principles S – Single Responsibility Principle There should never be more than one reason for a class to change. O – Open-Closed Prin...