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.
Web: www.jetbrains.com
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 http://blog.learningtree.com/tag/ui/.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube