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

Re: [XP] Throw It Away And Start Over

Expand Messages
  • Ron Jeffries
    ... Yes. I would generally not recommend deleting days of code, though we might want to talk about that. The context above is that one test is written, we
    Message 1 of 8 , Jun 3, 2006
    • 0 Attachment
      On Saturday, June 3, 2006, at 12:37:12 AM, Cory Foy wrote:

      > Ron Jeffries wrote:
      >> I'm not sure I have a rule of thumb operating yet. If I do, I'd
      >> guess it's something like
      >>
      >> If it's not working because of a simple bug that I'll find easily,
      >> I'd like to find it and fix it.
      >>
      >> If it's not working because I built it clumsily -- not just
      >> simply, but clumsily -- I'd like to do it over.
      >>
      >> Your thoughts?

      > About 3 weeks in to my current position, my pair and I were working on
      > some code. We realized that we didn't have any tests, and that it was no
      > one's fault but our own - we had let a spike grow into the system.

      > We discussed where we were, why we had gotten there, and what we could
      > do to fix it. I proposed a solution, highlighted the project,
      > right-clicked and hovered over delete. My partner had not experienced
      > that before, and I think it was quite and interesting experience.

      > In the end, we ended up test driving a rewrite which allowed us to move
      > all of our code to new classes which were being driven by the tests,
      > slowly moving the old code over. But that one experience - hovering over
      > delete - stays with us as the one tool in our arsenal that we don't want
      > to have to use.

      > (Of course, we still do sometimes)

      > So, while I was for deleting and starting over, it was interesting
      > working our way out of the legacy code using tests, and not deleting the
      > (week old) legacy code until we had moved the essence of it over.

      Yes. I would generally not recommend deleting days of code, though
      we might want to talk about that. The context above is that one test
      is written, we start to code it, think the code is going green, it
      doesn't ... so we delete what we just wrote and start over. It's the
      initial work of moments that we delete ... and no one I know always
      does it ...

      Ron Jeffries
      www.XProgramming.com
      The central "e" in "Jeffries" is silent ... and invisible.
    Your message has been successfully submitted and would be delivered to recipients shortly.