Tools & Apps

Presentation Data Dump

Submitted by Robert MacLean on Tue, 12/08/2009 - 08:36

Over the last year I have done a number of presentations and recently some of uploaded them (unfortunately I cannot upload all, as some contain NDA information) to SlideShare so here is the collection of presentations from the last 15 months or so, in no particular order:

  • ASP.NET Dynamic Data
  • JSON and REST
  • What’s Microsoft CRM all about?
  • Source Control 101
  • SQL Server Integration Services
  • ASP.NET MVC
  • What’s new in the .NET Framework 3.5 SP 1

Click the read more link to see and download them...

ASP.NET Dynamic Data

 

JSON and REST

 

 

What’s Microsoft CRM all about?

Source Control 101


SQL Server Integration Services

 

 

ASP.NET MVC

 

 

What’s new in the .NET Framework 3.5 SP 1


Dev4Devs - 28 November 2009

Submitted by Robert MacLean on Sat, 11/28/2009 - 07:48

Well today is the day! Dev4Dev’s is happening at Microsoft this morning and I will be speaking on 10 12 new features in the Visual Studio 2010 IDE. For anyone wanting the slide deck and demo application I used you can grab them below.

The slide deck is more than the 6 visible slides, there is in fact 19 slides which cover the various demos and have more information on them so you too can present this to family and friends :)

Note worthy

Submitted by Robert MacLean on Wed, 11/18/2009 - 22:48

I have been very focused during the day on a project and my evenings have been taken up a lot with VSTS Rangers work so the blog has lagged a bit so here are some things you should be aware of (if you follow me on Twitter, then you probably have heard these in 140 characters or less):

I was awarded the title of VSTS Rangers Champion - this is a great honour since it is a peer vote from VSTS External Rangers (no Microsoft Staff) and MVP’s for involvement in the VSTS Rangers projects.

The VSTS Rangers shipped the alpha of the integration platform for TFS 2010 - this is important for me because it means some of the bits I have worked on are now public and I am expecting some feedback to get them better for beta and release next year. It is also important since my big contribution to the integration platform, which is an adapter I will cover in future blog posts, has a fairly stable base.

Dev4Dev’s in coming up in just over a week. This is one of my favourite events because it really is event for passionate developers since they have to give up a Saturday morning for it (no using an event to sneak off work). I will be presenting on Visual Studio 2010! Which should be great, based on my first dry run to an internal audience at BB&D last week. Two more of my BB&D team mates will be presenting Zayd Kara on TFS Basic and (if memory serves me) Rudi Grobler on Sketchflow!

The Information Worker user group is really blowing my mind with it’s growth, on Tuesday we had 74 people attend our meeting. For a community that only had a 100 or so people signed up on the website at the beginning of the year that is brilliant. Thanks must go to my fellow leads: Veronique, Michael, Marc, Zlatan, Hilton and Daniel. We will be having a final Jo’burg event for the year on the 2nd and it will be a fun ask the experts session.

NDepend - The field report

Submitted by Robert MacLean on Wed, 11/18/2009 - 22:39

I received a free copy of NDepend a few months back, which was timed almost perfectly to the start of a project I was going on to. However before I get to that, what is NDepend?

NDepend is a static analysis tool, in other words it looks at your compiled .NET code and runs analysis on it. If you know the Visual Studio code analysis or FxCop then you are thinking of the right thing - except this is not design or security rules but more focused at the architecture of the code.

Right back to the field, the new project has gone through a few phases:

  • Fire fighting - There were immediate burning issues that needed to be resolved.
  • Analysis - Now that the fires are out, what caused them and how do we prevent it going forward.
  • Hand over - Getting the team who will live with the project up to speed.

Right, so how did NDepend help me? Well let’s look at each phase since it has helped differently in each phase.

Note: The screen shots here are not from the project, since that is NDA - these are from the application I am using in my upcoming Dev4Dev’s talk.

Fire Fighting

The code base has over 30000 lines of code and the key bugs were very subtle and almost impossible to duplicate. How am I supposed to understand it quick enough? Well first I ran the entire solution and I start looking at it in the Visual Explorer:

image

The first thing that it helps is dependency graph in the middle which visually shows me what depends on what, not just one level but multiple levels and so on a large project it could look like:

ComponentDependenciesDiagram

Now that may be scary to see, but you can interact with it and zoom, click and manipulate it to find out what is going on.

image

