CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeremy D. Miller -- The Shade Tree Developer

Under the hood and working with .Net, TDD, Software Design, and Agile Stuff

Moving up to VS2005, but not without ReSharper

This is probably just a bit of preaching to the choir, but... 

I'm bringing up the rear on .Net 2.0 adoption.  When VS2005 came out my feeling was that VS2003 + ReSharper would still be superior to VS2005 in terms of coding productivity.  After about 2 days of pairing on VS2005 with workstations that didn't have ReSharper I've decided that I was absolutely right.  Minus ReSharper, I still think VS2005 is clunky to use and feature poor.  Yeah, I know they added the Class Designer and tons more wizardy code generation things, but I don't care.  I want stuff that makes coding easier and faster. 

I've got the rest of the team talked into at least trying out ReSharper.   A friend of mine asked me several months ago why you would want ReSharper on top of VS2005 and I didn't give a strong enough reason.  After a couple days of working with naked Visual Studio, here's a couple of little reasons why you want to use ReSharper that add up to significant time savings:

  • ReSharper shows syntax and compilation problems in real time by highlighting errors.  With VS2005 you have to compile to get those indications.  Am I being forgetful, or didn't VS2003 do that?
  • Adding "using" statements automatically.  Both from typing a class name and from the "CTRL-ALT-SPACE" statement completion.  That's been driving me batty doing that manually.
  • Suggesting variable names
  • The "surround with" shortcuts to surround a section of code with if/then statements or try/catch constructs
  • The refactoring support.  VS2005 has the bare minimum Extract Method and Rename refactorings, but doesn't go far enough.  ReSharper adds better refactorings for changing a methods signature, extracting abstract classes, and moving methods from subclasses to superclasses and vice versa.
  • Finding types by the "CTRL-N" shortcut
  • Code navigation shortcuts
  • The little codegen tools to create getters, setters, and constructors
  • ReSharper generates Equals() and GetHashCode() methods from the fields in a class.  It's a really sweet feature for unit testing
All in all, taking advantage of ReSharper (or your refactoring tool of choice) cuts down on the mechanical costs of writing code and goes a long, long way towards making evolutionary design techniques cost effective.  The bottom line is less time typing and more time to spend on design and thinking.

On the positive side, I haven't seen any of the stability problems that seemed to plague the early adopters of VS2005 (other than debugging).  I haven't seen any sluggishness either, but that might be my new dual core machine with 2GB of RAM.



Comments

Jeffrey Palermo said:

Yep.  That was the first thing I had my team do:  Install Resharper.  They didn't get it at first, but now it is crystal clear.  Resharper gets Visual Studio out of your way when doing development.

I don't do much typing.  I hit a few characters every now and then and have R# pave the way.

I found out yesterday that R# 2 has generating support for anonymous methods.  I was pleasantly surprised.  CTRL+SHIFT+SPACE gives me these things for free.

# October 14, 2006 1:33 PM

Jason Haley said:

# October 14, 2006 3:31 PM

Eric Wise said:

I adopted VS2005 at beta 2 in a production environment and had little difficulty.  Of course it all depends on what features you actually use in the IDE.  I have a standard pattern that is very codesmith friendly so I do very little coding in the IDE itself except aspx forms (which were vastly improved in the 2005 ide with intellisence and formatting).

# October 14, 2006 3:49 PM

Peter said:

Just a note about automatic using statements.  VS2005 does have this, and you can access it with either shift-alt-f10 or ctrl-. (control period)

# October 14, 2006 5:31 PM

Jeremy D. Miller said:

Peter, I still like ReSharper's automatic prompts.  Can you configure VS2005 to do it automatically?

# October 14, 2006 5:40 PM

Joshua Flanagan said:

No, VS2003 C# didn't have the automatic background compilation and highlighting of errors. You're thinking of your good old days with VB6 when you had that feature ;)

# October 14, 2006 10:27 PM

Jeremy D. Miller said:

Good old days?  You mean when VB6 would scream at you with popups if you went back to a previous line of code without finishing your current line?  Talk about coding with the kid gloves on.

# October 15, 2006 8:14 AM

Peter said:

Unfortunately, no, I don't think you can configure it to prompt automatically.  Maybe you were thinking of Eclipse, for the background compilation?  I used to love that feature, back in my Java days.

# October 15, 2006 12:03 PM

Jeremy D. Miller said:

"Find Usages" too.  It makes me cringe to see developers using text searches to find things in the code.

# October 15, 2006 1:18 PM

Robert said:

