Saturday, April 14, 2007

Visual Studio 2005 -- refactoring? What's that?

So, I'm sitting here, staring at a shiny new version of Visual Studio 2005 Professional, and I'm wondering what the hell is going on with the refactoring support?

First of all, the UI for them is awful: even though there's only a handful of them available, that's no excuse for them to always be visible in the context menu. Smart IDE? How is this smart?

Yes, that's real smart. Even better: try to select any of the invalid options. For "Reorder Parameters," you'll get the completely mysterious "The member is defined in meta-data."

I think it really meant to say, "DURRR, I'm sorry, I can't perform this refactoring because that's impossible and I'm _stupid_ for even giving you the option."

The worst part? SharDevelop 2.0's refactory options -- a free, OPEN-SOURCE .NET IDE, built by people in their spare time -- are just, in a word, superior. First of all, all the refactorings are context sensitive, which means I don't have to navigate an ugly morass when I'm trying to find the only applicable refactorings.

Secondly, there are more of them -- more and _useful_.

Witness SharpDevelop's refactoring options for an interface, for instance:


The options you don't see for the IStuff interface are: "Move to file IStuff.cs," "Rename," "Find Derived Classes," and "Find References."

SharpDevelop has TONS of useful refactorings that really put Visual Studio 2005 Professional's over-priced ass to SHAME. For instance, the whole 'PropertyChanged' event idiom for data-binding? SharpDevelop has a refactoring for that -- right click on a property and you'll have the option, "Create Changed-event," which will not only create a PropertyChanged event, but insert the code to invoke it at the end of the property's set method!

Then, right click on the event that SharpDevelop just created and you can create an On-Event wrapper.

See, that really pisses me off -- for as pricey as the IDE is, it doesn't come with a fraction of the useful refactorings some "hobby" IDE like SharpDevelop ships with out of the box.

If I even want to come close to those kind of refactorings I've got to drop almost $300 on ReSharper. Seriously -- the IDE is, what, $800, plus the extra $300 just to make it as functional as a freeware solution like SharpDevelop? Christ almighty, is there something _wrong_ with the Visual Studio team, to think that this level of functionality was good enough?

All that money and it doesn't even support Unit Testing and Code Coverage out of the box -- unlike, say it with me now, 'SharpDevelop!'

The only reason I even have Visual Studio 2005 right now is because one of my clients has developed an ASP.NET solution as a Web Application Project, which SharpDevelop doesn't support correctly atm.

Geez, Open Source sure has changed the playing field a lot. It used to be that commercial products were superior to their free counter-parts in every way, a reason why you'd consider the investment in a heartbeat.* But now, with projects like SharpDevelop closing the gap in terms of functionality with a price-tag of $0, it feels a little queasy to be spending $800+ on a product that only offers minimal improvements over the free alternatives.

Well, that's enough ranting for now -- let's hope the Visual Studio team aims a little (a lot, way a lot) higher for the Orcas release of Visual Studio.

* I've got a copy of Visual Studio 6 lying around here; back when I bought it nothing else could compare.