For fighting code I could sit with the customer people, and easily see where the possible impact could be coming from. So that gets it down to libraries, but what about getting it down further? Well I can use the metrics view (those black squares at the top of the image above) which I change what they mean - so maybe the bigger the square the bigger the method, class, library etc… so using the logic that at some magical point (about 200 lines - according to Code Complete by Steve McConnell), the bigger the method the more likely that there is bugs in it. I could use that to find out where to spend time looking for the problems first, which meant that the problems were found quicker and resolved.

Analysis

Right now that the fires were over moved on to analysis to make sure that it never happened again - well when a project is analysed by NDepend it produces an HTML report with the information above but also a lot of other information like this cool chart which shows how much your assemblies are used (horizontal axis) vs. how a change may effect other parts of the code (vertical axis):

AbstractnessVSInstability

And that is great to see what you should focus on in refactoring (or maybe what to avoid), but there is another part which is more powerful and that is the CQL language which is like SQL but for code so you can have queries like show me the top 10 methods which have more than 200 lines of code:

WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE NbLinesOfCode > 200 ORDER BY NbLinesOfCode DESC

Some of these are in the report, but there is loads more in the visual tool and you can even write your own. I found that I ended up writing a few to understand where some deep inheritance was getting used when it came to exception handling specifically. In the visual tool this is all interactive too, so when you run that query it lights up the dependency tree and the black squares so you can easily see what is the problem spots and identify hot spots in the code.

Hand Over

Moving the final stages, I have to get the long term guys up to speed - how do I do that in a way they can understand without going through the code line by line? Easy, just pop this on a projector and use it as your presentation tool, with a custom set of CQL’s as slides or key points to show. What makes this shine is that it is live and interactive so when taking questions or doing a discussion you can easily move to other parts and highlight those.

All Perfect Then?

No, there are some minor UI issues that are more annoyance than anything else (labels not showing correctly in the ribbon mode or the fact that you must specify a project extension), but those are easily overlooked. The big problem is that this is not something you can pick up and run with - in fact I had tried NDepend a few years back and decided it wasn’t for me very quickly. If it wasn’t for a lot more experience and having an immediate need which forced me over that steep initial learning curve then I would never have gotten how powerful it is. That also brings up another point, the curve is steep - and if you aren’t used to metrics and thinking on an architectural level then this tool will really cause your head to melt and so this is not a tool for every team member, it is a tool for the architects and senior devs in your team to use.

Using Outlook 2010 with Google Calendar

Submitted by Robert MacLean on Thu, 10/29/2009 - 14:57
Update 1 October 2010: If you want FULL sync, then Google has updated there sync tool to support Outlook 2010 - please go to the Gmail blog for more info. Comments to this post will also be disabled as there is nothing left to say.

If you are using Google Calendar and want to use it with Outlook 2010, you will find that the Google Calendar Sync tool no longer works smile_sad_48

So what can you do? Well Outlook 2010 supports the iCal format and so does Google Calendar - so you can use that to get a basic sync between the two.

To set this up go to your calendar details page in Google Calendar (Settings link at the top of the window then Calendars and finally click on the calendar name), and at the very bottom of the is two sets of icons one public & one private. Right click the iCal icon from the private and select copy URL.

image

Now in Outlook, go to your calendar and click the Open Calendar button and select From Internet, now paste the URL in the text box and click OK.

image

There you go, your Google Calendar is now in Outlook 2010.

Downside to this is you now have two calendars in Outlook to work with, but if you click that little arrow next to the calendar name image you can have them display as one and you can easy copy/paste between them.

image

VS2010/TFS2010 Information Landslide Begins

Submitted by Robert MacLean on Tue, 10/20/2009 - 09:36

image001 Yesterday (19th Oct) the information landslide for VS2010 & TFS2010 began with a number of items appearing all over:

Gallery2 + C#

Submitted by Robert MacLean on Thu, 06/25/2009 - 18:05

Gallery2 is a web based PHP gallery system with a remote API for doing many things. I have been using it for a while, but have decided to change and so I wanted to export my images, which is harder than it sounds. To actually get this done I ended up writing a basic wrapper for the Gallery2 remote API and implementing a small console application to do the export.

If you are interested in the wrapper or the tool itself, I have setup a CodePlex project for it where you can download those: http://gallery2.codeplex.com/

The reason it is there, is because I have decided to open source it because it is useful to people besides me and I have gotten what I need from it, so I doubt I’ll spend much time getting it feature complete. This way someone else can get the tool (if that is all they need) or get the source and add to it.

FileDownload[1]

Screen shot of the tool running.

Glimmer - jQuery IDE

Submitted by Robert MacLean on Wed, 04/29/2009 - 09:42

image

