Archive for August, 2006

ReSharper 2.0.1 Maintenance Release Now Available

Friday, August 25th, 2006

JetBrains ReSharper version 2.0.1 is now available for download at http://www.jetbrains.com/resharper/download/.
This release fixes a number of bugs and usability issues, in addition to substantial performance improvements. For more information, please see online Release Notes.
The update is a free maintenance release for all licensed users of previous ReSharper versions. All current users are highly encouraged to upgrade, due to the transition of the ReSharper development project to a new issue tracking system. So, the new release automatically sends bugs and exceptions to this new system.
Keep developing with pleasure!

Technorati tags: ,

Test Driven Development with ReSharper 2.0

Thursday, August 17th, 2006

One more great ReSharper overview was published by Paul Laudeman at his blog. Using ReSharper as an essential part of your TDD toolkit describes ReSharper’s unit testing support for NUnit test framework and a number of other features such as code generation and navigation. For those who haven’t tried this functionality yet and want to learn more, we recommend reading the Unit Test Runner description from the ReSharper’s help.

By the way, we are going to add ‘friendly’ blogs to our blogroll. So, everyone who is blogging about .Net in general and ReSharper in particular can send us a link to the personal blog using the ‘Share your knowledge’ text box on the right side bar.

Technorati tags: , , ,

Generalizing the algorithm

Monday, August 14th, 2006

One of the common tasks developers face on a regular basis is generalizing an algorithm. This How-To describes how a combination of ‘Extract Method’ and ‘Push Members Down’ refactorings can help you streamline this task.

Suppose that you have some code for calculating yearly bonuses for your customers:

We want to generalize the behavior of the Customer class

Now you want to award bonus points differently for private and corporate customers. ReSharper to the rescue!

  1. Extract Method from o.BillingAmount / 100: select it, then press Ctrl + Alt + M (alternatively, you can go to the ‘Refactor This’ menu by pressing Ctrl + Shift + R and then select ‘Extract Method’:

    Use the Extract Method refactoring

    In the Extract Method dialog, provide the name of the new method and make sure to make it non-static and not private:

    Extract Method dialog

    After you click Continue, the code looks like the following:

    Method is extracted
  2. Push Members Down on GetBonusForOrder():

    Now use the Push Members Down refactoring

    In the Push Members Down dialog, check the method and make sure to select its ‘Make Abstract’ checkbox:

    Push Members Down dialog

    After you click Continue, the code looks like the following:

    Now you have one abstract method and two overrides.

    So, you’ve got an abstract GetBonusForOrder in Customer class and two overrides in CorporateCustomer and PrivateCustomer (which are identical as yet). Modify their implementations as necessary, and voila!

Read more about the features discussed in this How-To:
Refactoring

Technorati tags: , , , ,

A great overview of ReSharper posted by Jeffrey Palermo

Friday, August 4th, 2006

It’s nice to read stories from guys like Jeffrey Palermo. We highly recommend reading his Bread and butter Resharper post to everyone who uses ReSharper. It took him some time to discover the better part of ReSharper’s benefits, but seeing how he says, “I can’t imagine coding without it now”, we think it was worth it after all!

Actually, that’s why we started this blog - to get this sort of valuable information out so you can take advantage of it and not be left out.

Most of the functionality Jeffrey describes is also covered in detail on ReSharper Home. Please use the links below to learn more about these features:

And of course, much more information can be found in ReSharper online help.

Technorati tags: ,