Avoid single-character variables and abbreviations in favor of descriptive, full-word names that clearly communicate the variable's purpose or content. This improves code readability and makes the codebase more maintainable for other developers.
Avoid single-character variables and abbreviations in favor of descriptive, full-word names that clearly communicate the variable’s purpose or content. This improves code readability and makes the codebase more maintainable for other developers.
Examples of improvements:
x
to children
in function parametersstr
to string
for string parameterse
to focusable
when iterating over focusable elementsDescriptive names act as inline documentation, making code self-explanatory and reducing the cognitive load for developers reading or maintaining the code.
Enter the URL of a public GitHub repository