Tools - ashwin-shetty/Documents-Wiki GitHub Wiki

Clean and Maintainable Code

  • The best Programs are written so that computing machines can perform them quickly and so that human being can understand them clearly - Donald Knuth (Developer Quotes)
  • We are constantly reading old code as part of the effort to write new code... Therefore, making it easy to read makes it easier to write - Robert Martin (Developer Quotes)
  • Always code as if the guy who end up maintaining your code will be a violent psychopath who knows where you live - John Woods (Developer Quotes)
  • Reading code is 90% then writing code is 10% in most of the old project.
  • Technical Debt is longer when you ignore it time taken to resolver is more

Dirty Code Consequences

  • More Bugs
  • Decreased Productivity
  • Lower Job Satisfaction

Naming Guidlines

  • Class name should be a noun and always specific not a single letter
  • Ideally 1 or 2 words
  • Boolean variable should prefixed with "is", for example isValid or isActive.
  • Use camelcase
  • use ALL_CAPS with underscore for constants.

Clean Code

Code Analysis Tools

  • SonarLint
  • CheckStyle

Code Rules

  • Boy Scout Rule , Leave the code cleaner then you find it

Code Review

  • Setup a code review tool or review code looking at each other screen to review.
  • One or more code review
  • Code should be merged only after Review

Java 11

jdeps is Command line Static Dependency Checker which helps to migrate from Java 8 to Java 11