Wednesday, 15 February 2012

Resharper Plug

If you are a .NET developer and you do not use ReSharper you are going to get left behind in your field. If productivity were measured in key strokes and mouse clicks I would say that ReSharper has at least quintupled my productivity. I am sure I will rant about it a lot if I continue to write on this blog so I will try to be concise but here is an example to back up my above statements:
Using an object that is in a different namespace
I have an object, lets say BowlingBall, and I want to use it in my new code.
Without Resharper
  1. Type the full name of the class 'BowlingBall' in your code block and look for the Visual Studio icon to add an import statement.
  2. Wonder why it hasn't come up and get frustrated.
  3. Delve into the solution explorer to try and find the class.
  4. Finally find the class and see that the person who created it has made an unfortunate typo and that it is actually called BowelingBall - I will leave renaming for another day.
  5. Curse the idiot who made the typo.
  6. Return to your original code file and correct the typo.
  7. Use visual studio to add the relevant import statement.
Around 25 clicks and strokes assuming you know precisely where to find the file and the solution explorer is pinned.

With Resharper
  1. Type 'BB' into your code block.
  2. Press Shift+Alt+Space
  3. Select from the short list of classes displayed (also including BouncyBall and BreadBoard).
  4. Laugh at the unfortunate typo and those doing it the manual way.  
About 6 key strokes.

No comments:

Post a Comment