Use clear, descriptive names that follow consistent patterns across the codebase. For methods and properties: 1. Use intention-revealing names that clearly indicate purpose
Use clear, descriptive names that follow consistent patterns across the codebase. For methods and properties:
Examples:
# Poor naming
def compare_users # unclear if returns boolean
def detect_certificate_key # verb is ambiguous
property :certpassword # inconsistent with other properties
# Good naming
def users_changed? # clear boolean return
def certificate_key_exist? # clear boolean check
property :cert_password # consistent with other properties
# Property naming consistency
property :user # preferred over user_name
property :password # preferred over pass
This pattern improves code readability, maintains consistency, and reduces cognitive load when working across different parts of the codebase.
Enter the URL of a public GitHub repository