25 September 2008

I had a talk at NNUG Trondheim tonight

At this evenings NNUG meeting in Trondheim, I gave a talk about JetBrains ReSharper and showed many of its great features. During my work on the presentation I discovered many things I didn’t know about ReSharper, and my main point in the presentation is that to get the best value out of ReSharper, you have to invest some time in learning the various features and their keyboard shortcuts. I therefore created a demo solution that shows most of the features of ReSharper and their respective shortcuts. The examples are grouped into classes based on each main topic in ReSharper’s help file, and can be used by anyone looking for a quick repetition of how to work with ReSharper. The solution doesn’t compile, but that is by design so I can show the code analysis functionality of ReSharper.

I also managed to cram in a brief demo of dotTrace Profiler by running profiling on ScrewTurn Wiki, but I didn’t have much time to discuss this product in any detail. The attendees did seem to like the presentation, and I hope they have a better idea of what ReSharper and dotTrace Profiler can do for them.

After the talk we did something different than usual, because instead of ordering pizza and have it brought to us, we went to a local pizza place nearby. My employer Acando sponsored this event, and we had a great time socializing and chatting in an informal setting.

I have uploaded the slides and demo code to the meeting page on www.nnug.no, but for those of you that aren’t registered members you can download them from here also:

(in Norwegian)

(in Norwegian)

Important:The embedded links to SkyDrive isn't working quite as expected, but if you click on the name of the file they should work. If you click elsewhere inside the embedded frames you should be redirected to SkyDrive, but if you for instance use the PDF Download Add-on to Firefox it will catch the link and think it's a valid PDF file although it isn't.

Disclosure: JetBrains will provide me with a ReSharper and dotTrace license after my talk at NNUG, but they are in no way influencing what I think of the products or what I share with you on this blog or in my presentation.

22 September 2008

How to navigate to your recent edits in Visual Studio

I’m still working on my talk about ReSharper at this thursday’s NNUG meeting in Trondheim, and I’ve discovered a lot of cool functionality that improves my experience in Visual Studio. One thing I regularly use is “Navigate Backward”, to back track my steps and locate previous lines of code I have modified. The problem with this command is that it also navigates to places you only have positioned the cursor, and not only to where you actually made the changes. In addition, if you close a code window it’s history is lost, and the edits aren’t persisted between instances of Visual Studio. Here is an example of how this looks, after I made multiple modifications to multiple files that I later closed:
image 

Tip: If you don't see the "Navigate Backward" and "Navigate Forward" buttons on the standard toolbar, you probably doesn't use the General Development environment settings. You can manually add the buttons by customizing the toolbar (they are located in the View category), but when I tried that I didn't get the drop down functionality as shown in the screen shot above. What I did instead was to import the menu and toolbar settings from the General Development template by following these steps:

  • Select "Tools -> Import and Export Settings..."
  • Select "Import selected environment settings" and click "Next >"
  • Choose if you want to save your current settings or not and click "Next >"
  • Select "General Development Settings" and click "Next >"
  • Remove all check boxes
  • Check the node "All Settings -> General Settings -> Menu and Command Bar Customizations"
  • Click "Finish" to reset your toolbars and menus

ReSharper has two commands that help improve on these limitations. The first is a simple "Last Edit Location" command which move the cursor to the previous line you edited. The second command is "Recent Edits", which pops up a list of the last 30 locations you have modified:
image

Here you see every location I’ve edited in the solution, and even closed files are listed. This example is from my demo, and I’ve documented the various shortcut keys, and with ReSharper’s Visual Studio keyboard binding the shortcut for Recent Edits is Ctrl+Shift+,.

Note: The edits aren’t cleared when you select "Clear Caches" from ReSharper’s option dialog, but you can manually delete these items by removing them from the RecentEdits element in ReSharper’s user configuration file. The file is named <SolutionName>.4.1.resharper.user and resides in the solution folder.

Disclosure: JetBrains will provide me with a ReSharper and dotTrace license after my talk at NNUG, but they are in no way influencing what I think of the products or what I share with you on this blog or in my presentation.

15 September 2008

Who wrote "The Great Gig in the Sky"

Richard Wright sadly passed away today at age 65 from cancer. Richard was one of Pink Floyd's founding members, and did contribute to most of Pink Floyd's albums including writing the The Great Gig in the Sky for The Dark Side of the Moon.

I was lucky to attend Pink Floyd's Division Bell tour in 1994, and have very found memories of Richards performance. I haven't followed Richard's career very closely after his last solo album Broken China from 1996, but I watched Pink Floyd's brief reunion at Live 8 with great enjoyment. The most resent appearance I have of him is from David Gilmour's live DVD Remember That Night, where he plays keyboard and has lead vocal on his song Wearing the Inside Out and Syd Barrett's famous Arnold Layne on disc 2.

Thanks...

13 September 2008

DSLs can be textual

DSLs or Domain Specific Languages are designed to solve particular problems in particular domains, by using models or other constructs that are better suited to describe what our intentions are than traditional programming languages. I first read about DSLs in Jack Greenfield and Keith Short's book about Software Factories, and the latest version of Web Services Software Factory contains DSLs with graphical editors to define service contracts and service hosting environments. The Distributed Systems designers in Visual Studio Team System for Architects are other examples of DSLs that are currently shipping by Microsoft.

