Thanks Microsoft

I found out yesterday that I have received the Microsoft MVP Award again for Solution Architecture from Microsoft. This was the third time I received the award and I am grateful and honoured to be in such fine company as other the other MVPs out there that contribute to the IT community.

Aside from the recognition, the program opens up opportunities for bi-directional communication with Microsoft. They truly to listen to and value the input from MVP community leaders. While this is not unique, it's certainly rare type of program. There are many other big companies whom have lost sight of their customers, and even their most passionate ones. They would do well to take a lead from Microsoft in this regard.

Follow up on LINQ and ADO.NET Entity Framework Talk

On Saturday on March 31, 2007 I did a couple of talks at the Toronto Code Camp. The first an overview on the LINQ Project and the ADO.NET Entity Framework.

The second talk was an impromptu talk to cover a time slot for a speaker who was unable to attend. I gave the audience some choices of topics and they chose Automated Unit Testing in VSTS. We also touched briefly on the bridge between TDD and QA, other types of tests, integration with source control, work items and builds. My hidden agenda was to convince folks that this is an essential evolution of our develop discipline and is no longer a fringe activity, nor associated to just one kind of development methodology (XP/Agile).

The talk was unscripted and as such no slides. Good thing because we went well into the lunch hour and I appreciate everybody's willingness to hang out and have a good discussion. Here are some links:

And lastly a couple of book recommendations:

Finally a big thanks to Chris Dufour for putting on an excellent glitch free code camp - this should be a model for similar events.

Update: Also check out this blog post for videos of the EDM designer that unfortunately isn't working in the March CTP.

Update 2: I should also include Shyam Pather's excellent Entity Framework screencast tutorial(s) in which he demos Entity Query Language and tells a great story of how to evolve ADO.NET 1.0/2.0 code to ADO.NET 3.0

Toronto Code Camp Slide and Demo

The second annual Toronto Code Camp took place this past Saturday. By all accounts, it was a tremendous success with over 250 people giving their Saturday over to many things technical. I gave a presentation on extending the ObjectDataSource control, and while you should be able to get the slides and demo code from the Toronto Code Camp site shortly, I thought I'd post them here as well, just to get it out as quickly as possible.

Slide Deck - Extending the ObjectDataSource

Demo Code - Extending the ObjectDataSource Demo Code

My Recent Visit to MS Research

A couple of weeks back (sorry still catching up) I had the great fortune of being invited to visit a MS Research event called TechFest. MS Research hosts this event annually for fellow MS Employees and opens up their doors so they can see what they've been working on, and for the first time in their 15 year history, they allowed those of us without the trademark MS employee blue-badge to attend. The "exhibit hall" was very "science fair" full of academic research geeks and no marketing folks.

MS Product teams have been going through an era of transparency over the past few years and it was nice to see this principle infect MSR. A few quick facts that impressed me about MSR:

  • MSR has been grown from 0 to 750 researchers over the past 15 years. This is the equivalent of creating a new Berkeley CompSci Faculty...each of those 15 years.
  • MSR has researchers in facilities located in Redmond, Silicon Valley, San Francisco, Cambridge, Beijing and Bangalore.
  • MSR runs the largest CompSci Ph.D. internship program. Currently there are 800 Ph.D. interns working worldwide in MSR labs. In the US last summer, MSR had 300 interns in their labs which is impressive considering that the US produces about 1200 CompSci Ph.D.'s annually

There was lots of interesting projects to learn about, some very space-age and cool, others kind of weird and hard to see any use for, and some that you wish were in a shipping product yesterday. Then there are some that caused attendees with certain allergies to get all stuffed up. Check out some of the videos here and here.

Team System Web Access: Free!

Well this is about the best news I've read all day. Microsoft has acquired DevBiz, the makers of teamplain, which provides web based access to work items and some source control operations.

The good part of the news is that now MS owns it and is rolling into Team System (first as a power toy), and as of right now, you can download it and install it for free. So long as the clients have a TFS Client Access License, you're good.  [via Brian Harry's blog]

Toronto Association of Systems and Software Quality

A few weeks ago I attended the Toronto Association of Systems and Software Quality (TASSQ). It's refreshing to attend a user group outside of the MicroSphere. There was about a 100 attendees and I like the round table format over dinner with lots of opportunity for peer discussions.

This particular month the format was that of a moderated panel and despite being a new member, somehow I ended up as one of the panel members during the first part of the evening. There were a lot of questions and discussions around agile development, TDD and how that plays a part in the QA role. It was my pleasure to meet Scott Ambler and sit on the panel with him. He is an interesting guy who spends much of his time in the agile space.

It was obvious to me from watching and participating in the discussions that the TDD movement is perceived as a huge opportunity to assist Quality Assurance professionals. Unfortunately there is not a good understanding of how Test Driven Developers collaborate their work with the QA team. Not actually knowing what TDD or how to implement it is another common problem, but that's another blog post.

