I have been playing with JetBrains ReSharper (version 4.1) and DevExpress CodeRush + Refactor! Pro (version 3.2.2) lately. I wanted to decide on which one to go with. Here are some notes –
R# = ReSharper
CodeRush = CodeRush + Refactor! Pro
- R# seems to be better for refactoring, because it does not assume that I follow a rigid work flow when writing code. For example, I don’t always decide on the class hierarchies upfront. I do discover them as I write code. So, when I discover that I need to extract a base class from the class I am working on, I can do so with R#. I couldn’t find a way to do extract a base/super class with CodeRush.
- In R#, I can create an overloaded constructor using “Change Signature” refactoring (Ctrl+R, S). I couldn’t find a way to do this in CodeRush. CodeRush does allow me to create overloaded methods.
However, comparisons that only focus on how many refactorings each tool can do are not very important to me. After all, it should be easy for the individual missing refactorings to be implemented in the subsequent releases of these tools. I want to know which one is a better investment in the long run. The investment is not just a couple of hundred dollars, it is going to be an investment of time too.
- R# “finds” Types as you try to use them and adds references and “using” directives from other projects in your solution. You will not believe how useful this is! You don’t have to interrupt your train of thought to go add references and “using” directives. CodeRush doesn’t do that.
- I found R# “Create From Usage” feature incredibly useful with TDD. This feature will be available in Visual Studio 2010. They are calling it âConsume-First Developmentâ.
- R# has keyboard shortcuts for individual refactorings. All refactorings are accessible from ALT+ENTER or ALT+R. Again, R# helps you keep focused on the code you are writing. In CodeRush, individual refactorings don’t have keyboard shortcuts.
- R# allows me to specify exactly what to include when doing ExtractXXX refactorings. CodeRush doesn’t.
- R# seems to know what I want to do. For example, when I discover that an existing class would be a good starting point to write the class I am thinking about and copy-paste the class and attempt to rename it, CodeRush renames both classes. R# renames the one you intend to rename.
- R# introduces much less friction when running unit tests. It is possible to add unit-testing add-ins to Visual Studio and access similar functionality, but the way unit-testing is integrated into R#, it is much more conducive to TDD.
- Collapse a class region. Now try to do a refactoring on this class, like âRename file to match typeâ etc. In CodeRush, you will not be able to do it because the three-dot glyph will not be displayed when the class is collapsed.
- CodeRush keeps getting in my way by automatically writing over as I type. It expands its âsmart templatesâ when you press space. Guess what! That is how I separate words in my sentences – by pressing space. It gets quite annoying. I wish I could turn it off.
As you have probably guessed by now, I think ReSharper is a better fit for me.
Here is a list of some other comparisons, covering aspects and features of these products I havenât mentioned here that might be important to you. Some of these concluded in favor of CodeRush. Keep in mind that some of the following articles are a couple of years old.