Re: Ambiguous Refactoring Solution

hal arnold <[email protected]>
Newsgroups gmane.comp.programming.refactoring
Message-ID <[email protected]>
Very good point. [And a reminder to myself, not to speak in absolutes! ]. Sometimes it's better, and more importantly, faster to rely on manual tests to get to a better design. 
I have to say, though, it's not a piece of advice I'd give to 'younger' developers; cause I know that they'd understand 'sometimes' to mean 'almost always, if you need to'. 
Thanks, point taken.

/h






 




    
                  >

> It's true that we 'occasionally' have to resort to doing a particular

> refactoring without the benefit of a test. I would guess that you've come

> across this idea from reading Feather's book, where he discusses 'seams'. I

> think he made the point, that it's rare and comes about when you can't

> figure out a reasonable way to write a focused test first.  I can count the

> times I've had to resort to that; it would be sloth on my part if it

> happened more often.

>



Hi Hal,



I'm not so sure. Some folks I respect a good deal recently encountered

legacy code that was really poorly designed.  They knew how to write tests

for it.  Yet they felt that writing such tests would only couple the tests

to a very poor design.  They decided to refactor first, sans tests, manually

test that all was ok, then write the tests against the newly refactored.  I

think that was likely a sensible path to take in that situation.



-- 

best regards,

jk



Industrial Logic, Inc.

Joshua Kerievsky

Founder, Extreme Programmer & Coach

http://industriallo gic.com

866-540-8336 (toll free)

510-540-8336 (phone)

Berkeley, California



Learn Code Smells, Refactoring and TDD at

http://industriallo gic.com/elearnin g



[Non-text portions of this message have been removed]




 

      

    
    
	
	 
	
	








	


	
	


      

[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/refactoring/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/refactoring/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.