Resharper 4

It’s hard to imagine that almost a year has gone by since my jab at Resharper’s 3.0 lack of support for .NET 3.5. Yesterday I finally got around to installing thew newly released Resharper 4 and I’m more then blown away by some of the new features. Not only does it fully support the new syntax (lambdas, linq, anonymous types and so on), but it offers some nice new features.

The first thing I noticed was that the “Reformat” feature – which i use a lot –  has been renamed to “Cleanup Code” and not only does more, but also supports profiles – so different code cleanup profiles can do different things. One thing i haven’t figured out yet is how to edit the 2 default profiles

The next thing that surprised me was that Resharper suggested I use object initialization. So given:

task t = new Task();
t.Name = “Test”;

and hitting alt-enter, resulted in:

Task t = new Task {Name = “Test”};

Similarly, Resharper suggests  using implicit type variable. David already blogged about this – and like him, I also disabled this suggestion. However, if you’re with JP on this, you’ll certainly appreciate the helpful tip.

One feature I’m on the fence about is their JetBrains.Annotation assembly. With it, you can decorate your members usings JetBrain-specific attributes to provide even better integration. For example, given a method that behaves like string.Format, I can add a StringFormatMethod attribute:

public void Put(string key, params object[] args) { … }

This then allows Resharper to provide additional information, so if I do:

Put(“testing {0}, {1}, {2}”, 1, 2);

Resharper will tell me that {2} doesn’t have a matching argument. It’s a neat feature, but there’s something strange about adding a JetBrain’s ‘dll to my project.

Generally, I think Resharper’s a must-have. If you have an older version and aren’t working on 3.5 code, then save your money. However, if you’re doing even a little bit of 3.5 programming, then this thing is totally worth it. I have three complains/concerns.

First, I wish more of the windows docked. For example, I wish “Recent Edits” was dockable. While we’re on the topic of recent edit, Resharper should look at what e-TextEditor does and provide THAT amazing functionality.

Secondly, each version of Resharper gets progressivley more complex. There are more shortcuts (like the new ctrl-shift-enter) and more configuration. The barrier to entry is starting to get a little high. Although the couple hours you might spend configuring it are quickly made up.

Finally, price. I can’t help but feel that, despite the amazing value, upgrading from 3.0 to 4.0 should be less than $100. Maybe I feel that way ‘cuz 3.0 was a bit of let-down for me (I know it wasn’t for everyone, especially VB.NET developers), and also because I think everyone should use it.

What are you waiting for? Get your free 30 day trial now.

P.S – I downloaded that sucker at 8meg/sec from their Rackspace server – that’s insane (rackspace is in Texas, I’m all the way north in Ottawa). And while I still love Rackspace, I’m a far bigger fan of SoftLayer. Same thing but  $600/month cheaper, $0.20/gb instead of like $2.00, and amazingly useful iSCSI.


This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

10 Responses to Resharper 4

  1. Resharper is sloooooowwwwwwwww~~~~~ says:

    It interfere code typing because it constantly trying to analyse it on the fly. (i think it is overboard. Not every single time, code analyse is needed.)

    It always parsing source files for no good reason and it cause the whole system to crawl.

    It is a resource hog.

  2. ecards says:

    I think implicit types are great for complex types, and it’s easy to tell resharper only to affect these.

    I also wish it had a built in spell checker that worked for string constants, and text within .aspx files, but hey, everyone has their wishlist I guess.

  3. Valued Customer says:

    Anyone having a bad taste in their mouth from 4.0, definitely give the new 4.1 a try – the performance and stability have improved tremendously.

  4. Ivan says:

    ReSharper 4 is great, if you’re not working on ASP.NET projects. Otherwise, it just crashes constantly. 4.0 was a HUGE letdown for me.

  5. karl says:

    @Omer & Tim: Thanks for the notes.

    @Bryan: I wonder how resharper is affected by project size vs computer speed. I work on a fairly fast computer, and lately on small to medium projects, so I don’t have any particular performance problems. Or maybe I’m just acclimatized to it.

  6. Bryan says:

    Resharper 4.0 Quick Review:

    1. Features, great.
    2. Usability, great.
    3. Performance terrible.

    Still slows my computer to a crawl after all these years. I just can’t stand having my IDE not react when I’m trying to type some code into it.

    sigh, maybe some day…

  7. Tim Lloyd says:

    Just a note, but if you are using VS2008 and “targeting” .Net 2.0 you can use all of the new C#3.0 language features, and ReSharper 4.0 will happily oblige with all its goodies…

  8. Omer Mor says:

    About the annotation feature: You don’t need to add a reference to JetBrain’s dll to use it. All you have to do is go to the options page of the annotations, and here is a button there that will copy to your clipboard the code for the attributes they look for. You need to paste this code to a file in one of your projects, and you’re set. The attributes they look for only need to be in JetBrain’s namespace, but can reside in any dll you want.

  9. karl says:

    There isn’t too much in e-TextEditor that I like. It isn’t nearly polished enough to justify spending any money on it. The cygwin bundles don’t work for me, multi-file search sucks, the UI is inconsistent.

    I do use it for all my ruby programming though, but mostly more to try it out than anything else.

    There are some features that do stand out. One of which is their “Undo”, take a look at this screenshot:
    it actually does branches and what not.

    I’d feel bad if someone bought it because of what I said. I actually find it sad how much hype it has gotten..

  10. ReSharper rules!

    What is in e-TextEditor that you like? I have never used it.