Roy Osherove

View Original

Review - JetBrains Resharper

Product: Resharper

Version 1.02 (note: version 1.03 has just been released)

Company: JetBrains

Price: 99$ per license


A while ago I my wife was taking Java lessons as part of her Bsc degree. I was helping her out with some stuff and needed to download a Java IDE that can be used to make some of the programs she had as homework. I’m a tool wonk, and as such I like to try out lots of stuff before I make up my mind on a single software tool. So, I tried many IDEs for java (the biggest ones on the market). They were all great, in a way, but cumbersome in other ways. I finally came to an obscure IDE called IntelliJ IDEA made by JetBrains. When I first opened the IDE I felt the same feeling I had when I first opened VS.net – “Coolness!”. After 2 hours of playing with IDEA I was in love. I was not a Java coder but it was still the best IDE I have ever used. It was intelligent in ways I didn’t consider were possible. It knew what I wanted to do, what I needed to do, and what I forgot to do, and let me know about it and take care of it so quickly and easily that I was blown away.

The first thing that I did was blog about my humbling experience on my weblog (here and here) and urge Microsoft to look and listen to these guys. And mostly learn and imitate as much as they could. As only Microsoft could – take it to the next level.

A few months later I found out that the same company – JetBrains, was going to make a plug-in for VS.Net called Resharper, that would add the same support to refactoring and advanced interactivity that IntelliJ IDEA has. It was great news and I’ve waited patiently with a lot of other people for the first version. Which sucked. It had lots of bugs and was not really ready for prime time.

But today – I’m sitting in front of a stable, more mature version of this Add-in to Visual Studio .Net, version 1.02, and it reminds me of all the things I liked in the Java version of it. These guys have made some amazing things happen inside vs.net, on which I will write about in this review.  The promise is starting o be fulfilled.

 

The good:

Resharper brings to the plate some amazing productivity features. The list of features is very very long and I won’t attempt to reconstruct it all here. I’ll list some of the ones I use most:

 

Refactoring support

Refactoring – the act of changing the design of existing code while leaving its functionality intact, is sometimes a tedious task. There are some refactoring tools out there such as C# Refactory that allow you to accomplish many these tasks automatically, and in VS.Net 205 we even has a little of those features built in. As an ear to the thrown of Refactoring in Java, Resharper should have had more refactorings that it currently does. The ones that it does have are the most basic ones (although they claim that the next version will add many more) and they work great (“Extract method”, “Extract variable”, “Introduce field” but not much more). Everything can be done with the keyboard.

 

Smart tags – not just in office!

Smart tags are one of the features I liked most in IntelliJ IDEA – when you make a coding error or something that won’t compile – you automatically have a smart tag appear next to your code. If you click on it you’ll see a list of available actions you can take to remedy the problem automatically. Resharper takes this functionality and puts it inside VS.Net. It is pure coolness. For example: if you are trying to set variables of different types into each other without properly casting them – a smart tag will popup allowing you to automatically cast them correctly or use a “safe cast” (using the “is” keyword in C#). Another example is when you try to use objects that are in a namespace you have note added a “using” field for, you’ll get a smart tag that allows you to automatically add the appropriate namespace at the beginning of the file. Saves lots and lots of time. There are a lot of smart tags in there!

 

Better intellisense

You get a new intellisense window when you install resharper. It contains advanced functions such as the ability to filter the list based on your typed letters, and even automatically suggest names and types for variables as you type them (just like in vb.net when you try to set an enum variable you get an automatic list of all possible enum values – only much smarter). Another time saver.

 

 

Background compilation – almost

This is one of the best features. Resharper will automatically highlight in red a lot of errors that you could previously only find out about only during compilation and sometimes only during runtime! This alone saves at least an hour each coding day. Guaranteed.

 

Quick navigation, find usages

You can quickly find either a class name or a file name and navigate to them using simple and easy shortcuts.  Small feature – which does not get in your way but helps a lot when you really need it. Another great feature allows you to see all the places in which a class or a member of the class is used in the project or solution or just the current file. For example – you can automatically highlight al the places in which some parameter or variable are used in the file (they all get a background in red) and then press escape to get back into regular code mode. You can even jump between usages using key shortcuts. You can also navigate between derived classes and their base classes, or from a base class you can list all the places in which a specific virtual member is overridden and jump to those quickly and easily. Coding Nirvana.

 

Custom colors

Resharper takes over your current color scheme (and how may people actually bother to change the default font color scheme in Vs.Net? not many) and adds more custom colors into the font/colors dialog. You automatically get highlighting of all different code elements in different colors (function names and derived functions can have different colors, for example). Also – in the side bar, where you usually see breakpoints you now get new icons that sit next to any methods that are overridden from base classes, telling you what this method overrides. Nice touches everywhere. You can feel the love in the developers work.

 

So – what’s the bad news?

There are several shortcomings in the product – many of which are simply bugs that should be treated in upcoming versions:

  • C# support only

I hear they will support sb.net as well in the future. I hope so.

 

  • Slow working on large projects.

I used Resharper on a production project with 70 screens, some of them pretty large with plenty of controls. Resharper grinded to a halt on several machines to the point of being unusable. Which is a shame. The developers that used it loved it so much they would re-enable it on small screens and classes just so they could get all the cool features. This is a bug that was known in a previous version but was supposed to be fixed in this version. Well – it wasn’t on my project.

  • Original Intellisense is killed

After uninstalling or disabling Resharper – Intellisense in VS.Net is not restored. You have to explicitly press CTRL+Space each time to get it. Bad, bad bug which is unacceptable in this class of product.

 

  • Not enough refactorings.

I would have expected from such a product to contain more refactorings. I shouldn’t need C# refactory and resharper on the same machine to get all the features I want. In my view Resharper should have more refactorings than any other addin out there. The amount of refactorings in IntelliJ IDEA is several dozens (o so it feels). The same should be with redharper – especially with the upcoming version of Whidbey coming along.

 

 

 

Summary

Resharper is a worthwhile purchase. It increases developer productivity and returns the investment in it many times over. In spite of several small bugs and the lack of support for vb.net (which is a shame) – it is the first add-in I can whole heartedly support since my encounter with CodeSmart, my first love.