Wednesday, April 02, 2008

I am delighted and honored to receive Microsoft's Most Valuable Professional (MVP) 2008 Award for Connected System Developer. This is my third consecutive year receiving the MVP award. Thank you to the folks in Microsoft's MVP program and Connected Systems Division for this award.

Microsoft's Connected Systems Division owns the Windows Communication Foundation (WCF), Windows Workflow Foundation (WF), CardSpace, and BizTalk Server (BTS) technologies. BTS gains a new focus and considerable prominence in Project Oslo.

Thanks so much, I really appreciate this award.

Wednesday, April 02, 2008 4:20:44 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [2]  | 
 Tuesday, April 01, 2008

imagePain. IntelliSense is handy in a number of ways. One way it is not so handy is that when it pops up, it covers up whatever is down and to the right of where you are typing. Murphy's Law dictates that whatever is covered up is exactly the context that you need to see in order to write your code. Sigh.

For example consider the situation shown here. I was counting on the adjacent code to jog my memory if the class member I am about to create should public, protected, internal, or private.

Band-aid. I've always worked around this annoying 'IntelliSense-makes-a-better-door-than-window' problem by dismissing the IntelliSense window by pressing the Esc key, looking at that code I need to see, and then bringing the IntelliSense window back by pressing Ctrl+J. It's not pretty, but it works. I've done this so much that I find it is hardwired into my fingers. But it is a band-aid solution at best.

imageRelief. When IntelliSense is displayed, you simply hold down the Ctrl key and the IntelliSense window becomes semi-transparent (is that translucent?) so you can see right through it. It's not gone: if you look closely at this screen shot, you'll see the ghost of IntelliSense lingering just inside the range of barely perceptible. Release the Ctrl key and the IntelliSense  window is opaque once again.

Nice. Nice. Very nice.

Updated: as Rob comments, this is a Visual Studio 2008 feature. Sorry for not making that clear. Another good reason to upgrade.

Tuesday, April 01, 2008 7:51:57 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [2]  | 
 Friday, March 28, 2008

In my view... U-Prove is the equivalent in the privacy world of RSA in the security space. It does things we wouldn’t have otherwise thought possible.
— Kim Cameron

On 6 March 2008 Microsoft acquired Credentica, a Montreal-based company with some remarkable cryptography technology called U-Prove. The technology allows a user to disclose the absolute minimum information required in any given situation. U-Prove has been developed by Stefan Brands over the past two decades. In addition to acquiring the U-Prove technology and patent portfolio, Stefen Brands, and his colleagues Christian Paquin and Greg Thompson have joined Microsoft's Identity and Access Group. The U-Prove technology will be integrated in Microsoft's user-centric CardSpace identity metasystem and Windows Communication Foundation.

Stefan Brands, who ignored several previous offers, is excited about the Microsoft acquisition.

In turn, Microsoft's identity architect, Kim Cameron, is notably delighted with the acquisition.

Our goal is that Minimal Disclosure Tokens will become base features of identity platforms and products, leading to the safest possible Internet.  I don’t think the point here is ultimately to make a dollar.  It’s about building a system of identity that can withstand the ravages that the Internet will unleash. That will be worth billions.
— Kim Cameron

Kim has several blog posts related to the acquisition, which I link to and quote from here:

Microsoft to adopt Stefan Brands’ Technology (6 March 2008)

In my view... U-Prove is the equivalent in the privacy world of RSA in the security space. It does things we wouldn’t have otherwise thought possible.  At one time “public key” was considered an oxymoron - but the properties of RSA were so compelling they completely changed our thinking about keys.

The same, I think, is true of the zero knowledge proofs and “blinded signatures” Stefan has perfected. When you first hear about their capabilities, you say, “Well, that’s impossible.” But if you look into the math, it's not. It actually works.

If you are inclined to look into the math, Stephan Brands's book, Rethinking Public Key Infrastructures and Digital Certificates; Building in Privacy (MIT Press, 2000, ISBN 0-262-02491-8) is available in PDF form. Like most dense and chewy material, I do better reading my mathematics better in a dead tree format.

Know your need (6 March 2008). Need to know, know your need, need for security and privacy now.

Reactions to Credentica acquisition (9 March 2008). A reaction rodeo round-up.

Ralf Bendrath on the Credentica acquisition (9 March 2008)

Ralf Bendrath is a person who thinks about privacy deeply...

"Microsoft has acquired... Credentica. While that probably means nothing to most of you out there, it is one of the most important and promising developments in the digital identity world."

Microsoft says, “U-Prove it” (10 March 2008). Quotes Joe Wilcox at length, addressing some of Ralf Bendrath's comments.

Brendon Lynch, Microsoft Director of Privacy Strategy, helps explain what it all means.

In the great world beyond Redmond, Burton Group Identity Blog observes that Microsoft acquires Credentica, and there has been considerable press coverage by Washington Post, Network World, PC World, and eWeek's Microsoft Watch ("This is a damn, exciting acquisition." Hey, Joe, what is that comma doing there?)

