Choose variable and parameter names that clearly communicate their purpose and avoid misleading or cryptic naming. Names should be self-documenting and reduce cognitive load for other developers.
Choose variable and parameter names that clearly communicate their purpose and avoid misleading or cryptic naming. Names should be self-documenting and reduce cognitive load for other developers.
Key principles:
ref_if_deployment_name
when it’s really about branch availability)Example of improvement:
# Before: Confusing relationship between parameters
def decide_engine_type(requested_engine, engine_flag):
requested_engine = engine_flag # Unclear why both exist
# After: Clear purpose and relationship
def decide_engine_type(engine_flag):
requested_engine = engine_flag # Or just use engine_flag directly
This reduces confusion during code reviews and makes the codebase more maintainable by ensuring names accurately reflect their semantic meaning.
Enter the URL of a public GitHub repository