Ralph Johnson | 2 Dec 00:57 2002
Picon

Re: Weaken Parameter Types.

>From: Martin Fowler <mfowlerlists <at> thoughtworks.net>
>That looks like a good one. I would call it Generalize Parameter. It can 
>work with interfaces as well as superclasses.

I'd call it Generalize Variable.  You can change the type of a 
variable from T to S if all the uses are compatible with S. 
Presumably S is a supertype (i.e. superclass or interface) of T.
How are parameters different in this regard from other variables?

-Ralph

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/umvwlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
refactoring-unsubscribe <at> yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

Sven Gorts | 2 Dec 09:31 2002
Picon

Generalize Variable

Wouldn't  "Generalize Parameter" communicate better ?

With "Generalize Parameter" its immediately clear that
some kind of signature change is involved. Also
focusing on a particular instance could simplify the
refactoring steps.

"Generalize Variable" seems more like a family of
refactorings rather than a single refactoring.

Kind Regards,
Sven. 

--- Ralph Johnson <johnson <at> cs.uiuc.edu> wrote:
> >From: Martin Fowler <mfowlerlists <at> thoughtworks.net>
> >That looks like a good one. I would call it
> Generalize Parameter. It can 
> >work with interfaces as well as superclasses.
> 
> I'd call it Generalize Variable.  You can change the
> type of a 
> variable from T to S if all the uses are compatible
> with S. 
> Presumably S is a supertype (i.e. superclass or
> interface) of T.
> How are parameters different in this regard from
> other variables?
> 
> -Ralph
> 
(Continue reading)

Ralph Johnson | 2 Dec 20:34 2002
Picon

Re: Generalize Variable


I don't think "Generalize Parameter" communicates better.
The point I was trying to make is that you can change the
type of ANY variable, not just the parameter of a procedure.
You can generalize an instance variable or a temporary variable.
Aren't these all the same refactoring?  If not, what is 
different about them?

-Ralph Johnson

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/umvwlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
refactoring-unsubscribe <at> yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

John Davis | 2 Dec 20:48 2002
Picon

Why Smalltalk Refactoring Browser is so successfull??

I want to know why Smalltalk Refactoring Browser is so successfull compared
with other existing refactoring tools?? Perhaps Smalltalk is a dynamically
typed programming language, but most refactoring tools target Java and C++,
which are statically typed programming language. Robert's Refactoring
Browser (http://st-www.cs.uiuc.edu/users/brant/Refactory/) contains
Smalllint tool (bad smell detector), which checks for over 60 common types
of bugs. This is remarkable feature because most of the refactoring tools
require programmers to identify the bad smell. Agree?? I just try to see
what other refactoring tools can learn from SmallTalk browser, or some
technical restrictions.

Please discuss..

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/umvwlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
refactoring-unsubscribe <at> yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

refactoringdr | 2 Dec 23:09 2002

Re: Why Smalltalk Refactoring Browser is so successfull??

Just a clarification. I'm only the coauthor of the Refactoring 
Browser. John Brant is the other author. (In an old incarnation, all 
of the classes were prefixed with BR (Brant-Roberts), but that 
confused everyone, so we swapped initials).

As to why it is so successful, I can only speculate, but here are 
those speculations:

1) It is the oldest refactoring tool having been around in some 
incarnation since about 1993.

2) The Smalltalk community had a culture of refactoring code long 
before we showed up with a tool to help them.

Any other additions to the list from closet Smalltalkers?

don

--- In refactoring <at> y..., "John Davis" <jrefactor <at> h...> wrote:
> I want to know why Smalltalk Refactoring Browser is so successfull 
compared
> with other existing refactoring tools?? Perhaps Smalltalk is a 
dynamically
> typed programming language, but most refactoring tools target Java 
and C++,
> which are statically typed programming language. Robert's 
Refactoring
> Browser (http://st-www.cs.uiuc.edu/users/brant/Refactory/) contains
> Smalllint tool (bad smell detector), which checks for over 60 
common types
(Continue reading)

James Walker | 2 Dec 23:46 2002
Picon

Re: Generalize Variable

At 06:34 AM 3/12/2002, you wrote:

>I don't think "Generalize Parameter" communicates better.
>The point I was trying to make is that you can change the
>type of ANY variable, not just the parameter of a procedure.
>You can generalize an instance variable or a temporary variable.
>Aren't these all the same refactoring?  If not, what is
>different about them?

I'd say that the difference lies in the scope of the variable/parameter.

For "Generalise Variable" (oops I put in an s instead of a z :) I would say
the scope is very constrained - the local function or class

For "Generalise Parameter" it's immediately clear that you are altering
the contract of the method - and thus quite probably the contract of the class.

I admit that the variable could be a public instance variable and then have
a large scope but in such a situation I'd say you should first wrap the
instance var in a getter and then "generalise return type" :)

