Choose names that clearly indicate their context and purpose rather than generic terms. Generic names can be ambiguous and make code harder to understand, especially when the same codebase handles multiple contexts or domains.
Choose names that clearly indicate their context and purpose rather than generic terms. Generic names can be ambiguous and make code harder to understand, especially when the same codebase handles multiple contexts or domains.
When naming variables, parameters, methods, or classes, prefer specific descriptive names that include relevant context over broad generic terms. This makes the code self-documenting and reduces the cognitive load for other developers.
Examples of improvements:
library
instead of repo
when referring to a software library specificallypdf_hi_res_max_pages
instead of max_pages
when the parameter specifically limits PDF processing in high-resolution modesource
and destination
(lowercase) instead of capitalized Source
and Destination
for common technical termsThe goal is to make names immediately clear about what they represent without requiring additional context or documentation.
Enter the URL of a public GitHub repository