Product Reviews

Write Better Code, Faster, with ReSharper 4.5

JetBrains' ReSharper 4.5 is a comprehensive Visual Studio add-in that boasts enhanced IntelliSense-powerful refactoring and code-analysis tools in addition to welcome fixes for many of Visual Studio's biggest annoyances. Tuned to the needs of C# developers-though many of the tools work for Visual Basic as well-ReSharper does an outstanding job of improving the productivity of busy .NET developers.

What can ReSharper do for you? Quite a lot. From the simple, such as locating the file you're editing in Solution Explorer, to the essential-such as enforcing naming conventions-ReSharper capably handles tasks that often bog down busy programmers. ReSharper takes care of writing utility code by generating braces and parentheses. It also helps generate "best practice" code by doing things like testing all method parameters for null. ReSharper will even highlight and offer to fix C# errors as you type, without waiting for a compile.

It's impossible to describe all the features that ReSharper adds to Visual Studio in this review. I can, however, address the major concerns that you might have when considering a productivity tool like ReSharper.

Any tool that helps a programmer write code can become an annoyance if it gets in the way of the programmer. Fortunately, ReSharper provides a wealth of customization options so you can turn off or configure the support that ReSharper provides. In my tests, I spent about two minutes adjusting ReSharper to use the naming conventions I follow. After that, ReSharper flagged any names that violated my conventions and, on request, replaced the names and updated any references. It took another two minutes to tell ReSharper how I wanted my braces handled.

[Click on image for larger view.]
Figure 1. ReSharper has recognized that a parameter is never used in its method. When the cursor is moved to the error, a "quickfix" lightbulb appears in the left-hand margin, providing access to multiple refactoring solutions.

For team deployments, code-style options like these can be shared either by embedding them in a solution or by exporting them to a file. Code-style files can be shared among ReSharper users on the same network or sent to remote ReSharper users for importing.

Tools like ReSharper can come with a steep learning curve, requiring you to learn a dozen new hot keys. While ReSharper does have its share of hot keys, many of its most useful features are visually integrated into the editor window. When ReSharper has an issue with code, it flags the error with a wavy line and uses a tooltip to describe the problem. When you click the offending text, ReSharper places a light bulb in the line's margin with a list of fixes that ReSharper will implement.

Another thing to consider is the fact that Visual Studio add-ins can slow down an interface that may already have response issues. To stress-test ReSharper, I installed the tool on a slow computer. Initially, when I started typing on a new line, I'd get a slight hesitation before keystrokes registered on the screen. Adjusting the IntelliSense display time, as suggested in the documentation, eliminated the problem or reduced it to a level where I couldn't detect it. Developers with faster reaction times than mine might still notice that hesitation.

Would I buy ReSharper? In a heartbeat. For me, the C#-outlining and brace-completion tools are, by themselves, worth the price of admission. You might find that some other capability is your must-have feature, but I can almost guarantee that there'll be something in ReSharper that you won't be able to live without.

ReSharper 4.5

JetBrains s.r.o.
Phone: 650-378-8571
Price: $199 for individual developers; $349 for any single user in a business
Quick Facts: Visual Studio add-in that provides code analysis, refactoring and other programmer productivity tools
Pros: Useful tools; very configurable; supports many common code-writing activities
Cons: None, really-excellent value for the money

About the Author

Peter Vogel is a system architect and principal in PH&V Information Services. PH&V provides full-stack consulting from UX design through object modeling to database design. Peter tweets about his VSM columns with the hashtag #vogelarticles. His blog posts on user experience design can be found at

comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.