Friday, April 11, 2008

For those attending the Microsoft MVP Summit, here's some late breaking news. Patrick Smacchia (C# MVP) has a talk on NDepend that's a new addition to the schedule. It will be 5PM, Wednesday, 16 April 2008 in the MSCC. The session highlights new features of NDepend, including integration with code coverage metrics from NCover or VSTS.

If you aren't aware of NDepend, it a freaking amazing code analysis tool. It generates seriously deep code metrics, and provides tools for analyzing and visualizing the results. In the Documentation section of the website you can find a pdf "placemat" for understanding the code metrics which I created with help from Scott Hanselman and Patrick Cauldwell.

Friday, April 11, 2008 12:16:45 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Thursday, April 10, 2008

image I will be presenting a talk at PDX WebFoot this Saturday, April 12, 2008 that covers virtually every feature introduced in C# 2.0 and 3.0.

Whirlwind Tour of C# 2.0 and 3.0
Stuart Celarier — 2:30 – 3:30 pm
 

Microsoft has been working hard on changing how we write and think about code for years. Many .NET developers today still work with C# 1.0 — or use newer versions but don't use many of the new features. C# 3.0 has been released, so let's look at what's changed. In this lightning fast session we'll cover virtually every new feature of C# added since 2003. That way you can make smart decisions about which technologies to pursue without getting lost or overwhelmed. Fasten your seatbelts, we're going for a ride!

image PDX WebFoot is part of The Code Trip. It is free and open to the public. Please register through Upcoming.

The event runs from 1:00 pm to 7:00 pm, including dinner, and is located at OGI's Wilson Clark Center, 20000 NW Walker Road, Beaverton, Oregon. Other presenters include Adam Kinney, Walt Ritscher, Eric Mork, Kelly White, and the Code Trip Crew. They will be presenting and drilling into a load insanely great Silverlight goodness from the MIX08 Conference.

I hope to see some of you there!

Thursday, April 10, 2008 2:09:08 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Monday, April 07, 2008

image Wa— uh... —hoo. This blog started up with a Technorati rank of approximately alef-naught. Now in the world of competitive ranking, that leaves no where to go but down.

