Home > Archive > Extreme Programming > July 2007 > General Question on TDD
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
General Question on TDD
|
|
| SteveM 2007-06-07, 10:03 pm |
| I am just embracing TDD and like what I have read and seen so far. My
question is concerning programming tasks involving already written
code (with no tests). I have serveral tasks where I need to do some
modifications or maintenance on code either written by myself before
embracing TDD or writen by others without any thought for TDD. Is
there a philosphy concerning existing non test supported code and code
changes. Do I for instance treat my changes as separate entities and
write tests for them as I develope the implementation, or do I need to
go back and write code for the entire application or module, and if so
what are the recommended ways of handling that, or is it best just to
leave this code alone and start with a fresh project.
Inquiring minds want to know ;-)
Thanks
-SteveM
| |
| Daniel T. 2007-06-08, 7:03 pm |
| SteveM <steve.moody@philips.com> wrote:
> I am just embracing TDD and like what I have read and seen so far. My
> question is concerning programming tasks involving already written
> code (with no tests). I have serveral tasks where I need to do some
> modifications or maintenance on code either written by myself before
> embracing TDD or writen by others without any thought for TDD. Is
> there a philosphy concerning existing non test supported code and code
> changes. Do I for instance treat my changes as separate entities and
> write tests for them as I develope the implementation, or do I need to
> go back and write code for the entire application or module, and if so
> what are the recommended ways of handling that, or is it best just to
> leave this code alone and start with a fresh project.
Write just enough tests on the existing code so that you can make your
changes and know that when you run the tests, the existing code that you
changed still performs to spec. I.E., somewhere in between your two
options. :-)
| |
| John Roth 2007-06-09, 7:01 pm |
| On Jun 7, 9:44 am, SteveM <steve.mo...@philips.com> wrote:
> I am just embracing TDD and like what I have read and seen so far. My
> question is concerning programming tasks involving already written
> code (with no tests). I have serveral tasks where I need to do some
> modifications or maintenance on code either written by myself before
> embracing TDD or writen by others without any thought for TDD. Is
> there a philosphy concerning existing non test supported code and code
> changes. Do I for instance treat my changes as separate entities and
> write tests for them as I develope the implementation, or do I need to
> go back and write code for the entire application or module, and if so
> what are the recommended ways of handling that, or is it best just to
> leave this code alone and start with a fresh project.
> Inquiring minds want to know ;-)
> Thanks
> -SteveM
The best reference for working with legacy code (defined as any body
of code without a good test suite) is "Working With Legacy Code" by
Michael Feathers. It's a must read.
John Roth
| |
| SteveM 2007-06-18, 10:03 pm |
| On Jun 9, 9:35 am, John Roth <JohnRo...@jhrothjr.com> wrote:
> On Jun 7, 9:44 am, SteveM <steve.mo...@philips.com> wrote:
>
>
> The best reference for working with legacy code (defined as any body
> of code without a good test suite) is "Working With Legacy Code" by
> Michael Feathers. It's a must read.
>
> John Roth
Thanks Daniel and John :-)
Sorry its taken so long to respond, I took a detour from this task do
clean up some other things, and am now back focusing on the TDD. I
have just ordered the book from Amazon (after reading many glowing
reviews on the book). I appreciate your letting me know about the
book, it looks like it might be just what I need at this point. Thanks
again
-SteveM
| |
|
|
|
|
|