# Sunday, 01 July 2007

I'm leaving the country for vacation tomorrow morning (at 5 in the morning no less, yikes!). Expect low volume of posts in the coming weeks. I'll leave you with my ReSharper 3.0 Review until I'm back.

posted on Sunday, 01 July 2007 21:35:34 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback

... Actually it's been out a couple of days but I wanted to take it out for a spin before posting about it.


Users of the previous version need to be aware that this release is not a free upgrade from 2.x like we've been used to. Existing customers can upgrade their license for $199 while a brand spanking new version will set you back $349. It worth nothing that when you upgrade your existing license you actually get a completely new license for 3.0 something Microsoft should sit up and take notice of considering their annoying scheme of installing Windows Vista and then installing the "upgraded version" on top of that. It reminds me takes me back to upgrading Windows 2000 to Windows XP but that's a different story for another time :)

Additionally JetBrains has created a richer licensing model with separate versions for C#, VB, and a full version with support for both of them. Yes, you read that right, JetBrains now has VB support in ReSharper. More on that later.

JetBrains has really gotten their act together this time around and have released ReSharper 3.0 with Orcas support ahead of the final version of Orcas. I still member when Visual Studio 2005 was released and we had to wait for months and months until they got a ReSharper version out the door with support for that version.

Keyboard Scheme

ReSharper-Keyboard-Scheme-Selector When you first fire up Visual Studio with ReSharper 3.0 installed you will be greeted by my favorite new feature: The ReSharper Keyboard Scheme selector. Basically it allows you to select the keyboard scheme with which you are most comfortable like we've been doing in Visual Studio forever. It addresses one of the pain points I've had with ReSharper since version 1.0: The default shortcuts overrides the ones I'm used to in Visual Studio forcing me to remap keys or keep and exported file with my settings handy. When dealing with shortcuts I usually conform to the default layout of the keyboard just to avoid having to remap keys on every installation of Visual Studio I use. As of today I have 4 - 5 separate installations: One for the laptop, one for the desktop, one for a number of virtual machines... basically a lot of environments to keep in sync which is a pain when you're so dependant on the keyboard as I am.


The product has gotten a lot polish compared to the previous version. Just take look at the settings dialog which will also give you an idea of the scope of the product. Another testament to this fact is that when you install ReSharper you have the option to hide UI elements in Visual Studio which are redundant because ReSharper offers better functionality. Case in point the Refactor menu item on the Visual Studio toolbar which is removed in favor of the ReSharper menu item because that item encompasses so much more than Refactor. Of course this is configurable as you can see on the settings screenshot.


VB Support

JetBrains has spent a lot of time adding support for VB which is great for people doing work in VB. For myself it's a nice to have feature because we do have a couple of projects created in VB still and more importantly projects which mixes and matches VB and C#. I would have liked to I would have been more grateful for the feature two years ago but still it's nice to have the feature I'm used to available to me in both C# and VB. Additionally support for XML and XAML has been added to this version.

TODO Explorer

The TODO explorer (CTRL + ALT + D) is another new addition which actually makes our //TODO comments useful again. I've tried to use TODO comments in my code but I always forget to look them up. I'm sure that Visual Studio provides some sort of UI for viewing a list of TODOs but I can't for the life of me remember how to access it. The TODO Explorer in ReSharper makes it easy to get an overview of the TODOs in your code and ReSharper itself reformats TODO comments in a fashion that makes them stand out more, a nice visual cue that something needs to be done.


File Structure Window

I found the File Structure explorer (CTRL + ALT + F) by accident when I was trying out version 3.0 so I'm not sure whether it's a new feature to ReSharper 3.0 or if it's been there all along. It's new to me at least :) Basically it gives you an overview of the structure of the file you currently have open in Visual Studio. Very handy to make jumping to specific stuff in a file easier. Both the File Structure and TODO Explorer are naturally dockable like you would expect.


Background Compiling for C#

VB offers a feature called background compiling which is very useful because it provides feedback without compiling. When Vertica initially started out we were using VB because everybody came from an ASP 3.0/VBScript/VB6 background which made the choice to go with VB a nobrainer. When we switched to C# a couple of years later the feature I missed the most from VB was background compiling. In fact I was so used to the feature that C# and Visual Studio felt "wrong" somehow; I weren't able to put my finger on it until later when I dug a little and found the background compiling feature of VB. ReSharper offers much the same feature and improves upon the capabilities offered by Visual Studio itself by adding a nice overview of errors in the current file. Notice the right side of the screenshot where a yellow square and a couple of red and orange bars are shown. The square indicates the overall status of the file, the red color means that the file doesn't currently compile. The bars indicate where the errors and warnings are located in the file.