TDD is all about adding quality from the inside out, but per se, not intended to assist the QA profession. But there are good opportunities here in the areas build verification, earlier functional testing, regression testing and code coverage. The end goal here should be to cost-effectively improve our software quality. With that in mind, if you are in the Toronto area on March 29, 2007, I'd like to invite you to our Software MAnagement RoundTable (SMART) breakfast to discuss these issues. Click this link to read more about the event and registration details.

WebParts and the need for a Database

I'm doing some work creating WebPart components in ASP.NET 2.0 and discovered a dependency that I wasn't initially expecting...the need for a database.

It appears that in order to even place a WebPart onto a form, you need to have a database. Or at least a persistent data store. A little bit of investigation found this information available in a number of places. The WebPart isn't actually the problem, so much as the WebPartManager. The manager is responsible for keeping track of the various WebPartZones and which WebPart is in which Zone. To persist this information across iterations of the page, the location information is stored in a database. So, even when the page is displayed the first time, a database connection needs to be available.

While you can create your own provider, the easiest mechanism is to use the aspnetdb, which is also used by the Membership and Role providers. To add the database to an existing SQL Server instance (either SQL Server 2000 or 2005), use the aspnet_regsql command, which is found in c:\Windows\Microsoft.NET\Framework\v2.0.50215. Once the database is available, a connection string (call it AspNetDbConnectionString to match the upcoming example) should be defined in the web.config file, along with a webParts element that includes a personalization tag, similar to the following:

  <personalization defaultProvider="SqlPersonalizationProvider">
      <add name="SqlPersonalizationProvider"
        applicationName="/" />
      <deny users="*" verbs="enterSharedScope" />
      <allow users="*" verbs="modifyState" />

DataFormatString doesn't seem to work on BoundField elements

I was using the BoundField element in ASP.NET 2.0’s GridView control. More specifically, I was attempting to use the DataFormatString element in order to change the look of dates and dollar amounts as they get displayed. Much to my dismay, it didn’t look like the format string was being applied to the data.

After digging around a bit (and making sure that my memory of the format codes was accurate), it turns out that the problem is caused by a combination of factors. The first is that the default value for the HtmlEncode is true. The HtmlEncode property determines whether the value of the bound field is HTML encoded before being transmitted to the browser. The second factor is that, when the DataFormatString is applied to the value, any HTML encoding takes place prior to the formatting.

When, for example, a date is rendered, the date value is converted to string using the ToString() method. The string is then HtmlEncoded. Finally, the String.Format method is used to format the string using your format codes. However, your date format codes won’t work because the ‘date’ is no longer a DateTime variable. It’s a string. So instead of formatting the data, it is displayed using the ToString() layout. The same problem exists for other non-string types, including currency, floats, etc.

The solution is to set the HtmlEncode attribute to false on the BoundField element. Now the value is not converted to a string prior to the Sting.Format method call, the result being that the String.Format method uses the typed value (not the ToString version) and the format string in the manner that you (and I) expect.

MS Project and Work Items

If you are a project manager or know a project manager who is using Microsoft Project with Team Foundation Server to manage Work items you may have noticed that Start and Finish Dates only update in one direction. It seems that by default PublishOnly is set to True in the Field Mapping for MS Project for these fields, therefore if you have a schedule in Project and you publish it to the Team Foundation Server the work items will have the start and finish dates from project. However if you load up a project from the work items in your Team project the dates will not be reflected.

You can change this by downloading a mapping file, changing it and uploading it again. Use the command line utility TFSFieldMapping.exe to accompish this. Read this article to understand how to download and upload mapping information. 

The command is as simple as:
TFSFieldMapping download TeamFoundationServer TeamProject MappingFile.xml
TFSFieldMapping upload TeamFoundationServer TeamProject MappingFile.xml

After you have downloaded the Project Field Mapping information you can change the PublishOnly attribute to False and upload the file again.


Visual Studio 2005 Service Pack(s) 1


As an early Christmas present, Microsoft released a welcome service pack for Visual Studio 2005 last week. There's downloads available for each appropriate edition including the team foundation server. Check the download pages for releases notes as well.

There is still another service pack/update in the wings to provider greater facilities for integration with Windows Vista. It is supposed to be available in the first quarter of 2007, but you can download the beta of that service pack now.

For sometime now, I've done almost all of my development exclusively in virtual machines such as VPC and VMWare. This has been the only sane way to minimize disruption with the transition from Windows XP to Vista on my primary notebook.

As an aside, I heard a rumour that the VMWare Workstation 6.0 beta now supports the option to run your IDE on your host OS, and then to deploy, run & debug inside a virtual machine. That is certainly going to open some interesting scenarios. I can see that being very helpful for automated unit testing on via a build server, testing out on multiple configurations, environments, operating systems, etc.