Geeks With Blogs
Caffeinated Coder A Grande, Triple Shot, Non-Fat Core Dump by Russell Ball
I was working with someone who doesn't have ReSharper today and I noticed for the first time that I have developed some feature addictions because I actually winced when I watched him fully type out a property and then manually do an "extract method" refactoring.

This surprised me since I have only really been consistently using ReSharper for the last month and am still far from my goal of becoming a ReSharper Jedi. Nevertheless, the dozen or so keystrokes that I  have mastered and consistently use are making a noticeable difference in removing some of the coding noise that usually distracts me and slows me down while coding.

In keeping with the lucky seven theme from my last post, I decided to share seven favorite features. In other words, if there were suddenly a terrible ReSharper feature shortage and the Programming Gestapo started forcing everyone to ration their features, this is what I would choose.

(NOTE: All shortcut keys are according to the VS Bindings)

  1. Auto-inserting using statements (alt + return at prompt) - This is by far my favorite feature. How does it know what I wanted so quickly?
  2. Generating properties, constructors, & overrides (Alt + Ins) - For properties, it lets you choose from a list of  private variables without properties. For constructors, it lets you choose from a list of possible properties to use as parameters.

  3. Identifying Dead Code (text colored gray): No more excuses for letting unused code clutter your code base.      
  4. Extract Method (Ctl + Alt + M) - It figures out which parameters you'll need to pass in and replaces the highlighted text with a call to the new method.
  5. Rename (F2) - This is a LOT smarter and quicker than the Visual Studio Find & Replace.
  6. Find Usages (Shift + Alt + F12) - This also beats the pants off of Find & Replace for doing impact analysis.

  7. Go ToType (Ctl + N) - I like how it pops up at my cursor, filters the list while I type, and shows the location of the files.


I fully expect this list to change as I get more proficient with the tool and as I start working on a 2.0 .NET project instead of a 1.1 project so that I can use the latest version of ReSharper.

Which seven features would you choose? If you had to recommend one killer feature that I am missing out on, which one would it be?
Posted on Tuesday, October 23, 2007 12:28 AM Tools | Back to top


Comments on this post: The Resharper Challenge: What if You Could Only Have 7 Features?

# re: The Resharper Challenge: What if You Could Only Have 7 Features?
Requesting Gravatar...
Very tricksy. I never thought of it before, but I guess JetBrains has managed the impossible. They have gotten both Microsoft and Java developers to like the same software vendor.
Left by Russell Ball on Oct 23, 2007 11:23 PM

# re: The Resharper Challenge: What if You Could Only Have 7 Features?
Requesting Gravatar...
I would replace the generate constructors item with Introduce Parameter (CTRL-R + P).

I just recently found the generate constructors feature, but in combination with extract method and the new feature that suggests 'broader' parameters with a green underlines, I get a lot more effect from my refactoring by easily parameterizing the extracted method.
Left by Steven Mitcham on Oct 24, 2007 12:57 PM

# re: The Resharper Challenge: What if You Could Only Have 7 Features?
Requesting Gravatar...
@Steven: Good suggestion! I just played around with it and it looks like it will be a good technique for removing dependencies within code so that they will be more testable.
Left by Russell Ball on Oct 25, 2007 7:48 AM

# re: The Resharper Challenge: What if You Could Only Have 7 Features?
Requesting Gravatar...
Hard to give up any of those features as I use them frequently. Other features to check out (using IntelliJ bindings)... One that you didn't list that is a killer ReSharper feature is go to Declaration (Ctrl-B) and go to Inheritor (Ctrl-Alt-B). This is a fantastic way to navigate a codebase quickly. Combine that with VS's CTRL-"-" to go back and code exploration is a snap.

Another trick in becoming a ReSharper Jedi is Introduce variable (Ctrl-Alt-V). You need a variable... Type the following:
new Foo()
Now Ctrl-Alt-V with your cursor after the close paren, enter to select the suggested variable name, and the line becomes:
Foo foo = new Foo();
Now if it would only use IFoo as my type if it existed... :)
Left by James Kovacs on Oct 25, 2007 3:08 PM

# re: The Resharper Challenge: What if You Could Only Have 7 Features?
Requesting Gravatar...
@James - I also am a big fan of the 2 navigation features you mentioned, but I never tried the introduce variable one before. That's definitely a keeper. Thanks for the suggestion!
Left by Russell Ball on Oct 25, 2007 10:25 PM

# re: The Resharper Challenge: What if You Could Only Have 7 Features?
Requesting Gravatar...
Thanks for this article. It is very useful.
Left by Sohbet sitesi on Apr 05, 2008 1:02 PM

Your comment:
 (will show your gravatar)


Copyright © Russell Ball | Powered by: GeeksWithBlogs.net