shane_kelly | 1 May 2005 07:04

Re: Refactoring in VB2005

I've tried Ref++, but not much more than tried.  It's pretty slow and doesn't work across 
projects.  We have a big solution with >300 projects that are not well organized so this 
was an important feature so I didn't bother looking at it any closer.

We are mainly using C++, but Microsoft has included some refactoring support for C# in 
VS2005.  I'm not sure about VB support, but nothing yet for C++.  I'm told this is in the 
works for a future version, but that's likely to be another year and a half out.

I've briefly reviewed Visual SlickEdit and their product was just too slow to on a project our 
size.  On smaller projects it seemed fine, but it would crank away on an extract method for 
about a half an hour.  I was never patient enough to get a rename to finish.  Their editor is 
very nice, and really more of an IDE than an editor, definitely worth a look.

Shane
--- In refactoring <at> yahoogroups.com, Mike Counsell <mcounsell0 <at> y...> wrote:
> Hi Folks,
> 
> I agree, there must be plenty of demand. I've heard of Ref++, so someone 
> is already working in this area. I've not got around to trying it out yet.
> 
> Does anyone know what Microsofts plans are? Are they not planning to 
> implement refactoring support into the IDE, I'm out of touch with the 
> latest .NET IDE versions so maybe I missed something that exists already?
> 
> Mike
> 
> Steve Heller wrote:
> 
> >
> > --- Richard Morris <khiron <at> y...> wrote:
(Continue reading)

Mike | 1 May 2005 19:00
Picon

Re: Re: Refactoring in VB2005

Hi,
 
    Does refactoring support really make your life easier?  Could it be that good old Search-And-Replace is already good enough, even providing for a finer degree of control in some cases?  I tried out resharper at one point and found the extra information popping up all around me just got in the way.  And I don't like filling in popup forms.  I'm very willing to accept that I just need to retrain myself, but for now I'm skeptical.
 
Mike
Steve Heller | 1 May 2005 19:55

Re: Re: Refactoring in VB2005

On Sun, 1 May 2005 13:00:10 -0400, Mike <michael.net <at> gmail.com> wrote:

>Hi,
>  Does refactoring support really make your life easier? Could it be that 
>good old Search-And-Replace is already good enough, even providing for a 
>finer degree of control in some cases? 

Not for me, it isn't. For example, how would you use
search-and-replace to execute "extract method"?

Steve

 
Yahoo! Groups Links

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

<*> 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/

Mike | 1 May 2005 20:36
Picon

Re: Re: Refactoring in VB2005

Not for me, it isn't. For example, how would you use
search-and-replace to execute "extract method"?
 
I wouldn't.  Extract method never seems to take much effort or be worth a tool.  But as I say that, I recall that not even that long ago, people who had no decent IDE choices were saying that text editors were perfectly fine for development, and they were being sincere, they just didn't know any better.  That's what I'm getting at, perhaps I just don't know any better.
 
Mike

 
Marian Drumea | 1 May 2005 17:08
Picon
Favicon

Toronto's Software Architects group invites you to event

Hi The Refactoring Group members,

We are proud to announce the first event of the IASA's Toronto 
Chapter. Please join us in welcoming Scott Cairney 
(http://blog.scottcairney.com) on May 10th, 2005, at 6 PM. Scott, a 
BizTalk MVP, will share from his experience Architecting for a 
Services Oriented Enterprise.

If you would like to attend the event, please register at 
http://www.iasarchitects.org (make sure you choose the Toronto 
chapter on the Registration page). We are still working out the 
location details and will be back with details. Of course, pizza and 
refreshments included.

A new player in the GTA, the Toronto Chapter of the International 
Association of Software Architects provides a forum for business, 
technology and systems architects to share knowledge about 
application architecture, multi-systems architectures, vertical and 
horizontal re-use strategies, architecture methodologies and 
strategies, and architecture definitions.

Of course, as a new established user group, we need all the support 
we can get: your contribution and involvement is greatly appreciated. 
If you would like to participate in the administration of the group, 
drop me a line at mdrumea <at> rogers.com.

Scott Cairney – Bio

Scott has been leading a series of successful integration projects 
for Cactus Commerce as well as working side-by-side with Microsoft 
product teams.
Scott recently collaborated with the BizTalk Server team on 
integration to UCCnet. This venture has resulted in a product 
offering based on BizTalk server 2004. He is currently working on one 
of the largest deployments of BizTalk server, replacing the entire 
EDI/B2B infrastructure for a large technology company.
Scott has delivered talks at numerous events including Tech-Ed, Dev 
Days, Global Briefing, and Envision. Scott has also presented 
training sessions and customer talks for Microsoft on .NET Enterprise 
Servers, business process integration and e-business in general.

Thank you and very happy coding!

Marian Drumea
President, IASA Toronto Chapter

 
Yahoo! Groups Links

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

<*> 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/

richardjfoster71 | 2 May 2005 14:19

Re: Refactoring in VB2005

--- In refactoring <at> yahoogroups.com, Mike <michael.net <at> g...> wrote:
> That's what I'm getting at, perhaps I just don't know any better.

