Code Rush Vs. ReSharper

Its funny how sometimes there are pairs of products that contend for “best” and yet seem to be so evenly matched that the decision is often arbitrary, a pick made based on what your friends use, what you used first, which commercial (or Evangelist) is better. Some classics come to mind

Coke v Pepsi

Parallels v Fusion

Starbucks v Pete’s

None of that prevents adherents from a total conviction that whatever product they happen to use is far superior (see cognitive dissonance), but I’ve never been able to detect much difference.

There are times, however, when we are confronted with a choice between two products where the choice is consequential. This is especially true if the investment in learning how to use one makes converting to the other painful, if the product will be critical in your life and especially if your sense of self is tied up in your choice. We see this very clearly with the Mac v PC choice, the C# v. VB.Net choice and so forth.

My dilemma is with CodeRush v ReSharper.[1] They meet all the criteria: the learning curve on either makes switching to the other non-trivial; they are critical in my work and I certainly don’t want to choose the one that all the hip geeks sneer at.

What Are These Things?

Let’s start with what they have in common. Both are add-ins to Visual Studio and both greatly enhance your productivity and the quality of your code. They do this in three key ways (and lots of other smaller ways)

Making it easy to identify areas of the code that are outside your own coding guidelines

Making it very easy to refactor your code

Providing “Intellisense on steroids” reducing the amount of typing you have to do.

CodeRush is a DevExpress product, and their front page says,

For Developers, CodeRush for Visual Studio® .NET will help you create sophisticated code blocks in seconds and extend code templates instantly. CodeRush will complete identifiers as you type and expand or contract selections logically. With CodeRush, you will be able to instantly place selected code inside Try/Catch blocks, Regions and your own custom wrappers with ease.

ReSharper is built by JetBrains and their front page says,

Continuous code quality analysis…

Instant fixes to eliminate errors and code smells.

40 solution-wide refactorings to safely change your code base

200+ code editing helpers.

I’ve yet to see a comprehensive head to head review that wasn’t out of date by the time I read it, and, to be honest you won’t find one here either.

Some of the most important distinctions I have found so far, however, are these: [2]

CodeRush Wins

ReSharper Wins

Refactoring – fewer key strokes

Ability to apply formatting and refactoring rules all at once (one key fix)

More refactorings

Some key refactorings not in CodeRush

Better identification of memory leaks in non-managed code

More code issues reported

Many more snippets – much less typing but you have to remember the short-cuts

Better Intellisense supplement

Terrific real-time learning, context sensitive window

Possibly more focused on C# and less on non-managed code

Better support for Unit Testing

Better searching

It’s a pretty close call. One thing that I’m hoping is that if I spend enough time in both I’ll get a better sense of which is less intrusive and which is more readily called upon when needed. These are surprisingly elusive characteristics.

So, do you use one or the other? Do you have a clear preference and if so why? Please, use the comments to share your thoughts and experiences.

Footnotes

[1]Full Disclosure: I have multiple license of each. At least one of the companies provided a free copy because I was working on an Open-Source project, at least one license was provided at an educational discount because I’m on the faculty at Brandeis University. It is very possible either or both provided free licenses before I joined Microsoft, and certainly the technical evangelists for both have been wonderfully eager to help me stay within corporate and ethical guidelines while making it easy to obtain their products.

[2]Even Fuller Disclosure – this list is based on my observations and also comparison points from both company’s sites and in private correspondence from Gary Short, a truly terrific human being who is a DevExpress Technical Evangelist. Interestingly, the most balanced evaluation was Gary’s!

About Jesse Liberty

Jesse Liberty is an independent consultant and programmer with three decades of experience writing and delivering software projects. He is the author of 2 dozen books and multiple Pluralsight courses, and has been a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a Xamarin Certified Mobile Developer and a Xamarin MVP, Microsoft MVP and Telerik MVP.

65 Responses to Code Rush Vs. ReSharper

Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your weblog?
My website is in the very same area of interest as yours and my visitors would genuinely benefit
from some of the information you provide here.
Please let me know if this alright with you. Appreciate it!

I would be quite interested to see the specific code that caused ReSharper to complain about your use of pointers, ReSharper also has fully customizable “severeness” levels, so an error from ReSharper may not necessarily mean it’s uncompileable code, but it might flag things that are VERY bad practice as errors to indicate it’s severity, again, the pointer matter is very context-sensitive, and i would need to see a code example to know if it makes sense for it to flag that.

and on the ?? operator, it’s very possible for a nullable variable to never be null, SPECIFICALLY from static code analysis, consider the following code:

class A
{
private int _test; //contents not relevant, but a is a nullable type
}
class B
{
private A test;
A GetTest()
{
...do stuff...
test = new A();
...do more stuff...
return test ?? (test = new A()); // ?? operator checks for null, and test is a nullable value, but because test has been unconditionally assigned at some other time within the same scope it can never be null at this position in your code
}
}

finally, ReSharper as a tool, is somewhat like a car navigation system, it will do a LOT for you, but you still have to use your brains now and then to evaluate what a good way to solve the issue is, and it might well not be an issue, in which case it’s quite easy to tell ReSharper to shut up about the issue, as it can generate a list of annotations you can use to flag things that would normally cause errors or warnings to be intentional.

Unity3d, for example, uses functions like void Update() to manage it’s program flow, these functions aren’t called anywhere within your source code, so ReSharper notes them as functions that are never called, and wants to remove them, but you as a developer know this is how the function is intended to work, so you can flag it as [usedImplicitly] and the warning disappears, even giving future developers some immediate insight into the structure of the code, because the annotation itself indicates that the code isn’t referenced anywhere, and that some form of external code that’s added during compilation, but that isn’t part of the .net CLR (probably some framework you’re using) does use the code (likely via reflection or something similar)

Thanks for the post. I have been a long time ReSharper fan (from 2.0 to 6.1), but I start consider trying other tools. I love ReSharper’s search functions, but my solution is getting too big, and VS performance is getting slower. On my 64 bit OS, my VS can used up to 2.3 GB. It’s hard to focus on coding when the IDE becomes sluggish.

Cost is the biggest factor for me. I get an academic discount with Resharper, bringing the price down to $49. DevExpress doesn’t offer me that, so it’s $249. That’s a heck of a difference. They directed me to a free version, but it seems to be lacking quite a bit off of the paid version, so Resharper it is for me.

ReSharper for me also. I did email and ask about academic pricing and was also referred to the free version. I suggested that they consider offering academic licenses. Get future developers hooked on your tools now while they are young. Kind of like tobacco company attitudes in years gone by. I am guessing DevExpress could care less as they still do not offer such a license a year and a half after I first asked.

I have just been talking to CodeRush people. I am not a student, but I would use the product for learning. So I have asked them for options. Did you? Because I have got one very different from your $249. 😉