CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Brendan Tompkins [MVP]

Blog First. Ask Questions Later.

Best Refactoring Tools?

Does anyone know of any good refactoring tools for Visual Studio?  I've been playing around with ReSharper, and although it's pretty cool for refactoring, it pretty much kills the IDE for normal development.  It seems to override CodeRush's hooks too, and if I have to choose, it's CodeRush all the way...

-Brendan



Comments

Brendan Tompkins said:

David.. Using CodeRush really speeds up development, IMO and one tends to rely on it... So, when a tool like ReSharper disables another tool that you rely on, that's a show stopper.

That aside, it overrides a bunch of intellisense stuff with it's own implementation - which may have some nice features, but is really slow... Don't you agree? I can't spare a second when I type a "." to wait for intellesence to come up. I tried it out for a few days, but it got really annoying after a while.

-Brendan
# August 16, 2004 6:46 AM

KevinT said:

Brendan - the time delay on the intellisence is configurable, and the default is quite high (1000ms i think). AFAIK this is for people who don't rely on intellisense and don't want to be bugged by things flashing on the screen whilst they are coding. You can set the time right down to 0ms on the "Code Completion" tab item.

The builds pre 104 were quite resource heavy at times, but they have ironed it out pretty well now.
# August 16, 2004 6:57 AM

Brendan Tompkins said:

Kevin, David...

I'll re-install and play around with it some more, I didn't really look into the configuration. I would have thought that the time delay by default should be the same as normal VS time delay. Hmmm.

Maybe I judged it too quickly, but it just really seemed to slow my devlopment down. I'm comparing this to CodeRush. CodeRush instantly made the IDE better, and in my opinion made writing code easier.
# August 16, 2004 7:11 AM

David Hayden said:

I agree that I wouldn't be too happy if Resharper "disabled" functionality I relied upon in another tool. I had plans to check out CodeRush so this concerns me a bit.

I can validate what KevinT mentions about the option to configure the time delay of code completion. There is an option in Resharper that allows you to adjust the intellisense popup interval. I have mine set to 0ms, which allows the popup to display immediately. I haven't noticed any delays in coding, but I am not building enterprise applications either.

I haven't been using the refactoring as much as I had originally thought and am really mainly enjoying the other features like namespace optimization, adding of namespaces, creation of properties from private fields, auto creation of methods, auto creation of method parameters, auto this and auto that :) I am not suggesting Resharper is the greatest tool and that these are revolutionary features, but it has certainly opened my eyes to what I have been missing. I feel like I have removed my training wheels from my bike :)

Would you say CodeRush is even better at doing those types of things? Since testing ReSharper, I have been able to focus more on the code and less on syntax and other overhead. And, I haven't even started using the Live Templates functionality yet, which is probably going to blow my mind :)
# August 16, 2004 7:31 AM

Brendan Tompkins said:

David.. I did notice the nice namespace optimization features.

Code Rush does a nice job of creating properties from class members, but I really like the templated code building features. For example, if I copy a class name, then type coll[space] I get a complete strongly-typed collection. I can configure this template too. It also has a bunch of little tweaks that that save typing.

Honestly, I can't say that CodeRush is better or worse than ReSharper for this stuff. I didn't use it long enough, and mainly used the refactoring features. I did like these, and can say that ReSharper has it all over CR in this area..
# August 16, 2004 7:41 AM

David Hayden said:

I have a similar add-in just for strongly-typed collections and can't agree with you more on how truly valuable that type of functionality is.

I will download the CodeRush eval tonight and hope CodeRush and ReSharper don't disable the usefulness of each other. That would be a shame to have to pick one over the other.

It has been 3 to 4 weeks since I have dropped into the DevExpress Newsgroups, but I thought they were having some CodeRush performance issues? I remember reading that they were making some pretty significant architectural changes, too, which is kind of why I was holding off on the download. Talented group of developers. They have probably ironed out the issue(s) or perhaps I misunderstood the conversations in the CodeRush newsgroup.
# August 16, 2004 9:14 AM

J Donnici said:

Hi Brendan,

Like you, I'm a big fan of CodeRush. I try to spend a little time each week learning new features in it, but that Options dialog is so rich... and I think I need to brush up on regex to really make it sing.

