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

RE: Testing Leftover

Expand Messages
  • Jeff Tulley
    ... ... ... Ha! I just did this unintentionally only last week. Mostly we were led by code smells and the immediacy of needing to test. I too was working
    Message 1 of 42 , Jun 1, 2004
    • 0 Attachment
      > I run into this concern about polluting production
      > code with test code
      > a lot when mentoring people in TDD. This almost
      > always comes up when I'm
      ...

      ...
      > I let them choose the
      > lesser of evils in their mind. They can accept the
      > protected variable or
      > go back to the "pollution" of production code with
      > methods for testing.

      Ha! I just did this unintentionally only last week.
      Mostly we were led by code smells and the immediacy of
      needing to test. I too was working with somebody very
      new to TDD and XP, and this is exactly how our code
      evolved.

      Me, I am ok with the test-harness inside the
      production code, maybe because of my Electrical
      Engineering background. A large part of a
      semiconductor is usually devoted to testing -
      providing a means to get the chip into a certain state
      and also of verifying its proceeding actions.

      That said, I felt a lot better after the refactor and
      the removal of the only-for-testing setter method.




      __________________________________
      Do you Yahoo!?
      Friends. Fun. Try the all-new Yahoo! Messenger.
      http://messenger.yahoo.com/
    • Phlip
      ... The author of /Working Effectively with Legacy Code/ has reminded us that _in_ sight is better. More team awareness of the difference between the real and
      Message 42 of 42 , Jun 1, 2004
      • 0 Attachment
        Ian Collins wrote:

        > I prefer it shorter, uglier and out of sight!

        The author of /Working Effectively with Legacy Code/
        has reminded us that _in_ sight is better. More team
        awareness of the difference between the real and the
        ideal.


        =====
        Phlip
        http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces




        __________________________________
        Do you Yahoo!?
        Friends. Fun. Try the all-new Yahoo! Messenger.
        http://messenger.yahoo.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.