Evaluating CodeRush

A while back I went on a productivity tool bender and installed and trialled everything I could get a hold of (I wonder why). It's been a lot of fun and soon I'll need to post a list of what I tried and what I ended up using on a day to day basis. Before I do that though I have one more decision to make. CodeRush or ReSharper.

If you haven't seen these two tools before then I highly recommend that you have a look as they turbo-charge your development capabilities and take the drudgery out of writing code, just leave you with the good bits. But they will not work together (I'm not even sure why you'd try) and the selection of one over the other appears to be based on Personal Preference and Peer Pressure. As I wanted to genuinely improve my development productivity and not just impress my mates I decided to give them both a whirl and make my own decision.

First up I have been evaluating CodeRush and Refactor! Pro from Developer Express. My evaluation license is nearly up and I must say, I'm going to miss this when it's gone. It seriously made me wish I had more coding to do.

CodeRush is a plug-in for Visual Studio that is made up of a number of little productivity enhancers that all add up to a big productivity boost at the end of a days hard coding. These enhancements start simple like auto completion of open brackets as you type, through to the moderately more complex navigational aides called "locators" which you can leave like a trail through your code and travel back to quickly (think bookmarks but more usable) and much, much more. At the high end of the scale is a full mnemonic templating engine allowing to type rpi[space] and get a fully implemented Read-only Property of type Int wrapped around a private integer variable (and all conforming to your code conventions).

It definitely takes some getting used to and I likely never would have got the hang of it if it hadn't been for the Context-Sensitive CodeRush Training window. This little tool comes with CodeRush and when switched on it shows you what templates you have available at the moment along with a number of other keyboard shortcuts you might like to try. "Do you need to write a try-catch-finally block, well type tcf[space] and sit back and watch the magic." It even drops some little locator beacons so that you can quickly navigate around the new piece of code.

And if you aren't happy with what you've got that's where Refactor! Pro come in. Refactor! Pro is a tool to enable you to make sweeping changes to your codebase whilst maintaining consistency (little changes too). While it has the refactorings which come with Visual Studio (Re-Order Parameters, Rename Member, Extract Method, etc.) it gets exceedingly more powerful very quickly. How about being able to modify a method with 15 return statements so that it has one return statement at the end with return values being accumulated as you go? Well you can with the "Introduce Result Variable". Or back to the 15 return statements from the single return scenario?

The #1 best point about Refactor! Pro is that it has one hot-key. That's right one. You don't need to dance your fingers over the keyboard like a crazed concert pianist octopus with an Encyclopedia Fowler subscription. It's all context sensitive and it reads your mind. Spooky.

A nice touch is that both tools tend to mess with your undo/redo buffer so that a single action in CodeRush or Refactor is a single item in the Undo/Redo Stack.

On top of all of this, both CodeRush and Refactor! Pro like to show you what is going on. What do I mean by that? I mean they actually draw into the surface of the IDE to show you what they are doing and how your code is structured.

This makes it very easy to quickly pick up details without having to actually read code. I was a little concerned of the effect this would have on my machine. With all those arrows and things flying around, I figured that my machine would grind to a halt. Thus far though, no problems.

It is important to note that these tools are clever but not magic. They don't do anything you couldn't do by hand. They just enable you to do them like an ancient king might have done them. You have the idea and someone else puts it into practice.

My favorite example is if you move the cursor into the correct position and type x[space]PasswordFileMissing[enter] you will have a fully documented and ready to go exception class called PasswordFileMissingException. It will have 4 constructors according to the best practice rules of writing your own exception classes including that elusive protected serialization one. And all for 22 keystrokes.

The only drawback is the price, which is what everyone complains about. I don't think it's too expensive for what it does, I think it's well worth the money. I just don't HAVE the money to spend on an IDE plug-in. If it does turn out that I like CodeRush better than Resharper then I will find the money though. I feel like half a programmer without it now.

You can find CodeRush here: http://www.devexpress.com/Downloads/NET/IDETools/CodeRush/
They tend to have evaluation periods throughout the year so if they don't have one when you look, come back later :)

Now I get 30 days exercising ReSharper. If anyone needs me, I'll be coding. Bring it on.
Posted by: Mike Minutillo
Last revised: 27 May, 2011 02:42 PM History


02 Dec, 2007 04:30 AM @ version 0

Actually a very good question. The truth is that I have yet to really give ReSharper a good go because a lot of my dev work recently has been Sharepoint, BizTalk, SSIS, pointy-clicky style work.

Starting Monday I have 3 months of fairly solid development so I'm going to grab another demo version R# and get really serious about learning it's ins and outs.

As a consolation prize I'm going to run through a few of the other tools I have installed which have made a big difference to my day to day activity.

01 Dec, 2007 02:46 PM @ version 0

So which one wins in a fight? CodeRush w. Refactor or Resharper?

Inquiring minds want to know...

15 Oct, 2007 01:42 PM @ version 0

I think the following video sums it up pretty neatly Build an MVP Mail Reader App using Windows forms and CodeRush in 10 minutes.

15 Oct, 2007 11:53 AM @ version 0

Yeah you crazy VB guys get Refactor! for free. I must admit that I haven't tried the tools in VS2008 even though I do have it installed. It'd still be too hard for me to determine which goodness was VS2008 and which was CodeRush.

15 Oct, 2007 09:44 AM @ version 0

Nice post. It'd be interesting to see how these work under Visual Studio 2008, particularly with the new Intellisense on steroids. According to their website both CodeRush and Refactor! support 2008.

Thanks to Nick I'm mostly a VB.NET developer these days, I don't think ReSharper has as much to offer me.

No new comments are allowed on this post.