Loading ...
Sorry, an error occurred while loading the content.

[extremeprogramming] Re: When does refactoring become framework b uilding

Expand Messages
  • Robert C. Martin
    ... (blush) I should have couched that statement in a lot more context than I did. The orignial poster was suggesting that XP was riskier if you had developed
    Message 1 of 2 , Jan 4, 2000
    • 0 Attachment
      > -----Original Message-----
      > From: Jonas Karlsson [mailto:karlsson@...]

      >
      >
      > Hi,
      > We're trying to introduce XP practices on a fairly small
      > project (3-5 developers). I think Bob Martin wrote that he couldn't
      > think of a case where using XP on a project would add risk

      (blush) I should have couched that statement in a lot more context than
      I did. The orignial poster was suggesting that XP was riskier if you
      had developed that kind of app before, and if the requirements were
      stable. My statement should have read: "I can't think of any reason
      why XP adds risk if you have pre-knowledge, or stability of
      requirements."

      Certainly XP has not been tried for all project types, and there is
      therefore risk. Most importantly, XP has not been tried for very large
      projects. While I am confident that some XP-related approach will work
      in the large, there is certainly risk.


      Robert C. Martin | OO Mentoring | Training Courses:
      Object Mentor Inc. | rmartin@... | OOD, Patterns, C++,
      Java,
      PO Box 85 | Tel: (800) 338-6716 | Extreme Programming.
      Grayslake IL 60030 | Fax: (847) 548-6853 |
      http://www.objectmentor.com

      "One of the great commandments of science is:
      'Mistrust arguments from authority.'" -- Carl Sagan
    • Robert C. Martin
      ... There are two things to think about here. There is the general need to keep code flexible, and there is the anticipation of new features or changes. The
      Message 2 of 2 , Jan 4, 2000
      • 0 Attachment
        > -----Original Message-----
        > From: Jonas Karlsson [mailto:karlsson@...]

        > I get the impression that despite "You aren't going to need it", in
        > order to refactor effectively, some judgements about what is likely to
        > change in the future must be made.

        There are two things to think about here. There is the general need to
        keep code flexible, and there is the anticipation of new features or
        changes. The two are fundamentally different.

        In an XP project we refactor to:
        1. Make the code as simple as possible.
        2. Eliminate any duplication.
        3. Make the code as clear as possible.
        4. Enhance the flexibility of the code.

        But we do not write code in anticipation of anticipated feature changes.

        Point four above is the one you are worried about. What are the
        principles that are employed to create flexible code? The answer is
        that they are the same principles of dependency management that we have
        always employed in object oriented design.

        This does not mean that you go off generalizing your code and building
        frameworks that aren't explicitly needed. It does however mean that you
        pay close attention to Dependency Inversion, Interface Segregation,
        Substitutability, etc. The principles of OOD (See the publications
        section of http://www.objectmentor.com) still apply in XP.

        Indeed, the principles apply all the more in XP because refactoring is
        so critically important. If the code is not flexible it is difficult to
        refactor. The dependency management principles keep the code as
        flexible as possible so that it can be refactored when new features and
        new generalities are needed.


        Robert C. Martin | OO Mentoring | Training Courses:
        Object Mentor Inc. | rmartin@... | OOD, Patterns, C++,
        Java,
        PO Box 85 | Tel: (800) 338-6716 | Extreme Programming.
        Grayslake IL 60030 | Fax: (847) 548-6853 |
        http://www.objectmentor.com

        "One of the great commandments of science is:
        'Mistrust arguments from authority.'" -- Carl Sagan
      Your message has been successfully submitted and would be delivered to recipients shortly.