jQuery is a fairly easy to use if you understand CSS or been working with HTML for a while, but what if you are a drag & drop developer? Who never has done that? Or if you want to just whip up a nice effect quickly? Well the guys from Microsoft have recently launched Glimmer which is a free jQuery effects IDE. 

image

When you launch the very good looking WPF application (read:SLOW) you get four templates, which 3 of them have a wizard interface to set it up.

  • Image Sequencer (click here for the demo of this effect): This creates a rotating image box. Think of use for banners where you want to have each image go to a different URL or for a picture rotate/slide show. This one has four steps:
  1. Description (where is the “Do not show this again” checkbox)
  2. Select the images and set the URL for them  image. What is nice here is the live preview window on the right hand side.
  3. Set how long to delay between images and what the image size should be (say if you need to resize)
  4. Lastly the save page. The UI is a little odd here, since there is no finish button. You need to use the (large) save button. When you save it you get a folder with an images sub folder (containing your images), a CSS file, an image for the button (to manually switch between images), jQuery 1.3.2, a minified js file of the effect you have done and a html page for testing/usage
  • Dropdown Menu Wizard (click here for the demo of this effect): This creates a drop down menu. It has 3 steps:
    1. Description (no “Do not show this again” check box again)
    2. Set up the top level menu options image
    3. Add second level options and save. The output is pretty much the same as with image sequencer - minified js file of your effect,  jQuery and an HTML page.
  • Custom: The non-wizard of the group. This guy is powerful and will let you build a lot of effects together, but you need to have an HTML file to start with as it will give you a list of the tags/id’s available - no page, no tags, nothing to work with: . If gives you a single page to wire up the events and I think this would be useful for people needing something special. image
  • Tooltip Wizard (click here for the demo of this effect): Two step wizard to add tool tips to text/images.
    1. Description (no “Do not show this again” check box again)
    2. On step two you put in the text/image and the tool tip and save it.

    I do like the menu option “Clean Code Mode” (under the options menu) which disables the minifi-ing of the code it generates. This will be very useful for people using this to learn from.

    Overall this is a good first drop, although it should be viewed as a beta. The performance is terrible, there is so much more you could do with jQuery that it doesn’t do, it is unaware of plug-in’s which is important for jQuery and the UI has many things that aren’t logical (there is no hint that the Custom needs a HTML page to actually do anything). However as a tool to train people, or give designers a tool to work with jQuery this will be very valuable and I will be demo’ing it at my jQuery talk.

    VSTT Reference Guide

    Submitted by Robert MacLean on Mon, 04/06/2009 - 13:30

    If you are looking for some serious guidance on Visual Studio test, then the Rangers have come to the rescue (again) with a lovely 83 page document on VSTT. Get it from CodePlex

    It sounds like a contraction that 83 pages is a reference guide but from my use this morning of it (couldn’t of come out at a better time for me), it isn’t. It is not meant to be read from beginning to end, rather you can easily skip between parts because the material is presented in a Q&A format which is easy to manage.

    What’s in it?

    • SETUP CONSIDERATIONS 9
    • WEB TEST CONSIDERATIONS 14
    • WEB SERVICE TEST CONSIDERATIONS 35
    • UNIT TEST CONSIDERATIONS 36
    • LOAD TEST CONSIDERATIONS 42
    • LOAD TEST RIG CONSIDERATION 56
    • PERFORMANCE DATA COLLECTION AND USAGE 66
    • LOAD TEST RESULTS STORE INFORMATION 73
    • TEST CUSTOMIZATION 76
    • ITEMS CHANGED OR FIXED IN VSTS 2008 SP1 77
    • GENERAL COMMANDS AND TRICKS (NOT VSTS SPECIFIC) 79

    Delphi Prism: Part 4: What is available in each .NET Framework 3.5

    Submitted by Robert MacLean on Mon, 01/26/2009 - 17:34

    What is available on each .NET Framework with Prism… this is mainly a screen shot post since it supports exactly what C# (and VB.NET) supports on those framework versions.

    .NET Framework 3.5

    Delphi - General

    image

    Mono

    image

    Silverlight

    image

    WCF

    image

    Windows

    image

    Windows (WPF)

    image

    .NET Framework 3.0

    Delphi - General

    image

    Mono

    image

    Silverlight

    NONE!

    WCF

    image

    Windows

    image

    Windows (WPF)

    image

    .NET Framework 2.0

    Delphi - General

    image

    Mono

    image

    Silverlight

    NONE!

    WCF

    image

    Windows

    image

    Windows (WPF)

    NONE!