Resharper is a resource hog in VS2005.  Turning off the addin and typing any number of the 100x's of shortcuts they have will trigger it to reload the addin in the middle of the code you're trying to write.  It's OK at best.  I liked the 2003 implementation better.

# October 15, 2006 7:33 PM

Jeremy D. Miller said:

Robert,

That's very true, but I'd rather beg for more RAM than do without.  I'm just guessing, but I bet it was a huge drain on JetBrain's time to build a VS2003 and VS2005 implementation simultaneously.

I bet the resource utilization would be significantly better if the ReSharper capability was built into the IDE like IntelliJ or Eclipse.  I was hoping JetBrains would come through with their own IDE, but I haven't seen anything about that in at least 2 years.

# October 15, 2006 7:49 PM

Weijie Lin said:

Jeremy,

"Find all references" in VS 2005 should be equivalent to "Find Usages". However, the performance is unbearable, as VS 2005 searches for all aspx, asmx and asax pages for references by default. In fact, all refactoring operations in VS 2005 behave this way. Scott Gu has a nice tweak for this (http://weblogs.asp.net/scottgu/archive/2006/01/02/434355.aspx)

# October 15, 2006 8:58 PM

Erik Lane said:

Amen!  It is just difficult to watch guys code without ReSharper installed.  Recently, during a code review, we had to sit and watch a guy try to get the namespace syntax correct for a class he was trying to use.  He kept asking what the namespace was and all I told him was that I don't know.  I know the name of the class and ReSharper gives me the rest.

Sidenote - before all of this we had him install ReSharper when he came onboard and he uninstalled it within two days saying that he didn't see any value in it.  I think we just found at least on area in which it adds value.  :-)

# October 16, 2006 8:47 PM

David Stennett said:

Are there really people who can see NO benefit to ReSharper (or other tools like CodeRush, etc...?)?  Do they really think VS2005 stand-alone is optimized???  Kinda scarey ...

David

P.S. I'm from JetBrains ....

# October 17, 2006 9:41 AM

Jeremy D. Miller said:

David,

I think part of the problem is just not being familiar with the benefits.  The other issue is the .Net culture of RAD and design time stuff rather than a code centric world view.

# October 17, 2006 10:23 AM

Dan said:

"I still like ReSharper's automatic prompts.  Can you configure VS2005 to do it automatically?"

VS2005 gives you a small blue line under the class name as a hint, when it can add a using statement, but you cant get it to do it automatically, or get a better hint as far as I know.

Theres also code snippets for "surround with" in C#, as well as code snippets for "code gen support", Ive heard that R#'s version is better, but nobody has given any details as for why...

Id give it a try, but we are using VB.Net at work, and R# doesnt work for that..

# October 18, 2006 9:06 AM

Bil Simser said:

I've had a hard time choosing (and flip-flopping) between Resharper and CodeRush/Refactor. I mean, it's like comparing apples to apple-like bannanas, but there's similarities.

I'm sure Hanselman, who is a magician with any tool, could run circles around any of us and he lives and dies by CR, but I still can't get into the CodeRush flow. Resharper just works better for me as a developer. Like you said, the automatic namespace thing is a life saver. I tear my hair out as I have to fire up the help file just to figure out what the bloody namespace is (or use the object browser or something silly). Are we supposed to remember these things? No. That's what tools are for.

Anyways, glad to see you on the dark side. As I've said before, I'm sure if I get Mark Miller and Hanselman and a few Resharper dudes in a room we'll battle it out and see who survives.

I just still need my Ctrl+F12.

# October 18, 2006 11:19 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Jeremy D. Miller

Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy previously worked as a systems architect building mission critical supply chain software for a Fortune 100 company and learned agile development practices as a .Net consultant at ThoughtWorks, one of the pioneers of agile development. Jeremy is the author of the open source StructureMap (http://structuremap.sourceforge.net) tool for Dependency Injection with .Net and the forthcoming StoryTeller (http://storyteller.tigris.org) tool for supercharged FIT testing in .Net. Jeremy's thoughts on just about everything software related can be found on his weblog "The Shade Tree Developer" at http://codebetter.com/blogs/jeremy.miller, part of the popular CodeBetter site. Jeremy is a Microsoft MVP for C#. Check out Devlicio.us!

This Blog

Syndication

News

All opinions expressed here constitute my (Jeremy D. Miller's) personal opinion, and do not necessarily represent the opinion of any other organization or person, including (but not limited to) my fellow employees, my employer, its clients or their agents.

About Me

"Best Of" Compendium

StructureMap (Dependency Injection for .Net)

StoryTeller (Supercharged Fit)

Build your own Cab

TestDriven

MVP