clean code
Others
2022-04-22 01:29:02
views: 0
meaningful naming
- avoid misleading
- make meaningful distinctions
- use the read name
- avoid encoding
- Avoid mind mapping
- Class names: Class and object names should be nouns or noun phrases, not verbs. Avoid using class names like Manager, Processor, Data or Info.
- Method name: The method name should be a verb or a verb phrase,
- 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.
- Each concept corresponds to a word
- don't use double words
- Use solution domain nouns
- Use names derived from the problem area in question
- Add meaningful context
- Don't add useless context
Origin http://43.154.161.224:23101/article/api/json?id=324716668&siteId=291194637