Larkware

We get up early so that you don't have to.

Review: Refactor! Pro

Refactor! Pro for Visual Studio .NET, $99
Developer Express
Las Vegas, Nevada
(702) 262-0609 
http://www.devexpress.com

There are times when Visual Basic developers feel like second-class citizens. One of those times came earlier in the Visual Studio 2005 development cycle, when Microsoft announced that refactoring support in the product would be limited to C#. Fortunately for VB developers, this is one of those times when the hue and cry has actually had some effect. Although Microsoft hasn't actually reversed the decision about writing their own refactoring for VB .NET, they have arranged to have Developer Express supply a free version of Refactor! for Visual Basic 2005 users. At the same time, Developer Express has released Refactor! Pro, which supports both VB .NET and C#, and which works in Visual Studio .NET 2003 so you can use it in your current production environment. I've been beta testing it for a few months, in conjunction with their indispensable CodeRush add-in, and all I can say is that this thing rocks. The little movie below will give you an idea, although my screen recorder didn't capture the screentips so you miss a little of the yummy visual goodness.

Refactoring, of course, refers to transforming code in such a way that it keeps the same outputs while becoming easier to read and understand. Refactor! ships with a batch of useful refactorings: you can extract methods or properties, introduce locals or inline variables, reverse conditionals, rename all sorts of things safely, move and split initializations, and introduce constants, among other things. It's also very, very smart about when to make any of these available. Whenever it makes sense to have one of these refactorings performed, you get three little dots on screen; hover your mouse there for a moment and you get a tag you can click to do the work. For example, if the editor caret is in a number, the "introduce constant" refactoring is available.

Refactor! uses the same drawing technology as CodeRush, making a video game out of your code. When you introduce an overload, for example, you actually see strikethroughs appear on parameters being removed; when you change the name of a method in one place, the typing appears in several places at once, and is highlighted everywhere. Things move smoothly and color and animation are used well. Some people may find this distracting but once you get used to this sort of thing it's hard to go back to a text editor that doesn't take advantage of the dynamic nature of Windows. The tool is utterly non-modal, and never interrupts your work with annoying dialog boxes.

If you're a VB developer, you definitely want to get the free version for VS 2005. If you're a C# developer, it's worth checking into the Pro version - and have a look at CodeRush while you're at it. But beware. This stuff is addictive.

  Click for larger screenshot

  Click for animated movie (191 KB GIF made with DemoCharge 2005)

Mike Gunderloy is the lead developer for Larkware and author of numerous books and articles on programming topics.