Mike,

I felt pretty much the same way, but then I actually gave refactoring
tools (especially ReSharper) a better evaluation. Yes, initially I
found the pop-up's extremely annoying, but now I've got used to them I
wouldn't go back. Heck, if my company doesn't process the purchase
order for ReSharper soon I'm going to buy it with my own money!

That's not to say things couldn't be improved. It's possible that the
refactoring tools in the next release of the Visual Studio IDE will
meet my needs without using a third-part add-in.

Oh, and the things that really "sold" me on ReSharper: Extract
Interface, and Change method Signature.

Regards,
Richard

 
Yahoo! Groups Links

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

<*> 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/

Ramon Leon | 2 May 2005 19:48

RE: Re: Refactoring in VB2005

> 
> Hi,
> 
>     Does refactoring support really make your life easier?  Could it
be
> that good old Search-And-Replace is already good enough, even
providing
> for a finer degree of control in some cases?  I tried out resharper at
one
> point and found the extra information popping up all around me just
got in
> the way.  And I don't like filling in popup forms.  I'm very willing
to
> accept that I just need to retrain myself, but for now I'm skeptical.

Um... it's hard to even take that seriously.  VS.net is almost worthless
without re-sharper IMHO; it's that much of a difference.  Most, maybe
all of the cool features that will be in VS 2005, you can have now with
re-sharper, why wait?  Why wait for Microsoft to copy Intelli-J when you
can damn near just have it now?

How can you not see the value in things like the IDE automatically
importing namespaces for you as it watches you program, or automatically
renaming all uses of a class, as well as the file it's in, when you
rename the class.  Search and replace simply doesn't cut it, it's too
error prone, too... context unaware.  Extract method... sorry, but
nothing beats highlighting a chunk of code and having the method with
all correct parameters written automatically for you.  Automatic means a
lot, it means you can slice and dice code so fast that you often try out
several different ideas before you find the one you like most, in less
time than it'd take you to manually extract the first method.  How about
automatically suggest appropriate variable names based on your personal
preferences, or automatically taking a constructor arg you just added,
and initializing and declaring the member variable for you?  How about
automatically writing new constructors completely or automatically
extracting an interface out of a class, and replacing all references to
that class to use the new interface?

Re-sharper is the most unobtrusive intelligent plug-in I've yet seen, I
love seeing that little light bulb popup, small, not in my way, and
offering just a quick alt + enter + enter punch to do something for me
that pretty much always saves me tons of effort.  Mike, if you don't see
the value of automated refactoring, might I suggest that you haven't
really given it a try, a real try, not just a two day let me look at it
thing, but an honest let me do this for a month and get over my initial
bad reaction to the learning curve that every new tool imposes.  To
those accustomed to automated refactoring, doing without is like
programming in the dark ages, seriously, this is a must have tool.

 
Yahoo! Groups Links

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

<*> 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 Carter | 3 May 2005 23:10
Picon

Re: Passing null around in a system

On Tue, 12 Apr 2005, Vijay Baliga wrote:

> Don't pass null in production code unless you have no other choice. I know
> that some libraries out there expect you to, but when you write fresh code
> there are better alternatives. If you are tempted to use null in production
> code, find the places where you are returning nulls and passing nulls, and
> consider a different protocol. Consider using the Null Object Pattern
> instead.

This caused me to go an look at my code and contemplate cases where I
use nil. (I'm speaking Ruby which has the following special
properties....
   * Like C++ it allows you to specify default values for parameters.
   * nil === false, everything else is true.)

Thus the most common case where I use a nil parameter is as a default parameter
for example....

def issue_command( command, description = nil)
   description = "Do #{command}" unless description
   ...
end

If the user doesn't set the description, the description is just set
to "Do XXX" where XXX is the command issued. (Ok, lame example, but
you get the general principle, the real cases are substantially more
complex.)

The other pattern is to switch behaviour in and out. If the routine is
expected to perform some variant processing as described by a
parameter, I could do....(speaking C)

void do_stuff( bool_t doExtraStuff, int extraStuffParameter) {
  ...
  if (doExtraStuff) {
      // use extraStuffParameter
  }
  ...
}

In ruby I tend to do...

def do_stuff( extraStuff = nil)
  ....
  if extraStuff
    // Use extraStuff
  end
  ...
end

