A couple of weeks ago I talked a bit about some of what I liked (and some I didn't like) about CodeRush, and asked a few questions about Resharper and how it compared. Ilya Ryzhenkov, one of the developers at Jetbrains was extremely kind and answered some of my questions and encourage me to download the trial version and see what I thought about the product for myself.

Here's what I've found after testing Resharper for a couple of weeks:

Resharper feels less intrusive to me than CodeRush. That's not a bad thing about CodeRush, by the way. The reason CodeRush feels a bit more intrusive to me is that a) it has lots and lots and lots of templates and features and arrows and so on and b) it has a few things to make its features more visible and discoverable. All of that is good, in general terms, but it just feels a bit too "in your face" to me.

The downside for Resharper here is that you won't discover some of its features unless you take a look through the Resharper menus. and try stuff out.

Keyboard Bindings

One of the things I mentioned the last time that caused me issues with CodeRush was how many of my favourite keyboard shortcuts it overrode. This hasn't been as much of a problem with Resharper, for two reasons:

  1. Resharper takes less keys away (since it doesn't do as much as CodeRush), and in particular I've found so far relatively few clashes with the key combinations I use the most. Most importantly, it doesn't take away so many of the regular code navigation keys (like Ctrl - Down/Up arrow).
  2. Resharper has a pretty smart system that "notices" when you press a key combination once that it has a conflict and asks you whether you want to use the Resharper action or the regular Visual Studio action associated with the keyboard command. I've found myself reverting to the VS keys at time, and at others deciding that the Resharper functionality is better there.

Despite (2), I've hit  a few snags here with Resharper. The first one is that I find the Resharper key conflict dialog a bit harder to read than necessary; it could really be improved a bit to make it clearer, in particular to make it more obvious what the Resharper command does. The second issue I have is that once you decide which key action you want to stick with and the conflict dialog closes, the action you selected doesn't execute right away, so you have to press it again!

Another issue I ran into was when I ran into a conflict with the Shift+Tab combo. I selected to stick with the default VS action (decrease indent). Unlike other keys, however, this one didn't seem to "stick". I didn't get the Reshaper action, but neither the VS action, so I was left with no Shift+Tab and had to manually go to the Visual Studio options dialog to re-assign it to Edit.DecreaseLineIndent.

My last issue with the keyboard is that Resharper assigns the F2 key by default to the Rename refactoring (which makes perfect sense as that's exactly what F2 does in most applications), but that conflicts with my bookmark navigation keys, which I'm not thrilled about :-)

Code Style

Resharper has some pretty extensive code style options for C#, and they seem to work far better than the built-in Visual Studio options. One thing here I really liked was that it tends (usually) to recognize when you intentionally do something in a different in style and leaves it alone.

One issue I've seen, however, is when trying to use the "Reformat Code" option at the project level: At least a couple of times it has pegged Visual Studio with 100% CPU and hang, so I've had to kill it with task manager. At least one of those times it seemed some lengthy code generated Web Service proxies were the cause of the issue.

Illya also pointed out to me a cool feature in Resharper: you can export your code style settings to an XML file (and import it back). You can also force a given style configuration for your team for your solution or associate a style configuration to your solution as an individual. In other words, Reshaper already does something like what I suggested for Visual Studio. My only complain here is that a) the code style settings in Resharper don't completely override how the VS editor formats code (tab settings for example don't seem to be included), and b) the feature could really be more discoverable.

Performance

Resharper does increase Visual Studio loading time, though it doesn't seem to be as bad as I was expecting. That said, loading a large Visual Studio solution (particularly with many referenced assemblies) with Resharper enabled the first time can take quite a while.

Other Stuff I liked in Resharper

  • It will show unused variables and unneeded using declarations by "graying them out".
  • The color-coded pane right next to the vertical scrollbar that shows if potential improvements or code analysis warnings have been detected, making it easier to identify stuff to improve/fix.
  • It will warn you if an instance method doesn't depend on any other instance member and recommend. FxCop will catch those as well, but it's nice to be able to notice that right away.
  • I like the code navigation icons on the left of the code window: they allow you to easily navigate through a class hierarchy and method overrides. One thing I don't like though is that they seem to be a fixed gray background, which makes it look rather ugly in my color scheme :-)
  • Resharper will warn you right away if you reference an invalid type/member in a element in an XML code comment.

Other Stuff I don't like

  • Resharper uses several color-coded feedback mechanisms, including wavy underlining. Unfortunately, I haven't found any obvious way to change the colors used in them in the Resharper Options dialog.
    One thing I did notice that is particularly annoying is that Resharper seems to have its own matching braces/quotes highliting separate from the Visual Studio one. What then happens is that sometimes one kicks in, and sometimes another. That would not normally be a problem, except that again, Resharper uses its own colors for that, which clash heavily with my code scheme making the highlited code unreadable :-(
  • Resharper's Refactor submenu in the code editor context menu is named exactly the same as Visual Studio's built-in one. I have trouble remembering which is which and end up loosing valuable time as a result. It would be nice if the name was different or it had an Icon or something to distinguish Resharper's from the VS built-in one.
  • Resharper has a pretty complete Intellisense replacement, and it works very well, though it takes a bit getting used to. However, one thing I can't seem to get used to is the way tooltips for method arguments are presented: it seems to me a little bit more intrusive than necessary, tends to get in the way, and personally, I find it harder to read and navigate quickly than the regul
    ar VS tooltips.
  • While you can export and import Resharper code style settings, there does not appear an easy way to export and import the rest of the Resharper configuration. In particular, if I have already selected which Resharper key combinations you prefer over the VS original ones, I shouldn't have to do it all over again when I reinstall.

Conclusion

Resharper is a great product and adds a lot of capabilities and features that really improve the Visual Studio experience. Sure, it has its snags, but we live with Visual Studio, don't we? ;-). Both Resharper and CodeRush are great products and any developer would be lucky to have either one on his/her toolbox.

Technorati tags: , ,


Tomas Restrepo

Software developer located in Colombia. Sr. PFE at Microsoft.