James

--
Stock Software Pty Ltd

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/umvwlB/TM
---------------------------------------------------------------------~->
(Continue reading)

James Walker | 2 Dec 23:55 2002
Picon

Re: Why Smalltalk Refactoring Browser is so successfull??

I feel that an OO environment makes refactoring easier, and this is just
gut feeling rather than anything empirical, and thus the success of a
refactoring tool for Smalltalk vs one for C/C++?

I find the IDEA tool extremely good for Java but I've never used the
Refactoring Browser one so I can't compare them.

James

At 09:38 AM 3/12/2002, you wrote:
> > From: refactoringdr [mailto:roberts <at> refactory.com]
> >
> > Just a clarification. I'm only the coauthor of the Refactoring
> > Browser. John Brant is the other author. (In an old incarnation, all
> > of the classes were prefixed with BR (Brant-Roberts), but that
> > confused everyone, so we swapped initials).
> >
> > As to why it is so successful, I can only speculate, but here are
> > those speculations:
> >
> > 1) It is the oldest refactoring tool having been around in some
> > incarnation since about 1993.
> >
> > 2) The Smalltalk community had a culture of refactoring code long
> > before we showed up with a tool to help them.
> >
> > Any other additions to the list from closet Smalltalkers?
>
>Perhaps you were able to do a good job at it, because the Smalltalk
>environment made that possible.  Maybe others haven't done it
(Continue reading)

Mike New (noozoo | 2 Dec 23:38 2002

RE: Re: Why Smalltalk Refactoring Browser is so successfull??

> From: refactoringdr [mailto:roberts <at> refactory.com]
> 
> Just a clarification. I'm only the coauthor of the Refactoring 
> Browser. John Brant is the other author. (In an old incarnation, all 
> of the classes were prefixed with BR (Brant-Roberts), but that 
> confused everyone, so we swapped initials).
> 
> As to why it is so successful, I can only speculate, but here are 
> those speculations:
> 
> 1) It is the oldest refactoring tool having been around in some 
> incarnation since about 1993.
> 
> 2) The Smalltalk community had a culture of refactoring code long 
> before we showed up with a tool to help them.
> 
> Any other additions to the list from closet Smalltalkers?

Perhaps you were able to do a good job at it, because the Smalltalk
environment made that possible.  Maybe others haven't done it
(have they?) because it's harder in Eclipse or whatever?

Just a thought.

Cheers,
Mike New
----------------------------- _/ /\/\ /\/ --------------------------
J. Michael New                                mailto:mike <at> noozoo.com
+44 (0) 2089 522304                           http://www.noozoo.com/

(Continue reading)

yahoogroups | 3 Dec 00:08 2002

Re: Why Smalltalk Refactoring Browser is so successfull??


----- Original Message -----
From: "John Davis" <jrefactor.at.hotmail.com <at> yahoogroups.at.jhrothjr.com>
To: "refactoring <at> yahoogroups.com"
<refactoring.at.yahoogroups.com <at> yahoogroups.at.jhrothjr.com>
Sent: Monday, December 02, 2002 2:48 PM
Subject: [refactoring] Why Smalltalk Refactoring Browser is so successfull??

> I want to know why Smalltalk Refactoring Browser is so successfull
compared
> with other existing refactoring tools?? Perhaps Smalltalk is a dynamically
> typed programming language, but most refactoring tools target Java and
C++,
> which are statically typed programming language. Robert's Refactoring
> Browser (http://st-www.cs.uiuc.edu/users/brant/Refactory/) contains
> Smalllint tool (bad smell detector), which checks for over 60 common types
> of bugs. This is remarkable feature because most of the refactoring tools
> require programmers to identify the bad smell. Agree?? I just try to see
> what other refactoring tools can learn from SmallTalk browser, or some
> technical restrictions.
>
> Please discuss..

I don't know of a free refactoring browser in Python, but it does have the
popular PyChecker program (similar to lint.) Someone more familiar with
it would have to determine which (if any) of the refactoring code smells
it detects, since that isn't one of it's defined purposes.

Python is, of course, a dynamically typed language.

(Continue reading)

Sven Reichard | 3 Dec 02:16 2002
Picon

Re: Why Smalltalk Refactoring Browser is so successfull??

I haven't worked with this browser, and I have limited experience with 
Smalltalk, so the following reasons are just guessed:

* it is freely available;

* it is easy to handle;

* it is actually included in several standard IDE's;

* the average Smalltalker is more aware of good practice patterns.

BTW, can anybody point me to a port of the browser for Squeak?

Sven.

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/umvwlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
refactoring-unsubscribe <at> yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


Gmane