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

RE: [XP] Re: Only refactor methods out to remove duplication?

Expand Messages
  • WATKINS, Robert
    ... Of course. However, if your code isn t expressing intent adequately, then how do you know your tests are even remotely comprehensive? Or, more to the
    Message 1 of 207 , Dec 1, 2003
    • 0 Attachment
      Tim Haughton wrote:
      > > Just because your code pass all the current tests, doesn't
      > mean that
      > > there isn't a bug in there still.
      > >
      > > Robert.
      >
      > Is the same statement not true even if my methods are
      > extracted to oblivion?

      Of course. However, if your code isn't expressing intent adequately, then
      how do you know your tests are even remotely comprehensive? Or, more to the
      point, how does someone else?

      Taking the time to go back and polish the code, AFTER the tests are passing,
      to better express intent nearly always reveals new tests for me. Sometimes,
      those tests pass without other changes (because it's a test that already
      works and I want to make sure it stays working).

      If your code is expressing intent, and the tests are passing, then you're
      probably done. Remove any remaining duplication, and wrap it up. If you skip
      the expressing intent stage, then you've left a mess behind for someone else
      to clean up later.

      Robert.

      --
      "Software is too expensive to build cheaply"
      Robert Watkins J2EE Application System Specialist
      http://robertdw.blogspot.com Web & Integration Services, Suncorp
      robertdw@... robert.watkins@...


      -----------------------------------------------------------------------------------

      The contents of this message are the views of the Author and do not necessarily reflect the views of SUNCORP METWAY LTD ABN 66 010 831 722.

      The content of this e-mail, including attachments is a confidential communication between the Suncorp Metway Group and the intended addressee. Any unauthorised use of the contents is expressly prohibited. If you have received this e-mail in error please contact the sender immediately and then delete the message and any attachment(s).

      http://www.suncorp.com.au
    • WATKINS, Robert
      ... Of course. However, if your code isn t expressing intent adequately, then how do you know your tests are even remotely comprehensive? Or, more to the
      Message 207 of 207 , Dec 1, 2003
      • 0 Attachment
        Tim Haughton wrote:
        > > Just because your code pass all the current tests, doesn't
        > mean that
        > > there isn't a bug in there still.
        > >
        > > Robert.
        >
        > Is the same statement not true even if my methods are
        > extracted to oblivion?

        Of course. However, if your code isn't expressing intent adequately, then
        how do you know your tests are even remotely comprehensive? Or, more to the
        point, how does someone else?

        Taking the time to go back and polish the code, AFTER the tests are passing,
        to better express intent nearly always reveals new tests for me. Sometimes,
        those tests pass without other changes (because it's a test that already
        works and I want to make sure it stays working).

        If your code is expressing intent, and the tests are passing, then you're
        probably done. Remove any remaining duplication, and wrap it up. If you skip
        the expressing intent stage, then you've left a mess behind for someone else
        to clean up later.

        Robert.

        --
        "Software is too expensive to build cheaply"
        Robert Watkins J2EE Application System Specialist
        http://robertdw.blogspot.com Web & Integration Services, Suncorp
        robertdw@... robert.watkins@...


        -----------------------------------------------------------------------------------

        The contents of this message are the views of the Author and do not necessarily reflect the views of SUNCORP METWAY LTD ABN 66 010 831 722.

        The content of this e-mail, including attachments is a confidential communication between the Suncorp Metway Group and the intended addressee. Any unauthorised use of the contents is expressly prohibited. If you have received this e-mail in error please contact the sender immediately and then delete the message and any attachment(s).

        http://www.suncorp.com.au
      Your message has been successfully submitted and would be delivered to recipients shortly.