DiscussionIt's hard to overstate the value of simple designs and clear code. Your code's maintainer will thank you for making it understandableand often that will be your future self, trying to remember what you were thinking six months ago. Hence such classic wisdom as:
Many of the Items in this book naturally lead to designs and code that are easy to change, and clarity is the most desirable quality of easy-to-maintain, easy-to-refactor programs. What you can't comprehend, you can't change with confidence. Probably the most common tension in this area is between code clarity and code optimization (see Items 7, 8, and 9). Whennot ifyou face the temptation to optimize prematurely for performance and thereby pessimize clarity, recall Item 8's point: It is far, far easier to make a correct program fast than it is to make a fast program correct. Avoid the language's "dusty corners." Use the simplest techniques that are effective. |