On Sat, Apr 18, 2009 at 2:00 PM, Phlip <[email protected]> wrote:
>
> Andrew Timberlake wrote:
>
>> I don't think that this is a good idea at all.
>> Definitely start testing immediately but I wouldn't rewrite the app at all.
>
> It ain't a rewrite. Imagine if you could put a bookmark at one end of all your
> source. Above the bookmark is completely tested and below the bookmark is
> incidentally tested or not at all.
>
> If you open a new project folder and start TDDing each feature, passing each
> test by copying code in, then what you are really doing is simply moving that
> bookmark down thru all your source until it hits the end.
>
> If opening a new folder squicks you out, then comment out _all_ the code, and
> TDD it to uncomment it. Either way, the resulting velocity is much higher than
> raw development.
>
>> For every bug fix and change, make sure you write tests for the
>> functionality you are working on (in a TDD/BDD way - before changing
>> the code.)
>
> That is the advice from /Working Effectively with Legacy Code/ by Mike 
> Feathers.
>
> --
>   Phlip
>   http://flea.sourceforge.net/resume.html
>

I'm not advocating commenting out ALL the code, just the code around
the feature you're working with.
When you've got an app with thousands of hours work, a rewrite is just too huge.
What I'm suggesting is an iterative approach to eventually getting the
entire project covered based on the features you're working with at
any given time.

Andrew Timberlake
http://ramblingsonrails.com
http://www.linkedin.com/in/andrewtimberlake

"I have never let my schooling interfere with my education" - Mark Twain

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to