zoukankan      html  css  js  c++  java
  • [Study Note] Design and Testability 20100411

    [Succeed with TDD by designing with TDD]

    I don;t care how good you think your design is. If I can’t walk in and write a test for an arbitrary method of yours in five minutes its not as good as you think it is, and whether you know it or not, you’re paying a price for it. – Michael Feathers, The Bar is Higher Now, 2004

    Antipattern

    TheBlob antipattern

    Such systems usually have a few classes (Blobs) that have hundreds of methods and variables and encapsulate all the logic that the entire program needs. The rest of the system is littered with many dumb objects.

    1. BaseBlob – involves a base class that is a blob and hundreds of subclasses with little content.
    2. BlogController – found in systems with many, interrelated objects. all such objects are dumbed down and the BlobController does everything.

    Stovepipe antipattern

    a stovepipe system is a system procured and developed to solved a specific problem, characterized by a limited focus and functionality, and containing data tha cannot be easily shared with other systems.

    1. AutogeneratedStovepipeAntiPattern refers to porting an existing system to a distributed system, without adjusting the design to account for the distributed nature.
    2. StovepipeEnterpriseAntiPattern refers to “islands of automation” within an enterprise that are designed independently with little commonality or interoperability.
    3. StovepipeSystemAntiPattern refers to similar architecture between the subsystems of a single system.
  • 相关阅读:
    string
    auto和decltype
    const限定符
    &(引用) 和 *(指针)
    extern关键字
    关于将函数写入头文件问题(分离式编译)
    poj2154(polya定理+欧拉函数)
    bzoj2115(线性基)
    51nod1832(二叉树/高精度模板+dfs)
    51nod1464(trie + dfs)
  • 原文地址:https://www.cnblogs.com/zhaorui/p/1709897.html
Copyright © 2011-2022 走看看