As a nice addition you can scroll through errors (SHIFT + ALT + PgDn / PgUp) and highlights (ALT + PgDn / PgUp) via keyboard shortcuts making it easy and efficient to fix errors.


Context Actions

ReSharper offers another interesting feature which is the context based action (CTRL + Enter). Basically it tells you what the allowed operations at any given point are. Very handy when you're learned the product and don't know all the shortcuts. ReSharper is very keyboard driven which makes it the perfect fit for most C# developers but this is one area where they bring some of the stuff I think VB developers are going to like.



In previous versions of ReSharper you would have to learn shortcuts for every refactoring which meant, for me anyway, that I took the time to learn the most useful ones and left all the other ones alone. Not anymore. As an extension to context based actions we have Refactor This (CTRL + SHIFT + R) which brings up a list of available refactorings based on the place your cursor is at in your code. What this allows for is a single entry point into refactorings allowing you to get familiar with the various possible refactorings and ultimately to use them more than you would otherwise.


Type Completion

Type Completion adds a new level of intellisense to Visual Studio. Basically I can type a partial type name bring up Smart Code Completion (SHIFT+ ALT + Space) which will search through all reference assemblies and suggest type names even without a using statement of the namespace the type is in. Pressing enter will add the using clause to the top of file as well as complete the type. I can't say too many good things about this feature; it simply boots my productivity because I don't have to hunt around for the right namespace.


Unit Testing

If you're into unit testing (and you should be :)) ReSharper has something to offer as well. You'll be able to execute your tests from within Visual Studio ala what TestDriven.NET provides and additionally you get an Unit Test Explorer which makes it easy to overview your test suite. Basically ReSharper allows for much of the same convenience as Team System does by integration xUnit frameworks into Visual Studio.

Bracket Completion

Everything provided by ReSharper is about better productivity. In this section I'll cover all the little things you'll love and get addicted to before you know it :)

Bracket completion basically puts in the closing bracket of a block. Type { and ReSharper adds the matching }. Same thing goes for parentheses. You only save a keystroke but think about all the times a day you actually need this feature. I can't live without this one for sure.

Smart Complete Code

Smart Complete Code (CTRL + ALT + Space) basically an evolved version of Intellisense which gives you more relevant completion than what Visual Studio provides. You can think of the feature as scoped intellisense, whatever is relevant for the scope you're currently in ReSharper suggest. Very handy.

Reformat Code

Reformat Code (CTRL + E + F) is an extension to what was introduced in Visual Studio 2005 where you can specify how your coding style is, i.e. how spacing works, line breaks, all that good stuff. ReSharper actually had this in versions before Visual Studio 2005 came out and 3.0 has even richer support for configuring your coding style. Additionally you can reformat the code of the currently open file and as two new options globally for the entire solution or silently so you don't have to choose which settings to reformat by every time.


Surround With

Imagine that you've written a block of code and you are reminded that you need to do a try-catch around that block of code. You laboriously move the cursor to the start of the block and type try followed by the brace. After you you move the cursor to the end of the block and do the catch maybe followed by a finally block. With ReSharper that operation would go something like highlight the code block press CTRL + E + U select surround with try-catch-block. Surround With is a feature that allows you to surround blocks of code with other code like the try-catch block, a region, an if-statement, and so forth. I use this feature extensively to surround block with regions for example.


Goto Usage

How many times have you wanted to know which pieces of code call the particular method you're currently looking at? I know that I daily want to see this and luckily ReSharper does provide exactly this feature (SHIFT + ALT + F12). If only a single usage is found the you're taken there otherwise a list of the usages is displayed.


With the job market being what it is today my opinion is that it's downright irresponsible to not use tools that boost the overall productivity of developers. Almost every single company is clamoring for developers instead of making the most of the developers already employed in the company. Visual Studio brings a lot of productivity to the table, nice designers, code snippets, background compiling, refactoring. Even innovations in the core framework are about productivity like LINQ, automatic properties, etc..

