- Use snake_case for methods, variables, and files; CamelCase for classes/modules; UPPER_SNAKE_CASE for constants.
- Indent with 2 spaces and limit lines to max 120 characters.
- Keep methods short (<5 lines ideal) with descriptive names and single responsibility.
- Prefer Enumerable methods (map, select, reduce) over imperative loops.
- Use guard clauses and explicit receivers to avoid deep nesting.
- Write self-documenting code: favor descriptive names and extracted private methods over comments for clarity and maintainability.
- Extract complex logic into smaller methods or classes to enforce SRP and improve readability.