Chapter 3: Programming of intention wizard
1. Programming By Intention is one of the core concepts of extreme programming, awareness that clearly indicates your intentions when writing code.
2. You need to select a Semantical Transparent name, which means that these names have to be.
3. Use nouns or noun phrases as the name of the class.
4. Use adjectives or nimbles with general nouns or noun phrases (books not recommended in books with naming, but I use C #).
5. Use verbs or verb phrases as the method name.
6. Use a recognized value method (Accessor) and an assignment method (MUTATOR) name habit.
7. Do not keep excess information in the method name.
8. Use noun or noun phrases as a variable name.
9. Do not keep excess information in the method name.
10. Use nouns or noun phrases as variable names.
11. How is it easier (Do The SimpleSt Thing).
12. Use some reconstruction methods to make the code intent: replace the temporary code to the query method (similar to the extraction method); cut temporary variables (do not reuse temporary variables); eliminate the assignment of parameters.
13. To do a Warranted Assumption, only the code is required to add code.
14. Each participating project should use a common vocabulary to talk about various issues related to the fields and systems.
15. Test priority: Test passed, then the work is completed, avoiding overengingering and designing the system more complicated.
16. Avoid unnecessary annotations, just note: incomplete code (Todo: the tree stay be balanced after the insertion); there is a doubtful code requires review (Code Debt: the looping structure); heavy Unable to make it clear enough (Needs Work: I Tried Extract Method, But it's still awkward. Maybe Refactoring to a startgy 10; uses some unusual algorithm (indicating that this algorithm can be found) That is); performance adjustment (prevents others from reconstructing intentional skills, usually only when performance is a bottleneck); class annotation (existence of simple interpretation).