Code Quality

Code Quality

Write clean, consistent, and maintainable code

Enforceable guidelines from our catalog

Classes Must Follow Single Responsibility Principle

Each class must have a single, well-defined responsibility with cohesive methods and fields. Large classes with multiple concerns must be refactored into smaller, focused classes using composition or delegation patterns to improve maintainability and testability.

Methods Must Be Kept Reasonably Short

Methods should typically be no longer than 20-30 lines and focus on a single task. Long methods must be refactored into smaller, well-named private methods or extracted into separate classes to improve readability and testability.

Names Must Be Meaningful and Descriptive

Class names, method names, and variable names must clearly express their purpose using proper Java naming conventions (camelCase for variables/methods, PascalCase for classes). Avoid abbreviations, single-letter variables (except loop counters), and misleading names.

Sign up for free
and get unlimited access to our guidelines catalog