Today VisualStuart.net passed a milestone (no worries, it's less painful than passing a kidney stone) by breaking through the 1,000,000 rank barrier. Yes, VisualStuart.net is now among the 962,510 highest ranked blogs on Technorati. It boggles the mind. See the stats for yourself.

And how was this incredible feat achieved? Why, it was you, dear reader, nay, dear blogger, nay, indeed, dear linking blogger who linked to my blog from yours in the past six months, boosting my so-called authority, and thus improving my ranking. I am forever in your debt.

Okay, outta my way #962,509, I am busting through!

Monday, April 07, 2008 8:30:02 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [3]  | 
 Sunday, April 06, 2008

The InnoTech 2008 conference is here in Portland, Oregon, April 16 – 17, 2008, at the Oregon Convention Center. There are a lot of events included in the conference or associated with it. You may be particularly interested in two of those events.

The Developers track runs on Wednesday, April 16, and Thursday, April 17, and features ten sessions. A number of my friends and colleagues are presenting:

And the other sessions look great, too. A big hand to my fellow SAO Development SIG committee member, Mark Lawler, for putting the track together.

The Open Source Summit runs on Thursday, April 17. One of the many things that I really respect about the open source community is their creativity when it comes to presentations and conferences. The Open In Oregon Lightning Talks session features seven snapshot 'lightning talks' by an outstanding panel of presenters. Nice.

InnoTech 2008 is presented by the Software Association of Oregon and EasyStreet Online Services.

Sunday, April 06, 2008 6:16:32 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Saturday, April 05, 2008

image Another stop on my whirlwind tour of C# awaits you on Microsoft's Channel 9. You can find it at Whirlwind 5: What's new in C# 3 - Automatically Implemented Properties, Type Inference, Initializer (10:56).

Since this is the first whirlwind session that explores the wonderful world of C# 3.0, I lead off with a brief timeline of .NET Framework, C#, and Visual Studio releases — platform, language, and tools. One thing is clear, Microsoft has continued to innovate on all three of these elements that affect the code we write and how we write it. And they intend for the .NET Framework to be a platform on which they will continue to innovate, so expect a significant release every year or two. Language releases are probably less frequent, and tools somewhere between the two. Embrace change.

The main value of automatically implemented properties and initializers is to simplify the syntax around some commonly occurring code.

While it looks like local type inference also is aimed at simplifying syntax, it has a higher purpose. In the next whirlwind session we'll look at anonymous types. I don't want to get ahead of the game, but with an anonymous type the developer does not give the type a name, but the type is known to the compiler. Well, since an anonymous type has no name, we have to use var to declare a variable of such a type. The same also goes for declaring a variable of a generic type that is parameterized by an anonymous type. So var can be both a convenience and a necessity. You'll want to give some thought to the effect of var on the readability of your code and decide when you want to use it. Opinions about when to use and when to eschew var cover the entire spectrum.

References

Automatically Implemented Properties, section 26.9 in Overview of C# 3.0, MSDN Library

Auto-Implemented Properties, C# Programming Guide, MSDN Library

var, C# Reference, MSDN Library

Implicitly Typed Local Variables, section 26.1 in Overview of C# 3.0, MSDN Library

Implicitly Typed Local Variables, C# Programming Guide, MSDN Library

Implicitly Typed Arrays, C# Programming Guide, MSDN Library

Object and Collection Initializers, section 26.4 in Overview of C# 3.0, MSDN Library

Object and Collection Initializers, C# Programming Guide, MSDN Library

Erratum

At 8:55, I show a collection initializer that is missing instantiation of the contained type. Here's the code with the error.

var circles = new List<Circle>
{
  { Origin =
new Point { X = 2, Y = 4 }, Radius = 2 },
  { Origin =
new Point { X = 3, Y = 6 }, Radius = 4 },
  { Origin =
new Point { X = 1, Y = 1 }, Radius = 3 }
};

The corrected initializer instantiates a new Circle for each item in the collection.

var circles = new List<Circle>
{
 
new Circle { Origin = new Point { X = 2, Y = 4 }, Radius = 2 },
 
new Circle { Origin = new Point { X = 3, Y = 6 }, Radius = 4 },
 
new Circle { Origin = new Point { X = 1, Y = 1 }, Radius = 3 }
};

I had it correct in my code (honest!) and must have copied it wrong to the slides. I guess the C# syntax checker in PowerPoint 2007 isn't as good as the one in Visual Studio 2008. (The syntax is written correctly in the next code slide at 9:57.)

As a bonus for enduring the correction, consider that the example illustrates that the syntax supports a collection of types derived from Circle.

public class TexturedCircle : Circle
{
 
public string Texture { get; set; }
}
var circles = new List<Circle>
{
 
new Circle { Origin = new Point { X = 2, Y = 4 }, Radius = 2 },
 
new TexturedCircle { Origin = new Point { X = 3, Y = 6 }, Radius = 4, Texture = "bumpy" }
};

Previous episodes

Saturday, April 05, 2008 8:46:46 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Friday, April 04, 2008

Forty years ago today, on  4 April 1968, civil rights leader Reverend Martin Luther King, Jr., was assassinated in Memphis, Tennessee. Four years before his death, Martin Luther King, Jr. received the Nobel Peace Prize, becoming the prize's youngest recipient.

At age 39, Dr. King was in Memphis supporting the black Sanitation Workers in their  strike for humane working conditions when he was slain. Consider that Martin Luther King, Jr. has now been dead longer than he was alive. And still his words and dreams live on, and are powerful today.

imageThis photo was taken the day before King died, on the balcony of the Lorraine Motel. Shown (left to right) are Hosea Williams, Jesse Jackson, Jr., Martin Luther King, Jr., and Rev. Ralph Abernathy.

The night before he was slain, Martin Luther King, Jr. delivered his speech, I've Been to the Mountaintop, considered to be among the top 100 speeches in United States history. After acknowledging talk of threats on his life, Dr. King concluded his speech with these words.

Like anybody, I would like to live a long life. Longevity has its place. But I'm not concerned about that now. I just want to do God's will. And He's allowed me to go up to the mountain. And I've looked over. And I've seen the Promised Land. I may not get there with you. But I want you to know tonight, that we, as a people, will get to the promised land!

And so I'm happy, tonight.

I'm not worried about anything.

I'm not fearing any man!

Mine eyes have seen the glory of the coming of the Lord!

image A day later Dr. King was shot and killed on the same balcony of the Lorraine Motel pictured above. In this photo, taken by Joseph Louw, Abernathy, Jackson, and others point to where the shots came from, as Dr. King lay dying at their feet.

That evening, with riots breaking out in cities across the nation, Robert Kennedy had the difficult task of telling a campaign rally in Indianapolis of King's death. Officials feared that a riot would break out at the terrible news. Here's part of what Robert Kennedy said that night.

For those of you who are black and are tempted to be filled with hatred and distrust at the injustice of such an act, against all white people, I can only say that I feel in my own heart the same kind of feeling. I had a member of my family killed, but he was killed by a white man. But we have to make an effort in the United States, we have to make an effort to understand, to go beyond these rather difficult times.

My favorite poet was Aeschylus. He wrote: "In our sleep, pain which cannot forget falls drop by drop upon the heart until, in our own despair, against our will, comes wisdom through the awful grace of God."

What we need in the United States is not division; what we need in the United States is not hatred; what we need in the United States is not violence or lawlessness; but love and wisdom, and compassion toward one another, and a feeling of justice toward those who still suffer within our country, whether they be white or they be black.

So I shall ask you tonight to return home, to say a prayer for the family of Martin Luther King, that's true, but more importantly to say a prayer for our own country, which all of us love--a prayer for understanding and that compassion of which I spoke.

Indianapolis was calm that evening, attributed, in part, to Kennedy's plea.

Now, forty years later, please take a moment to reflect on the words and accomplishments of Martin Luther King, Jr. Here are some resources for your exploration of King's life and legacy.

The King CenterMLK OnlineNational Civil Rights Museum (housed in the former Lorraine Motel, Memphis) — The April 4th FoundationSpeeches of Dr. Martin Luther King, Jr.

Free at last, free at last. Thank God Almighty, we are free at last.
— Dr. Martin Luther King, Jr.

Friday, April 04, 2008 2:39:40 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Thursday, April 03, 2008

Microsoft Surface will be making its debut commercial appearance at AT&T stores in four trial cities starting 17 April 2008. Surface is a 30-inch table display that combines touch, gesture, and device recognition. I've seen Surface from a distance at various events — it has been impossible to get any closer than about 12 feet due to the crushing mass of geekdom it always attracts.

AT&T will conduct a trial of Surface at selected stores in New York, San Antonio, Atlanta, and San Francisco, and then evaluate deploying throughout its 2,200 US stores. The announcement was made at CTIA Wireless in Las Vegas on 1 April 2008. Keep your finger on the pulse of the Surface at their team blog.

Thursday, April 03, 2008 7:12:27 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 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]  |