Re: Re: Ambiguous Refactoring Solution
Olof Bjarnason <[email protected]>
| Newsgroups | gmane.comp.programming.refactoring |
|---|---|
| Message-ID | <[email protected]> |
2009/9/23 Donaldson, John (GEO) <[email protected]> > > > > Bryan, > > > I do not have tests for the class. > > The reason is that I don't feel tests on this class will pay for themselves. Tests are invaluable when doing refactorings. Adding tests after the code is written can be painful - but it will also guide you on what refactorings to do (to make the functionality encapsulated by the class testable). For example, you might find certain methods hard to test from the outside - then move them to a separate class and make it public/testable. There you go, you've refactored the class. But again - if there is no driving force (fixing errors, adding new use cases), I would wait with refactoring. Of course, one driving force could be the will to learn refactoring.. > > Add some tests! They can be simple, they won't cost much. > They will probably make you think about refactoring - for example, how much work is it create an instance of the class? > > John D. > -- twitter.com/olofb olofb.wordpress.com olofb.wordpress.com/tag/english ------------------------------------ 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/