ReSharper takes many of these familiar tools to new levels and adds new functionality to the best development environment out there. I've been using ReSharper for years and have liked almost every version of the product with exception of 2.0 which was dog slow. I'm happy to report that all the code analysis going on behind the scenes don't slow down Visual Studio noticeably. ReSharper truly delivers on JetBrains' promise of "develop with pleasure".

posted on Sunday, 01 July 2007 21:32:19 (Romance Daylight Time, UTC+02:00)  #    Comments [6] Trackback
# Monday, 25 June 2007

As you probably know we had our first meeting in the Aarhus .NET Usergroup last wednesday. I wanted to get the summary out earlier but unfortunately customer meetings got in the way. A couple of accounts of the meeting has already been posted, one by Jeppe Rørbæk from Microsoft (with pics), another one by Morten Vadstrup of Host Nordic who was kind enough to arrange a place for the meeting at the offices of Dynamic Web, and finally a short one from Klaus Hebsgaard.

I wanted to help Morten out with setting the place up for the meeting so I arrived early at Dynamic Web, luckily for me Morten and Morten had already done all the work which left me looking good without actually having to do anything :) Actually that's not entirely true as Marten asked me to handle the agenda since I was the one who proposed it.

We had quite a turnout with a total of 15 people attending. The number was perfect as our game plan for the evening was to establish the ground for the usergroup: What content to offer, what format to offer it in, membership, and so forth.

After a brief presentation of myself and the agenda we went around the table and got everybody introduced. I'm very pleased with the breadth of people who turned up, both professionally and technically.

We had people working with system administration, provisioning, C#, VB, Web, WinForms, CMS, SAP, and even one person looking into game development using XNA. XNA in particular was something people were instantly interested in hearing more about, much to the surprise of the person in question :) No doubt about the fact that we should have a presentation on XNA at a future meeting. A couple of students had also found their way to the first meeting which is great. No doubt that a usergroup is a great asset to them in particular as it gives them access to not only great knowledge but also to industry contacts which they can leverage come graduation. For those of us already in the business of software it's a great opportunity to meet the next generation of software developers and single out potential hires :)

In short we had people working with almost every aspect of .NET with all levels of experience which brought us to the next question: Technical level of the content. The consensus was that we would try and find something for everybody and that we would encourage everybody to take part in doing presentations. As one person pointed out nobody is an expert in all areas of .NET so even if you only have limited experience on a given topic you would still be able to provide value for people not familiar with that particular topic. In short we'll try to avoid a RTFM culture and try to create an environment which provides something for everybody.

Content-Brainstorm-Founding-Meeting Next up: Brainstorming about concrete topic people would like to see presentations on. My goal here was to walk away with something for the next meetings and boy did we ever cover a lot of topics! We had a whiteboard available for the seance and by the end of the session we had the entire whiteboard covered in topics. At the end I had difficulty even finding space for new stuff. Basically we're going to dig into all areas of .NET and in the future we might even take a look at some stuff not related to .NET. For now though we have more than enough: Check out the picture I took of the whiteboard in case of doubt :) Of course topics such as Orcas, LINQ, Silverlight, and other upcoming stuff were mentioned again and again so we need to do something in those areas. Jeppe mentioned that he would be able to come up with people on various topics such as unit testing (Mark Seemann), ORM (Morten Mertner), and Team Foundation (Martin Pamdeth). I mentioned that I'd like to see that bulk of the content created by the group itself to get it going but we'll see how we end up doing it.

Three people elected to come up with presentations for the next meeting: Jeppe Rørbæk, Klaus Hebsgaard, and myself.

With a very nice discussion on topics and level of presentations done we moved on to the physical aspect of the usergroup: Where should the meetings be held? The same place every time, in alternating locations, or something else entirely? Everybody were pretty much in agreement that doing a round robin between the offices of our respective companies would be preferrable because we'd get to see how other people have chosen to set up their shop. I personally like the idea of doing a round robin approach in spite of the fact of the additional planning required. The fact of the matter is that we all get an opportunity to be inspired and maybe start doing things in a better way by seeing what others have done. So we decided on giving the round robin model a go while keeping a couple of places as backup should all else fail. Jeppe ensured us that he would be willing to help us out by finding speakers on particular topics.

