- Use `CamelCase` for type and module names, `snake_case` for functions and variables, and `SCREAMING_SNAKE_CASE` for constants.
- Add type annotations to function arguments in performance-critical code (e.g., `function add(x::Float64, y::Float64)`) but avoid over-annotating in generic code.
- Use `end` to close all blocks (`if`, `for`, `function`, `module`) — never rely on indentation alone.
- Prefer `!` suffix for in-place mutating functions (e.g., `sort!`, `push!`) to signal side effects to callers.
- Use `begin...end` blocks or `let` scopes to isolate temporary variables and avoid polluting the module namespace.
- Write docstrings with triple-quoted strings before function definitions — include argument descriptions and example usage.
- Prefer `AbstractVector` and `AbstractMatrix` over concrete `Vector` and `Matrix` in function signatures to allow all subtypes.
- Use `@assert` for debug-mode invariant checks and `@warn`/`@error` macros for logging — avoid bare `println` for diagnostic output.