Resharper rewrite

OK, so the first ReSharper post was a written statement of resharper joy. However, it’s not the best format for getting me some $$ for ReSharper at work. So, let’s write up an informational document for the people who would make the decisions…

ReSharper is an add-in to Visual Studio that provides Visual Studio with a number of useful features. Overall, they help a developer code cleaner, faster and more efficiently.  ReSharper is produced by JetBrains, the company that also produces IntelliJ, a highly regarded IDE for Java.

Some Key Features

  • Find Usages – this is VERY different from a search. It finds anyplace a class, a class’s method, a property or a variable has been used… if another class has a method of the same name, that method won’t come up-only the ones you want. This is a huge time saver. It’s amazing the amount of time you want to know where something is called so you know if it’s “safe” to change, for instance
  • Related to “Find Usages” is Rename… rename a class at the site of an object declaration, and the class will get changed, the name of the class file, the constructor, all declarations of objects based on that class, and any private variables that seem to have a related name get changed. This is great because any code that’s been around for a while collects artifacts that are misnamed… among other reasons, because something ends up getting repurposed in unexpected ways, or a domain concept becomes better understood. These misnamings were previously a minefield that would inevitably happen. With rename, it’s very easy to give objects the proper name, so the code can become much more intuitive.
  • Highlight unused code. This isn’t really something that a user actively does, it’s one of the many things ReSharper does on its own that helps a developer code better. If a variable or “using” statement is not being used, it colors it gray. Then, unused things can be removed with a quick keystroke. Just another feature at keeping the code clean.
  • If you’re viewing an interface, there’s an option to go to implementors, and it provides a list. Yes, you could do a text search for the interface name, but if you ARE coding with interfaces, this saves time, and is a really intuitive way to navigate.
  • Code completion. If configured correctly, Visual Studio will do code completion, but it requires a code compile for methods to come up. Resharper parses code on-the-fly, so you immediately have classes and methods from other files available as you are working, even if things don’t compile. A little thing, but another timesaver-it saves on typing/guessing errors on your current work even when the code isn’t compiling.
  • It provides better inline method documentation. Again, you could get better documentation on the web, but having it right at your cursor as you type is instant (unlike a web search), and doesn’t require a context switch.
  • It autoparses the ASP.NET aspx files, and makes the content accessible via Intellisense in the codebehind file. Again, you could just spend time flipping back and forth, copying and pasting, but typing in the codebehind and having it pick up the elements in the aspx file helps reduce error (you can intellisense the name out so you KNOW it’s correct) and then you also have the elements’ methods immediately available via Intellisense, so you won’t have to manually type NavigateUrl, savinng type (and avoid possibly mistyping as NavigateURL)
  • Many refactorings are supported, such as “Extract Method” and “Extract Interface”. Refactoring is a way to impove the readability and maintainability of code though safe reogranizations and restructurings. This is something all good developers do as a matter of course, but this tool can help a refactoring happen in a few seconds instead of minutes or even hours. Making refactoring easy is going to make it happen more, which (when done appropriately) is very healthy for a codebase.

Items of note on ReSharper:

  • ReSharper works best on a properly organized Visual Studio project, with classes organized by namespace in folders (this is the recommended way anyway) … but to get best use out of ReSharper on a project that’s legacy and incorrectly set up, you will want to straighten things up.
  • It’s SLOW to open a project. … this is because ReSharper does a pass through of everything for parsing. Granted, things are fine once it does open, but if constantly opening and closing things in VS is your mode of working, You might want to either rethink ReSharper, or your mode of work.
  • It’s a memory hog. This is probably (I’m guessing here) somewhat proportional to the number of classes, since it parses, and holds the definitions in memory so it can do its magic. Anyway, JetBrains says 512 is a bare minimum, and recommends at least 1 gb. I have to say that with my machine set up normally, an ftp program open, and a web browser, I’m going WAY over my 1gb of memory, and am swapping like crazy. I’m guessing here, but looking at my real-world memory usage, I’d say not less than 2gb, and maybe more to be comfortable.
  • The current version is 3.1, but 4.0 for VS 2008 is coming out soon. Anyone who buys 3.1 now gets a free 4.0 upgrade license when it comes out.
  • As this is a plugin for Visual Studio, The developer must have at least Visual Studio Standard (the lowest non-free version, and the cheapest version taking plugins) to use ReSharper.

Cost:

 

  • Single-developer cost $149 for C# only, $199 for C# and VB.net support. They are non-transferrable. The license allows for installation of the software on different computers (at work and/or at home), provided that multiple instances of the software will not be used at the same time.
  • Commercical license is $249 for C# only, $349 for C# and VB support. Commercial licenses are based on a concurrent user model… as many installations as you want, but number of copies legal to be used at the same time limited by the number of licenses purchased. Non-transferable to other companies, but transferable within the organization.

Tags: ,

Leave a Reply

This blog is kept spam free by WP-SpamFree.