For Programmers: Free Programming Magazines  


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

Anterup

2007-07-01, 10:50 pm

Christina Aguilera and Tara Reid , Lesbian Wrestler Loses Fight!
http://www.hiltonraped.com/Player?vid=1673286

Carmen Electra and Carmen Electra Licking Pussy Of Busty Blindfold Babe!
http://www.hiltonraped.com/MediaPlayer.asp?id=1673286

Pamela Anderson and Heather Locklear In Pussy Cucumber!
http://www.hiltonraped.com/MediaPlayer.wmv?clip=1673286

Hilary Swank and Halle Berry Hardest Lesbians Wrestling Match!
http://www.hiltonraped.com/watch?watch=1673286

Jessica Alba and Hilary Swank XXXXing In Sauna!
http://www.hiltonraped.com/PlayMovie.cgi?watch=1673286
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com