What is the code cleanliness that is often said
Table Of Contents Clean Code The price of messy code? Subsequent maintenance and modification are difficult, and productivity and time are negatively correlated. What is clean code? Clean code only does one thing well: each class, each function, and each module focuses on one thing, completely free from interference and pollution from surrounding details. A more comprehensive generalization is: reduce duplication of code, improve expressiveness, and build simple abstractions earlier. More specific implementation: please read on! Better variable naming See the name and know the meaning Abstract factory: Do not name the interface IShapeFactory. The leading letter is actually disturbing to the user. The user only needs to know that it is an abstract factory. It is recommended to use CShapeFactory for a better experience. Use nouns for class names and verbs for methods. Words such as get and fetch with similar parts of speech shoul...