Anyway, I'm wondering about that collection template you have. I looked and couldn't find it -- is that something you added, or was it there by default (in which case I must have nuked mine at some point)?

I've been using a little (outside of VS) utility I put together for creating STCs... it lets me choose which types of members I need to support, etc, but I don't know why I didn't think of using CR for that.

Cheers,

Jeff
# August 17, 2004 6:14 AM

Brendan Tompkins said:

Jeff. Look under Templates..Types it's called "coll" .. I've modified mine a bit to add designer stuff, here it is:

[ToolboxItem(true)]
[DesignTimeVisible (true)]
[Serializable()]
public class «Paste»Collection : CollectionBase, IComponent, IDisposable
{

#region IComponent Members
// Added to implement Site property correctly.
private ISite _site = null;

/// <summary>
/// Get/Set the site where this data is
/// located.
/// </summary>
public ISite Site
{
get { return _site; }
set { _site = value; }
}
#endregion

#region IDisposable Members
/// <summary>
/// Notify those that care when we dispose.
/// </summary>
public event System.EventHandler Disposed;

/// <summary>
/// Clean up. Nothing here though.
/// </summary>
public void Dispose()
{
// Nothing to clean.
if (Disposed != null)
Disposed (this, EventArgs.Empty);
}
#endregion

// public methods...
#region Add
public int Add(«Paste» a«Paste»)
{
return List.Add(a«Paste»);
}

public void AddRange(«Paste»Collection a«Paste»)
{
for (int intCounter = 0; (intCounter < a«Paste».Count); intCounter = (intCounter + 1))
{
this.Add(a«Paste»[intCounter]);
}
}
#endregion
#region IndexOf
public int IndexOf(«Paste» a«Paste»)
{
for(int i = 0; i < List.Count; i++)
if (this[i] == a«Paste») // Found it
return i;
return -1;
}
#endregion

#region Insert
public void Insert(int index, «Paste» a«Paste»)
{
List.Insert(index, a«Paste»);
}
#endregion
#region Remove
public void Remove(«Paste» a«Paste»)
{
List.Remove(a«Paste»);
}
#endregion
#region Find
// TODO: If desired, change parameters to Find method to search based on a property of «Paste».
public «Paste» Find(«Marker»«Paste» a«Paste»)
{
foreach(«Paste» l«Paste» in this)
if (l«Paste» == a«Paste») // Found it
return l«Paste»;
return null; // Not found
}

// TODO: If desired, change parameters to Find method to search based on a property of MailStop.
public «Paste» Find(int hashCode)
{
foreach(«Paste» l«Paste» in this)
if (l«Paste».GetHashCode() == hashCode) // Found it
return l«Paste»;
return null; // Not found
}
#endregion
#region Contains
// TODO: If you changed the parameters to Find (above), change them here as well.
public bool Contains(«Marker»«Paste» a«Paste»)
{
return (Find(a«Paste») != null);
}
#endregion

// public properties...
#region this[int aIndex]
public «Paste» this[int index]
{
get
{
return («Paste») List[index];
}
set
{
List[index] = value;
}
}
#endregion
}
# August 17, 2004 7:13 AM

J Donnici said:

Brendan,

Thanks for the info. Under Templates, I don't have a tree branch called "Types". I do have "Types" under "Declarations", but it doesn't have a collection.

I've been using CR since before the official release and with each install I've restored my "settings" directory. I bet doing that means I haven't received any newer templates.

Hmmm... time to install it again, I think. ;-) Hopefully, a future version will give us the option of "merging" templates. In any case, thanks for the template!

Jeff
# August 17, 2004 9:23 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Brendan Tompkins

Brendan has been programming with .NET since the first public beta and is owner and operator of Port Technology Services, a consultancy company providing .NET application development services to the Maritime industry. In July, 2007, he was awarded the Microsoft MVP award for ASP.NET. He's also a proud co-founder of failed .COM startup Intrinsigo, and has had a hand in the failure of numerous other businesses. He currently runs CodeBetter.Com and Devlicio.us, and lives in Norfolk, Virgina with his wife Tiara and son Ian.

View Brendan's profile on LinkedIn

Check out Devlicio.us!

Our Sponsors

Free Tech Publications