Use Pronounceable Names

Learn the importance of using pronounceable names in your code. Discover how it improves communication and enhances code readability and maintainability.


Usage

πŸ“ Guideline

Use Pronounceable Names: Choose names that are easy to pronounce to facilitate verbal communication within your team.

Choosing good names takes time but it saves even more time. Names should be easy to pronounce to be able to communicate with your teammates verbally.

πŸ› οΈ How to Apply

  • Choose names that can be effortlessly pronounced and understood by team members. πŸ‘₯
  • Avoid using ambiguous or cryptic names that may lead to confusion or miscommunication. πŸ€·β€β™€οΈ
  • Prioritize readability and clarity when selecting names, aiming for simplicity and ease of verbal communication. πŸ“’

Pros and Cons

πŸ‘ Pros

  • Improved Communication: Pronounceable names facilitate effective verbal communication among team members, enhancing collaboration and understanding. πŸ’¬
  • Clarity and Readability: Names that are easy to pronounce contribute to the readability and comprehensibility of the code, making it easier to maintain and understand. ✨

πŸ‘Ž Cons

  • Naming Constraints: The requirement for pronounceable names may sometimes limit the use of more concise or creative naming choices. 🚫
  • Increased Naming Effort: Choosing pronounceable names may require additional time and effort compared to using arbitrary or cryptic names. πŸ•’

Examples

❌ Bad

const yyyymmdstr = moment().format("YYYY/MM/DD")

βœ… Good

const currentDate = moment().format("YYYY/MM/DD")

References

  • Meaningful Naming: Use names that accurately describe the purpose and functionality of variables, functions, and classes. πŸ”
  • Consistent Naming: Establish and follow consistent naming conventions throughout the codebase to enhance readability and maintainability. πŸ“š
  • Self-Explanatory Names: Choose names that are self-explanatory and reduce the need for additional comments or documentation. πŸ“
  • Avoid Abbreviations: Use full words instead of abbreviations to improve code clarity and understanding. 🚫