I am working on getting my head around zero-knowledge proofs and minimal disclosure tokens. It is clear that I've got some deep reading ahead. Exciting times.

Friday, March 28, 2008 8:57:42 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 

If you are ever attending a BOF session and the moderator is pitching a product or delivering a presentation, call him or her on it...

Hunter in Roanoke, Virginia, has a few blog posts about Birds-of-a-Feather (BOF) sessions at the TechEd 2008 conferences. I love the humorously title of his post "Birds of a Vendor?" where he asks a great question:

A quick look through the Birds of a Feather voting area (for the IT Pro Conference) shows a lot of sessions that appear to be sponsored by vendors. I wonder if they will turn into a sustained marketing pitch.

Absolutely not!

I posted a reply in the comments. Here's one part that I want to share with everyone attending BOF:

I absolutely agree with you, and we have heard loud and clear from past conferences, that BOFs are not appropriate for marketing products or services. Nor are they presentations or lectures. We communicate that to all of our moderators. Okay, sometimes those old presentation and marketing habits are hard to break, and that’s where you, the good old community, come in. If you are ever attending a BOF session and the moderator is pitching a product or delivering a presentation, call him or her on it. Be polite, but be firm. You can say that all of you came to discuss the subject together, and you’d like to hear what other people in the room think about the subject. [More...]

And a minor technical correction: vendors don't sponsor the BOF sessions they moderate. They volunteer just like the rest of the moderators and hosts.

Proposals for Birds-of-a-Feather sessions are accepted through Wednesday, April 2, and voting continues through Monday, April 7, 2008. Use these links to propose a BOF session for TechEd Developer 2008 or TechEd IT Professional 2008.

Friday, March 28, 2008 4:51:50 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Wednesday, March 26, 2008

If you've been following my whirlwind tour of C# on Channel 9, with episode 4 posted I've now covered the features that I consider to be the major ones — the ones that have the biggest impact on the way we write code. There are other features that were also introduced in C# 2.0, and it is only fair to point out what I left out.

The definitive reference for 2.0 features is the article What's New in the C# 2.0 Language and Compiler, in the Visual C# Getting Started, in the MSDN Library. The topics I opted to not cover are:

Okay, your curiosity should have gotten the better of you by now. Go look up covariance and contravariance in delegates. Then you'll be able to write better code and impress your friends with sesquipedalian verbiage.

Wednesday, March 26, 2008 4:48:58 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 

My fourth screencast on modern C# language features is posted on Microsoft's Channel 9 — Whirlwind 4: What's new is C# 2 - Accessors, Static Classes, Nullable Types (9:40). This installment wraps up the major C# 2.0 features, so next time we'll be jumping into the C# 3.0 goodness.

In addition to a few resources on today's topics, I've also provided some code showing a sample of using accessor visibility and a static class. And for the careful listener, I  have some small corrections to the screencast.

Resources

Asymmetric Accessor Accessibility, C# Programming Guide, MSDN Library

Access Modifiers, C# Programming Guide, MSDN Library

Static Classes and Static Class Members, C# Programming Guide, MSDN Library

static, C# Language Reference, MSDN Library

Nullable Types, C# Programming Guide, MSDN Library

?? Operator, C# Language Reference, MSDN Library

Nullable<T> Generic Structure, .NET Framework Class Library, MSDN Library

C# Whidbey Featurette #3: Static classes, blog post by Eric Gunnerson, C# program manager. Eric provides some justification for the static class in C# 2.0.

Get a Charge From Statics with Seven Essential Programming Tips, K. Scott Allen, MSDN Magazine, June 2005.

Nullable types in C#, blog post by Eric Gunnerson, C# program manager.

Create Elegant Code With Anonymous Methods, Iterators, And Partial Classes, Juval Löwy, MSDN Magazine, Visual Studio 2005 Guided Tour issue, 2006 (Vol. 21, No. 3)

Code sample

Here is a sample that illustrates use of accessor visibility and static classes. 

using System;
using System.Collections.Generic;

namespace CSharpWhirlwind4
{
 
public class Animal
  {
   
private string name;
   
public string Name
    {
     
get { return name; }
     
private set { name = value; }  // restrict accessor visibility
    }

   
// private constructor
    private Animal( string name ) { Name = name; }

   
// nested static class, manages Animal instances
    public static class ClassFactory
    {
     
private static Dictionary<string, Animal> animals
        =
new Dictionary<string, Animal>();

     
public static Animal Create( string name )
      {
       
if ( !animals.ContainsKey( name ) )
          animals[ name ] =
new Animal( name );
       
return animals[ name ];
      }
    }
  }

 
// ...
}

The Animal class has a Name property which is marked with public visibility. Within the Name property, the set accessor is declared with private visibility, so that only members of the Animal class can set the Name property.

The Animal constructor is also declared with private visibility, so Animal cannot be instantiated except by members of the Animal class. The constructor uses the private set accessor on the Name property.