On a very cool note I had proposed that we should try and work something out for a informational web site but that had already been taken care of by Morten on beforehand. He launched our web site at http://aarhus.activedeveloper.dk a couple of days before the actual first meeting. It's a great example of the energy and entusiasm surrounding the meeting. When I asked if anyone would be interested in doing a presentation most put up their hand. I expected about 5 but got double that which bodes well for the future I'd say.

We needed some way of easily planning meetings which is why I came up with the idea of meeting the last Wednesday of the month at 19:00. We did not schedule the next meeting because of summer vacations which are sure to conflict with the group. In hindsight we could probably have chosen a better time to start this thing :) Keep your eyes peeled at the usergroup web site for information about the next meeting. We had a brief discussion about the particular day of the week and which time. Some wanted the meeting to start later, some earlier. For me personally 19:00 suits me just fine as I have to hang out until the meetings start and you never know how long they will go on for. We didn't decide on a particular length of each meeting but I feel that 2 - 3 hours is as good a place as any to start out which leads us on to the format of the meetings.

Basically we would like to have a presentation which can act as a base for further discussion, maybe a couple each time depending on how long we can keep a single topic interesting. We definitely need to play around with length and number until we find something that works. Someone came up with the concept of the "Nut Cracker" ("Nøddeknækkeren"); the idea here is to have people present problems they're facing and others will try to help them out. Also Jeppe suggest that we should try and build some actual useful code which sounds great in theory and it's certainly something we should try and do but in reality I'm concerned that it might be a tad too unmanageble. I would encourage people to try and come up with ideas for implementations based on the topic of their particular presentations. Additionaly we could put a Subversion server online for the group to play around with.

As the last order of business we decided to elect a number of core responsible people who will make sure that the meeting are arranged and that we have speakers for the topics people want to hear about. I was a bit afraid that no one would volunteer but in the end 5 people including myself volunteered for the job. Again a nice sign that we have something special going on here. The core responsible are: Morten Vadstrup, Peter Loft Jensen, Lars Buch-Jepsen, Brian Holmgård Kristensen, and Søren Spelling Lund. We had a short meeting at Vertica before we went to the meeting to discuss what we could do ourselves to get this thing rolling; one of the things was to actively participate in the group and that's just what we did as Lars and Brian are colleagues of mine. Also Vertica is ready to support the group should it be needed.

Finally I would like to thank everybody who showed up for the meeting and for the very active participation in the discussion. Also thanks to Morten Vadstrup for arranging a place for us to hold the meeting and organizing a web site for the group. Of course thanks to Dynamic Web for allowing us to use their offices for the meeting.

Sorry about the longest post since TechEd :)

posted on Monday, 25 June 2007 21:18:46 (Romance Daylight Time, UTC+02:00)  #    Comments [4] Trackback
# Monday, 18 June 2007

A quick reminder that the first meeting of the Aarhus .NET Usergroup is this wednesday 19:00 at Hostnordic A/S, Åhavevej 5, 8260 Viby J. Check out my original post about it and also take a look at the attendee list. I'm taking the liberty of proposing an agenda for our initial meeting to try and encourage a more productive meeting.

Goals for initial meeting
Vision/Mission for the group
Elect core responsible for group

Who are we
Introduction of attendees
Wishes for the usergroup - advanced topics vs. entry-level topics
Brainstorm for content - concrete presentations

Physical space
Schedule meetings, e.g. the last Wednesday of every month
Venue for meetings, e.g. round robin of work spaces
Informational web site

Attendees wishing to do presentations
Contacts in companies (possible speakers)
Content topics: SQL Server Express, SSIS, ERP, Vista, Commerce, Ruby, BizTalk, data access, LINQ, architecture, concrete projects
Use of Prosa/Samdata

posted on Monday, 18 June 2007 15:48:12 (Romance Daylight Time, UTC+02:00)  #    Comments [3] Trackback
# Friday, 15 June 2007

WindowsLIveWriterLogo The new Windows Live Writer is very good as I pointed out in a previous post but couldn't figure out where my spell check had gone off to. It turns out that if you run LIve Writer on a box with a non-English regional setting the spell check will be disabled with no way of activating it through the UI.

Luckily I found a workaround on Roy Osherove's blog; basically a small exe which launches Live Writer with spell checking enabled. A bit of a dirty workaround but it gets the job done until Microsoft release a version with this behavior fixed.