Sure I could use a NullObject pattern, but in these cases I didn't
(don't) feel it is worth spinning an extra class just for 5 lines of
code.

The refactoring I prefer in these cases is to split do_stuff, this is
especially effective if the "if extraStuff" is either at the front or
the back of do_stuff, and doesn't contain any local variables of do_stuff. ie.

Take out the "if extraStuff" and move it into the calling code. So the
invocation becomes either...

do_stuff
do_extra_stuff( extraStuffParameter)

or just plain...

do_stuff

depending on what I mean.

However, sometimes (rarely) the extra stuff is really deeply embedded
within "do_stuff" and cannot sensibly be extracted. So I leave it and
use a null default parameter.

I see I also use a curious subcase of the NullObject pattern. 
def find_files( matching_regex = /./)
  ...
end

ie. The default is a regex that will match all files.

John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter <at> tait.co.nz
New Zealand

Somewhere on the edge of a Galaxy, one of literally billions of such
galaxies, is a sun, one of literally billions of suns in that
galaxy.

Orbiting that sun is a small rock 330000 times smaller than that
sun.

This rock is  covered by a very very thin scum  of life. (Think 6000km
of rock followed by a meter or so of biomass.)

Amongst the millions of species in that scum are many hundreds of
thousands of types beetle and a mere handful of primates.

Surprisingly enough, this email does not originate from a beetle.

It originates from just one of the 6 billion vastly outnumbered humans.

I trust you will keep this perspective and context in mind when
reacting to this email.

 
Yahoo! Groups Links

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

<*> 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/

Keith Nicholas | 4 May 2005 03:38

RE: Passing null around in a system

perhaps its worth thinking about not passing parameters into methods that create or remove extra behaviour.

From: refactoring <at> yahoogroups.com [mailto:refactoring <at> yahoogroups.com] On Behalf Of John Carter
Sent: Wednesday, 4 May 2005 9:11 a.m.
To: refactoring <at> yahoogroups.com
Subject: Re: [refactoring] Passing null around in a system

On Tue, 12 Apr 2005, Vijay Baliga wrote:

> Don't pass null in production code unless you have no other choice. I know
> that some libraries out there expect you to, but when you write fresh code
> there are better alternatives. If you are tempted to use null in production
> code, find the places where you are returning nulls and passing nulls, and
> consider a different protocol. Consider using the Null Object Pattern
> instead.

This caused me to go an look at my code and contemplate cases where I
use nil. (I'm speaking Ruby which has the following special
properties....
   * Like C++ it allows you to specify default values for parameters.
   * nil === false, everything else is true.)

Thus the most common case where I use a nil parameter is as a default parameter
for example....

def issue_command( command, description = nil)
   description = "Do #{command}" unless description
   ...
end

If the user doesn't set the description, the description is just set
to "Do XXX" where XXX is the command issued. (Ok, lame example, but
you get the general principle, the real cases are substantially more
complex.)

The other pattern is to switch behaviour in and out. If the routine is
expected to perform some variant processing as described by a
parameter, I could do....(speaking C)

void do_stuff( bool_t doExtraStuff, int extraStuffParameter) {
  ...
  if (doExtraStuff) {
      // use extraStuffParameter
  }
  ...
}

In ruby I tend to do...

def do_stuff( extraStuff = nil)
  ....
  if extraStuff
    // Use extraStuff
  end
  ...
end

Sure I could use a NullObject pattern, but in these cases I didn't
(don't) feel it is worth spinning an extra class just for 5 lines of
code.

The refactoring I prefer in these cases is to split do_stuff, this is
especially effective if the "if extraStuff" is either at the front or
the back of do_stuff, and doesn't contain any local variables of do_stuff. ie.

Take out the "if extraStuff" and move it into the calling code. So the
invocation becomes either...

do_stuff
do_extra_stuff( extraStuffParameter)

or just plain...

do_stuff

depending on what I mean.

However, sometimes (rarely) the extra stuff is really deeply embedded
within "do_stuff" and cannot sensibly be extracted. So I leave it and
use a null default parameter.

I see I also use a curious subcase of the NullObject pattern.
def find_files( matching_regex = /./)
  ...
end

ie. The default is a regex that will match all files.



John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter <at> tait.co.nz
New Zealand


Somewhere on the edge of a Galaxy, one of literally billions of such
galaxies, is a sun, one of literally billions of suns in that
galaxy.

Orbiting that sun is a small rock 330000 times smaller than that
sun.

This rock is  covered by a very very thin scum  of life. (Think 6000km
of rock followed by a meter or so of biomass.)

Amongst the millions of species in that scum are many hundreds of
thousands of types beetle and a mere handful of primates.

Surprisingly enough, this email does not originate from a beetle.

It originates from just one of the 6 billion vastly outnumbered humans.

I trust you will keep this perspective and context in mind when
reacting to this email.
Bryan Ewbank | 4 May 2005 17:31
Picon

Re: Passing null around in a system

Rather than splitting do_stuff into pre-extra, extra, and post-extra,
can't this instead a base class with a null doExtraStuff() function,
and a derived class with a non-null extraStuff():

  B::do_stuff() [ ... extraStuff(); }
  B::extraStuff() { }

  D : public B;
  D::extraStuff() { use extraStuff; }

Then you create the object based on the algorithm you want, rather
than with a trigger parameter to the sole function.

- Bryan

On 5/3/05, John Carter <john.carter <at> tait.co.nz> wrote:
> def do_stuff( extraStuff = nil)
>   ....
>   if extraStuff
>     // Use extraStuff
>   end
>   ...
> end
> 
> Sure I could use a NullObject pattern, but in these cases I didn't
> (don't) feel it is worth spinning an extra class just for 5 lines of
> code.

 
Yahoo! Groups Links

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

<*> 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