Inside of the Animal class, there is a nested class named ClassFactory which is responsible for managing Animal instances. The developer's intention is that Animal.ClassFactory should only contain static members, and therefore never be instantiated. That is indicated by declaring the class to be static.

imageTake a look at the resulting assembly in ildasm. The ClassFactory class (.class) is marked as abstract   and sealed. As an abstract class, it cannot be instantiated. And because it is sealed, it cannot be inherited by another class. Also note that the static ClassFactory has a default class constructor (.cctor), which is in fact permitted on static classes since that is a static member.

Since ClassFactory is a nested class in the Animal class, it is a member of the Animal class, and so has access to Animal's private constructor.

In this example, the ClassFactory ensures that no more than one instance of an Animal of a given name is created, as illustrated here.

Animal w1 = Animal.ClassFactory.Create( "wombat" );
Animal w2 = Animal.ClassFactory.Create( "wombat" );
Debug.Assert( w1 == w2 );   // two references to the same object

Errata

The devil is always in the details.

At 1:31, in a bout of overly excessive exuberance, on accessor visibility I said  you can change the visibility of "one, the other, or both" accessors.  Every word of that is true... except for the "or both" part.

At the end of the section on static classes (4:17) I misspoke when I said the static class "exists only because it has private members." Pretend you really heard me say it "exists only because it has static members."

Previous episodes

Wednesday, March 26, 2008 3:12:59 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Monday, March 24, 2008

Last year we put together a team of folks from Corillian, Arcot, Wachovia, and the Microsoft CardSpace team and jointly created a proof-of-concept demo for a user logging into an online banking application using Microsoft CardSpace. I delivered the demo in the Microsoft booth at the RSA 2007 Conference for a whole week, and we had a lot of traffic since the technology was featured in Bill Gates's keynote address at the start of the conference.

Thanks to CardSpace team member Nigel Watling, you can view the demo on Microsoft's Channel 9. We designed the demo so we could use it to tell many different stories. This is one of them.

Monday, March 24, 2008 2:31:57 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 

I am looking forward to reading Bob Uva's new technical blog, http://bobdotnet.wordpress.com. Bob is a friend and colleague at CheckFree, and he's particularly keen on sharing his impressions of WCF.

Monday, March 24, 2008 11:14:40 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Sunday, March 23, 2008

image My whirlwind tour of C# features continues with Whirlwind 3: What's new in C# 2 - Partial types, anonymous methods on Microsoft's Channel 9.

Partial types are quick and easy: split class, struct, and interface definitions across multiple files. I don't cover them in the screencast, but in addition to partial types there are also partial methods, see the resources for details.

Anonymous methods are more involved: pass a block of code inline anywhere a delegate is expected. It's a good idea to understand this concept, since lambda expressions in C# 3.0 build on anonymous methods. You'll see that in a future whirlwind episode.

Resources

Partial Classes and Methods, C# Programming Guide, MSDN Library

partial (Type), C# Reference, MSDN Library

partial (Method), C# Reference, MSDN Library

Anonymous Methods, C# Programming Guide, MSDN Library

Delegates, C# Programming Guide, MSDN Library

delegate, C# Reference, MSDN Library

Create Elegant Code With Anonymous Methods, Iterators, And Partial Classes, Juval Löwy, MSDN Magazine, Visual Studio 2005 Guided Tour issue, 2006 (Vol. 21, No. 3)

Introduction to C# Anonymous Methods, Patrick Smacchia, TheServerSide.NET

Fun with Anonymous Methods, blog post by Brad Adams. The mischievous kind of fun.

Closures and Continuations, blog post by Don Box.

Previous episodes

Sunday, March 23, 2008 9:45:02 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Friday, March 21, 2008

Don Box and Charles Torre interviewed She-Who-Watches-Microsoft in All About Mary Jo on Channel 9. The informal and slightly irreverent video was filmed backstage at the Lang.NET 2008 conference.

If you're not familiar with her prodigious body of work, Mary Jo Foley has been writing All About Microsoft for ZDNet since September 2006. And prior to that gig she wrote Microsoft Watch for eWeek for eleven years.

In the interview, Don's unrelenting pursuit of the truth and subtle sleuthing uncovers that Mary Jo has written a new book, Microsoft 2.0, due out later this spring. It purports to predict what Microsoft AB (After Bill) will look like.

Note to Don about your new career interests: you really do seem better suited for the sensitive architect role than investigative journalism. I am not saying don't follow your dream, but in the meantime keep your day job.

Friday, March 21, 2008 6:54:07 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 

PDC 2008 I keep getting asked this question, so I bet others are asking as well.

Yes, the dates for PDC08 have been announced: 27 – 30 October 2008 in Los Angeles, California. Save the date, and clear the time with your boss, spouse, entourage coordinator, indoor Ultimate Frisbee league, and anyone else who normally has a lock on your coordinates.

No, no other details have been announced yet. I think that Microsoft focused on  TechEd 2008 at the moment.

But you can subscribe to the PDC event RSS feed so that updates are delivered straight to you.

Friday, March 21, 2008 10:37:49 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  |