Art Of Programming

musings by Dmytrii Nagirniak

Benefits of Using ReSharper

Please do not laugh at me now after reading the next sentence. I am evaluating the ReSharper now.  I should do it years ago as I have always been aware of it, but just didn’t get my hands on to it. I tried CodeRush and Refactor! from DevExpress too. I must admin these tools do not read your mind, but are doing a great job FOR you.
What I liked in DevExpress CodeRush+Refactor! is its fun visualisations and code complexity shown. Refactorings are great as well.
But, ReSharper aims to help you with coding more than just showing some information about it (though it does it too).
Additionally, CodeRush has great support for expandable shortcuts, lets calls it consistently – Live Templates. There are thousands of them in CodeRush. But honestly saying I dont use it as much. Visual Studio templates in 99.99% of cases do the job for me. I have to mention that ReSharper does support its own live templates and tries to make it smart (at least by providing sensible defaults).
While I haven’t had intention to compare Refactor! vs ReSharper, I would say “DevExpress’ product adds fun to coding, while ReSharper adds quality to coding”. Many can disagree and have the right for that.
So here is the small list the ReSharper benefits me with:
  1. Run your unit-test from IDE (Not only MsTest but other common ones too).
  2. Clean-up the code in the whole file using different strategies. The code looks much better after that.
  3. Automatically include file header (I have to put copyright notice, so it saves my time).
  4. It easily removes redundant using statements.
  5. It automatically adds using statements for extension methods or anything that is not yet available. This one I just love. Here is the scenario:
    1. You have an IEnumerable<Something> list; in a new file.
    2. You type list.Where();
    3. ReSharper suggests: “Use method System.Linq.IEnumerable<Something>.Where”.
    4. You hit enter and it’s done.
    5. It suggest to rename file to match the class name.
  6. It warns (I changed it to ‘suggest’) to move class to the namespace according to the location on the file system.
  7. It automatically highlights possible NullReferenceExceptions.
  8. It validates the names of classes, methods, properties etc thus enforcing the consistency and guidelines. Not only it validates, but with one hit of Enter it renames it accordingly.
  9. It warns about unused parameters. It saves my time so I don’t have to debug for hours to spot the parameter is never used and the actual value is hardcoded instead.
  10. It selects current file in the solution explorer (don’t know why VS still doesn’t do it).
  11. Live templates are very smart.
  12. Easily reorder members using Ctrl-Alt-Shift and arrows.
  13. It shows NotImplementedExceptions in case you forgot something and have no test for it
  14. Shows great list of notes, todos, bug-notes etc extracted from your code and organised in a single window.
  15. And lots of other things I forgot to mention…
I also started to use a new word together with refactoring… and it is… resharping.
Additionally I have to mention that while evaluating ReSharper I migrated large project from .NET 1.1 and Borland Developer Studio 2006 to .NET 3.5 and Visual Studio 2008 (including all of its related assemblies). ReSharper definitely saved me at least 20-40% of time during this not the most pleasant process.
The biggest disadvantages I can see using ReSharper for now is that it slows down the IDE, increases memory consumption, especially on a large solution. But I can pay price easily for all the benefits.


Dmytrii Nagirniak
Ok. I got a reply from the DevExpress about the licensing. Posting here to remove all the possible speculations.
Dmytrii Nagirniak

You do not install a new product. You possibly install a new version of the product. But I doubt even that because I don't believe DevExpress releases a new version each month.

Anyway, You are right this went off-topic.

It would be interesting to see Refactor! Pro features you find the most useful on a daily basis.
I don't see the point to continue the discussion about the licensing, because it's out of this topic.

I read the license agreement and I didn't find that I break it, because I cannot download the same SOFTWARE PRODUCT(S), I always uninstall it, before installing a NEw one, which has new features and bugs which I have to evaluate…
I will defently buy it if they change the EULA.
Dmytrii Nagirniak
I don't really understant what the disadvantage of ReSharper is in terms of licensing.

You can evaluate Refactor! for, technically, unlimited time, but it violates the law and you still have to buy it (see below). The price is higher then ReSharper's one.

On the other hand I can evaluate ReSharper for 30 days. And I recently asked to evaluate it for another month with no problem.

So generally you can evaluate ReSharper for the period enough for you to decide.

It is basicly same as Refactor! but still for the lower price.

Once again, the Refactor! can be used for free ONLY for the evaluation purposes (as the license clearly states that).

Also please pay attention that Refactor! Pro evaluation license is also valid for only 30 days:

If the SOFTWARE PRODUCT(S) you have obtained is marked as a "TRIAL" or "EVALUATION," you may install one copy of the SOFTWARE PRODUCT(S) for testing purposes for a period of 30 calendar days from the date of installation ("Evaluation Period"). Upon expiration of the Evaluation Period, the SOFTWARE PRODUCT(S) must be uninstalled and all copies destroyed.
This comment has been removed by the author.
Dmytrii Nagirniak

1. I told cannot agree more. Read again.
2. Well, you told you don't have to buy it. I assume in this case you are using it for free. Let's not play the words :)
This comment has been removed by the author.
Dmytrii Nagirniak
Cannot agree more about Refactoring tools and code snippets.
But sometimes the codesnippets just get overused and that was the Alexander's point.

As for the CodeRush, you DO have to buy it. It is NOT a free product. It is only free to evaluate. If you evaluate the product for couple of years (when in fact you just use the product) I believe you break their licensing and thus law.
Also you must buy Refactor! Pro AND CodeRush.

If you come to the pricing - ReSharper is cheaper and provides much more useful functionality (for me at least).
It's very useful to use templates.

I use them a lot. They simplify my life.
e.g Instead of typing 'MessageBox.Show("");"
I can type just 'mb + space'

Also it saves time to create property, methods and so on…
You simply can wrap your code into try catch block just pressing one key,

e.g. I often wrap my code by using template into

// code
catch(SomeException ex)

with refactoring tool I can spent more time to think how to better implement it, and not spend valuable time of typing :)

People don't use 90% of functionality of sophisticated tools because they don't know how to use it :) and don't to spent time to learn.

I still use CodeRush. Recently they added lots of new functionality like ReSharper has (cleaning code, highlighting unused variables, etc.)

But ReSharper has a very big disadvantage - I have to buy it, CodeRush I have not
my 5 cents.

I think that using templates is not a good thing. Sipmly saying, if template complexty goes beyond comment heading and class A{} structure, it starts to become code duplication.

As for refactoring functionality - yeah, I liked reShaper as well, though have not been using for quite a long time ('cause in Java now)

I've also found out that the 90% of the time 90% of the functionality of rich developer's IDE tools are not used. Most of the time I try thinking on HOW do I implement this or that.

After you know how - you do it.

Surely, it does not cut off some mechanical work, like migration from one .net version to another. No one likes doing dumb work.

Though, tools make life easier until you rely on them completely :)

I still remember DAS trying to code smth on our lectures within a studio without (CodeRush?).

Keyboard script follows: (keys as they are hit)
fpi (backspace)(backspace) public void int method(){…
Sergey Litvinov
Yeah, i agree. Resharper its a good thins. But as you mentioned - it realy slows the IDE. In some cases - work in IDE becames impossible. It's really main disadvantage of Resharper.