clean code

meaningful naming

  1. avoid misleading
  2. make meaningful distinctions
  3. use the read name
  4. avoid encoding
  5. Avoid mind mapping
  6. Class names: Class and object names should be nouns or noun phrases, not verbs. Avoid using class names like Manager, Processor, Data or Info.
  7. Method name: The method name should be a verb or a verb phrase,
  8. Don't be cute: If the name is too playful, it will only be remembered by someone with the same sense of humor as the author.
  9. Each concept corresponds to a word
  10. don't use double words
  11. Use solution domain nouns
  12. Use names derived from the problem area in question
  13. Add meaningful context
  14. Don't add useless context

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324716668&siteId=291194637