Prompt
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:
- Change
xtochildrenin function parameters - Change
strtostringfor string parameters - Change
etofocusablewhen iterating over focusable elements
Descriptive names act as inline documentation, making code self-explanatory and reducing the cognitive load for developers reading or maintaining the code.