Re: Ambiguous Refactoring Solution

Adam Sroka <[email protected]>
Newsgroups gmane.comp.programming.refactoring
Message-ID <[email protected]>
On Thu, Sep 24, 2009 at 11:01 PM, Olof Bjarnason
<[email protected]> wrote:
>
>
>
> 2009/9/25 Richard <[email protected]>
>
> >
> > - Do you write unit tests for automated refactorings?
>
> Nope. I think this is the culprit of the discussion - the distinction
> between automated refactoring and manual refactoring.
>
> When Adam and others, including me, use the word 'refactoring' we
> generally mean manual refactoring, not automated refactoring.
>

I think refactoring potentially includes some mixture of automated
tools and manual changes (Or cut-and-paste). However, I think that
improving the design of code generally involves multiple small
refactorings that add up quickly. The problem is that "rename,"
"extract method," "move method," etc. are all examples of
refactorings, but so are "Replace Conditional with Polymorphism,"
"Remove Middle Man," "Separate Domain from Presentation," etc. And if
you get into the patterns stuff and strategies that Joshua and
Industrial Logic have promoted it gets way more complex than that way
quick.

To do anything really interesting you have to significantly change the
design. You can do that by applying what seem like relatively trivial
changes in succession. However, you are still significantly changing
the design. You need a way to know that it is still right, and
VisualStudio isn't going to cut it (Though it will run your tests for
you.)

We're probably still just talking about C#, C++, and Java. What if you
are refactoring in Ruby, Python, Perl, even C? The compiler is not
going to save you any more (Not that it necessarily would have.) The
tools may not catch the problem either, but tests still would.


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

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.