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

RE: [XP] Re: redundant code

Expand Messages
  • James Cloughley
    If you re using a version control system, in theory, you can always go back and get the original code. A refresh from the source repository gets you back to
    Message 1 of 37 , Dec 1, 2003
    • 0 Attachment
      If you're using a version control system, in theory, you can always go back and get the original code. A refresh from the source repository gets you back to before you made any changes immediately.

      I think people just value code that is written and feel that it's a shame to remove it so they comment it out. Whenever I find it, I remove it. It keeps the code cleaner.

      Jim

      -----Original Message-----
      From: J. B. Rainsberger [mailto:jbrains@...]
      Sent: Monday, November 24, 2003 3:55 PM
      To: extremeprogramming@yahoogroups.com
      Subject: Re: [XP] Re: redundant code


      James Cloughley wrote:

      > I've noticed that some people tend to cling to code that is no longer needed because they wrote it and have some kind of emotional bond.

      I don't know that it is just "an emotional bond." There could be some
      real fear, there: fear of changing something and not being able to
      quickly get back to the spot where everything worked.

      One thing you can do is pair with them in a TDD session and throw away
      some code. They may have the tendency to comment code out, run the
      tests, then remove the code once the tests pass. If so, throw the code
      away before running the tests. Maybe once they see that it is not so
      dangerous, that will help them "let go."
      --
      J. B. Rainsberger,
      Diaspar Software Services
      http://www.diasparsoftware.com :: +1 416 791-8603
      Let's write software that people understand


      To Post a message, send it to: extremeprogramming@...

      To Unsubscribe, send a blank message to: extremeprogramming-unsubscribe@...

      ad-free courtesy of objectmentor.com

      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    • George Paci
      ... You might want to take a look at Jester: http://jester.sourceforge.net/ (as opposed to http://www.geocities.com/xtremetesting/anecdotes.html ) --George
      Message 37 of 37 , Dec 1, 2003
      • 0 Attachment
        WILLIAMS Dominic wrote:

        > Well, it seems to me it /can/ be automated, and I have started working
        >
        > on an experimental tool with precisely that aim. My thinking is that
        > by mutating code (including "deletion" as a mutation), and seeing what
        > that does to /acceptance tests/ (not just unit tests), you could
        > detect that something needs attention. The tool will /highlight/ code
        > that can be mutated without breaking acceptance tests, and let the
        > programmer either add acceptance tests or automatically delete the
        > code.
        >
        > Does that sound like it would answer the problem?

        You might want to take a look at Jester:

        http://jester.sourceforge.net/

        (as opposed to http://www.geocities.com/xtremetesting/anecdotes.html )

        --George

        There is nothing to be found in a beehive that is not submerged in a
        bee. And yet you can search a bee forever with cyclotron and
        fluoroscope, and you will never find a hive. --Kevin Kelly
      Your message has been successfully submitted and would be delivered to recipients shortly.