On a related note I still remember when Apple decided to do something along these lines with a release of iTunes which basically read the current locale of the system and launched iTunes in that particular language without any way of overriding the setting. Really annoying if you like me run an English version of Windows with a different locale. I just want my programs to speak English with Danish keyboard enabled and have all their features enabled damn it! :)

Utility: Launch Windows Live Writer with Spelling Enabled
posted on Friday, 15 June 2007 09:04:51 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback

My colleague Nikolaj passed along the feelgood link of the day: A video of a salesman who absolutely wows the audience at a song contest. I guarantee that you will have a smile on your face after seeing this.

Singing salesman makes Cowell's jaw drop

posted on Friday, 15 June 2007 08:43:22 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Wednesday, 13 June 2007

CommerceServer We decided to go ahead and put the "smart" in Smart Client and use ClickOnce deployment for the business tools of Commerce Server in order to make initial deployment and future updates to the client machines easier. In short a good idea which unfortunately met a speed bump due to the fact that we're deploying the business tools from the source code and not the compiled version shipping with Commerce Server 2007.

Basically everything went fine until we got to the Customer and Orders Manager which just didn't work. Every time we ran the ClickOnce installer locally or remotely we would get a SecurityException telling us that we didn't have FileIOPermission. Additionally Visual Studio reported that various assemblies didn't allow access to partially trusted assemblies. Baffled we started debugging. New certificates, strong naming assemblies, various ClickOnce deployment modes, changing trust levels for ClickOnce, etc. etc..

In the end the clue that helped us in the right direction was a warning in Visual Studio saying, "Invalid value for 'TargetZone' of item 'LocalComputer'.". Searching through the entire solution yielded nothing. Finally we used a text editor and opened up the .csproj file for Customer and Orders Manager project to have a look at the actual XML of the file. Lo and behold an element called <TargetZone> was defined with the value LocalComputer. Removing the element altogether and redeployed fixed the problem.

I'm assuming that the <TargetZone> element in the csproj file is a leftover from a partial trust deployment setting. Interestingly enough it turns out that this element is defined in the Microsoft Commerce Server 2007 Partner SDK source code distributed by Microsoft which means that everybody trying to do a ClickOnce deployment of Customer and Orders Manager from the supplied source code will encounter the same issue as we did.

Other than this issue configuring the business tools for ClickOnce deployment is a snap I think our client will be very pleased with this particular deployment model.

posted on Wednesday, 13 June 2007 12:36:20 (Romance Daylight Time, UTC+02:00)  #    Comments [2] Trackback
# Tuesday, 12 June 2007

First we had a Mac guy saying positive things about Windows Vista and now ... the Mac browser Safari is being released for the Windows platform. It must be a cold day in hell indeed :) There's a news story on the unveiling at WWDC on Computerworld.

In all seriousness it's a nice move from Apple because we can now test our web applications in the Safari browser without actually going out a buying a Mac computer. We are looking at a public beta 3 of the product and as such it exhibits a number of problems but the overall experience is definitely there. In the 45 seconds I spent testing it I came across two glaring bugs: The H1 tag is not rendered when running with 120 DPI in Windows (screenshot below) and clicking the bookmarks button crashes the browser. I checked with a colleague and it works in his machine leading me to believe that the issue is related to my 120 DPI setting also.

Performance-wise I'm pretty impressed with Safari it renders pages very quickly, about the same as the latest beta of Firefox 3 called Gran Paradiso, and of course notably quicker than IE7 which is just dog slow on my current development box.


posted on Tuesday, 12 June 2007 09:40:26 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Monday, 11 June 2007

David Messner gave a talk on Commerce Server 2007 architecture at TechEd 2007 Orlando. I didn't think too much of it when I saw that he had posted his slides to the Commerce Server Team blog because the slides are usually worthless without the actual presenter going through them. I was however pleasantly surprised to find that he had actually put some effort into adapting the slides to a PDF making the content very useful to those us not fortunate enough to be a TechEd Orlando.

Take a gander at the Commerce Server 2007 Architecture PDF on the Commerce Server Team blog. I believe that this is required reading for anybody working with Commerce Server.

posted on Monday, 11 June 2007 12:58:47 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Thursday, 07 June 2007

 I'm probably getting not getting enough sleep when I find something like this funny:


It was actually trying to say:


posted on Thursday, 07 June 2007 10:55:44 (Romance Daylight Time, UTC+02:00)  #    Comments [1] Trackback