One can also argue that LINQ is a textual DSL embedded in another language, and you can create a DSL your self by defining a fluent interface where the classes and methods represents the syntax of your language. Anders Norås has blogged about this earlier, and at his talk about SOA at MSDN Live (you can still catch his presentation in Oslo on September the 30th) he gave a quick glimpse of how Boo could be used as a DSL to configure a message bus in his demo. I've not looked at Boo in any detail, but Tore Vestues and Gøran Hansen had a brief discussion on Tore's blog about how you can extend Boo with your own keywords, and by that defining your own DSL.

I think the concept of DSLs are becoming main stream sooner rather than later, and after reading Douglas Purdy's post He who defines the language… this week I'm looking forward to what Microsoft will reveal at PDC in October:

You are going to be hearing a lot more about (textual) DSLs from me and others on my team.

Martin Fowler, who I had an opportunity to meet a couple months ago, has a quick Q&A that is worth reading if you would like to be educated about the space.

http://www.martinfowler.com/bliki/DslQandA.html

See you at Doug's talk about "Oslo" and at Chris Anderson's and Giovanni Della-Libera's talk about Textual DSLs in Los Angeles.

08 September 2008

ReSharper is smarter than Visual Studio

As I blogged about previously, I'm working on a talk about ReSharper for NNUG in Trondheim, and today I noticed something that isn't as important as the other features of ReSharper, but it demonstrates that in many respects ReSharper improves on the base functionality of Visual Studio.

We all know that the C# compiler can generate some useful warnings (which we of course correct immediately :)) , but it misses some obvious issues. In my example I have a method with a couple of unused variables:
 Code Example  
As you see ReSharper correctly identifies both var1 and var2 as unused by coloring them gray, but the C# compiler lists just var1 as being unused:
 image

Disclosure: JetBrains will provide me with a ReSharper and dotTrace license after my talk at NNUG, but they are in no way influencing what I think of the products or what I share with you on this blog or in my presentation.

04 September 2008

JetBrains has a very transparent development process

I’ve been using ReSharper for some time, and I think it is a great add-on to Visual Studio. I’m working on a presentation and a demo of ReSharper and dotTrace for our next NNUG meeting in Trondheim on September 25, so I’m not going to discuss any features just jet. But I want to share something I really like about JetBrains, and that’s how they handle their development process and their relationship with the community.

The first version of ReSharper I tried was an early version of ReSharper 3.1, which I got through their early access program (EAP). This program allows users to download betas, release candidates and even nightly builds of the software. These builds have trial licenses that are renewed throughout the program, so if you're interesting in evaluating and maybe help improve the next version this is a great way to start. One thing you should note is that some of the nightly builds may contain serious bugs, but if you stick with the official betas, release candidates or the builds that have passed JetBrains' tests you should have a pretty easy ride. Neither ReSharper nor dotTrace have an active EAP today, but I expect new programs to start in time fore the next main releases.

Even if you can't download any early software right now, you can still submit requests for what you want to see in the next version. This is done through JetBrains JIRA, which is used to track various issues. Here we can submit suggestions and vote for those we think is most important to us. The issue tracker is also used for bug tracking, and whenever ReSharper encounters an error you get the option to automatically submit the exception to JetBrains JIRA. I've submitted a couple of exceptions that I got during editing of MSBuild project files, and I am able to track them through JIRA. None of them is fixed yet, but I hope JetBrains will consider them for the next release.

JetBrains also has a blog and various forums for their products, but  I think it's the EAP and public issue tracker that separates JetBrains from other developers. Microsoft Connect is a similar web site, and I think more companies should do the same and open up to their communities. This will at least make me trust the companies more, and it's much easier for me to recommend tools from such vendors.

Check out JetBrains' Community Center for more information about their community commitment.

Disclosure: JetBrains will provide me with a ReSharper and dotTrace license after my talk at NNUG, but they are in no way influencing what I think of the products or what I share with you on this blog or in my presentation.

01 September 2008

Kevin Rose sold me a copy of Ratatat's new album

I enjoy listening to good music, but lately I haven't bought many new albums for a variety of reasons. The main reason is that I simply haven't heard something new that I really liked for a long time. It was therefore very nice to check out Kevin Rose's (from Digg and Diggnation) Muxtape compilation of Ratatat's new album LP3, and I liked it immediately. Ratatat  is an electronic music duo, which reminds me of Röyksopp and a little bit of Air, and if you like those bands I recommend you check out Ratatat.

It appears someone don't like this kind of marketing, because now Kevin's compilation isn't available any more from his Muxtape page at http://krose.muxtape.com/. I, on the other side, got to listen to the album before it was taken down, and I ordered a copy of the CD. Kevin has a link to a downloadable MP3 version of the album from Amazon on his blog post, but I prefer to have a CD in my collection. If you're interested, you can still get some samples of the Album from Amazon and on the bands MySpace page, so it is still possible to get a taste before you buy.