美文网首页
Refactoring Improving the Design

Refactoring Improving the Design

作者: icecity96 | 来源:发表于2016-12-05 23:21 被阅读0次

    Refactoring Improving the Design of Existing Code


    Refactoring,a First Example

    • A poorly designed system is hard to change.Hard because it is hard to figure out where the changes are needed.
    • When you find you have to add a feature to a program,and the program's code is not structured in a convenient way to add the feature,<font color='red'>first refactor</font> the program to make it easy to add the feature, <font color='red'>then add the feature</font>.
    • The first step in refactoring is building a solid set of tests.
    • Refactoring changes the programs in <font color='red'>small steps</font>. If you make a mistake, it is easy to find the bug.
    • Good code should communicate what it is doing clearly, and variable names are a key to clear code
    • Any fool can write code that a computer can understand. Good programmers write code that human can understand.

    相关文章

      网友评论

          本文标题:Refactoring Improving the Design

          本文链接:https://www.haomeiwen.com/subject/rmmlmttx.html