spout

September 12, 2015 spout

Choose HTML for UI Development

Choose HTML for UI Development

On Sept. 10, 2015, Winston Kodogo writes:

Hey Chris, if you’re feeling happy enough to blog, how about a post giving us your current thoughts on UI development. A friend of mine has asked me for advice on moving an in-house app from VB6 to something he can find people to modify if he needs to, and I can’t for the life of me think of what to tell him. I have your most excellent books on Windows Forms and WPF, but what would the modern (!) equivalent be. Not WebJS, surely.

Thanks for the softball question, Winston. I do love to pontificate extemporaneously (although I have already given away the ending).

Pre-Windows

I started my Windows career as a Petzoldian Windows developer, but before that, I developed UIs in curses, Flavors Lisp and even voice-based UIs in a proprietary AT&T scripting language for which I no longer remember the name.

Windows

As a Windows developer, I programmed against 16 and 32-bit GDI and User, GDI+, MFC, WTL, Windows Forms, WPF, WinJS, Silverlight and Xamarin Forms. I’ve even written books, articles and presentations about many of these toolkits.

And even now, as I type this, I’m using a different framework, Markdown, to produce the UI you’re using now.

Transcend Windows

It’s this last fact that leads me to my pretty much universal recommendation for UI development: The UI framework with the most reach, the best tools, the most community support and the best staying power is, of course, HTML, with it’s kissing cousins, JavaScript and CSS.

There are good reasons to choose others, of course:

  • Are you building a desktop game? Use OpenGL or DirectX.

  • Are you building a mobile game? Use the iOS or Android APIs or, even better, Unity.

  • Do you love C# and .NET? Then some implementation of XAML may suit your needs.

  • Are you targeting developers with automation or specific integration needs? Then a command line interface is probably what you want.

But other than that, my default UI development advice is always always HTML.

HTML How

The beauty of an HTML-based UI framework is that it has grown steadily in capability, usage and ubiquity since it was introduced in 1993. It’s hard to find an environment where HTML doesn’t run:

  • Desktop Browser: This is where HTML was first shown and it arguably shows best here. There’s little you can’t do in this environment, including near native games using WebGL, Enscripten and asm.js (soon to become WebAssembly).

    This is probably your best bet for any kind of internal app, e.g. the kind of thing that VB6 and WinForms are usually used for. Toolkits like Angular and React are popular for desktop browser apps because they provide the end-to-end developer story while still having rich extension libraries.

    That said, if I were going to tackle a new web site or web app today, I’d probably use WebComponents (and Polymer) for the excellent reasons that Joe Gregorio lays out in his OSCON 2015 talk.

  • Mobile Browser: Today’s smartphone-based browsers are very capable and adapt to desktop-based web sites fairly well. However, I do recommend making sure your desktop web sites work well on mobile as well, if for no other reason than you want to make sure you don’t lose your ranking on Google, which now prefers mobile-friendly sites for mobile search results (and provides a tool to help you get your site ready).

    With the modern enterprise moving towards mobile as fast now as they have been moving towards the web-based intranet over the last decade, I’d recommend making sure that your internal web sites/apps work well on mobile if you want to avoid the CTO stopping by your desk in the near future.

  • Desktop Stand-alone App: The new trend (with companies like GitHub and Microsoft on board) for building cross-platform, stand-alone desktop apps is to use HTML, but package it into an app, specifically using something like Electron. This is the new hotness, but this is what I’d do if I wanted to build a stand-alone desktop app today.

  • Mobile Store App: Most mobile apps today are built for the iOS and Google Play stores, although increasingly enterprises are building mobile apps for internal use and distributing them internally using private stores like Appaloosa.

    Today, mobile apps are built overwelminging using the platform-specific native APIs, most often with two separate teams for each app, one for iOS and one for Android. However, as mobile becomes more of an enterprise platform, you want apps that are developed quickly, can be maintained easily and can be built with a smaller number of developers, which all boils down to one thing: you want to have a single codebase for your internal mobile apps instead of one codebase per platform.

    Today, you have two viable alternatives when building mobile apps that target multiple platforms from a single source code base: Xamarin and Adobe PhoneGap. Xamarin is essentially cross-platform .NET with some UI controls and native compilation thrown in, whereas PhoneGap is a framework for hosting HTML on mobile platforms (as well as others, but no one does that) along with a platform-agnostic JavaScript API that maps to native functionality.

    I’ve used both of these frameworks and they both have their pros and cons. Xamarin has a simple UI framework that changes it’s look n’ feel depending on the platform your app is running on, but PhoneGap does not. In that case, I’d also bring Ionic into the mix, which will let you write your app in HTML but give you the native UI as appropriate (and a beautiful one at that).

    There has been much said about whether HTML is appropriate for building mobile apps and while it’s possible to build a bad app using any platform, in my experience, it’s not hard to get an app that’s built in HTML to look n’ feel just like a native app. When I did it, there were some tricks involved, but frameworks like Ionic pretty much take away the need for that these days. Of course there are always going to be apps that can’t be built this way, but as a percentage (leaving out twitch games), that number is getting smaller and smaller.

Where are we?

Of course, the best and worst part of the web platform is that the community changes it’s mind about how sites and apps should be built for the web platform about as often as I change my underwear, so the specific recommendations are merely appropriate for this point in time. The general guidance remains the same, however: choose HTML for your UI development unless you’ve got a darn good reason not to.

January 4, 2015 .net spout

Handling Orientation Changes in Xamarin.Forms Apps

Handling Orientation Changes in Xamarin.Forms Apps

By default, Xamarin.Forms handles orientation changes for you automatically, e.g.

ss1[5]

ss4

Xamarin.Forms handles orientation changes automatically

In this example, the labels are above the text entries in both the portrait and the landscape orientation, which Xamarin.Forms can do without any help from me. However, what if I want to put the labels to the left of the text entries in landscape mode to take better advantage of the space? Further, in the general case, you may want to have different layouts for each orientation. To be able to do that, you need to be able to detect the device’s current orientation and get a notification when it changes. Unfortunately, Xamarin.Forms provides neither, but luckily it’s not hard for you to do it yourself.

Finding the Current Orientation

To determine whether you’re in portrait or landscape mode is pretty easy:

static bool IsPortrait(Page p) { return p.Width < p.Height; }

This function makes the assumption that portrait mode has a smaller width. This doesn’t work for all future imaginable devices, of course, but in the case of a square device, you’ll just have to take your changes I guess.

Orientation Change Notifications

Likewise, Xamarin.Forms doesn’t have any kind of a OrientationChanged event, but I find that handling SizeChanged does the trick just as well:

SizeChanged += (sender, e) => Content = IsPortrait(this) ? portraitView : landscapeView;

The SizeChanged event seems to get called exactly once as the user goes from portrait to landscape mode (at least in my debugging, that was true). The different layouts can be whatever you want them to be. I was able to use this technique and get myself a little extra vertical space in my landscape layout:

ss2

Using a custom layout to put the labels on the left of the text entries instead of on top 

Of course, I could use this technique to do something completely differently in each orientation, but I was hoping that the two layouts made sense to the user and didn’t even register as special, which Xamarin.Forms allowed me to do.

January 2, 2015 .net spout

Launching the Native Map App from Xamarin.Forms

My goal was to take the name and address of a place and show it on the native map app regardless of what mobile platform on which my app was running. While Xamarin.Forms provides a cross-platform API to launch the URL that starts the map app, the URL format is different depending on whether you’re using the Windows Phone 8 URI scheme for Bing maps, the Android Data URI scheme for the map intent or the Apple URL scheme for maps.

This is what I came up with:

public class Place {
  public string Name { get; set; }
  public string Vicinity { get; set; }
  public Geocode Location { get; set; }
  public Uri Icon { get; set; }
}
public void
LaunchMapApp(Place place) { // Windows Phone doesn't like ampersands in the names and the normal URI escaping doesn't help var name = place.Name.Replace("&", "and"); // var name = Uri.EscapeUriString(place.Name); var loc = string.Format("{0},{1}", place.Location.Latitude, place.Location.Longitude); var addr = Uri.EscapeUriString(place.Vicinity); var request = Device.OnPlatform( // iOS doesn't like %s or spaces in their URLs, so manually replace spaces with +s string.Format("http://maps.apple.com/maps?q={0}&sll={1}", name.Replace(' ', '+'), loc), // pass the address to Android if we have it string.Format("geo:0,0?q={0}({1})", string.IsNullOrWhiteSpace(addr) ? loc : addr, name), // WinPhone string.Format("bingmaps:?cp={0}&q={1}", loc, name) ); Device.OpenUri(new Uri(request)); }

This code was testing on several phone and tablet emulators and on 5 actual devices: an iPad running iOS 8, an iPad Touch running iOS 8, a Nokia Lumia 920 running Windows Phone 8.1, an LG G3 running Android 4.4 and an XO tablet running Android 4.1. As you can tell, each platform has not only it’s own URI format for launching the map app, but quirks as well. However, this code works well across platforms. Enjoy.

January 1, 2015 .net spout

App and User Settings in Xamarin.Forms Apps

App and User Settings in Xamarin.Forms Apps

Settings allow you to separate the parameters that configure the behavior of your app separate from the code, which allows you to change that behavior without rebuilding the app. This is handle at the app level for things like server addresses and API keys and at the user level for things like restoring the last user input and theme preferences. Xamarin.Forms provides direct support for neither, but that doesn’t mean you can’t easily add it yourself.

App Settings

Xamarin.Forms doesn’t have any concept of the .NET standard app.config. However, it’s easy enough to add the equivalent using embedded resources and the XML parser. For example, I built a Xamarin.Forms app for finding spots for coffee, food and drinks between where I am and where my friend is (MiddleMeeter, on GitHub). I’m using the Google APIs to do a bunch of geolocation-related stuff, so I need a Google API key, which I don’t want to publish on GitHub. The easy way to make that happen is to drop the API key into a separate file that’s loaded at run-time but to not check that file into GitHub by adding it to .gitignore. To make it easy to read, I added this file as an Embedded Resource in XML format:

image

Adding an XML file as an embedded resource makes it easy to read at run-time for app settings

I could’ve gone all the way and re-implemented the entire .NET configuration API, but that seemed like overkill, so I kept the file format simple:

<?xml version="1.0" encoding="utf-8" ?>
<config>
  <google-api-key>YourGoogleApiKeyHere</google-api-key>
</config>

Loading the file at run-time uses the normal .NET resources API:

string GetGoogleApiKey() {
  var type = this.GetType();
  var resource = type.Namespace + "." +
Device.OnPlatform("iOS", "Droid", "WinPhone") + ".config.xml"; using (var stream = type.Assembly.GetManifestResourceStream(resource)) using (var reader = new StreamReader(stream)) { var doc = XDocument.Parse(reader.ReadToEnd()); return doc.Element("config").Element("google-api-key").Value; } }

I used XML as the file format not because I’m in love with XML (although it does the job well enough for things like this), but because LINQ to XML is baked right into Xamarin. I could’ve used JSON, too, of course, but that requires an extra NuGet package. Also, I could’ve abstracting things a bit to make an easy API for more than one config entry, but I’ll leave that for enterprising readers.

User Settings

While app settings are read-only, user settings are read-write and each of the supported Xamarin platforms has their own place to store settings, e.g. .NET developers will likely have heard of Isolated Storage. Unfortunately, Xamarin provides no built-in support for abstracting away the platform specifics of user settings. Luckily, James Montemagno has. In his Settings Plugin NuGet package, he makes it super easy to read and write user settings. For example, in my app, I pull in the previously stored user settings when I’m creating the data model for the view on my app’s first page:

class SearchModel : INotifyPropertyChanged {
  string yourLocation;
  // reading values saved during the last session (or setting defaults)
  string theirLocation = CrossSettings.Current.GetValueOrDefault("theirLocation", "");
  SearchMode mode = CrossSettings.Current.GetValueOrDefault("mode", SearchMode.food);
  ...
}

The beauty of James’s API is that it’s concise (only one function to call to get a value or set a default if the value is missing) and type-safe, e.g. notice the use of a string and an enum here. He handles the specifics of reading from the correct underlying storage mechanism based on the platform, translating it into my native type system and I just get to write my code w/o worrying about it. Writing is just as easy:

async void button1_Clicked(object sender, EventArgs e) {
  ...

  // writing settings values at an appropriate time
  CrossSettings.Current.AddOrUpdateValue("theirLocation", model.TheirLocation);
  CrossSettings.Current.AddOrUpdateValue("mode", model.Mode);

  ...
}

My one quibble is that I wish the functions were called Read/Write or Get/Set instead of GetValueOrDefault/AddOrUpdateValue, but James’s function names make it very clear what’s actually happening under the covers. Certainly the functionality makes it more than worth the extra characters.

User Settings UI

Of course, when it comes to building a UI for editing user settings at run-time, Xamarin.Forms has all kinds of wonderful facilities, including a TableView intent specifically for settings (TableIntent.Settings). However, when it comes to extending the platform-specific Settings app, you’re on your own. That’s not such a big deal, however, since only iOS actually supports extending the Settings app (using iOS Settings Bundles). Android doesn’t support it at all (they only let the user configure things like whether an app has permission to send notifications) and while Windows Phone 8 has an extensible Settings Hub for their apps, it’s a hack if you do it with your own apps (and unlikely to make it past the Windows Store police).

Where Are We?

So, while Xamarin.Forms doesn’t provide any built in support for app or user settings, the underlying platform provides enough to make implementing the former trivial and the Xamarin ecosystem provides nicely for the latter (thanks, James!).

Even more interesting is what Xamarin has enabled with this ecosystem. They’ve mixed their very impressive core .NET and C# compiler implementation (Mono) with a set of mobile libraries providing direct access to the native platforms (MonoTouch and MonoDroid), added a core implementation of UI abstraction (Xamarin.Forms) and integration into the .NET developer’s IDE of choice (Visual Studio) together with an extensible, discoverable set of libraries (NuGet) that make it easy for 3rd party developers to contribute. That’s a platform, my friends, and it’s separate from the one that Microsoft is building. What makes it impressive is that it takes the army of .NET developers and points them at the current hotness, i.e. building iOS and Android apps, in a way that Microsoft never could. Moreover, because they’ve managed to also support Windows Phone pretty seamlessly, they’ve managed to get Microsoft to back them.

We’ll see how successful Xamarin is over time, but they certainly have a very good story to tell .NET developers.

November 1, 2014 spout

Microsoft Fan Boy Goes To Google

Microsoft Fan Boy Goes To Google

In 1992, I was a Unix programmer in Minneapolis. I’d graduated with a BS in Computer Science from the University of MN a year earlier and had written my programming assignments in C and C++ via first a VT100 terminal and then a VT100 terminal emulator on my Mac (running System 7, if you’re curious). My day job was at an AT&T VAR building multi-user voice response systems on Unix System V. My favorite editor was vi (not vim) and, like all good vi programmers, I hated emacs with a white hot passion.

Being bored with my current job, I posted my resume on the internet, which meant uploading it in ASCII text to an FTP site where tech companies knew to look for it. The tech company that found it was Intel. To prepare for my interview in Portland, OR, I went to play with a Windows 3.1 machine that someone had set up in the office, but nobody used. I had a Mac at home and Unix at work and for the 10 minutes that I could stand to use it, Windows 3.1 seemed like the worst of both. In spite of my distaste, Intel made an offer I couldn’t refuse and I found myself moving with my new wife to a new city for a new job and a new technology stack.

The move to Intel started my love affair with Windows (starting with Windows 95, of course, let’s be reasonable). Over the years, I grew to love Word, Excel, Visio, PowerPoint, Outlook, Live Writer, Skype, Windows XP, Windows 7, COM, ATL, .NET, C# and of course the Big Daddy for Windows developers: Visual Studio. Not only did I become a Windows fan boy (I can’t tell you how lonely it is to own a Windows Phone after the iPhone was released), but I became I contributing member of the Windows community, accounting for nearly 100% of the content on this web site, first published in 1995 solely to provide links to my DevelopMentor students, but growly steadily since (over 2600 posts in 20 years). Add to that to more than a dozen books and countless public speaking engagements, magazine articles and internet appearances and you’ve got a large investment in the Windows technology stack.

Of course, as I take on roles beyond consultant, speaker, author and community PM, I contribute less and less (although I do love spouting off into my twitter feed). Even so, I’ve been a regular attendee to Windows-related events and 90% of my friends are also Windows developers, so the idea of leaving not just a technology ecosystem but an entire community behind is a pretty daunting one.

And then, about 45 days ago, Google came knocking with an offer I couldn’t refuse. A few days after that, before I’ve even officially accepted the offer, I find myself in a bidding war for a house in Kirkland, WA that the wife and I both love (which almost never happens). So, for the first time since 1992, with my three boys graduated from high school, I find myself moving with my new wife to a new city for a new job and a new technology stack. As I write this, it’s the Friday before my Noogler orientation week (New Googler — get it?). I’ll be working on tools for Google cloud developers, which matches my Windows experience helping developers build distributed systems, although there’s going to be a huge learning curve swapping in the details.

After 20 years with Visual Studio, I don’t know if my fingers still know vi, but I can’t wait to find out. If I get a beer or two in me, I might even give emacs another try…

July 21, 2014 spout interview

Future Proof Your Technical Interviewing Process: The Phone Screen

In 30 years, I’ve done a lot of interviewing from both sides of the table. Because of my chosen profession, my interviewing has been for technical positions, e.g. designers, QA, support, docs, etc., but mostly for developers and program managers, both of which need to understand a system at the code level (actually, I think VPs and CTOs need to understand a system at the code level, too, but the interview process for those kinds of people is a superset of what I’ll be discussing in this series).

In this discussion, I’m going to assume you’ve got a team doing the interview, not just a person. Technical people need to work well in teams and you should have 3-4 people in the interview cycle when you’re picking someone to join the team.

The Most Important Thing!

Let me state another assumption: you care about building your team as much as you care about building your products. Apps come and go, but a functional team is something you want to cherish forever (if you can). If you just want to hire someone to fill a chair, then what I’m about to describe is not for you.

The principle I pull from this assumption is this: it’s better to let a good candidate go then to hire a bad one.

A bad hire can do more harm than a good hire can repair. Turning down a pretty good” candidate is the hardest part of any good interview process, but this one principle is going to save you more heartache than any other.

The Phone Screen

So, with these assumptions in mind, the first thing you always want to do when you’ve got a candidate is to have someone you trust do a quick phone screen, e.g. 30 minutes. This can be an HR person or someone that knows the culture of the company and the kind of people you’re looking for. A phone screen has only one goal: to avoid wasting the team’s time. If there’s anything that’s an obvious mismatch, e.g. you require real web development experience, but the phone screen reveals that the candidate really doesn’t, then you say thanks very much” and move on to the next person.

If it’s hard to get a person to come into your office — maybe they’re in a different city — you’ll also want to add another 30 minutes to do a technical phone screen, too, e.g.

  • Describe the last app they built with Angular.
  • Tell me how JVM garbage collection works.
  • What’s the right data structure to hold the possible solutions to tic-tac-toe?

Whatever it is, you want to make reasonably sure that they’re going to be able to keep up with their duties technically before you bring them on site, or you’re just wasting the team’s time.

At this point, if you’re hiring a contractor, you may be done. Contractors are generally easy to fire, so you can bring them on and let them go easily. Some companies start all of their technical hires as contractors first for a period of 30-90 days and only hire them if that works out.

If you’re interviewing for an FTE position, once they’ve passed the phone screen, you’re going to bring them into the office.

You should take a candidate visit seriously; you’re looking for a new family member. Even before they show up, you make sure you have a representative sample of the team in the candidate’s interview schedule. At the very least, you need to make sure that you have someone to drill into their technical abilities, someone to deal with their ability to deliver as part of a team and someone to make sure that they’re going to be a cultural fit with the company as a whole. Each of these interview types is different and deserves it’s own description.

Future Posts in This Series

Tune in to future posts in this series where we’ll be discussing:

July 17, 2014 spout

Moving My ASP.NET Web Site to Disqus

Moving My ASP.NET Web Site to Disqus

I’m surprised how well that my commentRss proposal has been accepted in the world. As often as not, if I’m digging through an RSS feed for a site that supports comments, that site also provides a commentRss element for each item. When I proposed this element, my thinking was that I could make a comment on an item of interest, then check a box and I’d see async replies in my RSS client, thereby fostering discussion. Unfortunately, RSS clients never took the step of allowing me to subscribe to comments for a particular item and a standard protocol for adding a comment never emerged, which made it even less likely for RSS clients to add that check box. All in all, commentRss is a failed experiment.

Fostering Discussion in Blog Post Comments

However, the idea of posting comments to a blog post and subscribing to replies took off in another way. For example, Facebook does a very good job in fostering discussion on content posted to their site:

image

The Facebook supports comments and discussions nicely

 

Not only does Facebook provide a nice UI for comments, but as I reply to comments that others have made, they’re notified. In fact, as I was taking the screenshot above, I replied to Craig’s comment and within a minute he’d pressed the Like button, all because of the support Facebook has for reply notification.

However, Facebook commenting only works for Facebook content. I want the same kind of experience with my own site’s content. For a long time, I had my own custom commenting system, but the bulk of the functionality was around keeping spam down, which was a huge problem. I recently dumped my comments to an XML format and of the 60MB of output, less than 8MB were actual comments — more than 80% was comment spam. I tried added reCAPTCHA and eventually email approval of all comments, but none of that fostered the back-and-forth discussions over time because I didn’t have notifications. Of course, to implement notifications, you need user accounts with email verification, which was a whole other set of features that I just never got around to implementing. And even if I did, I would have taken me a lot more effort to get to the level of quality that Disqus provides.

Integrating Disqus Into Your Web Site

Disqus provides a service that lets me import, export and manage comments for my site’s blog posts, the UI for my web site to collect and display comments and the notification system that fosters discussions. And they watch for spam, too. Here’s what it looks like on a recent post on my site:

image

The Disqus services provides a discussion UI for your web site

 

Not only does Disqus provide the UI for comments, but it also provides the account management so that commenters can have icons and get notifications. With the settings to allow for guest posting, the barrier to entry for the reader that wants to leave a comment is zero. Adding the code to enable it on your site isn’t zero, but it’s pretty close. Once you’ve established a free account on disqus.com, you can simply create a forum for your site and drop in some boilerplate code. Here’s what I added to my MVC view for a post’s detail page to get the discussion section above:

<%-- Details.aspx –%>
...
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  <!-- post –>
  ...
  <h1><%= Model.Post.Title %></h1>
  <div><%= Model.Post.Content %></div>
  <!-- comments -->
  <div id="disqus_thread"></div>
  <script type="text/javascript">
    var disqus_shortname = "YOUR-DISQUS-SITE-SHORTNAME-HERE";
    var disqus_identifier = <%= Model.Post.Id %>;
    var disqus_title = "<%= Model.Post.Title %>";

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function () {
      var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
      dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
      (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
  </script>
</asp:Content>

The discussion section for any post is just a div with the id set to disqus_thread”. The code is from the useful-but-difficult-to-find Disqus universal embed code docs. The JavaScript added to the end of the page creates a Disqus discussion control in the div you provide using the JS variables defined at the top of the code. The only JS variable that’s required is the disqus_shortname, which defines the Disqus data source for your comments. The disqus_identifier is a unique ID associated with the post. If this isn’t provided, the URL for the page the browser is currently showing will be used, but that doesn’t work for development mode from localhost or if the comments are hosted on multiple sites, e.g. a staging server and a production server, so I recommend setting disqus_identifier explicitly. The disqus_title will likewise be taken from the current page’s title, but it’s better to set it yourself to make sure it’s what you want.

And that’s it. Instead of tuning your UI in the JS code, you do so in the settings on disqus.com yourself an includes things like the default order of comments, the color scheme, how much moderation you want, etc.

There’s one more page on your site where you’ll want to integrate Disqus: the page the provides the list of posts along with the comment link and comment count:

image

Disqus will add comment count to your comment lists, too

 

Adding support for the comment count is similar to adding support for the discussion itself:

<%-- Index.aspx --%>
...
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  ...
  <!-- post -->
  <h2><%= Html.ActionLink(post.Title, "Details", "Posts", new { id = post.Id }, null) %></h2>
  <p><%= post.Content %></p>
  <!-- comment link --> 
  <p><%= Html.ActionLink("0 comments", "Details", "Posts", null, null, "disqus_thread",
new RouteValueDictionary(
new { id = post.Id }),
new Dictionary<string, object>() { { "data-disqus-identifier", post.Id } }) %></p> ...
  <script type="text/javascript">
    // from: https://help.disqus.com/customer/portal/articles/565624
    var disqus_shortname = "sellsbrothers";

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function () {
      var s = document.createElement('script'); s.async = true;
      s.type = 'text/javascript';
      s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
      (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
    }());
  </script>
</asp:Content>

Again, this code is largely boilerplate and comes from the Disqus comment count docs. The call to Html.ActionLink is just a fancy way to get an A tag with an href of the following format:

>#disqus_thread data-disqus-identifier=“<>”>0 comments

The disqus_thread” tag at the end of the href does two things. The first is that it provides a link to the discussion portion of the details page so that the reader can scroll directly to the comments after reading the post. The second is that it provides a tag for the Disqus JavaScript code to change the text content of the A tag to show the number of comments.

The data-disqus-identifier” attribute sets the unique identifier for the post itself, just like the disqus_identifier JS variable we saw earlier.

The A tag text content that you provide will only be shown if Disqus does not yet know about that particular post, i.e. if there are no comments yet, then it will leave it alone. However, if Disqus does know about that post, it will replace the text content of the A tag as per your settings, which allow you to be specific about how you want 0, 1 and n comments to show up on your site; 0 comments”, 1 comment” and {num} comments” are the defaults.

Importing Existing Comments into Disqus

At this point, your site is fully enabled for Disqus discussions and you can deploy. In the meantime, if you’ve got existing comments like I did, you can import them using Disqus’s implementation of the WordPress WXR format, which is essentially RSS 2.0 with embedded comments. The Disqus XML import docs describe the format and some important reminders. The two reminders they list are important enough to list again here:

  • Register a test forum and import to that forum first to work out the kinks.” Because Disqus only lists some of the restrictions on their site for the imported data, I probably had to do a dozen or more imports before I get everything to move over smoothly. I ended up using two test forums before I was confident enough to import comments into my the real forum for my site.
  • Keep individual file sizes < 50 MB each.” In fact, I found 20MB to be the maximum reliable size. I had to write my script to split my comments across multiple files to keep to this limit or my uploads would time out.

 

The XML import docs do a good job showing what the XML format is as an example, but they only list one of the data size requirements. In my work, I found several undocumented limits as well:

  • comment_content must be >= 3 characters (space trimmed) and <= 25,000 characters. I found out the max when trying to import some of my unapproved spam comments.
  • comment_author and comment_author_email must be <= 75 characters. You may get errors about comment_author being too long even if you haven’t provided one; that just means that Disqus has grabbed comment_author_email as the contents for comment_author.
  • post_date_gmt and comment_date_gmt must be formatted correctly as yyyy-MM-dd HH:mm:ss. Of course, they must be in GMT, too.
  • The actual post content should be empty. Even though it looks like you’re uploading your entire blog via RSS, you’re only providing enough of the post content to allow Disqus to map from post to associated comments, like the thread_identifier referenced as disqus_thread in the JavaScript code above, as well as to show the post title and date as appropriate. The only real content you’re importing into Disqus is the comment content associated with each post.

Something else to keep in mind is that as part of the comment import process is that Disqus translates the XML data into JSON data, which makes sense. However, they report their errors in terms of the undocumented JSON data structure, which can be confusing as hell. For example, I kept getting a missing or invalid message” error message along with the JSON version of what I thought the message was to which they were referring. The problem was that by message”, Disqus didn’t mean the JSON data packet for a particular comment,” they meant the field called message’ in our undocumented JSON format which is mapped from the comment_content element of the XML.” I went round and round with support on this until I figured that out. Hopefully I’ve saved future generations that trouble.

If you’re a fan of LINQPad or C#, you can see the script I used to pull the posts and comments out of my site’s SQL Server database (this assumes an Entity Framework mapping in a separate DLL, but you get the gist). The restrictions I mention above are encapsulated in this script.

Where Are We?

Even though my rssComments extension to the RSS protocol was a failed experiment, the web has figured out how to foster spam-free, interactive discussions with email notifications across web sites. The free Disqus service provides as implementation of this idea and it does so beautifully. I wish importing comments was as easy as integrating the code, but since I only had to do it once, the juice was more than worth the squeeze, as a dear Australian friend of mine likes to say. Enjoy!

July 11, 2014 spout

Moving My Site to Azure: DNS & SSL

Moving My Site to Azure: DNS & SSL

This part 3 of a multi-part series on taking a real-world web site (mine) written to be hosted on an ISP (securewebs.com) and moving it to the cloud (Azure). The first two parts talked about moving my SQL Server instance to SQL Azure and getting my legacy ASP.NET MVC 2 code running inside of Visual Studio 2013 and published to Azure. In this installment, we’ll discuss how I configured DNS and SSL to work with my shiny new Azure web site.

Configuring DNS

Now that I have my site hosted on http://sellsbrothers.azurewebsites.net, I’d like to change my DNS entries for sellsbrothers.com and www.sellsbrothers.com to point to it. For some reason I don’t remember, I have my domain’s name servers pointed at microsoftonline.com and I used Office365 to manage them (it has something to do with my Office365 email account, but I’m not sure why that matters…). Anyway, in the Manage DNS section of the Office365 admin pages, there’s a place to enter various DNS record types. To start, I needed to add two CNAME records:

image

The CNAME records needed to be awarded an IP address by Azure

 

A CNAME record is an alias to some other name. In this case, we’re aliasing the awveryify.sellsbrothers.com FQDN (the Host name field is really just the part to the left of the domain name to which you’re adding records, sellsbrothers.com in this case). This awverify string is just a string that Azure needs to see before it will tell you the IP address that it’s assigned to you as a way to guarantee that you do, in fact, own the domain. The www host name maps to the Azure web site name, i.e. mapping www.sellsbrothers.com to sellsbrothers.azurewebsites.net. The other DNS record I need is an A record, which maps the main domain, i.e. sellsbrothers.com, to the Azure IP address, which I’ll have to add later once Azure tells me what it is.

After adding the awverify and www host names and waiting for the DNS changes to propagate (an hour or less in most cases), I fired up the configuration screen for my web site and chose the Manage Custom Domains dialog:

image

Finding the IP address to use in configuring your DNS name server from Azure

 

Azure provided the IP address after entering the www.sellsbrothers.com domain name. With this in hand, I needed to add the A record:

image

Adding the Azure IP address to my DNS name servers

 

An A record is the way to map a host name to an IP address. The use of the @ means the undecorated domain, so I’m mapping sellsbrothers.com to the IP address for sellsbrothers.azurewebsites.net.

Now, this works, but it’s not quite what I wanted. What I really want to do, and what the Azure docs hint at, is to simply have a set of CNAME records, including one that maps the base domain name, i.e. sellsbrothers.com, to sellsbrothers.azurewebsites.net directly and let DNS figure out what the IP address is. This would allow me to tear down my web server and set it up again, letting Azure assign whatever IP address it wanted and without me being required to update my DNS A record if I ever need to do that. However, while I should be able to enter a CNAME record with a @ host name, mapping it to the Azure web site domain name, Office365 the DNS management UI won’t let me do it and Office365 support wasn’t able to help.

However, even if my DNS records weren’t future-proofed the way I’d like them to be, they certainly worked and now both sellsbrothers.com and www.sellsbrothers.com mapped to my new Azure web site, which is where those names are pointing as I write this.

However, there was one more feature I needed before I was done ported my site to Azure: secure posting to my blog, which requires an SSL certificate.

Configuring Azure with SSL

Once I had my domain name flipped over, I had one more feature I needed for my Azure-hosted web site to be complete — I needed to be able to make posts to my blog. I implemented the AtomPub publishing protocol for my web site years ago, mostly because it was a protocol with which I was very familiar and because it was one that Windows Live Writer supports. To make sure that only I could post to my web site, I needed to make sure that my user name and password didn’t transmit in the clear. The easiest way to make that happen was to enable HTTPS on my site using an SSL certificate. Of course, Azure supports HTTPS and SSL and the interface to make this happen is simple:

image

Azure’s certificate update dialog for added an SSL cert to your web site

 

Azure requires a file in the PKCS #12 format (generally using the .pfx file extension), which can be a container of several security-related objects, including a certificate. All of this is fine and dandy except that when you go to purchase your SSL cert, you’re not likely to get the file in pfx format, but in X.509 format (.cer or .crt file format). To translate the .crt file into a .pfx file, you need to generate a Certificate Signing Request (.csr) file with the right options so that you keep the private key (.key) file around for the conversion. For a good overview of the various SSL-related file types, check out Kaushal Panday’s excellent blog post.

Now, to actual dig into the nitty gritty, first you’re going to have to choose an SSL provider. Personally, I’m a cheapskate and don’t do any ecommerce on my site, so my needs were modest. I got myself a RapidSSL cert from namecheap.com that only did domain validation for $11/year. After making my choice, the process went smoothly. To get started, you pay your money and upload a Certificate Signing Request (.crs file). I tried a couple different ways to get a csr file, but the one that worked the best was the openssl command line tool for Windows. With that tool installed and a command console (running in admin mode) at the ready, you can follow along with the Get a certificate using OpenSSL section of the Azure documentation on SSL certs and be in good shape.

Just one word of warning if you want to follow along with these instructions yourself: There’s a blurb in there about including intermediate certificates along with the cert for your site. For example, when I get my RapidSSL certificate, it came with a GeoTrust intermediate certificate. Due to a known issue, when I tried to include the GeoTrust cert in my chain of certificates, Azure would reject it. Just dropping that intermediate cert on the floor worked for me, but your mileage may vary.

Configuring for Windows Live Writer

Once I have my SSL uploaded to Azure, now I can configure WLW securely for my new Azure-hosted blog:

image

Adding a secure login for my Azure-hosted blog

 

You’ll notice that I use HTTPS as the protocol to let WLW know I’d like it to use encrypted traffic when it’s transmitting my user name and password. The important part of the rest of the configuration is just about what kind of protocol you’d like to use, which is AtomPub in my case:

image

Configuring WLW for the AtomPub Publishing protocol

 

If you’re interested in a WLW-compatible implementation of AtomPub written for ASP.NET, you can download the source to my site from github.

Where are we?

Getting your site moved to Azure from an ISP involves more than just making sure you can deploy your code — it also includes making sure your database will work in SQL Azure and configuring your DNS and SSL settings as appropriate for your site’s new home.

At this point, I’ve gotten a web site that’s running well in the cloud, but in the spirit of the cloud, I’ve also got an aging comment system that I replaced with Disqus, a cloud-hosted commenting system, which is the subject of my next post. Don’t miss it!

July 8, 2014 spout

Moving My Site to Azure: ASP.NET MVC 2

Moving My Site to Azure: ASP.NET MVC 2

In our last episode, I talked about the joy and wonder that is moving my site’s ISP-hosted SQL Server instance to SQL Azure. Once I had the data moved over and the site flipped to using the new database, I needed to move the site itself over, which brought joy and wonder all it’s own.

Moving to Visual Studio 2013

I haven’t had to do any major updates to my site since 2010 using Visual Studio 2010. At that time, the state of the art was ASP.NET MVC 2 and Entity Framework 4, which is what I used. And the combination was a pleasant experience, letting me rebuild my site from scratch quickly and producing a site that ran like the wind. In fact, it still runs like the wind. Unfortunately, Visual Studio 2012 stopped supporting MVC 2 (and no surprise, Visual Studio 2013 didn’t add MVC 2 support back). When I tried to load my web site project into Visual Studio 2013, it complained:

image

This version of Visual Studio is unable to open the following projects

 

This error message lets me know that there’s a problem and the migration report provides a handy link to upgrade from MVC 2 to MVC 3. The steps aren’t too bad and there’s even a tool to help, but had I followed them, loading the new MVC 3 version of my project into Visual Studio 2013 would’ve given me another error with another migration report and a link to another web page, this time helping me move from MVC 3 to MVC 4 because VS2013 doesn’t support MVC 3, either. And so now I’m thinking, halfway up to my elbows in the move to MVC 3 that Visual Studio 2013 doesn’t like, that maybe there’s another way.

It’s not that there aren’t benefits to move to MVC 4, but that’s not even the latest version. In fact, Microsoft is currently working on two versions of ASP.NET, ASP.NET MVC 5 and ASP.NET v.Next. Even if I do move my site forward two version of MVC, I’ll still be two versions behind. Of course, the new versions have new tools and new features and can walk my dog for me, but by dropping old versions on the floor, I’d left with the choices of running old versions of Visual Studio side-by-side with new ones, upgrading to new versions of MVC just to run the latest version of VS (even if I don’t need any of the new MVC features) or saying screw it” and just re-writing my web site from scratch. This last option might seem like what Microsoft wants me to do so that they can stop supporting the old versions of MVC, but what’s to stop me from moving to AWS, Linux and Node instead of to ASP.NET v.Next? The real danger of dropping the old versions on the floor; not that I’ll move over to another platform, because I’m an Microsoft fanboy and my MSDN Subscription gives me the OS and the tools for free, but that large paying customers say screw it” and move their web sites to something that their tools are going to support for more than a few years.

Luckily for me, there is another way: I can cheat. It turns out that if I want to load my MVC 2 project inside of Visual Studio 2013, all I have to do is remove a GUID from the csproj file inside the ProjectTypeGuids element. The GUID in question is listed on step 9 of Microsoft’s guide for upgrading from MVC 2 to MVC 3:

image

Removing {F85E285D-A4E0-4152-9332-AB1D724D3325} from your MVC 2 project so it will load in Visual Studio 2013

 

By removing this GUID, I give up some of the productivity tools inside Visual Studio, like easily adding a new controller. However, I’m familiar enough with MVC 2 that I no longer need those tools and being able to actually load my project into the latest version of Visual Studio is more than worth it. Andrew Steele provides more details about this hack in his most excellent StackOverflow post.

Now, to get my MVC 2 project to actually build and run, I needed a copy of the MVC 2 assemblies, which I got from NuGet:

image

Adding the MVC 2 NuGet package to my project inside Visual Studio 2013

 

With these changes, I could build my MVC 2 project inside Visual Studio 2013 and run on my local box against my SQL Azure instance. Now I just need to get it up on Azure.

Moving to Azure

Publishing my MVC 2 site to Azure was matter of right-clicking on my project and choosing the Publish option:

image

Publishing a web site to Azure using the Solution Explorer’s Publish option inside Visual Studio 2013

 

Selecting the Windows Azure Web Sites as the target and filling in the appropriate credentials was all it took to get my site running on Azure. I did some battle with the Error to use a section registered as allowDefinition=‘MachineToApplication’ beyond application level bug in Visual Studio, but the only real issue I had was that Azure seemed to need the Precompile during publishing” option set or it wasn’t able to run my MVC 2 views when I surfed to them:

 

image

Setting the Precompile during publishing” option for Azure to run my MVC 2 views

 

With that setting in place, my Azure site just ran at the Azure URL I had requested: http://sellsbrothers.azurewebsites.net.

Where are we?

I’m a fan of the direction of ASP.NET v.Next. The order of magnitude reduction in working set, the open source development and the use of NuGet to designate pieces of the framework that you want are all great things. My objection is that I don’t want to be forced to move forward to new versions of a framework if I don’t need the features. If I am forced, then that’s just churn in working code that’s bound to introduce bugs.

Tune in next time and we’ll discuss the fun I had configuring the DNS settings to make Azure the destination for sellsbrothers.com and to add SSL to enable secure login for posting articles via AtomPub and Windows Live Writer.

July 7, 2014 spout

Moving My Site to Azure: The Database

Moving My Site to Azure: The Database

In a world where the cloud is not longer the wave of the future, but the reality of the present, it seems pretty clear that it’s time to move sellsbrothers.com from my free ISP hosting (thanks securewebs.com!) to the cloud, specially Microsoft’s Azure. Of course, I’ve had an Azure account since its inception, but there has been lots of work to streamline the Azure development process in the last two years, so now should be the ideal time to jump in and see how blue the waters really are.

As with any modern web property, I’ve got three tiers: presentation, service and database. Since the presentation tier uses server-side generated UI and it’s implementation is bundled together with the service tier, there are two big pieces to move — the ASP.NET site implementation and the SQL Server database instance. I decided to move the database first with the idea that once I got it hosted on Azure, I can simply flip the connection string to point the existing site to the new instance while I was doing the work to move the site separately.

Deploy Database To Windows Azure SQL Database from SSMS

The database for my site does what you’d expect — it keeps track of the posts I make (like this one), the images that go along with each post, the comments that people make on each post, the writing and talks I give (shown on the writing page), book errata, some details about the navigation of the site, etc. In SQL Server Management Studio (SSMS), it looks pretty much like you’d expect:

image

sellsbrothers.com loaded into SQL Server Management Studio

 

However, before moving to Azure SQL Server, I needed a SQL Azure instance to move the data to, so I fired up the Azure portal and created one:

image

Creating a new SQL Azure database

 

In this case, I chose to create a new SQL Azure instance on a new machine, which Azure will spin up for us in a minute of two (and hence the wonder and beauty that is the cloud). I choose the Quick Create option instead of the Import option because the Import option required me to provide a .bacpac file, which was something I wasn’t familiar with. After creating the SQL Server instance and the corresponding server, clicking on the new server name (di5fa5p2lg in this case) gave me the properties of that server, including the Manage URL:

image

SQL Azure database properties

 

If you click on the Manage URL, you will have a web interface for interacting with your SQL Azure server, but more importantly for this exercise, the FQDN is what I needed to plug into SSMS so that I can connect to that server. I’ll need that in a minute, because in the meantime, I’d discovered what looked like the killer feature for my needs in the 2014 edition of SSMS:

image

Deploy Database to Windows Azure Database in SSMS 2014

 

By right-clicking on the database on my ISP in SSMS and choosing Tasks, I had the Deploy Database To Windows Azure SQL Database option. I was so happy to choose this option and see the Deployment Settings screen of the Deploy Database dialog:

Untitled-2

SSMS Deploy Database dialog

 

Notice the Server connection is filled in with the name of my new SQL Server instance on Azure. It started blank and I filled it in by pushing the Connect button:

Untitled-7

SSMS Connect to Server dialog

 

The Server name field of the Connect to Server dialog is where the FQDN we pulled from the Manage URL field of Azure database server properties screen earlier and the credentials are the same as I set when I created the database. However, filling in this dialog for the first time gave me some trouble:

Untitled-8

SQL Azure: Cannot open server foo’ requested by the login

 

SQL Azure is doing the right thing here to keep your databases secure by disabling access to any machine that’s not itself managed by Azure. To enable access from your client, look for the Set up Windows Azure firewall rules for this IP address” option on the SQL database properties page in your Azure portal. You’ll end up with a server firewall rule that looks like the following (and that you may want to remove when you’re done with it):

image

SQL Azure server firewall rules

 

Once the firewall has been configured, filling in the connection properties and starting the database deployment from my ISP to Azure was when my hopes and dreams were crushed:

image

SSMS Deploy Database: Operation Failed

 

Clicking on the Error links all reported the same thing:

Untitled-4

Error validating element dt_checkoutobject: Deprecated feature String literals as column aliases’ is not supported by SQL Azure

 

At this point, all I could think was what the heck is dt_checkoutobject” (it’s something that Microsoft added to my database), what does it mean for to use string literals as column aliases (it’s a deprecated feature that SQL Azure doesn’t support) and why would Microsoft deprecate a feature that they used themselves on a stored proc that they snuck into my database?! Unfortunately, we’ll never know the answer to that last question. However, my righteous indignation went away as I dug into my schema and found several more features that SQL Azure doesn’t support that I put into my own schema (primarily it was the lack of clustered indexes for primary keys, which SQL Azure requires to keep replicas of your database in the cloud). Even worse, I found one table that listed errata for my books that didn’t have a primary key at all and because no one was keeping track of data integrity, all of the data was in that table twice (I can’t blame THAT on Microsoft : ).

And just in case you think you can get around these requirements and sneak your database into SQL Azure w/o the updates, manually importing your data using a bacpac file is even harder, since you now have to make the changes to your database before you can create the bacpac file and you have to upload the file to Azure’s blob storage, which requires a whole other tool that Microsoft doesn’t even provide.

Making your Database SQL Azure-compatible using Visual Studio

To make my SQL database compatible with SQL Azure required changing the schema for my database. Since I didn’t want to change the schema for a running database on my ISP, I ended up copying the database from my ISP onto my local machine and making my schema changes there. Getting to point of SQL Azure-compatibility, however, required me to have the details of which SQL constructs SQL Azure supported and didn’t support. Microsoft provides overview guidance on the limitations of SQL Azure, but it’s not like having an automated tool that can check every line of your SQL. Luckily, Microsoft provides such a tool built into Visual Studio.

To bring Microsoft’ SQL compiler to bear to check for SQL Azure compatibility requires using VS to create a SQL Server Database Project and then pointing it at the database you’d like to import from (which is the one copied to my local machine from my ISP in my case). After you’ve imported your database’s schema, doing a build will check your SQL for you. To get VS to check your SQL for Azure-compatibility, simply bring up the project settings and choose Windows Azure SQL Database as the Target platform:

image

Visual Studio 2014: Setting Database Project Target Platform

 

With this setting in place, compiling your project will tell you what’s wrong with your SQL from an Azure point-of-view. Once you’ve fixed your schema (which may require fixing your data, too), then you can generate a change script that updates your database in-place to make it Azure-compatible. For more details, check out Bill Gibson’s excellent article Migrating a Database to SQL Azure using SSDT.

The Connection String

Once the database has been deployed and tested (SSMS or the Manage URL are both good ways to test that your data is hosted the way you think it should be), then it’s merely a matter of changing the connection string to point to the SQL Azure instance. You can compose the connection string yourself or you can choose the View connection strings for ADO.NET, ODBC, PHP and JDBC option from your database properties page on Azure:

image

SQL Azure: Connection Strings

 

You’ll notice that while I blocked out some of the details of the connection string in my paranoia, that Azure itself is too paranoid to show the password; don’t forget to insert it yourself and to put it into a .config file that doesn’t make it into the SCCS.

Where are we?

In porting sellsbrothers.com from an ISP to Azure, I started with the database. The tools are there (nice tools, in fact), but you’ll need to make sure that your database schema is SQL Azure-compatible, which can take some doing. In the next installment, I’ll talk about how I moved the implementation of the site itself, which was not trivial, as it is implemented in ASP.NET MVC 2, which has been long abandoned by Microsoft.

If you’d like to check out the final implementation in advance of my next post, you help yourself to the sellsbrothers.com project on github. Enjoy.

December 23, 2013 spout

Bringing The Popular Tech Meetups to Portland

Bringing The Popular Tech Meetups to Portland

pdx-tech-meetup-logoI’ve been watching the Portland startup scene for years. However, in the last 12 months, it’s really started to take off, so when I had an opportunity to mentor at the recent Portland Startup Weekend, I was all over it. I got to do and see all kinds of wonderful things at PDXSW, but one of the best was meeting Thubten Comerford and Tyler Phillipi. Between the three of us, we’re bringing the very popular Tech Meetup conference format to Portland.

The idea of a Tech Meetup is meant to be focused on pure tech. In fact, at the largest of the Tech Meetups in New York (33,000 members strong!), they have a rule where it’s actually rude to ask about the business model. The Tech Meetups are tech for tech’s sake. If you’re in a company big or small or if you’re just playing, cool tech always has a place at the Portland Tech Meetup.

The format is simple and if you’re familiar with the way they do things in Boulder or Seattle, you’re already familiar with it. Starting on January 20th, 2014, every 3rd Monday at 6pm, we’ll open the doors for some networking time, providing free food and drink to grease the skids. At 7pm, we’ll start the tech presentation portion of the evening, which should be at least five tiny talks from tech presenters of all kinds. After the talks, we’ll wrap up around 8pm and then head to the local water hold for the debrief.

If this sounds interesting to you, sign up right now!

If you’d like to present, drop me a line!

If you’d like to sponsor, let Thubten know.

We’re very excited about bringing this successful event to Portland, so don’t be shy about jumping in; the water is fine…

December 27, 2011 spout tools

GUI REPL for Roslyn

GUI REPL for Roslyn

If you recall from REPL for the Rosyln CTP 10/2011, I’ve been playing around building a little C# REPL app using Roslyn. That version was built as a Console application, but I’ve refactored and rebuilt it as a WPF application:

image

You can download the source code for both the Console and the WPF versions here:

RoslynRepl Sample Download

The benefit of a real GUI app is that output selection makes a lot more sense and that you could imagine real data visualization into data controls instead of just into strings. However, implementing a REPL shell in a GUI environment requires doing things considerably differently than in a Console app. Besides the stupid things I did, like doing a lot of Console.Write, and things that don’t make sense, like #exit or #prompt, there are a few interesting things that I did with this code, including handling partial submissions, rethinking history and rewiring Console.Write (just cuz it’s stupid when I do it doesn’t mean that it shouldn’t work).

Partial Submissions

In this REPL, I decided that Enter means execute” or newline” depending on whether the submission is complete enough, according to Roslyn, to execute or not. If it is, I execute it, produce the output and move focus to either the next or a new submission TextBox. If the submission isn’t yet complete, e.g. void SayHi() {”, then I just put in a newline. Further, I do some work to work properly with selections, i.e. if you press Enter when there’s a selection, the selection will be replaced with the Enter key.

So far I like this model a lot, since I don’t have to something like separate execute” and newline” into Enter and Alt+Enter or some such.

Rethinking History

In a GUI shell with partial submissions and multi-line editing, the arrows are important editing keys, so can’t be used for access to previous lines in history. Further, a GUI apps makes it very easy to simply scroll to the command that you want via the mouse or Shift+Tab, so there’s not a lot of use for Alt+Arrow keys. Pressing Enter again replaces the old output (or error) with new output (or error):

imageimage

Currently when you re-execute a command from history, the command stays where it is in the history sequence, but it could as easily move to the end. I haven’t yet decided which I like better.

Redirecting Console.Write

Since this is a REPL environment works and acts like a shell, I expect that Console.Write (and it’s cousins like Console.WriteLine) to work. However, to make that work, I need to redirect standard output:

Console.SetOut(new ReplHostTextWriter(host));

The ReplTextWriterClass simply forwards the text onto the host:

class ReplHostTextWriter : TextWriter {
  readonly IReplHost host;

public ReplHostTextWriter(IReplHost host) { this.host = host; } public override void Write(char value) { host.Write(value.ToString()); } public override Encoding Encoding { get { return Encoding.Default; } } }

The hosts implementation of IReplHost.Write simply forwards it onto the currently executing submission (the ReplSubmissionControl represents both a submission’s input and output bundled together). You’ll notice that the TextWriter takes each character one at a time. It would be nice to do some buffering for efficiency, but you’d also like the output to appear as its produced, so I opted out of buffering.

However, one thing I don’t like is the extra newline at the end of most string output. I want the main window to decide how things are output, setting margins and the newline looks like a wacky margin, so the trailing CR/LF had to go. That’s an interesting algorithm to implement, however, since the characters come in one at a time and not line-by-line. I want separating newlines to appear, just not trailing newlines. I implement this policy with the TrimmedStringBuilder class:

// Output a stream of strings with \r\n pairs potentially spread across strings,
// trimming the trailing \r and \r\n to avoid the output containing the extra spacing.
class TrimmedStringBuilder {
  readonly StringBuilder sb;

  public TrimmedStringBuilder(string s = "") {
    sb = new StringBuilder(s);
  }

  public void Clear() {
    sb.Clear();
  }

  public void Append(string s) {
    sb.Append(s);
  }

  public override string ToString() {
    int len = sb.Length;

    if (len >= 1 && sb[len - 1] == '\r') {
      len -= 1;
    }
    else if (len >= 2 && sb[len - 2] == '\r' && sb[len - 1] == '\n') {
      len -= 2;
    }

    return sb.ToString(0, len);
  }
}

Usage inside the ReplSubmissionControl.Write method is like so:

public partial class ReplSubmissionControl : UserControl {
...
  TrimmedStringBuilder trimmedOutput = new TrimmedStringBuilder();

  public void Write(string s) {
    if (s == null) { trimmedOutput.Clear(); }
    else { trimmedOutput.Append(s); }

    consoleContainer.Content = GetTextControl(trimmedOutput.ToString());
  }
}

Now, as the input comes in one character at a time, the trailing newlines are removed but separating newlines are kept. Also, you may be interested to know that the GetTextControl function builds a new read-only TextBox control on the fly to host the string content. This is so that the text can be selected, which isn’t possible when you set the content directly.

Right now, there’s no support for Console.Read, since I don’t really know how I want that to happen yet. Pop-up a dialog box? Something else?

Completions, Syntax Highlighting and Auto-indent

I was a few hundred lines into implementing completions using Roslyn with the help of the Roslyn team when I realized two things:

  1. Implementing completions to mimic the VS editor is hard.
  2. Completions aren’t enough — I really want an entire C# editor with completions, syntax highlighting and auto-indentation.

Maybe a future release of Roslyn will fix one or both of these issues, but for now, both are out of scope for my little REPL project.

December 27, 2011 spout

Moving to the Cloud Part 2: Mostly Sunny

Moving to the Cloud Part 2: Mostly Sunny

In part 1 of this now multi-part series (who knew?), I discussed my initial attempts at moving my digital life into the cloud, including files, music, photos, notes, task lists, mail, contacts, calendar and PC games.There were some issues, however, and some things that I forgot, so we have part 2.

Before we get to that, however, it’s interesting (for me, at least) to think about why it’s important to be able to move things into the cloud. Lots of vendors are busy making this possible, but why? There are backup reasons, of course, so that a fire or other natural disaster doesn’t wipe out all of the family pictures. There are also the ease of sharing, since email makes a very poor file sharing system. Also, multi-device access is certainly useful, since the world has moved into a heterogeneous OS world again as smartphones and tablets take their place at the table with PCs.

For me, however, moving my data into the cloud is about freedom.

The cloud enables me to get myself bootstrapped with data associated with my personal or business life, using whatever device or OS I feel like using that day. It provides me freedom of location or vendor.

The cloud is still forming, however, so hasn’t really been able to make this a seamless experience, which is why I’m onto part 2 of this series.

Mail, Contacts and Calendar

Hotmail is a fine system for online access to mail, contacts and calendar that integrates well with Windows Phone 7. However, the integration with desktop Outlook and my custom domain isn’t good enough yet to rely on. The primary problem was the Hotmail Outlook Connector, which isn’t ready yet for prime time. It worked great with calendar and contacts, but fell down badly when it came to large email folders that I moved from my PST file. It never showed the sync’ing progress as complete, which made me uncomfortable that it never actually completed sync’ing and therefore my data wasn’t safe. Also, when I sent an email from Hotmail, either via the web or via Outlook, it showed the reply address as hotmail_44fe54cff788bdde@live.com. I assume the latter would’ve been fixed with Windows Live custom domains, but the former was the real deal-killer for me.

Also, I heard that Google Apps is the way to go, but that also requires some special software to enable sync’ing with desktop Outlook — I wanted something that was native to both Outlook 2010 and Windows Phone 7. Further, it cost money, so if I was going to pay, I wanted something that Microsoft was going to integrate well with.

So, I bit the bullet and hooked myself with the latest in hosted Exchange — Microsoft Office 365. That’s what I’m using now and just like the on-premise Exchange that worked great for me as a Microsoft employee, I’ve been very happy with it. However, because of the way I was using it, it was a pain to configure properly for use in hosting my csells@sellsbrothers.com email.

The easy way to configure Office 365 is to let it be the DNS name manager, which lets it manage everything for you, including your web site (via SharePoint), your mail, your Lync settings and any future service they care to tack on. However, that doesn’t work for me, since I didn’t want to move my 16-year-old web site into SharePoint (duh). Instead, I wanted to leave my DNS name manager at securewebs.com, which has been a fabulous web hosting ISP for me.

A slightly harder way to configure Office 365 for use with your domain is to only be used for selective services, e.g. set the MX record for mail, but don’t mess with the CNAME record for your web site. This would’ve been nice, too, except I don’t want to move all of the email accounts on sellsbrothers.com — only csells. Why? Well, that’s a family matter.

Over the years at family gatherings, to seem geek cool, I’ve offered free email boxes to my relatives. Oh? You’re moving to another ISP again? Why don’t you move your email to sellsbrothers.com and then you can keep the same email address forever! And the best part is that it’s free!”

Now, of course, I’d recommend folks get an email address on hotmail or gmail, but this all started before the email storage wars back when you needed an actual invitation to set up a gmail.com account. Now I’ve got half a dozen family members with permanent” and free” email boxes and I don’t want to a) move them, b) charge them or c) pay for them myself on Office 365.

As cheap as you might think I am, it’s really migration that I worry most about — having successfully gotten them set up on their phones and PCs with their current email host, I don’t want to do that again for Outlook or migrate their email. Maybe it’s easy, maybe it’s hard. We’ll never know cuz I’m not doing it!

So now, I have to make csells@sellsbrothers.com sync with Office 365 and leave everyone else alone. This is the hardest way to use Office 365 and involved the following:

  • Set up a custom domain in Office 365: sellsbrothers.onmicrosoft.com
  • Add myself as a user: csells@sellsbrothers.onmicrosoft.com
  • Verify that I own sellsbrothers.com by asking securewebs.com support to add a DNS TXT record as specified by Office 365 (this took two weeks and a dozen emails)
  • Make csells@sellsbrothers.com the primary email on that account
  • Make csells@sellsbrothers.com the From address by removing csells@sellsbrothers.onmicrosoft.com and adding it back again
  • Configure my ISP email (SmarterMail) to forward csells@sellsbrothers.com email to csells@sellsbrothers.onmicrosoft.com (I’m not also deleting the email on my ISP account yet when it forwards, but eventually I plan to)
  • Login to my Outlook Web Access account on http://mail.office365.com
  • Find my Outlook host name via Help | About | Host name (ch1prd0502.outlook.com) for use as my Outlook server on my Windows Phone 7 (along with my From email address: csells@sellsbrothers.com)
  • Stumbling onto the right technical forum post to figure out how to configure desktop Outlook 2010 using advanced settings:
    • Server: ch1prd0502.mailbox.outlook.com (my host name with mailbox” thrown in)
    • User name: csells@sellsbrothers.com (my From address)
    • Exchange Proxy Server: ch1prd0502.outlook.com (my Host name again)
    • Check both checkboxes to use HTTP first before TCP/IP
    • Authentication: Basic Authentication

Obviously, this is a crappy configuration experience, but no amount of manual updates to Outlook provided by the Office 365 site seemed to help. It was nice that the WP7 Outlook was much easier, although I’d really loved to have just told desktop Outlook that I was an Office 365 user and had it figure out all the touchy config settings.

Everything seems solid except one minor annoyance: when I do a Reply All, csells@sellsbrothers.com stays in the list because my mail programs don’t know that my csells@sellsbrothers.com and csells@sellsbrothers.onmicrosoft.com email addresses are logically the same. I assume if I was hosting my MX records at Office 365, this problem, along with the crappy config experience, would go away.

The good news is that I’ve got access to my full range of Mail, Contacts and Calendar from the web, my phone and my desktop, including multi-GB email folders I’ve copied over from my PST file, all for $6/month. Had I to do it over again, I’d have long ago moved my family to hotmail and avoided the config nightmare. I may yet do just that.

Encrypted Files

With my mail et al sorted, my next fix from last time was the lack of confidence in my most sensitive files with Dropbox. Dropbox can be hacked or subpoenaed like anyone else, so I want a client-side encryption solution. Dropbox may someday provide this themselves, but currently they gain a great deal of storage savings by detecting duplicate blocks amongst their users, saving significantly on uploads and storage, which client-side encryption disrupts. In the meantime, I really want an app that encrypts on the client and drops my data into Dropbox, which BoxCryptor does nicely.

In addition to supporting Windows, BoxCryptor also supports MacOS, iOS and Android, although not WP7 yet. Further, it’s free for 2GB and only a $40 one-time fee for unlimited data, so it’s cheap, too.

I also looked at SecretSync, which has a similar cross-platform story and pricing model (although it’s $40/year instead of $40/once), but it requires Java and I don’t put that on my box. For an open source solution, you may be interested in TrueCrypt.

imageFinancial Data

I’m a mint.com user. I like the idea of an all-up look at my finances across 29 online financial accounts. However, as a backup of that data, I wrote a mint.com scraping tool that downloads the CSV transactions export file and digs current snapshot data out of the homepage HTML. The format on the web site is constantly changing of course, so it’s a support problem, but having that data even a little messed up over time is way better than not having it at all, so I’m happy. The data itself goes into CSV files that I can query with LINQPad and that are stored in my Dropbox folder, which keeps them sync’d.

Books and Bookmarks

I can’t believe I missed this last time, but one of the big things I keep in the in the cloud is my set of Amazon Kindle books. I think that the proprietary format and DRM of Kindle materials will eventually open up because of competition, but until then, Amazon has been a great steward of my online books and bookmarks, providing me clients for all new platforms as well as their own e-ink-based hardware. I have an extensive book collection (this is just part of it), but am adding to the physical part of it no more.

Further, in the case that I have the what the hell was that book I used to have?” moment after I finally truck all of my books off to Powell’s, the Brothers Sells have scanned all of the ISBN numbers from my 500+ books into LibraryThing. I won’t have the books anymore, but at least I’ll be able to browse, refresh my memory and add the books to Kindle on demand. The reason I picked LibraryThing is because it was easy to get all of the book metadata from just an ISBN (so it’s easy to spot data entry errors early), it’s easy to export from in a CSV file and, should I decide, easy to user their API.

App Specifics

In addition to the big categories, several apps keep data important to me:

  • Twitter keeps Twitter users I’m following and searches
  • Facebook keeps Facebook contacts, which is nice because they can maintain their own contact data for me and I don’t have to be constantly out of data with my copy
  • Windows Live Messenger keeps my IM contacts for me, although Facebook has largely replaced that for IM chatting
  • As of the latest update, Xbox game state in the cloud for me, although I’m not a big enough gamer that I really need it anywhere else except my home console. I assume in the future, MS will also keep the Xbox games I’ve purchased in the cloud as well
  • Hulu keeps a list of several TV shows I like and notifies me when new episodes are available
  • Netflix keeps a partial list of movies I’d like to see, but unfortunately not all of them
  • I keep my blog posts in an instance of SQL Server maintained on securewebs.com, which I assume they backup regularly. Someday I’ll write the script to pull that data out into my Dropbox just in case. The source code for the site itself is already stored in Dropbox, so I’m set there
  • Favorites: I don’t have a good app here, but I’d love it if some app could keep my IE favorites sync’d between my phone and my other computers. Suggestions?

Things Left On The Ground

As you may have surmised, I don’t put a lot of sentimental value in physical things. They’re not nearly as important to me as people, experiences or data. However, there are some things that I’d want to rescue in case of disaster given the chance:

  • A few wrist watches that reminds me of a special person or event
  • An inscribed copy of The Complete Sherlock Holmes that my grandfather, my father and I have all read
  • Inscribed copies of The Hobbit and The Lord of the Rings trilogy that my mother read to me as a child
  • A leather bound copy of Batman: The Dark Knight Returns because Frank Miller kicks ass
  • Two pieces of marble and maple furniture that my grandfather built to withstand the onslaught from my mother barreling through each room at top speed as a child (I’d have liked to see the first collision of the immovable object and the irresistible force that day!)

As hard as I try, I can’t think of anything else. Should I have to jam, my plan is to place these few items into safe keeping and sell, donate and/or toss the rest.

Where Are We?

As I write this, I’m sitting in a Starbucks in Sandy, OR, 20 minutes from a cabin I’m renting for a few days. When I’m done here, I’ll explore the town, see a movie and make myself some dinner. I won’t worry about my phone, my laptop or my home being lost or destroyed, since 98% of the possessions I deem most valuable are being managed by cloud vendors I trust.

The cloud doesn’t just represent a place to backup or store data — it represents a way of life.

My data stores a lifetime of experiences, people and knowledge. By keeping it safe and available no matter where I go, I gain the freedom to wander, to experience new physical places and new hardware and software solutions, all without being unduly burdened.

Creative work requires a comfortable place to labor filled with the tools and the materials the worker needs to be creative. Today my tools are an Apple MacBook, Windows 7, Office 2010, Visual Studio 2010 and a Samsung Focus. Yesterday those tools were different and I’m sure they’ll be different again tomorrow. However, while other people build up their place with comfortable things around them — a bookshelf for reference, a comfy chair, knick-knack reminders of events or trips — my place is a lifetime of data and anywhere that provides access to electrons and bits.

Having my data safe, secure and available makes me feel comfortable, creative and free.

December 16, 2011 spout

Sells Manor: Running 64-bit Win8 on My MacBook Air

Sells Manor: Running 64-bit Win8 on My MacBook Air

With the exception of //build/, I haven’t really been a public part of the Microsoft developer community for about a year. So, to make up for some lost time, I’m giving a talk about some of the //build/ bits at the Portland Area .NET User Group first thing in the new year. This means that I need a running installation of the Windows 8 Developer Preview on my new laptop, cuz THE MAN took my old laptop back when I handed in my badge (although, to be fair, they paid for it in the first place : ).

My constraints were as follows:

  • I really like boot-to-VHD. I find that any other kind of virtualization technology slows an OS down enough that it negatively affects any talk I would give.
  • I have an existing VHD I wanted to reuse with Win8 and VS11 installed and running just fine already.
  • I am running it on a MacBook Air. It’s the big one with quad-core i7, 4GB of RAM and 256GB of SSD, so it’s got the muscle but it needs to drivers to make everything work properly.
  • I’m running Windows 7 on my MacBook. The wonderful Boot Camp Assistant in MacOS makes it a snap to get Win7 up and running on a MacBook, but making it run with Win7 and Win8 is a special challenge.

So, with all of that in mind, of course I started with Hanselman’s Guide to Installing and Booting Windows 8 Developer Preview off a VHD post. If you’re willing to build a new VHD, that’s the way to go. However, I was able to use the techniques I learned from that post, especially the comment section and a couple tips from my friend Brian Randall to make my existing Win8 VHD work. Some of this may work for you even if you don’t have a MacBook Air.

Getting Windows 7 Running on my MacBook Air

I started with a virginal MacBook and used the built in Boot Camp to create a Win7 partition, point to a Win7 Ultimate ISO I have on a network share for just these kinds of emergencies and get it installed and running. It wasn’t seamless, but Bing was helpful here to straighten out the curves.

Replacing the Boot Manager

The way I like to create VHDs is via Windows Server 2008 and Hyper-V. Once I have the VHD, I drop it onto the c:\vhd folder on my computer, do a little bcdedit magic and boom: when I reboot, I’ve got a new entry from which to choose my OS of the moment.

However, Win8 doesn’t boot from the Win7 boot manager, so the first thing I needed to do (as implied by the comments in Scott’s post) was use bcdboot to replace the Win7 book manager with the Win8 boot manager. To do that, boot into Win7 and fire up the Disk Management tool (Start | Run: diskmgmt.msc). Select your BOOTCAMP drive and choose Action | Attach VHD. Choose the path to your VHD and you’ll get another virtual disk:

image

In my case, C was my Win7 Boot Camp HD and F was my Win8 VHD. Now, start an elevated command prompt and use bcdboot to replace the Win7 boot manager with the Win8 book manager.

DISCLAIMER: I’m stealing the works on my machine” graphic from Hanselman’s site because this action replaces a shipping, maintained, supported boot manager with one that is still in developer preview” mode. Make sure you have your computer backed up before you do this. I am a trained professional. Do not attempt this at home. All stunts performed on a closed course. Some assembly required. Void where prohibited. I’m just sayin’.

image

Now that you’ve got the right boot manager in place, getting Win8 to boot requires bcdedit.

Getting Windows 8 to Boot

Scott’s post on booting to VHD involves bcdedit, which describes adding a new boot option in the Setting up your Windows Boot Menu to boot to an Existing VHD section:

image

Use bcdedit to point to the Win8 VHD.

Logging into Windows 8 on a MacBook

Now when you boot your MacBook, you’ll choose to boot to your Windows partition as you always have (which should just happen automatically), but then the Win8 book manager will kick in and you choose your Windows 7 install or your new Windows 8 install. Booting into Windows 8 shows you the login screen as normal, but now you have another problem.

The MacBook keyboard comes without a Windows Delete button. Oh sure, it’s labeled delete” in trendy lowercase letters, but it’s really the equivalent of the Windows Backspace button. And that’s a problem, because you need to press Ctrl+Alt+Del to log into Win8.

Of course, Apple thought of that, so they created the Boot Camp drivers for Windows that maps fn+delete to Delete, but you can only install them after you’ve logged in.

So how do you log into a MacBook without a Delete button? Easy. You attach an external USB keyboard, press that three-fingered salute and login as normal.

Once you’re in that first time, you can install the Boot Camp drivers and never have to use the external keyboard again.

Installing the Boot Camp Drivers on Win8

When I created the Boot Camp USB to install Win7, it came with a set of drivers in the WindowsSupport folder with a wonderful setup.exe that makes Windows run great on the MacBook. Unfortunately, when you try to run it, you get a message that says you can’t:

Untitled

If you search the internet, you can find folks that have gotten past this by tricking setup.exe into thinking it’s running on Win7, but you’ll also find that those tricks don’t seem to work for 64-bit installs on MacBook Air, i.e. the one I was doing. However, this is where Brian had another suggestion: you can edit the Boot Camp MSI itself.

DISCLAIMER: This is something that I made work surprising well on my own personal MacBook Air, but I provide no guarantee that it won’t cause your computer to burst into flames on an international flight causing your body to be lost at sea. These techniques are not supported by Microsoft, Apple or the American Dental Association. You’ve been warned.

You may wonder, To what MSI is Mr. Sells referring?” And I answer: WindowsSupport\Drivers\Apple\BootCamp64.msi. This is the 64-bit MSI with the check in it for Windows 7. To make it work for Windows 8, you need to edit the MSI and change the version number. And to do that, the easiest tool I know of is the unsupported, discontinued Orca MSI editor from Microsoft, now hosted on technipages.com. Running Orca allows you to edit BootCamp64.msi and change the Windows version part of the LaunchCondition from 601 (Windows 7) to 602 (Windows 8):

orca

Once you’ve changed this version, WindowsSupport\setup.exe seems to run just fine, installing the keyboard entries that allow you to login and the control panel that allows you to customize everything.

Where Are We?

Starting from a Boot Camp installation of Windows 7 on my MacBook Air, I showed you how I was able to get Windows 8 booting from a VHD. It wasn’t pretty and it required tips from all over the internet. I gather them here today so that future anthropologists will know how hard we worked to enable the coming of our robotic overlords. If you’re able to use these instructions to expedite their arrival, I’m sure they’ll take that into consideration when they’re sorting us into work details.

P.S. This post is dedicated to Jerry Pournelle. I used to pour over his Byte magazine column every month like he was the computer Sherlock Holmes.

December 14, 2011 spout tools data

Moving My Data To The Cloud: Stormy Weather

Moving My Data To The Cloud: Stormy Weather

For years, I’ve maintained a single main” computer. It was the computer that was the central authority of all of the personal data I’d accumulated over the years and from which it made me uncomfortable to be separated. Because I needed a single computer for everything, it had to work on my couch, on a plane, on a desk and everywhere else I ever needed to go. Also, it couldn’t have a giant monitor or multiple monitors, because it had to go everywhere. All of this was because I needed all of my data with me all of the time.

My process for moving to a new computer used to include a lot of manual copying of files from the old D hard drive (D is for Data) to my new hard drive, which was also carefully partitioned into C for Windows, Office, Visual Studio, etc. and D for a lifetime of books and articles, coding projects and utilities I’ve collected over the years, e.g. LinqPad, Reflector, WinMerge, etc. This is 30GB of stuff I wanted access to at all times. I was also backing up via Windows Home Server, keeping photos and music on the WHS box (another 30GB), then backing that up to the cloud via KeepVault. And finally, as I upgraded HDs to go bigger or go to solid state, I kept each old HD around as another redundant backup.

All of that gave me some confidence that I was actually keeping my data safe right up until my Windows Home Server crashed the system HD and I found out that the redundancy of WHS doesn’t quite work the way you’d like (this was before I installed KeepVault). This was a first generation HP Home Server box and when it went down, I took it apart so I could attach a monitor, keyboard and mouse to diagnose it, pulled the HDs out so I could read what files I could and ultimately had to drop it off in Redmond with the WHS team so I could get it up and running again.

There are some files I never got back.

KeepVault gave me back some of the confidence I’d had before WHS crashed, but they didn’t provide me a way to see what files they were backing up, so I didn’t have the transparency I wanted to be confident. Further, they don’t have clients on every kind of platform like Dropbox does.

Of course, simply sync’ing files isn’t enough — sync’ing my 10GB Outlook PST file every time I got a new email was not a good way to share 20 years of contacts, email and calendar items.

The trick is to sync each kind of data in the right way, be confident that it’s safe and have access to it across the various platforms I use: Windows, Windows Phone 7, iOS and possibly Android (you know, if I feel like walking on the wild side!). And since I’m currently under employed (my new gig doesn’t start till the new year), I figured I’d do it once and do it right. I almost got there.

Files

Let’s start easy: files. Dropbox has made this a no-brainer. You install the software on any platform you care to use, drop everything you want into the folder and it just works, keeping files in sync on the cloud and across platforms, giving you adequate (although not great) status as it does so. Most platforms are supported natively, but even on platforms that aren’t, there are often alternative clients, e.g. I’m using Boxfiles for Windows Phone 7. When I gave up my Microsoft laptop, instead of doing the dance of the copy fairy to my new Mac Book Air, I installed Dropbox on both computers, dropped everything I want backed up and sync’d between computers into the Dropbox folder. 36 hours and 30GB later, all of it was copied into the cloud and onto my new laptop, at which point I reformatted my Microsoft laptop and handed it into my boss.

Further, as a replacement for WHS and KeepVault, I now keep all of the files that I was keeping just on my WHS server — photos and music primarily — into Dropbox.

image

This keeps me the confidence I need to know that my files are safe and backed up to the cloud, while making it very easy to keep it backed up locally by simply running Dropbox on more than one computer at my house. If at any time, I don’t want those files on any one computer, I tell Dropbox to stop sync’ing those folders, delete the local cache and I’m all done.

There are two tricks that I used to really make Dropbox sing for me. The first is to change my life: I no longer partition my HDs into C and D. The reason I’d always done that was so that I could repave my C with a fresh Windows, Office and VS install every six months w/o having to recopy all my data. Windows 7 makes this largely unnecessary anyway (bit rot is way down on Win7), but now it doesn’t matter — I can blow any computer away at will now, knowing that Dropbox has my back. In fact, Dropbox is my new D drive, but it’s better than that because it’s dynamic. The C drive is my one pool of space instead of having to guess ahead of time how to split the space between C and D.

The other thing I did was embrace my previous life: I wanted to keep D:\ at my fingertips as my logical Data” drive. Luckily, Windows provides the subst” command to do just that. Further, ntwind software provides the fabulous VSubst utility to do the mapping and keep it between reboots:

image

Now, I’ve got all the convenience of a dedicated data” drive backed up to the cloud and sync’d between computers. Because I needed 60GB to start, I’m paying $200/year to Dropbox for their 100GB plan. This is more expensive than I’d like, but worth it to me for the data I’m storing.

There is a hitch in this story, however. Right now on Dropbox, data and metadata is available to Dropbox employees and therefore to anyone that hacks Dropbox (like the government). I don’t like that and for my very most sensitive data, I keep it off of Dropbox. When Dropbox employees themselves aren’t able to read Dropbox data or metadata, then I’ll move the sensitive data there, too.

Music

I’m not actually very happy with how I’m storing music. I can play all my music on any PC, but I can only play it one song at a time on my WP7 because there’s no Dropbox music client. I could use the Amazon cloud drive that provides unlimited music storage for $20/year, but there’s no WP7 client for that, either. Or I could spend $100/year on Amazon and get my 100GB of storage, but their client isn’t as widely available as Dropbox. Ironically, Dropbox is using Amazon as their backend, so hopefully increased pressure in this space will drop Dropbox’s prices over time.

Photos

I’m not using Facebook or Flicr for my photos simply because I’m lazy. It’s very easy to copy a bunch of files into Dropbox and have the sync’ing just happen. I don’t want to futz with the Facebook and Flickr web interfaces for 15GB worth of photos. Right now, this is the digital equivalent of a shoebox full of 8x10s, but at least I’ve got it all if the house burns down.

imageNotes and Tasklist

For general, freeform notes, I moved away from Evernote when they took the search hotkey away on the Windows client (no Ctrl+F? really?) and went to OneNote. The web client sucks, but it’s better than nothing and the Windows and WP7 clients rock. I have a few notes pinned to my WP7 home screen that I use for groceries, tasks, etc., and I have all of my favorite recipes in there, too, along with my relatives’ wi-fi passwords that they don’t remember themselves, a recording of my son snoring, etc. It’s a fabulous way to keep track of random data across platforms.

On the task list side, I only sorta use OneNote for that. I also send myself emails and write little TODO.txt files every time I get a little bee in my bonnet. I’ve never found that the Exchange tasks sync well enough between platforms to invest in them. Maybe someday.

imageMail, Contacts and Calendar

And speaking of Exchange, that’s a piece of software that Microsoft spoiled me on thoroughly. This is sync that works very well for contacts, emails and calendar items. IMAP does email folders, but server implementations are spotty. For years, I used Exchange for my personal contacts and calendar, only keeping my personal email separate in a giant PST file, pulling it down via POP3. This can sorta be made to work, but what I really wanted was hosted Exchange.

However, what I found cost between $5 and $11 a month per user. I’d probably have gone with Office 365 for sellsbrothers.com mail, even at $5/month except for two reasons. The first is that Microsoft requires you to move your entire DNS record to them, not just the MX record, which means there is all kinds of hassle getting sellsbrothers.com working again. They do this so that they can get all of the DNS records working easily for Lync, Sharepoint, etc., but I don’t want those things, so it’s just a PITA for me. If they change this, I’d probably move except for the other problem: I’m not the only user on sellsbrothers.com.

For years to be the big shot at family gatherings, I’ve been offering up permanent, free email addresses on my domain. That’s all well and good, but now to maintain my geek cred, I need to keep my mom, my step-mom, my brother, my sons, etc., in an email server that works and one that they don’t have to pay for. So, while I was willing to pay $5/month for hosted exchange for me, I wasn’t willing to pay it for my relatives, too!

One option I tried was asking securewebs.com (my rocking ISP!) to upgrade to SmarterMail 8.x, but that didn’t work. I even footed the one-time fee of $200 for the ActiveSync support for SmarterMail, but I couldn’t make that sync from Outlook on the desktop or the phone either.

Eventually I made an imperfect solution work: Hotmail. The nice thing about Hotmail is that it’s free for 25GB (yay webmail storage wars!) and it syncs contacts, mail and calendar items just like I want. Further, with some effort (vague error messages are not useful!), I was able to get Hotmail to pull in my personal email. And, after installing the Outlook Hotmail Connector (explicitly necessary because my Windows Live ID is not a @live.com or an @hotmail.com email address), I was able to sync almost everything, including the folders I copied from my giant PST file, via hotmail to both my desktop and phone Outlook. However, there are a few downsides:

  • There is an intrinsic delay between when someone sends me an email and when it syncs to any device because Hotmail is polling via POP3. This polling is annoying and sometimes sends me directly to the web mail frontend where I can interact with my personal email directly.
  • The Outlook Hotmail Connector sync’ing progress indication is terrible in that it seems to stack every time I press F9 (a bad habit from years of POP3 usage) and I can’t tell what it’s working or or when it will finish. Because of this, I’ve trimmed the set of email folders I sync to the ones I really use, using the PST file as an archive for days gone by.
  • Hotmail does the right thing with the Reply To”, but sometimes weird @hotmail addresses with random characters shows up in email threads, which breaks the fourth wall. That’s annoying.
  • My RSS Folders don’t sync to my phone, which is a shame because I really loved having my Hacker News folder pinned to my WP7 home page letting me know where there were new items. None of the RSS readers on WP7 seem to work as well as a simple pinned email folder.

The good news is that this all works for free and my relatives continue to have working email. The bad news is that it doesn’t work nearly as well as the Exchange server I’m used to. Hopefully I will be able to revisit this in the future and get it working correctly.

imagePC Games

I purchase all of my games via Steam now and install them as the mood strikes me. I love being able to reinstall Half-Life 2 or Portal on demand, then blow it away again when I need the hard drive space. Steam is the only viable app store for Windows right now, although I am looking forward to have the Microsoft app store in Windows 8.

imageBackups

I no longer maintain backups” in the sense that I can slap in a new HD, boot from a USB stick and have my computer restored in 30 minutes or less (that never worked between WHS and Dell laptops anyway). I’ve had HD problems, of course, but they’re so rare that I no longer care about that scenario. Instead, what I do is keep all of the software that I normally install on a file server (the new job of my WHS box). If the file server goes down, then most of the software I install, i.e. Windows 7, Office and Visual Studio, is available for download via an MSDN Subscription. The rest is easily available from the internet (including Telerik tools and controls!) and I just install it as I need it.

Where Are We?

In order to free myself from any specific PC, I needed to pick a new centralized authority for my data: the cloud. The experience I was after for my PCs was the same one I already have on my phone — if I lose it, I can easily buy a new one, install the apps on demand and connect to the data I already had in Exchange, Hotmail, Skydrive, etc. Now that I’ve moved the rest of my world to Dropbox, I can treat my PCs and tablets like phones, i.e. easily replaceable. It’s not a perfect experience yet, but it’s leaps and bounds ahead of where it was even a few years ago.

Hardware and software comes and goes; data is forever.

December 13, 2011 spout telerik

Goodbye Microsoft, Hello Telerik!

Goodbye Microsoft, Hello Telerik!

I have gotten to do a ton of really great things at Microsoft:

  • I got to write a column on WPF and turn that column into not one, but two books.
  • I got the excitement for every blog post in the first two years wondering if this was the one that was going to get me fired. (It was close a few times.)
  • I got to throw several Developer Conferences (DevCons).
  • I got to spin up a completely new community from scratch (“Oslo”).
  • I got to stay up all night erasing the word WinFS” from all of microsoft.com.
  • I got to be part of a Microsoft product team from incubation through startup to product and then to kaput.
  • I got to get ordained as a minister so that I could marry a PM from the WPF team to a PM on the WCF team as part of the talk I gave with Doug Purdy at the 2008 PDC.
  • I got to prepare for that talk with Doug until 4am, then walk back to the hotel, causing people to cross the street to stay away from us. And then I got to give that talk with Doug the next morning right after restoring my copy of Windows that had crashed 30 minutes before.
  • I got to drag Lars Wilhelmsen up on stage to read Norwegian from the Oslo Tour Guide book, only to find I was pointing him at German.
  • I got to throw an SDR.
  • I got to play poker with Microsoft power brokers far above my level (and take their money : ).
  • I got to sleep at Don Box’s house and become an adjunct part of his family.
  • I got to have two design reviews with Bill Gates (as hard as I tried, I could never see him actually enter the room).
  • I got to turn developer feedback into hundreds of bugs across dozens of products.
  • I got code into Vista (and I assume into Windows 7 and Windows 8 as well).
  • I got to work on the team that built the most ambitious set of templates ever shipped with Visual Studio.
  • I got a very quick, very deep education on JavaScript and CSS.
  • I got to help drive the developer story for an entirely new platform: WinRT, WinJS and Win8.
  • I got to lead two product teams through two PDCs (OK, one PDC and one //build/).
  • I got to give the //build/ keynote launching the Visual Studio 11 tools for Windows 8 with Kieran Mockford, who will forever be my //build/ buddy.
  • I got to see how the sausage is made for SQL Server, WCF, WPF, Silverlight, Windows Phone 7, Windows 8 and a host of others. I am forever changed.

Those and dozens more have all been extraordinary experiences that have made my time at Microsoft extremely valuable. But, like all good things, that time has come to an end.

telerikLogo-web-450x180pxAnd now I’m very much looking forward to my new job at Telerik!

Telerik is an award-winning developer tools, UI controls and content management tools company. They’re well-known in the community not only for their top-notch tools and controls, but also for their sponsorship of community events and their free and open source projects. Telerik is a company that cares about making developer’s lives better and I’m honored that they chose me as part of their management overhead. : )

My division will be responsible for a number of UI control sets — including WinForms, WPF, Silverlight and ASP.NET — as well as a number of tools — including the Just line, OpenAccess ORM and Telerik Reporting. I’m already familiar with Telerik’s famous controls and am now ramping up on the tools (I have been coding with JustCode recently and I like it). My team is responsible for making sure that developers can make the most of existing platforms, knowing that when you’re ready for the next platform, we’ll be there ready for you.

These controls are already great (as is the customer support — holy cow!), so it’ll be my job to help figure out how we should think about new platforms (like Windows 8) and about new directions.

And if you’ve read this far, I’m going to ask for your help.

I’m going to be speaking at user groups and conferences and blogging and in general interacting with the community at lot more than I’ve gotten to do over the last 12 months. As I do that, please let me know what you like about Telerik’s products and what you don’t like, what we should do more of and what new things we should be doing. Telerik already has forums, online customer support, blog posts and voting — you should keep using those. In addition:

Feel free to reach out to me directly about Telerik products.

Of course, I can’t guarantee that I’ll take every idea, but I can guarantee that I’ll consider every one of them that I think will improve the developer experience. I got some really good advice when I first arrived at Microsoft: Make sure that you have an agenda.” The idea is that it’s very easy to get sucked into Microsoft and forget why you’re there or what you care about. My agenda then and now is the same:

Make developers’ lives better.

That’s what I tried to do at Intel, DevelopMentor and Microsoft and that’s what I’m going to try to do at Telerik. Thanks, Telerik for giving me a new home; I can’t wait to be there.

December 29, 2010 spout

Enabling the Tip Calculator in Your Brain

I can’t imagine anyone reading this blog needs to read this, but I can’t help myself.

When I was just a wee lad, probably the most valuable thing I learned was how to perform mathematical estimation, the importance of which and several techniques you can get by reading Jon Bentley’s The Back of the Envelope (this essay along with several others, are collected in his most excellent books Programming Pearls and More Programming Pearls, both of which are still relevant a decade later). Not only is estimation generally quicker than running a calculator, but even when you do run a calculator, it helps you figure out when you did it wrong, the latter of which has saved my bacon time and again.

For example, as much as I love the Windows Phone 7 marketplace and it’s quality and quantity of applications, the ones that puzzle me are the tip calculator” apps (several!). I don’t understand why it’s worth the trouble of pulling out your phone and punching buttons when you can know the tip instantly.

For example, let’s assume the dinner bill is $37.42. If the service was bad, that’s a 10% tip (you have to tip them something cuz the IRS assumes you will and taxes them accordingly — bastards). So, with a 10% tip, take the bill and move it right one decimal point: $3.74. Now, round up or down depending on how bad the service was, e.g. $3.50 or $4. Quick and easy.

Assuming the service was great, that’s a 20% tip, so double the bill and move it right one decimal point, making the math easier for yourself, e.g. $37.42 is close to $35, doubling is $70, so a $7 tip. Boom: 20% tip.

If you want to get fancy and provide a 15% tip for good but not great, then average the two numbers: ($4 + $7)/2 = $5.50. Zim zam zoom.

Honestly, as great as the apps are on your phone, tablet or BlueTooth headset (seriously), think about using the apps in your head first. Now only are they quicker and cheaper, but using them staves off dementia (which is a good thing!).

Oh, and if the tip is added as a mandatory minimum, then the additional tip is easy: $0.00. I don’t deal well with authority.

October 27, 2010 spout

A Function That Forces

Far Side - Midvale School for the GiftedAt Microsoft, there’s this passive-aggressive cultural thing called a forcing function,” which, to put it crudely, is an engineering way for us to control the behavior of others. The idea is that you set up something to happen, like a meeting or an event, that will force” a person or group to do something that you want them to do.

For example, if someone won’t answer your email, you can set up a meeting on their calendar. Since Microsoft is a meeting-oriented culture (even though we all hate them), a softie will be very reticent to decline your meeting request. So, they have a choice — they can attend your meeting so that they can answer your question in person or they can answer your email and get that time back in their lives. This kind of forcing function can take larger forms as well. I can’t say that our execs make the decision like this (since they don’t talk to me : ), but it is the case that signing up a large number of Microsoft employees to host and speak at important industry events does have the effect of making us get together to ensure that our technologies and our descriptions of those technologies holds together (well, holds together better than they would otherwise : ).

Unfortunately, this way of thinking has become so much a part of me that I’ve started to use it on my family (which they very much do not like). Worse, I use it on myself.

For example, I have been holding back on half a dozen or more blog posts until I have the software set up on my newly minted web site to handle blog posts in a modern way, namely via Windows Live Writer. In other words, I was using the pressure inherent in the build up of blogging topics to motivate me to build the support I wanted into sellsbrothers.com to have a secure blogging endpoint for WLW. Before I moved all my content into a database, I could just pull up FrontPage/Expression Web and type into static HTML. Now that everything is data-driven, however, the content for my posts are just rows in a database. As much as I love SQL Server Management Studio, it doesn’t yet have HTML editing support that I consider adequate. Further, getting images into my database was very definitely a programming task not handled by existing tools that I was familiar with.

So, this is the first post using my new WLW support and I’m damn proud of it. It was work that I did with Kent Sharkey, a close friend of mine that most resembles Eeyore in temperament and facial expressions, and that just made it all the more fun!

Anyway, I’m happy with the results of my forcing function and I’ll post the code and all the details ASAP, but I just wanted to apologize for my relative silence on this blog and that things should get better RSN. XXOO.

P.S. I’m loving Windows Live Writer 11!

August 8, 2010 spout

Why can’t it all just be messages?

Why can’t it all just be messages?

My mobile device is driving me crazy.

I have an iPhone 4.0. Normally when it’s driving me crazy, it’s standard stuff like the battery life sucks or that the iOS 4.0.1 update didn’t fix the proximity detection or stop emails I send via Exchange from just disappearing into the ether.

This time, it’s something else and I can’t blame the iPhone; I think all modern smart phones have the same problem. The problem is that I constantly have to switch between apps to see my messages. Here are screenshots for 5 of the messaging clients I use reguarly:

Voicemail Exchange Email SMS/MMS Facebook Twitter

This list doesn’t include real-time messages like IM, or notifications like Twitter or RSS. I’m just talking about plain ol’ async messaging. We used to think of it as email,” but really voicemail, email, SMS, MMS, Facebook messages and Twitter Direct Messages are all the same — they are meant to queue up until you get to them.

Now, some folks would argue that SMS/MMS aren’t meant to be queued; they’re meant to be seen and handled immediately. Personally, I find it annoying that there is a pop-up for every single text or media messages I get on my phone and there seems to be no way to turn that off. On the other hand, if I want that to happen for other types of messages, e.g. voicemail, I can find no way to turn it on even if I want to. Why are text messages special, especially since most mobile clients let you get over the 160 character limit and will just send them one after the other for you anyway?

iOS 4 takes a step in the right direction with the universal” inbox:

iOS4 "universal" inbox

Here I’ve got a great UI for getting to all my email messages at once, but why can’t it handle all my messages instead?

super-universal inbox

Not only would this put all my messages in one place at one time, but it would unify up the UI and preferences across the various messaging sources. Do you want your text messages to quietly queue up like email? Done. Do you want your voicemail to pop to the front like an SMS? Done. Do you want the same swipe-to-delete gestures on your voicemail as you have with your email? Done!

Maybe someone with some experience on the new Windows Phone 7 can tell me that there is a messaging” hub that manages all this for me. Since they’re already doing things like bringing facebook pictures into the pictures” hub (or whatever they call it), that doesn’t seem completely out of the realm of possibility. If that’s the case, I’ll say again what I’ve been saying for a while — I can’t wait for my Windows Phone 7!

April 2, 2010 spout

College info for my sophomore

I went to a college planning sessions at my sons’ high school not because I’m hung up on getting my Sophomore into a top school, but because I thought I’d get a jump on things. I learned I was actually behind.

For one, I learned that the high school has an online system that will do some amazing things:

  • It will give my son a personality test and an interest test.
  • From those tests, it will tell him what kinds of careers he might want to consider.
  • Based on those careers, what major should he have.
  • From the major, what schools around the country offer it.
  • In those schools, what the entrance requirements are.

That means that my son can answer questions about personality and interests and draw a straight line through to what he needs to do to get into a school so he can learn to do the jobs he’ll like and be good at. Holy cow. We didn’t have anything like that when I was a kid.

Further, the online system has two complete SAT and ACT tests in it, so, along with the PSAT that he’s already taking, he can do a practice ACT, figure out which test he’s best at (my 34 ACT score was way better than my 1240 SATs) and just take that test, since most schools these days take both SAT or ACT results.

This is all freely provided by the high school and, in fact, they have counseling sessions with the students at each grade level for them to get the most from this system.

It’s no wonder that 93% of students from this high school go on to 4 or 2-year college degree programs.

That was the good part.

The scary part is that my eldest, half way through his Sophomore year, is essentially half-way through his high school career. Colleges only see their grades through the end of Junior year, since most college applications are due in the middle of January of their Senior year at the latest. I have to sit down with my son and have the conversation about how even if you get a 4.0 from now on, the best grades you can have are…”

Is it just me or is the world moving faster with each passing day?

March 21, 2010 spout

you may experience some technical difficulties

I’ve been futzing with the site and I’ve got more to do, so unexpected things may happen. Last weekend I screwed with the RSS generator and that caused a bunch of folks to see RSS entries again. This weekend I’m moving more of my static content into the database, so you may see a bunch of old stuff pop up.

Feel free to drop me a line if you see anything you think needs fixing. Thanks for your patience.

March 18, 2010 spout

On Building a Data-Driven E-Commerce Site

On Building a Data-Driven E-Commerce Site
The following is a preprint of an article for the NDC Magazine to be published in Apri.

 

It had been a long, hard week at work. I had my feet up when a friend called and popped the question: Do you know how to build web sites?”

 

That was about a month ago and, after swearing to her that I spent my days helping other people build their web sites, so I should oughta know a thing or two about how to build one for her. After some very gentle requirements gathering (you don’t want a bad customer experience with a friend!), I set about designing and building bestcakebites.com, a real-world e-commerce site.

 

 

She didn’t need a ton of features, just some standard stuff:

·        Built on a technology I already knew so I could have the control I needed.

·        Listing a dozen or so products with pictures and descriptions.

·        A shopping cart along with, ideally, an account system so folks could check their order status or reorder easily.

·        Shipping, handling and tax calculation.

·        Taking payment.

·        Sending email notifications of successful orders to both the customer and the proprietor.

 

As it turns out, there are a bunch of ways to skin this particular cat, but because I was a busy fellow with a more-than-full-time job and a book I’m supposed to be writing, instead of falling prey to my engineering instinct to write my own website from scratch, I decided to see what was out there.

 

As it turns out, there’s quite a few e-commerce web site solutions in the world, several of them recommended by PayPal, as well as one that PayPal itself provides, if you don’t mind sending shoppers to their web site. And if fact, I did. Requirement #1 was that I needed complete control over the code and the look and feel of the site. I didn’t want to configure somebody else’s web site and risk going off of her chosen domain name or not being able to tweak that one little thing that meant the difference between #succeed and #fail. (Friend customers are so picky!)

 

The e-commerce solution I picked was the one I found on http://asp.net (I am a Microsoft employee after all): nopCommerce. It’s an open source solution based on ASP.NET and CSS, which meant that I had complete control when it wasn’t perfect (control I used a few times). It was far more than full-featured enough, including not only a product database, a shopping cart, shipping calculation and payment support, but also categories and manufacturers, blogs, news and forums, which I turned off to keep the web site simple (and to keep the administration cost low). Unexpected features that we ended up liking included product variants (lemon cake bites in sets of 8, 16 and 24 made up three variants, each with their own price, but sharing a description), product reviews, ratings and site-wide search.

 

The real beauty of nopCommerce, and the thing that has been the biggest boon, was that the whole thing is data-driven from SQL Server. To get started, I ran the template web site that was provided, it detected that it had no database from which to work and created and configured the initial database for me, complete with sample data. Further, not only was it all data-driven based on the products, orders and customers the way you’d expect, but also on the settings for the web site behavior itself.

 

For example, to get shipping working, I chose from a number of built-in shipping mechanisms, e.g. free, flat rate, UPS, UPSP, FedEx, etc., and plugged in my shipper information (like the user name and password from my free usps.com shipping calculation web service account)

 

With this configuration in place, the next order the site took, it used that shipper, pulling in the shipping information from the set of size and weight measurements on the ordered products (from the database), calling the web service as it was configured (also from the database) to pull in the set of shipping options from that shipper, e.g. Express Mail, Priority Mail, etc., augmenting the shipping prices with the per product handling changes, and letting the user pick the one they wanted. All I had to do was use the administration console, tag each product with size information and tell nopCommerce that I’d like USPS today, please.

 

Everything worked this way, including tax calculation, payment options (we chose PayPal Direct and Express so that folks with a credit card never left our site whereas folks with PayPal logged into their account on the familiar paypal.com), localization, whether to enable blogs, news, forums, etc. Most of the time when I wanted to make a change, it was just a matter of flipping the right switch in the database and not touching the code at all.

 

As one extreme example of where the data-driven nature really came through was on the order numbers generated by the site. During testing, I noticed that our order numbers were monotonically increasing from 1. Having ordered from a competitor’s site, their order number was only 103, clearly showing off what amateurs they were (and the order itself took a month to arrive after two pestering emails, so it was clear how amateur they really were). I didn’t want us to appear like newbies in our order-confirmation emails (which nopCommerce also generated for us), so I found the Nop_Order table, and used SQL to increase the identity column seed, which it was clear was the origin of the order number: 

DBCC CHECKIDENT (Nop_Order, RESEED, 10047)

From then on, every time an order came through, we protected experience simply because of the order number, which I changed without touching a line of code. If helping you fake it til you make it” isn’t enough reason to love a data-driven solution, I don’t know what is!

March 11, 2010 spout

The incomplete list of impolite WP7 dev requests

In my previous list of WP7 user requests, I piled all of my user hopes and dreams for my new WP7 phone (delivery date: who the hell knows) onto the universe as a way to make good things happen. And all that’s fine, but I’m not just a user; like most of my readers, I’m also a developer and have a need to control my phone with code. I have a long list of applications I want to write and an even longer list of applications I want other developers to write for me.

 

Today at 1:30p is the first public presentations of how to do WP7 programming, so to affect the future, I have to get my feature requests for the Windows Phone 7 Series development environment posted now!

 

·        I want the legendary Microsoft tools for code editing, UI design, debugging, deployment, version control, add-ins, project management, etc. Please just let me install the Windows Phone 7 Series SDK and have Dev10 light up with new project and project item templates et al.

·        I definitely want to be able to write C#. Since Charlie’s mentioned Silverlight, it seems like I’ll be able to do just that.

·        I want to be able to mark a program as useful for background processing, e.g. I’m writing Pandora, and let that trigger a question for the user as to whether to allow it or not, ideally with a message like Pandora would like to continue to run in the background using XX% of your battery. Is that OK?”

·        For most apps that would like to appear as if they’re running in the background, I want to register a bit of code to run when its own cloud-based notifications comes in, e.g. an new IM or sports score.

·        I want to be able to access data from built-in apps, e.g. contacts, appointments, etc.

·        Obvious things:

o   Notification when the user switches orientation

o   Access to the compass, GPS, network, camera, mic, etc.

o   Access to the network using TCP, HTTP, Atom, AtomPub and OData.

o   Low and high-level access to gestures

o   A nice set of build-in standard controls, including simple things like text box and more complicated things like map and route

o   Integration with existing apps, e.g. the ability to launch the map app from my own app at a specific location or to a specific route.

o   Ability to create custom controls/do custom drawing.

o   Serialization so I can keep user data between sessions. Notifications when my app is being whacked.

o   App-selected keyboards for specific tasks, e.g. entering a URL.

 

That doesn’t seem like a very big list. I must be missing something. : )

March 9, 2010 spout

Creating a Lazy Sequence of Directory Descendants in C#

My dear friend Craig Andera posted an implementation of a function that descends into a directory in a lazy” manner, i.e. you get the first descendant back right away and not after all descendants have been calculated. His implementation was in Clojure, a Lisp variant that runs on the Java VM:

(import [java.io File])

(defn dir-descendants [dir]
  (let [children (.listFiles (File. dir))]
    (lazy-cat
     (map (memfn getPath) (filter (memfn isFile) children))
     (mapcat dir-descendants
      (map (memfn getPath) (filter (memfn isDirectory) children))))))

Craig was happy with this function because, even though it was a mind-bender to write,” it’s easy to read and because C# would almost certainly be at least somewhat more verbose.”

Taking this as a challenge, I rewrote this program in C#, maintaining the laziness:

using System.IO;
using System.Collections.Generic;

namespace ConsoleApplication1 {
    class Program {
        static IEnumerable GetDirectoryDecendants(string path) {
            foreach (var file in Directory.GetFiles(path)) { yield return file; }
            foreach (var directory in Directory.GetDirectories(path)) {
                foreach (var file in GetDirectoryDecendants(directory)) { yield return file; }
            }
        }
    }
}

The key hit here is the use of yield return” which lets me return elements of an IEnumerable as I calculate them. This took me 5 minutes to write, my mind is straight and I find it fairly easy to read. I’ll let you decide on the relative verbosity of each implementation.

March 9, 2010 spout

The incomplete list of impolite WP7 user feature requests

When I first moved from the combination of a dumb phone and a separate music player, I had modest requirements: phone calls, MP3 playback, calendar notifications, contact management, email, camera and solitaire. Even asking for only these seven things, my first smart phone was as life changing as my first laptop. I could do a great deal of my work while out and about, allowing me to have a much more productive work/personal life balance.

 

When I was first married, the word love” didn’t seem big enough for what I felt for my bride. These days, the word phone” doesn’t seem nearly big enough for the pocket-sized mobile device that I’m never without, like my wallet and my keys. Further, I expect my phone to replace my wallet and keys any day now, along with the Walkman, DVD player, TV, radio, book shelf, notepads, calculator, compass, alarm clock, wall calendar, newspaper, encyclopedia, dictionary, GameBoy, carpenter’s level, laptop, navigation device and landline it’s already replaced.

 

Now that I’ve been through several smart phones, including my favorites, the T-Mobile Dash and the iPhone 3G, I have a much longer, incomplete list of what I want from my Windows Phone 7 Series (and I know it’s incomplete because after I post this list, someone is going to remind me what vital things I missed : ).

 

·        A calculator. It’s surprising how useful this is, including the scientific features.

·        A battery that lasts at least 24 hours while I’m using Bluetooth, 3G, Wi-Fi, GPS, music and my apps. Oh, and please let me charge the thing with a standard connector (USB!) and let me use my phone while it’s recharging.

·        An easy, high-quality way to run the music through my car stereo. The Sells Brothers and I like to jam!

·        An easy way to switch back and forth to airplane mode. Or even better, can you make it so the device isn’t an FAA threat during takeoff and landing so I can stop reading the stupid magazine in the seat pocket in front of me for 5 minutes at the beginning and ending of my flights?

·        Great auto-correct on my hard or soft keyboard entry. This is really the only way that allows my big fingers and the lack of tactile feedback to even work with a phone keyboard.

·        Copy-paste: I can’t live w/o it anymore. Also, please include pasting into my phone during calls so I can stop memorizing 9-digit conference call IDs.

·        I’d really love intelligent integration of music, i.e. keep it playing when I switch apps and not just the built-in Zune player, but 3rd party music apps, too (aka Pandora). Also, let me pause, next, previous while my phone is locked or I’m in another app. Finally, make sure to stop music when I get a call and start it back up again when my call is over. I love that.

·        Full (!) calendar support:

o   Sync’ing with Exchange and not Exchange.

o   Recognition of phone numbers and addresses in my calendar appointments with links to dial/get directions.

o   Reply All to an appointment so that I can let folks know I’m running late.

o   Snooze on my meeting reminders (I can’t tell you how many times I’ve forgotten my meeting after the one and only 15 minute reminder).

o   Show my appointments on my home page instead of making me dig into some app.

·        Please provide a responsive UI, even if I haven’t rebooted in a week. Ideally I’d never have to reboot at all.

·        Wireless sync’ing to my PC. My house is bathed in Wi-Fi; why make me connect a wire?

·        Tethering so I can use my phone as a network connection for my PC. I’m paying for unlimited data — let me use it! And ideally make that wireless, too.

·        Turn-by-turn directions! This won’t be ready until I go off course and I hear recalculating” from my phone piped through my car stereo with Pandora playing in the background.

·        There definitely needs to be an app store” for phone apps, but also there needs to be a way to install apps from other sources without hacking my phone. Also, please let me install them on my SD card so I can take advantage of the extra memory.

·        Let me install extra memory!

·        Let me replace the battery! Batteries go bad over time and they need to be replaced on the go.

·        I need a great audio book listening experience (bookmarks!) and a great ebook reading experience (formats!).

·        I’d like some phone-wide search, including the ability to see where the result came from. I never want the email-only Contact from the list of everyone that I’ve ever received an email from — I want the real contact info that I’ve got cached on my phone.

·        Full contact lookup, both personal and corporate (Exchange).

·        Good camera (and flash): the one on my phone is the only one I ever use, as it’s the one I always have with me.

·        Bluetooth and voice dialing for hands free operation (required by state law in both Washington and Oregon, where I spend most of my time). Also, I’d love the same integration with my Jawbone that I have with my iPhone, i.e. volume control and battery indicator.

·        Apps I can’t live without:

o   Evernote: I’m willing to move my data into OneNote so long as I can sync between the web, my phone and my PC.

o   Social networking clients: IM, Twitter, an RSS/ATOM Feed Reader, YouTube and Facebook.

o   Converter for currency, distance, volume, etc.

o   A Compass.

o   A Flashlight. I have used the ambient life from my phone to get myself out of the forest in pitch blackness. Without it, I’m sure I would’ve been hacked to pieces by Jason or Michael Meyers.

o   TripIt, Movies, OpenTable, UrbanSpoon, Mint: I use these all the time.

o   Shazam: Before this app, I used to record snippets of songs and email them to my son would be charge me $.50/ea. to find the title and artist so I could grab them for my phone. Shazam has cut out the middle man and represents ~100% of the music I purchase these days.

o   Skype or some other good way to use my phone to do IP Telephony (or even IP Video Conferencing)

o   Tetris! I guess there are other casual games in the world, but that’s mine.

 

Because the WP7 hasn’t shipped yet, I can pile all of my hopes and dreams on it and, like everyone else not on the WP7 team, I have very little idea of whether my hopes will be fulfilled, but that doesn’t stop me from dreaming. So now it’s your turn — what did I miss? : )

 

P.S. I know that lots of phones have a subset of these features and I’m sure someone will tell me that, with the correct config, I can make their favorite phone do all these things. I know that’s going to happen because whenever I complain about a missing feature in the Visual Studio editor, some emacs guy says, Oh, you can do that with Alt+Shift+Left Elbow in my editor!” I don’t care about what your phone can do. No phone’s UI has stirred me like the WP7s UI. That’s the one I want to use, so that’s the phone I’m going to bang on til my incomplete list is complete.

March 3, 2010 spout

Please don’t run apps in the background on my WP7 phone!

When I was but a wee lad, I learned that when it came to my computer, I was often going to be waiting on something, whether it was the CPU, the IO or the memory. Now that I’m all grown up and spending a great deal of time on handheld mobile devices, I’ve discovered a whole new thing I’m waiting on: charging the battery.

In the bad old days of DOS, I spent a disturbing amount of time working on my autoexec.bat and config.sys files to optimize the loading of drivers and TSRs (DOS programs that run in the background for you whippersnappers). Now, instead of optimizing for memory usage on my PC,  I spend my time optimizing for power consumption on my phone, e.g. turning off 3G and Bluetooth when I don’t need them, turning down the polling frequency on my SMTP mail accounts and spreading power adapters everywhere in my world where I sit for more than 5 minutes. The single most important feature on my phone is that’s it’s on and the way power is managed on my iPhone means that this is often not the case. Sometimes I pine for my Windows Mobile Dash for just that reason; it ran for days instead of hours.

And as bad as this power situation is, it would be even worse if my phone ran more than one app at a time. I don’t worry about random apps from the AppStore using too much memory or crashing; I worry about them eating my battery and killing my iPhone in the middle of a route to somewhere I’ve never been. By not allowing background apps to run, Apple is trying to do the right thing but (although my battery life still sucks). I don’t have personal experience with Google phones, but since they do allow background apps to run, I have to imagine battery life is an even bigger problem.

So, when I see people lobbying for background apps on the new Windows Phone 7 Series, all I can say is, you don’t want it. What you want is for work to go on in the background for you without the cost in power.

Oh, I want to listen to my MP3s or Pandora while I answer my email like everyone else, but I don’t want every financial/IM/email/social/sports app I download sucking down my battery life because it feels itself to be more important than everything else on my phone. I want those apps to notify me when something I care about happens but I don’t want the processing to discover such events to happen on my phone - I want the processing to happen in the cloud.

You may recall my piece about how important storage in the cloud is for moble devices. Let’s let somebody else scale and manage the storage so we can leverage it. In the same way, we want to leverage CPU and power in the cloud, saving local resources for cool graphics, twitch games and streaming my Pink” channel.

Of course, if we’re going to push the processing to the cloud, I’m going to need an efficient and easy way to write my WP7 apps to be notified so I can do the actual processing that needs to happen on the phone. And that all needs to happen while I’m navigating and playing my bad girls party mix.

I’m saving my WP7 phone battery for important things after all.

February 2, 2010 spout

We need cloud apps to use cloud drives

Reading about Windows Azure Drive reminded me of a conversation I had when I was hanging out with my Microsoft brethren last week. We started by talking about how apps target a particular OS and how Microsoft’s bread-and-butter is making sure that apps continue to work forever on Windows so that our customers can upgrade their OS and still get their work done.

We then moved on to wondering whether Apple was gonna do the same thing when it came to letting iPhone/iPod Touch apps run on the new iPad. As it turns out, we heard from the iPad announcement that Apple is doing just that (although in a particularly strange single-tasking way).

From there we moved on to how it’s really not a big deal whether you ditch your current smart phone, e.g. Dash, iPhone, BlackBerry, Droid, etc., for another one because nobody really keeps data on their phones anymore anyway. It’s either synch’d to their PC, e.g. photos, music, etc., or it’s kept in the cloud. In fact, without realizing it, I already have a great deal of info in the cloud:

  • Exchange: email, contacts, appointments
  • TweetDeck: twitter search terms
  • Evernote: random notes
  • Amazon: Kindle books
  • TripIt: trip itineraries
  • Mint: account and budget information
  • Facebook: social contacts
  • LinkedIn: business contacts

Further, I could keep my pictures in Flickr, my documents on Live and I’m sure there are many, many more. This is fabulous, because I can move from platform to platform on my phone and it’s in a vendor’s interest to make sure that each major platform has their app on it and because it’s a smaller, more focused platform, it’s easier for them to do.

The problem here, of course, is that we’ve moved from mobile vendor lock-in to cloud data storage lock-in. What happens when Amazon decides to repossess another book or Mint decides to start charging or Flickr goes out of business? Unlike the physical storage business (you know, little garages where people keep stuff when their relatives die or they’re going through a divorce), the logical storage business doesn’t have any legal responsibility to keep the doors open for 30 days when they go out of business to let me move my stuff somewhere else.

And this has already happened. When GeoCities went out of business, all of those people’s web sites were gone. When live.com decided to clean out my set of RSS feeds, there wasn’t any notification or recourse. I’m sure there are more similar stories and there will be lots more in the future.

And because I know there will be more, I’m worried.

Right now, as we move our apps and storage in the cloud, we have a very different dynamic then apps and storage on the desktop. Because apps on the desktop use storage I own, I can back up that data, import it into other programs and, if I feel like it, write programs against it. It’s my data. The vendor doesn’t ever even see it, let alone gate my access to it.

On the other hand, cloud app vendors ARE gating access to my data; I have to use their apps to get to it. Unless there’s some pressure, you can be damned sure the Flickrs and Mints and Amazons aren’t going to be giving up the data they’ve got a wall around now so that I can take it to a competitor.

Which is why we need control over the storage for cloud apps just as much as we do for desktop apps. I want to go to a vendor I trust, e.g. Amazon, Microsoft, GE, i.e. someone big, someone you know is gonna be around for a while, and purchase cloud storage from them. I want to be able to use it as a HD for my desktop data (like Azure Drive and other products before it), including general-purpose backup, but I also want my cloud apps to store their data there, too. That way, if they start charging or they go out of business or I want to go somewhere else with my data, I can do so.

I expect to pay for this service, of course. That way, the cloud storage folks make money, the cloud apps folks make money for using my cloud storage and I get peace of mind knowing that I’ll always have access to my data, no matter what happens to the cloud app or the cloud app vendor, just like today.

We need cloud apps to use cloud drives. Call your congressman!

December 20, 2009 spout

Stead Defines ‘Customer’

And here’s one more from the paper file I’m putting into electronic format to reduce the pile of papers in my life:

During the all-associate broadcast, Jerre Stead shared with the team a memo another associate had sent about defining a customer. Here are the highlights:

  • Customers are individual companies with unique needs.
  • Customers are struggling with their competitors for success.
  • Customers are people with feelings and opinions, therefore relationships and experiences matter.
  • Customers will judge us by our performance, not by our words.
  • Customers are influenced by every contact with us, each and every day.

Customer Must Not’s”

  • We must not import our products or ideas on customers.
  • We must not ask customers to deal with people who cannot make decisions.
  • We must not make customers wrestle with our bureaucracy.
  • We must not allow any question, issue or awkwardness go unattended or unresolved.
  • We must never unpleasantly surprise our customer.
  • We must never, never take a customer for granted.

Customer Can’s”

  • We can help the customer succeed - make our customers winners.
  • We can provide greater value to our customers than our competitors can.
  • We can measure ourselves from the viewpoint of our customers.
  • We can put decision-making close to our customers.
  • We can continuously improve to better serve our customers.
December 20, 2009 spout

How To Handle Angry Callers in 7 Not-So-Easy Steps

When I was first in technical phone support for the software I was building, I found out that I wasn’t exactly a… um… natural” at putting customers at ease. I used the following information from an AT&T magazine (I was working for a AT&T VAR at the time) in the fall of 1992 to start my education:

  1. Don’t react. Stay calm. When confronted with an irate caller, everyone has the urge to return fire. But don’t fight back. And don’t take it personally, or you’ll become an emotional basket case. Keep relaxed by breathing deeply. And remind yourself that this discussion will not change the destiny of mankind.
  2. Let them vent. Remember, you simply cannot get customers to deal with the logic of a situation until you’ve dealt with their emotions. Trying to attack the problem before people have fully vented their anger or disappointment just won’t work.
  3. Defusing the anger. When a tirade is winding down, try asking - sincerely - Is there anything else?” By this point, they’re usually exhausted and willing to talk. If you hear profanity, try saying: I know the words you’re using right now aren’t directed at me personally.” If the caller replies, Oh yes they are!” you’re no worse off than you were. But generally they’ll apologize, realizing it’s not your fault. At which point, a real dialogue can begin.
  4. What do they want? Once they’ve calmed down, that’s the time to find out what they want: Money back? A defective part replaced? Find out quickly to determine whether you can solve the problem on the spot.
  5. What can they have. Once you’ve figured out what they want, what can you do? This will be set by bounds of your company’s policies - such as warranties or guarantees - as well as any flexibility that management may give you (which should be clearly spelled out).
  6. Customer solutions. Sometimes, the best solution you can deliver is one the customer suggests. And, surprisingly, it can end up being less than what you yourself were willing to offer. Recently, at a major department store, a customer wanted a discounting an imperfect blouse. The cashier was willing to take 35% off the marked price, but first asked the woman what discount she wanted. The answer: 20% off. Of course, some customers will make outrageous demands. In that case, ask them what they’d consider to be a fair solution.” Instead of confronting the customer, this reply opens up the discussion to a more equitable resolution.
  7. Follow up. Don’t make an angry customer even angrier by not doing what you said you’d do. When a promise is made, keep following up internally to be certain that what was promised has been implemented. Even if that means making a minor pest of yourself!

Fred Gleek

November 22, 2009 spout

Do you know someone that needs dinner this Thanksgiving?

The boys and I were driving past a church with a holiday bizarre, so we stopped by. It was a mix of silent auction, bake sale and a $1 raffle for a turkey dinner with all the fixings. I made several comments about how they could skip the formality of the drawing and to make sure they could read my phone number on the back of my raffle ticket, because I was obviously going to win. They laughed.

When they called this morning to let me know that I had won, they told me that they remembered me and I laughed.

Anyway, the Sells Brothers and I have already picked up all we need for our Thanksgiving dinner, so if you know of a family in the Portland metro area without the means for a traditional dinner this holiday season, please let me know. I doubt it’ll be so big that I’ll need a sled to cart it through the streets, but I’m happy to deliver it when it needs to go. You can leave a comment on this post or drop me a line.

Happy holidays, everyone.

October 22, 2009 spout

The New Microsoft Store Looks Cool

And the folks in Scottsdale, AZ lined up overnight to be there when it opened and get their copies of Windows 7 (which goes on sale today and, if I may say so, rocks).
September 15, 2009 spout

The Downside of Transparency

Ever since Chris Anderson built his blogging software and shared it with his colleagues, more and more Microsoft employees has been pushing hard on being as transparent to our customers as we can be. This has been a very much grass roots effort. I remember coming into Microsoft six years ago just when legal was busy giving everyone disclaimers to put on their personal blogs and telling us what we could and could not say. It was always a worry whether the next blog post would get you fired. I got in trouble personally several times, but the brave pioneers before me laid the groundwork for people like me to comment on the internals of Microsoft culture, for Robert Scoble to call Steve Balmer out onto the carpet several times and for Rory Blyth to talk about penises, all on the Microsoft dime. Now blogging is just an accepted way to do things. It’s not even questioned anymore; it’s expected.

And by and large, this transparency is good for reasons that are obvious these days — when our customers see how the sausage is made and have a say in the ingredients, they’re happier eating it with their breakfasts.

As with all good things, however, these is a downside. For example, the product I’ve been working on for 4.5 years has gone through many transformations. This has to do with how new software is designed at Microsoft.

The tag line when we’re hiring folks is always, Don’t you want to change the world?!” Of course, everyone does and that’s good, because people coming in the door want to take big risks and do big things. If you’re trying for the next Office or Windows, that’s the kind of thinking you need. However, what that means is that we have a lot of folks building 1.0 software. We do this in my division with an organizational structure called an incubation.”

My product was in incubation mode for years and we started with zero assumptions. My first day on the job, I was asked to think about synchronization.” What did that mean? What problem was I trying to solve? Does replication count as synchronization? Does data import? I struggled with this for months before I got my head around the process of noodling with a technology enough to understand what problems there were in the space and how that fit with our general idea of what we might want to build into a product.

We tried a huge amount of stuff, often rebuilding shipping technologies to which we had ready source code access just so we could get a feel for how it worked (I personally built multiple data synchronization engines, a WPF-compatible XAML parser, a data binding engine and a set of universal data viewers during that period, all of which were thrown away, as expected).

As we got further along, we started producing things that needed to be published, even if they weren’t a core part of our product anymore (like MEF and some new features in XAML 4.0). Once this started happening, we started to feel like we had a handle on what we were doing to move into startup” mode, where we formed a team to make productization plans. At this point, we started telling folks what we thought we had, including analysts and insider” customers, getting their feedback. Based on this feedback, we re-jiggered the product and the story and did it again. And again.

Eventually, we move out of startup mode to become a real product team with dev, test, PM and UA splits (up til then everyone does everything or, as we liked to say, everyone shovels”). Eventually in this mode, you publish some set of bits that are your best guess at the time of what we think we’re eventually going to ship. In our case, it was the October 2008 “Oslo” SDK CTP, guaranteed only to take up space on your hard drive. At the time, we’d been telling the Oslo” story for more than a year and it had evolved a great deal. Since we published that initial CTP, we’ve published a few more, along with an entire web site filled with articles, videos, specifications, samples, etc.

I mean, we did it big. We were part of the keynote at the 2008 PDC and we had lots of folks on our team that are very visible in the community, including Don Box, Chris Anderson and Doug Purdy. These are the heavy hitters, so when they said something, folks listened.

And we definitely got a lot of community involvement — way more than we expected, in fact. With that involvement, we got a ton of feedback, which is the benefit to us of releasing early and often. We take that feedback and we make changes to our product — sometimes big changes. In this particular case, we were building on all kinds of SQL Server-related technologies, so because of pressure to build the absolute best thing we possibly could for our customers, we actually merged the division that owned Oslo” (and WF, AD, WCF, BizTalk, etc) with the SQL Server division.

Of course, those are the kinds of changes that our customers don’t see. What they see is that things are changing and that they’re not quite sure what our plans are. That’s one big downside:

When you share early information, sometimes it’s half-baked, it often changes and is almost always confusing.

As an example, Jeremy Miller recently had this to say about Oslo” and our communication about it’s purpose in life. Believe it or not, this is helpful feedback and it’s my team’s responsibility to understand what exactly is holding folks up and get it fixed in the way we tell the story and in the product itself.

Another part of my team’s responsibility, of course, is communicating what it is the product does so that folks can understand it and give us feedback. That means that the first people that know how confusing a product is are the folks writing the documentation and tutorials, building the videos and producing the samples. And believe me, we act as customers on the team as well, logging bugs and making complaints and bugging the developers and PMs directly, hoping to fix everything before customers even see it. Of course, we can’t do that all the time (or even most of the time), so often:

We produce materials that tell the story in the very best way we know how with the current set of bits.

Kraig’s recent Oslo” blog post is an example of this. This is an important part of the process, too, actually. We, as Microsoft employees, can complain to the folks producing the software ’til we’re blue in the face, but often real changes aren’t made til real customers complain. As a consequence of this:

We take the slings and arrows of our customers and thank them for taking the time to shoot us.

This one can really hurt, actually. I’m a professional, but I take it personally when I say something that doesn’t resonate with my audience (at a recent conference, I threw away an entire completed slide deck and started over only days before the deadline so I could tell a better story) and the audience takes it personally when I show them something that they don’t understand.

In fact, everyone in marketing, DPE, UA and every part of the team that interacts with customers directly or via the software we’re producing, including the devs and test engineers, all take it personally. We care deeply about building products that delight and empower our customers, which is why we push so hard on transparency from the bottom — the sooner we hear your complaints, no matter how confusing we might be, the better able we are to build something you love.

I’ll tell you though, if we could build something you’d love without giving you an early look, we might want to do that because:

When a customer is confused or disappointed by an early look at a product, they might not want to look at it again for a really long time, if at all.

Early looks are a double-edged sword. We want the early feedback to make our product better, but if you don’t come to look at it again, you’ll never know we made it better.

Still, transparency is absolutely worth the downsides. Keeps those cards and letters comin’! : )

July 10, 2009 spout

PowerBoots makes me want to use PowerShell!

I’ve picked up PowerShell half a dozen times or more. The central premise, that I can pipe streams of objects instead of streams of text between programs, is pure genius. However, in the day-to-day, two things make me put it down again every single time:

  1. The differences between ps and cmd.exe are annoying and unnecessary.
  2. The lack of pushing the boundaries on the text output in a GUI window leaves me wondering what I really gain when I get over the hump of #1.

I understand the need to reboot” the DOS command line and get something scalable and consistent, but ps is a superset of cmd.exe and aliasing could’ve made the transition seamless. However, because little more than dir” works (and dir /s” doesn’t) I’m constantly bumping into barriers just trying to get my work done in the new shell.

And I’d be really ready to learn ps, especially since it’s everywhere now, but what am I really gaining? I never wrote a bunch of shell scripts in cmd.exe and I don’t find myself writing them in ps either, which means that the cool piping objects” thing doesn’t make my life any simpler. What I really really want is for the text window of the ps shell to also be something active, e.g. if I do a dir”, I’d like to be able to click on a file or folder in output of dir and open it or right-click on a file and choose a method on the .NET File object to execute. Even better, I’d like all of that functionality but with a keyboard command interface like the old Norton Commander used to provide. I’ve tried the ps IDEs and GUI shells and haven’t liked any of them.

Anyway, the first thing that’s made me really really want to move to ps is PowerBoots! It’s starting to really deliver on what I had hoped to get out of ps and it feels like Shoes, which I already know I love. Check it out!

July 8, 2009 spout

Dynamic Languages: A Separation of Concerns

I saw Nick Muhonen give a talk on the new language features in C# 4.0 last night at the Portland-Area .NET User Group. He did a good job in spite of the constant questions I asked. He showed one example that I found especially compelling:

object GetConfig() {
  return new {
    WindowSize = new Size() { Width = 100, Height = 200 },
    ConnectionString = "...",
    ...
  };
}

Of course, you wouldn’t hard code settings in your application — you’d load them from somewhere (ideally a database, but that’s another story : ). Anyway, in C# 4.0, I can write code like this:

dynamic config = GetConfig();
mainWindow.Size = config.WindowSize;
...

Notice the use of the dynamic keyword — this means I don’t have to know the type at compile-type — I’ll check for the WindowSize property at run-time ala .NET Reflection, COM IDispatch or VB Option Explicit Off”. Of course, this is the cornerstone of all dynamic languages, e.g. Perl, Python, Ruby, etc. These languages have been gaining in popularity for the last few years and I didn’t understand why. Tim Ewald, my close friend and compadre, kept trying to explain it to me, but I’m just too slow to get it and I didn’t ’til last night watch Nick do his thing. It wasn’t looking at the code that Nick typed that made the point for me, it was looking at what he didn’t type.

When writing dynamic code, there is no requirement to define a type.

That is, when I inevitably add another property or 10 to my app config, I have to write code to use the new properties, but that’s all. I don’t have to write a class and I likely don’t have to update the save/load code either, because it’s also going to be dynamic and just expose whatever data is part of the serialized config. Or, to put it another way:

When writing dynamic code, I only have to write the part I care about.

In the case of dealing with application config, that’s about 2/3rds of the code I no longer have to write. Of course, this isn’t a new idea — Stuart Halloway has been talking about embracing essence (the code you care about) and rejecting ceremony (the code you don’t) for a long time now. It just took Nick’s concrete example for me to understand it.

And not only does this make dynamic code good for reducing the code you type, it always makes it good for the code you’re generating, e.g. COM interop assemblies, database mapping code, XML mapping code, etc. In general, I find that most of the code we have generated for us in the .NET programming environment is code to map to foreign type systems, i.e. COM, databases, XML, web services, etc. With dynamic languages, you can write that code once and just use it. In fact, in C# 4.0, there’s no need to use Primary Interop Assemblies (PIAs) anymore — those can just be mapped to a sub-class of the DynamicObject” type that .NET 4.0 ships to provide that dynamic mapping bridge.

When writing dynamic code, you don’t need generated code layers to map to foreign type systems.

This means I don’t have to do the mapping to databases per query or to XML per XSD — I can just have an implementation of DynamicObject, point it at my configuration and go — no muss, no fuss. Of course, purely dynamic languages have a construct for DO built right in, so it’s even easier.

Around the table after Nick’s talk last night, someone was complaining that with purely dynamic languages, I give up the benefits of the compiler doing static type checking (I think it was Nick : ). I argued that this was a good thing. The compiler is really just one kind of unit testing — it’s testing names. It can’t do any of the other unit testing you need done, however, so you still need unit tests. What that means is that, with static languages, you’ve got some unit tests separate from your code and some baked into the code via types, casts, etc.

When writing dynamic code, you can separate unit tests completely out of your code.

Of course, as software engineers, we already know that separating concerns leads to better, more readable and more maintainable code, which is why we’ve long separated our applications into tiers, separated our view from our data, our interfaces from our implementations, etc. Dynamic languages let us do another complete separation of concerns with regards to unit tests that static languages don’t allow. In a static language, the ceremony is required, thereby obfuscating the essence.

And all of this is great except for one question — how do I get my list of possible code to write when I type .” if I’m using a dynamic language or dynamic features of a static language ala C# 4.0?

When writing dynamic code, I don’t get Intellisense.

My name is Chris Sells and I’m an Intellisense addict. Admitting I have the problem is the first step…

April 17, 2009 spout

Win7 killed a feature I love in Vista!

Win7 killed a feature I love in Vista!

All my friends have updated to Windows 7. My 14-year old son is running Win7. I’m the only one I know that’s not running Windows 7. The reason? Windows 7 took away a feature I use all the time, as shown on the right: Search the Internet.

Here’s what I do all day, every day in Vista: Ctrl+Esc to bring up the Start menu, then I start typing. If I’m searching on my HD, I immediately get matches and I can choose one with just the arrows and the Enter key. If I’m typing in the name of a program in the Start menu, I get those matches and choose one. If I want calc” or notepad” I can just type those and those work.

However, 80% of the time, I want to search the internet, so enter my search term, optionally including attributes like site:”, I press, down-arrow once, highlight Search the Internet” and press Enter. This brings up my default browser with my search results in my default search engine without me having to move the mouse or open the browser and wait for the home page or even decide where I want the search results to come from until after I’ve entered my search phrase.

And they took it out of Windows 7. : (

I logged the bug and heard nothing.

Does anyone know of I 3rd party program I can run that will work exactly like the Vista Start menu under Windows 7? Please?

April 17, 2009 spout

Twitter takes a bite out of blogs

At the last DevCon in 2003, blogging was rampant. We had about 100 posts in the lead up to the conference and during the conference itself.

A this year’s DSL DevCon, there’s a ton of buzz, but almost none of it is in the blogosphere. Instead, it’s all in Twitter.Last I checked, it was more than 150 tweets and we’re still on the first talk of the 2nd day (and day #1 was only a half day).

The worm has turned.

March 15, 2009 spout

Why I Hate My iPhone

Why I Hate My iPhone

I’ve had an iphone for the last coupla weeks and there are some things that drive me crazy about it!

  • The battery life is crazy short. I can’t make it more than 6 hours on a charge. Good lord!
  • Pandora, an app I dearly love, can’t run in the background like the ipod app, so I can’t do SMS, email, check my calendar, etc. while I’m listening. Are you kidding me?
  • There’s no tactile feedback on the keyboard, although the auto-correct is amazing (“let go, let iphone!“).
  • There’s no copy-paste. I’ve never used a smart phone that did, but I soooo want this feature!
  • There’s no free out-of-the-box app for using my iphone as a laptop modem, which is something I really loved about my T-Mobile Dash.
  • I used to be able to use my T-Mobile account to get free wifi at Starbucks. Can I do the same with my AT&T account? I have the unlimited data option.
  • There’s no turn-by-turn directions on the map app and easy re-routing when I go off route. It’s so close; let’s go all the way!

And all of that pales in comparison to the single worst deficiency in the app-suite of the iphone for which I’ve found no good work-arounds; the calendar app is nearly worthless in a business environment:

  • There is no snooze, so I can’t set an alert for 15 minutes and then 5 minutes before, then at the time, etc. In a meeting driven environment like Microsoft, the lack of snooze means that I’m actually missing meetings.
  • There is no way to invite other people to events. Further, if I create an event via Exchange so I can invite someone, I can’t edit it on the iPhone.
  • I can’t do a Reply All to an event to ask a question or let folks know I’m running a little late.
  • There is no detection of phone numbers or addresses in event locations or the body, which means I get no integration with the phone or map apps. This means that I’m memorizing phone numbers and addresses stored in events so I can enter them manually. I have a smart phone so I don’t have to remember this stuff!
  • My appointments don’t show on the home screen, so I have to constantly check the calendar app to see what my day is going to look like.

The calendar app is the single thing that makes me miss my Dash. Someone please tell me there’s a workaround to these issues! I’ll pay!

The reason I list the things I hate about my iphone is because the list of things I love about it would be impossible to enumerate. I had a T-Mobile Dash for years and it went with me everywhere. It was as big a boost in my electronic lifestyle as my first laptop. After having a smart phone for contacts, email, music and surfing the web, I couldn’t go back. Plus, I loved the Dash so much that I’d try a new phone every 6 months or so and then bring it back because it just didn’t compare.

On the other hand, the iPhone replaced my Dash in 24 hours. I’ve been twittering iPhone development related apps. I’ve purchased iphone charing cables for everywhere in my life where I sit for more than 5 minutes. I want to integrate my iphone as closely into my car as possible.

They will pry my iphone out of my cold dead hands.

March 14, 2009 spout

How I learned to Stop Worrying and Love the Twitter

How I learned to Stop Worrying and Love the Twitter

Scott Hanselman performed an intervention on me in the mall the other day. I was in denial and while I can’t say I’m fully into acceptance, I’m at least past anger. : )

It took Scott 90 minutes and I fought him every step of the way, but I think I finally have a handle on what Twitter is. I’ve heard it described as a 24-hour virtual cocktail party,” which always turned me off. I’ll take a lake of fire any day over more than three strangers in a room with which I share no common task and with whom I’m expected to socialize. Making that into a 24-hour thing and including everyone in the world does not make this more attractive to me.

And while that is one valid way to describe Twitter, the more attractive way for me to thing about it is as a single global chat room with conventions and tools to pull out the bits and pieces you want, i.e. the people to which you want to listen, the topics you care about, etc.

Except that’s not right, either.

Instead, it’s more like a poetry reading in a hippy bar where you’re up on stage saying whatever comes into your head and the audience is generally ignoring you (because they’re also on their own stage) except occasionally when they holler yeah man! right on!” back at the stage.

And why is that cool?

Well, I can’t speak for anyone else, but until Scott turned the light on in my head, it wasn’t. Now I check Twitter (via TweetDeck) half a dozen times a day looking for direct messages first, then replies, then new search results (I search on my name, Oslo and DSL right now), then whatever’s on top of my All Friends.” When I find someone that says something interesting about a topic I like, I follow them for a while til I decide they’re saying mostly stuff I’m not interested in and then I unfollow.

The whole thing feels very much like what we used to do in email (“Look! Cute kiddie pictures!“) and then in blogs (“Look! I have a blog!“) before we figured out how to use it and what it was really for. I can’t say I really know what Twitter is for yet, although I’ve been following Scott’s advice, i.e. bigger, permanent stuff goes into blogs, transient stuff to a few people goes into email and transient stuff that goes to the hippy bar audience (i.e. the world) goes into Twitter.

I’m still very much learning and hardly anyone is following me (@csells), but that’s OK. I’m already finding out who’s in the Oslo community and have had lots of useful stuff on personal topics, too, e.g. sharing my iPhone love/hate.

Also, I have to say that I really love the social aspect — I’m working alone at my house a lot and it’s nice to have the world listening to every fool thing that comes into my head. : )

January 4, 2009 spout

Eat Less and Exercise: Before and After

Eat Less and Exercise: Before and After

A few years ago, I looked like the before” picture to the right. I didn’t look like that all the time, thank goodness — this was some couples’ party and I was doing the ballerina dance” challenge — but as you can tell, I was a tad overweight. Specifically, I weighed in excess of 100 pounds more than the top end of my idea weight range, which put me over 300 pounds.

I had been a skinny kid with a fast metabolism growing up. At 6′5″ it takes a lot of food to get to full grown, even when I had only a medium build (I can’t even claim to be big boned”). In college, living in a fraternity served by a cook that believed fully in the benefits of meat and potatoes and having been born in the Midwest with a gravy ladle in my mouth, I got my freshman 15″ in the first semester and kept on going until I was the jolly fellow you see to your right (complete with the belly that shook like a bowl full of jelly).

I tried dieting. A few years ago, I was able to lose 50 pounds on The Geek Diet (it was a freely downloadable PDF file at the time), but gained it all back in a year. The problem was that that diet is fundamentally based on deprivation: you count calories and don’t eat more than a certain amount based on your activity level. This made me hungry and crabby all the time. Then, one Christmas back in Fargo under the influence of my deep-fried meat, brownie, cinnamon roll and fudge pushing grandmother, I snapped. It was like a psychological rubber band, pulling me right back into my old habits. Also, I didn’t exercise, so I’d plateau’d and my metabolism wasn’t equipped to deal with even a few extra calories.

Over the last twelve months, I tried something different and as of a coupla week ago, I look like the guy on the left. I called it eat right and exercise.” It sounds revolutionary, I know, but I’ve lost 60 pounds over the last year and I’ve kept it off (even after the visit to my grandfather over the holidays!) The idea isn’t to diet at all, but to change your habits. I can’t say that I’m expert enough to recommend any of this to you, but here’s what I did:

Stop Eating When You’re Full. This was the hardest one to learn. In college, I learned up to drink and, most importantly, when to notice when it’s time to stop drinking. However, it took me til I was 38 to learn how to tell when I was full. This involves eating slowly and being very ready to leave food on your plate (which I always try to do now).

There’s Always More Later. This is the other key to stopping eating. As much as I might like something and want to finish it, I had to realize that there would always be more of whatever it was later. I learned to feel good about leaving food uneaten, no matter how good it was.

Eat Better Food. If you have to choose between eating 1000 calories of Doritos or of broccoli, I think we all know the right choice to make. The key is, making it. I’ve had to learn to like salad, fruits and vegetables, which I’m still working on. I’m always trying new things to learn to eat things that are better for me.

Don’t Buy Grazing Food. If I’m doing something I don’t like or am bored or reading or watching TV or any number of other things, I can easily eat chocolate or chips or any other manner of things that are bad for me, even if I’m not hungry. I have a hard time saying no” to an unhealthy snack when I’m watching a movie, for example, so I don’t buy them. Instead. I buy apples and applesauce and melons and other things that are good for me so that if I have to snack, there are only good things available.

Eat Lots of Meals. This one is counter-intuitive, but I find I do better if I eat a small amount every few hours than larger meals three times a day. In general, if I’m hungry, I eat and if I’m full, I stop. It’s really just that easy.

Don’t Deprive Yourself. If you want a piece of chocolate or a chip or whatever it is that you crave, then have it. Life is short and there is a variety of wonderful things to enjoy. Don’t gorge yourself — everything in motivation — but don’t make yourself crazy, either. I find it makes me feel good to eat a piece or two of my grandmother’s famous fudge and it feels equally good to stop eating it.

Exercise Regularly. This is one of my major failings with The Geek Diet. I was depriving myself of calories, but I wasn’t boosting my metabolism, so my body was just adapting to fewer and fewer calories. These days, I try to swim 2 miles/week and that seems to keep me at my fighting weight.

Mix It Up. I find I’m happiest eating a bunch of small portions than one or two large portions at a meal. I like variety, so I like a little bit of a few things. Also, to make sure that my body doesn’t get used to my level of exercise (it’s getting easier and easier to swim for distance), I try a variety of exercises. For example, I just did a 90 minute hot yoga class the other day (I thought I was gonna die) and I regularly do sprints in the pool, going as fast as I can. The latter’s useful because it always sucks, no matter how fit I get, so it’s almost more than I can handle.

Commit. The key to making anything happen is to decide it’s going to happen and then route around obstacles until it does. The days I swim without resting or swim a mile when I normally go half are the days I decide to do so. The key to weight loss or any other accomplishment is first to commit.

Don’t Beat Yourself Up. Didn’t do as much exercise as you wanted this week? Had a few too many Twinkies? So what. You’re human. Let it go. Don’t give up. Do better today.

The whole point of all this is that it’s not about a temporary diet, but about changing my habits permanently. I still have 40 pounds I’d like to lose, but I don’t obsess about it. In fact, I haven’t weighed myself in months. And even if I never do lose those pounds, I’m down from a 44 waist on my pants to a 38. If I do nothing but stay there, I’ll be happy as hell with myself.

I love that most of these tips are just like Scott’s newsflash — gives me some validation. Do you have tips to contribute? Tell me about them.

November 12, 2008 spout

tvrss.net + uTorrent + FiOS + WHS + 360 = DVR Bliss

So, the other day, Windows XP SP2 destroyed my Windows Media Center Edition install that I’ve been using for years and absolutely loved. It let me record all my favorite shows on two separate tuners and I could watch them on the TV attached to my MCE box, from all the PCs in my house and from my XBOX 360. Losing it was a huge blow, especially since it was clear I’d need to repave and I was swamped with PDC and post-PDC work (damn those MSDN Magazine deadlines!).

A little research revealed the following facts:

  • tvrss.net provides RSS feeds of every TV show I’ve ever heard of, whether it’s on normal TV, cable or a premium channel like HBO and Showtime. The shows are available in HD with the commercials pre-edited out, so I wouldn’t even have to do the 30-second fast-forward, 5-second rewind dance that MCE enables to skip them.
  • uTorrent provides automatic downloads from RSS feeds, including fancy features like only downloading each new episode once, even if it’s provided from multiple sources.
  • My Verison FiOS pipe provides 20MBps downloads, so a 22 minute TV program (30 minutes - 8 minutes of commercials) even at HD would only take about 20 minutes to download, on average.
  • My $500 Windows Home Server machine has 1.4TB of storage, so your average 22-minute sitcom, at 180MB, is only a tiny fraction of the storage. Put another way, I could store about 4000 hours of TV.
  • My XBOX 360 supports the same format (XVID) that TV shows available from tvrss.net seem to be provided in. Further, my 360 has direct support from playing videos from shares on my home network (which is wired for 1GB Ethernet, but only run by a 100MB Ethernet router right now).
  • The XVID codec is available, along with a ton of other useful codecs, from free-codecs.com (I’m partial to the K-Lite Codec Pack myself), which means that any videos that I download in XVID format can be played back on any PC in my house. Those PCs running Vista Ultimate that have a Media Center remote control on them can surf to videos on the network and pick them with an experience just like that of my XBOX 360.
  • It’s my understanding that the XBOX 360 menuing system will be updated this month to support Netflix streaming, so for the minimum subscription fee (1 DVD at a time, $8/month), I’ll be able to get live, streaming movies directly from my XBOX 360 and all my PCs for the movies I don’t yet own.

All of this means is that if I were to schedule episodes of say, Burn Notice, to be recorded by uTorrent and dropped into the Videos\TV\Burn Notice folder of my WHS box, I’d be able to access those and play them back on my XBOX 360 even more simply then I could access video from my MCE box, because I don’t have to start up the Media Center software first — access to shared folders is built right into the XBOX 360 menuing system. And I could have all of this in HD (no CableCard required) without commercials and without regard for how many tuners I have. This is all free and, if I don’t want to watch live TV (the Superbowl was the last time I did), then I don’t even need to spend $55/month on cable.

Plus, when combined with my photos, music and ripped DVDs, all of which are also stored on my WHS box, and streaming movies I don’t yet own, I could access all of my digital media from my XBOX 360 (attached to my 46″ LCD panel) and from all of my PCs simply and quickly.

Of course, I would never record my favorite TV programs like this, because it’s very much a copyright violation and therefore highly illegal.

But if I did, wow, it would rock…

Why do I need cable again?

September 30, 2008 spout

MS + jQuery: This Is Huge!

Yesterday, the ASP.NET team announced that they were going to ship jQuery, a small, populate open source web client library. And not only is Microsoft going to ship this library, as is, but we’re going to build support into Visual Studio for it, build future versions of our web components assuming it and support it via PSS like any other Microsoft product.

This is huge.

Of course, is it useful for developers using Microsoft tools, because they get another supported library out of the box for them to use to build their applications. But that’s not what makes it huge.

What makes it huge is that, instead of seeing the functionality in jQuery and thinking to themselves, Wow. jQuery is really great. Let’s build something from scratch like that into our products,” the ASP.NET team, in what is the first time in Microsoft history afaik, decided to reuse something from the world that was already working, adding only the thing we do better than anyone else: integration into a suite of libraries and tools.

But isn’t this just embrace and extend?’” I hear you asking. Isn’t Microsoft just going to absorb jQuery, thereby killing it for folks not using Microsoft products?”

There are two ways forward at this point. One, we could push on jQuery in a Microsoft-centric way until the project owners” (which is a slippery concept with an OSS project anyway), decide to either give up and let Microsoft own” it or they decide to fork jQuery, thereby creating jQuery-classic and jQuery-MS. This would not be good for the jQuery community.

The other way to go, and this is the way I hope it goes, is that Microsoft learns to play nicely in this world, submitting features, changes and bug fixes to the jQuery source tree in a way that’s consistent with the vision from which jQuery sprang, making it work better for Microsoft customers and non-Microsoft customers alike.

If we can learn to do that second thing, then we’ve turned a corner at Microsoft. I’m keeping my fingers crossed.

September 5, 2008 spout

I don’t pretend to understand advertising

I’ve always liked the Mac vs. PC ads. They’re clever, they make me laugh and I like both actors (Accepted is very under rated, IMO). Of course, I actually prefer my PC running Windows to a Macintosh (I had a Mac IIcx back in the day), I prefer Vista to XP and I’m a Microsoft employee, so I don’t have any trouble seeing the exaggeration, but there’s always a kernel of truth, which is what makes them funny. The part that kinda annoys me is that Apple seems to be claiming they have no such problems, which is, of course, not true.

The Mac vs. PC ads I understand: they’re meant to put down the PC by having the PC guy look like an idiot, leaving the Mac guy to seem non-threatening and therefore better by comparison.

On the other hand, I can’t say I understand the latest Windows ad with Jerry and Bill. I did enjoy it, however. Not only did Bill seem much friendlier and more approachable than I’ve ever seen him, but the image of someone in the shower with their shoes and socks on made me laugh, as did the image of Bill wiggling his butt in a Deep Throat sorta way.

And the commercials are having an effect: they’re being talked about and folks are interested in the next one. How often do you hear about folks looking forward to a commercial? That in and of itself is an achievement.

September 4, 2008 spout writing

Programming WPF goes into 3rd printing

August 27, 2008 spout

Where did my old Word command go in new Word?

I’ve been using Word for a long time and my fingers knew where the commands were that I used even though my brain didn’t. Most of the those commands I’ve mapped to the new Ribbon-enabled Word without a problem, but sometimes I still search. For those times, the Office guys have put up a cool tool that shows me where the new version of each command is located in the new Word. Enjoy.
August 14, 2008 spout

Digigirlz Rock!

I gave a talk to the Digigirlz yesterday and it was a blast. It was 25 high school girls that were on the Microsoft campus all week learning various technologies to promote women in IT. The girls are nominated by their teachers for aptitude and attitude and these girls had both in spades.

Vijaye Raji and I were giving the talk, me primarily the pretty front man while he drove the slides, typed the code and made sure I didn’t get things very wrong (he knew the environment and the language far better than I). We were teaching general programming basics using a variant of BASIC that was especially well suited to new programmers. We spent two hours showing them how to do turtle graphics and how to write a game (Pong) all from scratch and we all had a blast doing it.

And these girls were sharp! I’m used to pacing material for rooms of adult software engineers, but I didn’t have enough. I had to take feature requests from the audience and figure out how to implement them on the fly while they followed along, programming their own versions of the game as we went. They were hands on the whole time and eventually I enlisted their help to tell us what code to write. Mind you, this was a language they’d only learned minutes before, but they didn’t have any trouble at all.

They laughed and asked questions and answered my questions and were engaged the whole time (well, most of them — some were seduced by the siren song of the high speed internet connection : ). I figured I was doing OK when one of the girls asked me if I ever thought about being a teacher.

Naw,” I said. I hate kids…”

They didn’t buy it… : )

June 23, 2008 spout

George Carlin, Rest In Peace

When I was a teenager, some kids were sneaking out to get drunk or have sex. I was sneaking into my parents’ record collection to listen to George Carlin. Unfortunately, unleashing my version of his brand of humor on my peers was one of the things that kept me from being invited for parties or sex, but I still dearly loved the man and was very sorry to hear that he passed away yesterday.

Certain situations still trigger George Carlin responses whether I want them to or not; he is permanently lodged in my brain. And of all the things he’s done, his incomplete list of impolite words is stuck in there furthest (*not* safe for work!).

I’ll miss you, George. Give whatever all-powerful being you run into in the next life a piece of your mind about the state they’ve left us in here on Earth.

Update: a very NSFW GC highlight video series.

June 13, 2008 spout

Losing weight the old fashioned way: tonsilectomy

Today is my last day of time off work from a tonsillectomy a week ago Thursday. I’m down to about 20mg of OxyContin/day (from 60mg) and hope to have that down to nothing by Monday (although I still have half a jug for my next party : ).

Why would a grown man fresh off two SDRs and a BillG review feel the need to have his tonsils pulled? Well, I’ve been trying to talk someone into taking them for a coupla years now, even since the recurring strep throat started, but no luck. This time it was because I wasn’t sleeping properly.

A few months ago at a routine checkup, my doctor was working her way down a standard questionnaire, asking me if I had this problem or that problem. I’d been swimming a lot and had lost a few pounds recently, so mostly I didn’t have any health problems. Until she got to sleep:

Are you having any trouble sleep?”

Well, I’ve been waking up about 4am every morning, no matter when I go to bed.”

Any stress?”

I work at Microsoft,” I said, figuring that was answer enough.

She laughed. I mean anything out of the ordinary?”

I couldn’t think of anything that would explain it, so I said so.

Have you ever had a sleep study?”

Well, one time I recorded a chapter of my social studies text book and listened to it all night while I slept. I got an A on that test.”

Now she was just tired of my lip, so she explained what she meant. And then she signed me up. And I went. And it sucked. Imagine trying to get sleep while tied up (and not in a good way!).

The diagnosis of my sleep study was severe sleep apnea,” as defined by more than 10 episodes an hour when I stop breathing and more than 10% decrease in oxygen to my brain. I was at 31 and 17% respectively, the sleep tech told me as they strapped me in for sleep study #2, this time with a C-PAP machine. Now imagine sleeping while being tied up and gagged.

Apparently the gag improved my sleep enough that it cured” my sleep apnea so, without benefit of advice from an actual sleep doctor yet, I was set up with my own C-PAP machine, where I could gag myself every night before going to sleep. And not just gag myself, but strap on a hockey mask while someone blows into your mouth all night long. And now try to sleep while this is happening. My father got one and complained bitterly about it for a full year til he got used to it.

So, being even more stubborn than my father (which, if you knew my father, is stubborn on a Biblical scale), I asked for a second opinion. Or at least a first opinion from an actual sleep doctor (and not just a tech).

And I got one. There are other treatments besides C-PAP machines for sleep apnea, among them tonsillectomy (can work depending on the patient), some kind of dental appliance (generally not very successful) and, I kid you not, learning to play the digeridoo. This last one had me particularly interested as I’ve always wanted to do that anyway. (Come on! Breathing in and out at the same time and making weird noises! It’s like sex without the mess!)

Well, let’s see if a tonsillectomy would help you,” the doctor said, leaning in for a look down my throat. He shined his little light in and then started backward as if scared. Oh, yeah… You’ll want to have those looked at,” he said, his eyes all big.

What?” I asked, a little worried.

Those are within the range where should talk to an ear-nose-throat doctor about having them removed,” he said, hastily writing out a recommendation and stealing a look at my throat out of the corner of his eye as he did so.

And so I went to the ENT doctor, a young’un one step up from Doogie Howser (or maybe just having celebrated my 39th birthday, everyone is starting to look really young to me…). He explained how things worked inside the mouth and throat. He looked at my nose. He looked in my ears. He understood my dislike of the C-PAP machine. He described the four-point scale they used for measuring tonsils, asked me to open wide and, like the other doctor, started backward after a 500ms look.

Those are huge!” Doogie said.

Really?”

Yeah!” I swear his pupils were dilated in some kind of fight or flight response.

So, on the four-point scale?”

4+. Huge!” he said. Most people have a bunch of space around their tonsils to let he air in. How are you able to breath at all?”

OK, doc. What do you think we should do?”

We should take em out! Here’s how it’s going to work…” and he started describing the surgery, which was to include removing my tonsils, shaving back my uvula and fixing my deviated septum.

Will I ever be able to sing?”

Sure,” he said. That shouldn’t be a problem.”

Great. I’ve always wanted to be able to sing!”

He laughed. Well, no promises there.” And then he started to describe the complications. Up until then, I was fine with him talking about permanent non-trivial surgery to correct a problem that I could be using an external (infernal!) machine to correct otherwise. But when he started talking about uncontrolled bleeding” and rushing to the emergency room as [my] stomach filled with blood,” well, that was a bit much after no breakfast that morning.

Are you OK?” he said, a concerned look on his face. You’ve gone all white.”

Ah, no, actually, I’m not. I’m feeling a bit faint…”

So Doogie had me put my head between my knees and breath deeply. And when that didn’t work, he popped some smelling salts under my nose. That hurts! But that didn’t work either.

Huh. That normally works,” he said, dumbfounded at the giant man getting ready to pass out in his office. Nurse! Bring me some juice!”

After recovering from the mere idea of uncontrolled bleeding down the back of my throat (which still makes me a little queasy just typing it), he said, Well, let’s not talk about that any more. You’ll come in and I’ll take care of it, OK?”

That sounded good to me, so I scheduled the surgery for 6/5, a week after the BillG and a few days after my birthday (my own gift to myself : ).

So, I had a few weeks to shutdown my work because the doctor said that I would be out for at least” two weeks recovering. And you’ll be on heavy medications, too. Kids bounce back in a day or two, but this is *very* painful surgery for adults.”

Great. Never had any surgery other than my wisdom teeth and now I get a doozy.

I started informing those around me of my impending doom. And then the advice started.

The first week was really easy. It’s the *second* week that’s hard.”

My throat hurt so much that I just didn’t eat for two weeks. I lost 30 pounds!”

Those drugs will lower your IQ by like 30 points.”

I wonder if your voice will change? Mine did.”

I had a tonsillectomy as an adult and I still can’t say my Ls properly.”

As a professionally speaker, I didn’t mind the idea of my voice changing a little (hopefully deeper), but losing my Ls? Good lord!

I was not to eat or drink starting midnight the night before my surgery, so I didn’t. Normally the sleep deprivation has acted as an appetite suppressant, so that and the exercise has caused me to lose 43 pounds in the last 6 months. Missing a few coupla meals hasn’t been an issue, but by 3pm the next morning, sitting on the hospital bed in a hospital gown, my ass hanging out while every nurse and doctor in the place asked me if I’d avoided food and water of any kind and I started to get damn hungry, hoping for the surgery just to have something else to do (although Melissa let me win a few hands of gin, which was nice).

Then the nice anesthesiologist came and slipped me a little something. I felt completely normal for about 10 minutes and then I woke up in the recovery room, the nurses asking me if I could help them move from the gurney to the bed. Seriously. That was my entire surgical experience. Melissa was there, making sure my stuff came with me and asking if I was OK.

Oh, and I was feeling no pain. I don’t remember much from those first few hours. I could talk, which apparently was very unusual. I could walk. I remember my sister-in-law bringing my boys by for a visit and them waking me up every five minutes so I didn’t spill my juice all over myself. I remember several pretty nurses waking me up every hour or so to adjust this sensor or give me that medication. I don’t remember what I said to them, but I do remember making them laugh, which made the increasing pain of my throat more bearable.

We figured out my pain dosage that first night, 10mg of OxyContin every 4 hours mixed with intravenous morphine to take the edge off. I was disappointed that I didn’t get any kind of high,” though. I just felt fuzzy headed and sleepy. Is that what Rush liked? I don’t get it. I tell you though that the tennis elbow I’d given myself with the free weights in my garage was *completely* cured.

In that first 12 hours, it was my job to be able to walk, go to the bathroom on my own and manage my own pain via oral medications. And I did so. In fact, I was recovering so quickly, the doctor came by and gave me permission to go home hours early. I’d told him the night before that, if my voice had to change, could he push it toward Barry White? Oh, and I’d like to be able to say all my letters if possible. That morning, he asked, Have you tried it? Can you still say your Ls?”

And then, because I couldn’t not, I channeled A Christmas Story for demonstration purposes: Fa ra ra ra ra ra ra ra ra!” willing to endure the pain in my throat for the cheap laugh. And I got it. : )

I came home a week ago Friday and have been largely ignoring my work, sleeping most of the time, getting up mainly for drugs every four hours and a little food (Top Ramen, Popsicles and water). The combo put me to sleep within an hour, giving me just time enough to send the random pathetic email or IM before collapsing again. Gradually I’ve been cutting back on pain meds and eating more, my throat just a minor annoyance at this point. It still hurts and my voice is still scratchy, but a quick chug of OC and I’m back in the game, mostly awake during the day and asleep at night.

I went in for my week check-in with the ENT guy yesterday. He was delighted to tell me about micro-pustules and puss inflammation that had riddled my tonsils. Not only where they huge,” but apparently my body’s been fighting them off as a low level infection for who knows how long. While telling me this, the doctor put a bib around me and handed me a tray to hold as I looked at him questioningly.

Oh, I don’t think you’re going to throw up,” he said, rummaging for some instruments in a drawer. I just need you to hold the splints when I take them out.”

As part of fixing my deviated septum, Doogie had put splits in my nose so that things would heal open. At the mention of splint,” I thought of a little stick to hold my nostril open like the pole in the center of a tent. I thought he’d reach in, cut it in two and pull out a couple of tiny toothpicks. Well, he reached in, stretched my nostril to uncomfortable proportions, clipped the thread holding the split in and started pulling.

Have you seen the scene from Total Recall where Arnold reaches up into his nose and pulls out that giant tracking device? Yeah. Think that except the split was longer. The doctor kept pulling and it kept coming out until it fell with a thump into the tray.

That was in my nose?!”

Yep. And there’s another one on the other side,” he said, reaching for the other side.

There is?!”

Yeah. Didn’t I tell you? Oh, I guess you were asleep when I put them in,” he said, pulling another canoe out of my other nostril.

Oh my god!” I said, looking down at the snot covered railroad ties in the tray I was holding.

Are you OK? You look a little pale. OK, head back…” He was much more comfortable getting the color back into my face the second time, having practiced on me before.

Nurse! Cold compresses!”

May 18, 2008 spout

The Next Generation

When I was in high school, game programmer” meant at best BASIC or at worst 6502 assembly language, but either way, lots of text manipulation. These days, high school-age programmers are going to camps and programming competitions having spent their time in drag-n-drop programming environments like Game Maker. They’ve been doing work flow for 7 versions already!

Yesterday, I was a judge and the keynote speaker at a high school game programming contest. After asking a bunch of the 25 teams questions about their games, I was asked to speak about careers in software to 100 high school computer geeks. My people!

I started by introducing my youngest son as the slide monkey” to warm applause and them myself as a Microsoft employee to… silence. So, I said: How many of you think that Microsoft is…” and then I put my face down to the podium microphone and said in a voice from God, EVIL?”. Half of them raised their hands, all of them laughed and I had them engaged for the next 20 minutes.
 
Instead of listing various careers and their duties, I had dug through literally 13 years worth of bad Internet humor (641 emails) that I’d saved over the years and used all the silly, stupid, funny pictures to illustrate the various careers, like an x-ray of Homer’s tiny brain (Architect), a picture of some hand puppets chasing a kitten (Legal), street signs that said left turn” and keep right” at the same time (User Assistance), etc. A couple pictures I had to clean up, like that one that said Every time you masturbate, God kills a kitten,” but even so, the pictures worked: they were listening to me.
 
While I had their attention, I told them two things. First, I told them that Microsoft was hiring. : )  Second, and most importantly, I told them not to worry about the money, but to pick a job that’s going to get them excited every day. Pick the job that’s the most *fun*. And when that one isn’t fun anymore, pick another one! I tried to put every ounce of sincerity I had into it, because I believe it. I love my work, I love who I work with and I think everyone should have that. I know it’s silly, but if I could inspire just one person to reject some high paying job that’s going to make them miserable in favor of a starvation-wages job that they’ll love, then I’m happy.
 
And to illustrate the downside of picking the wrong job, I closed my talk showing a little boy balling his eyes out (although in his case, it was because of Santa’s tombstone behind him : )
 
What a good way to spend the day. Highly recommended.
April 30, 2008 spout

Why I Love My Tribe and Want You To Join It!

Recently, I went to lunch with some friends of mine from the DevelopMentor Software days (wow, *that* was a long time ago) and they accused me of radio silence” for the last two years.

What?” I said. I blog all the time!”

Oh yeah? What have you been working on again?”

Uhhh…”

I’ve mentioned my work on this blog in passing as model-driven” this or data-driven” that, but never the details. And I still can’t tell you those kinds of details.

But what I can tell you is how I spend my days, because they are *glorious* days.

Have you ever had one of those jobs where you’re energized about coming to work every single day, because whatever you’re doing, it *really* needs doing and it’s going to be different than yesterday?

You might be pushing to finish writing a talk for an upcoming SDR (Software Design Review) or getting that last bit of code checked in before a big internal drop, digging into security threat modeling for the first time or complaining that the thing your team is building is too damn hard to use, only to be told, fine, then, fix it!”

You could be holding the hand of a new Jr. PM just joining the team or busting the balls of some Sr. Architect that thinks he’s all that and a box of Cracker Jacks, interviewing the next set of folks that are dying to be on your team and turning some away because as much work as you have to do, it’s better to leave it undone than to lower the bar even an inch on the quality standards you’re committed to living up to.

You could be building your own sub-system that we already have 8 of inside the company, but you need some source code you understand and that you can experiment with so that you can add the one or two features you think could really make a difference, only to find out you’ve just built the thing that your management wants to base the next-gen version of that very sub-system on.

You might be meeting your boss in the ProClub locker room when you’re half naked or soaking in the hot tub laughing about some trick you pulled in a meeting, listing the customers that need special attention or cornering an executive in the elevator asking for a really cool thing we have to do for the PDC, damn the cost.

You’re definitely going to be going into work with the smartest, nicest, most fun, more interesting, most sincerely quality-focused people you’ve ever known. After Don had first come to Microsoft for a while, he told me that he’d found his tribe.” I’d been at DevelopMentor during it’s heyday, so I couldn’t imagine ever finding another group of people I enjoy working with that much. I was wrong. My tribe (of which Don is one of the chiefs) gets so much accomplished because we lean on each other, we trust each other and we spend *so* much time laughing with each other (and *at* each other : ).

Most of you will be able to see the thing I’ve been working on with my tribe at the PDC. Or, if you’d like to help us build it, we’re always looking for new tribe members.

March 22, 2008 spout writing

Nobody Knows Shoes: The Book — Pure Genius!

I friend of mine dropped a book with a funny cover in my lap and said, Hey, check this out.” I threw it on my pile and didn’t get back to it for a few days. When I did, I didn’t know what to make of it. It was like The Grapes of Wrath by Rory Blyth, with illustrations by a drunk Salvador Dali.

It took a few pages, but I eventually figured out that Shoes” was a cross-platform GUI framework for Ruby and this 52-page book was a tutorial for it. By page 15, I knew the major concepts. By page 20, I could write my first program. By the end, 30 minutes after I’d started reading, I knew the whole thing.

But it was page 24 that completely blew me away. The use of pictures of dominoes and matches to illustrate layout in stacks and flows was genius. This wasn’t just a random collection of wacky illustrations and  non-traditional font choices — the author of this book really knew how to tell a story.

It wasn’t that I wanted to program Shoes, so went looking for a tutorial. It was the tutorial that made me want to program Shoes. Now *that’s* writing.

P.S. This book is not from a publisher — it’s self-published through LuLu.com for cost. There is no bar code, copyright page, Table of Contents or index. It’s just the stuff you actually need to get started programming a completely new thing. And, if you don’t want to shell out the $8.72 to read a paper copy, you can read the HTML and PDF versions instead.

March 3, 2008 spout writing

Programming WPF: “Programming Book of the Decade”

February 21, 2008 spout writing

Programming WPF enters 2nd printing!

Wahoo! You love us, you really love us! : )

When a book goes to another printing, 100% of the time, there’s a list of errata” (aka mistakes”) that are fixed in the new printing. In this case, neither Ian nor I have any fixes to apply. So, it’s official — the book is perfect! : )

Thanks for reading.

February 20, 2008 spout writing

Bridging object models: the faux-object idiom

My 1997 master’s thesis came online today (he says, trying not to flinch). Here’s the abstract:

Microsoft’s Component Object Model (COM) is the dominant object model for the Microsoft Windows family of operating systems. COM encourages each object to support several views of itself, i.e. interfaces. Each interface represents a collection of logically related functions. A COM object is not allowed to expose multiple interfaces using multiple inheritance, however, as some languages do not support it and those that do are not guaranteed to do so in a binary-compatible way. Instead, an object exposes interfaces via a function called QueryInterface(). An object implements QueryInterface() to allow a client to ask what other interfaces the object supports at run-time.

This run-time type discovery scheme has three important characteristics. One, it allows an object to add additional functionality at a later date without disturbing functionality expected by an existing client. Two, it provides for language-independent polymorphism. Any object that supports a required interface can be used in a context that expects that interface. Three, it provides an opportunity for the client to degrade gracefully should an object not support requested functionality. For example, the client may request an alternate interface, ask for guidance from the user or simply continue without the requested functionality.

COM attempts to provide its services in as efficient a means as possible. For example, when an object server shares the same address space as its client, the client calls the functions of the object directly with no third-party intervention and no more overhead than calling a virtual function in C+ +. However, when using COM with some programming languages, this efficiency has a price: language integration. COM does not integrate well with a close-to-the-metal language like C+ +. In many ways COM was designed to look and act just like C + + , but C + + provides its own model of polymorphism, object lifetime control, object identity and type discovery. Of course: since C+ + is not language-independent or location transparent. it was designed differently. Because of these contrasting design goals, a C+ + programmer using COM often has a hard time reconciling the differences between the two object models.

To bridge the two object models, I have developed an abstraction for this purpose that I call a faux-object class. In this thesis, I illustrate the use of a specific instance of the faux-object idiom to provide an object model bridge for COM that more closely integrates with C+ +. By bundling several required interfaces together on the client side, a faux-object class provides the union of the operations of those interfaces, just as if we were allowed to use multiple inheritance in COM. By managing the lifetime of the COM object in the faux-object’s constructor and destructor, it maps the lifetime control scheme of C+ + onto COM. And by using C+ + inline functions, a faux-object can provide most of these advantages with little or no additional run-time or memory overhead.

COM provides a standard Interface Definition Language (IDL) to unambiguously describe COM interfaces. Because IDL is such a rich description language, and because faux-object classes are well defined, I was able to build a tool to automate the generation of faux-object classes for the purpose of bridging the object models of COM and C+ +. This tool was used to generate several faux-object classes to test the usefulness of the faux-object idiom.

Enjoy.

January 17, 2008 spout writing

Bookscan says “Programming WPF” is #3 .NET book!

January 8, 2008 spout writing

WPF Book Easter Egg

Does anyone have both the Anderson WPF book and the Griffiths/Sells WPF book? If so, have you read Don’s forewords in both books?
January 6, 2008 spout writing

The Annotated Turing!

I just saw that Mr. Petzold is re-publishing the paper that started computer science and annotating it so that even I can understand it. I can’t wait!
January 5, 2008 spout

Time for some anti-social networking

OK, just after all my friends are on FaceBook, now I’m getting the requests to join Spock.com. I don’t know what Spock.com is, but after the address-book thingie, MySpace, the high school alumni thingie, Friendster (?), the Google ork-something, the business thingie and most recently FaceBook, I’m all done. All I ever do on these sites is approve friends requests! Isn’t there supposed to be some value to it other than that?

Oh, sure, I’ve had a few messages from people I haven’t heard from in a while, but email works for that. In fact, email works for a helluva lot of the internet apps I see today. Plus, most of them just forward web form results to my email anyway! Why do I need a whole other thing when I’ve already got all my friends listed in my address book?

I declare the social network backlash officially started!

From now on, I’m going to be doing some anti-social networking around the ol’ Casa de’ Sells. If you want me, you know my email addresses, how to post comments on my blog and my phone number. That should be enough.

*cough* When I was a boy, we didn’t have these fancy social networks. *cough* *cough* We had email and we were happy to have it!”

Yes, Grandpa. Shhhh….”

January 4, 2008 spout writing

“So easy to read, it should be illegal”

Thanks very much ET on the Canadian Amazon. I can think of no higher compliment. : )
January 3, 2008 spout

WHS Continues to Rock My World

In the same way that .NET manages memory for you, Windows Home Server manages storage. All you have to do is tell it the names of shared folders you want it to have and which computers to back up and it will spread it and duplicate it across however many HDDs you have, without you worrying about which actual HDD your Music” folder is on or where your wife’s computer is being backed up to.

Plus, if you have more than one HDD and you have Enable Folder Duplication” enabled for a shared folder, the data in that folder will be shared across multiple HDDs, effectively giving you the benefits of RAID without the config muss and fuss. (It’s my understanding that this cross-HDD data duplication happens automatically for backed up data, but I don’t know how to confirm that empirically without risking the data.  : )

Because a 750GB SATA HDD was $156 at newegg.com, it was a no-brainer to pick one up. It arrived today and it was mean-time of 10 minutes between tearing the tape off the box and the new HDD being used for data storage on my WHS. I didn’t even have to turn off the HP MediaServer machine!

All I did was pull an empty drawer forward, place the new HDD into it and push the drawer closed. Seating the drawer also seated both the data and power connections on the HDD itself, no wires or plastic connectors needed. I want all HDDs to work this way!

10 seconds later, the little light went on that said my new HDD was ready to be added as storage to my WHS, which only took right-clicking in the WHS console (already updated to display the new HDD) and adding it as storage. Another 10 seconds and some additional settings changes to enable folder duplication on my shared folders and the new HDD is in active service, providing redundant storage for all the data I care about in the house.

Really, the only problem I have now is that I only have enough data to fill 14% of the 1.4TB of new storage space. Maybe we need a Windows Friends & Family Server and I could rent out the extra space? : )

December 27, 2007 spout

Christmas Delight

Not all was gloom and blackness this XMas. Among the new things in our lives, several of them rocked*:

  • Our new HP MediaServer running Windows Home Server is awesome. As a Microsoft employee, I got a killer deal on this server appliance, but knowing what I now know, I’d have paid full price — a whopping $550. In fact, I recently sunk another $200 into it for a memory upgrade and a 750GB HD, bringing it up to 1.25TB.

    WHS keeps all the computers in my house automatically backed up, keeps shared folders duplicated across multiple HDs which can be added via the slide-out drawers in the front of the unit (no muss, no fuss) and serves it all up over the web securely. Plus, it’s platform for add-ins, so, for example, if I want offsite storage of everything on the WHS box in case of catastrophe, I can get KeepValue for a flat $100 year.

  • My youngest’s new Zune 2 is the best MP3 player I’ve ever touched. We got the 4GB version, which is tiny, but still comes with amazing video playback, an FM radio and very intuitive controls. (I know I’m unusual in this regard, but when I first touched the iPod, I had no idea how to make it work and the manual didn’t help.)

    The client software is also a joy to use. The look and feel is unique and simple. Both the client and Zune UIs make me hope that those guys actually are building a phone. I want it.

    Plus, we got a pair of the Altec-Lansing Zune speaker dock from woot.com for $40 and they sound great, worked instantly and come with the cutest remote control. Very nice package.

  • I can’t wait to put my new portable Bosch 10″ Table Saw with Gravity Rise Stand to use (thanks, Babe!). I’ve been remodeling my homes for years, doing as much of it myself as I have time for, but was missing a saw to do straight rips. I’m all set now!

  • My brother-in-law got Rock Band for his family and it *rocks*, especially the tone feedback on the microphone. (I love to sing, which you’ll know if you’re ever trapped in a car with me and Bohemian Rhapsody comes on the radio : )

  • My youngest also got a pair of the Killer Rabbit Slippers, which Chris picked up for me when he and his wife went to Spamalot. I’d covet my son’s new slippers except I love the Goofy loafer Slippers I stole from him years ago. : )

What did Santa bring you this year? Anything you’d recommend or want to steer folks away from?

*Yes, I know I’m a Microsoft employee and biased. Feel free to take what I say with as much salt as your heart can take. : )

December 26, 2007 spout

The Sidekick Phone Sucks

I brought my son a Sidekick Slide cell phone for XMas this year and I’ve come to the conclusion that it sucks, or at least the way T-Mobile sells it sucks.

When I purchased it, the T-Mobile salesman offered me unlimited data and text messages for an additional $20/month on that line. The phone was an upgrade on our existing family plan, which already has 3000 minutes/month and unlimited text messaging and I don’t really need my son surfing the interweb during class, so I declined. He never mentioned that the phone wouldn’t actually work without this extra money, or I never would’ve purchased it.

Then, XMas morning rolls around, my son is super-excited and plugs his SIM card into his new phone, turns it on and is greeted with the activation screen. This lasted for hours. Eventually, he found the magic key combination and was able to use the phone, but when it crashed, it lost all his contacts and pictures. Plus, the battery life sucked, lasting maybe four hours between charges. The boy swears it’s because it’s still trying to activate in the background.

Finally, we called T-Mobile customer care.” If I wanted to use the full capabilities” of the phone, like save f-ing contacts, we pay the $20/month. The contacts are saved on the network” *only*. That sucks. This was a $200 phone subsidized with a 2-year extension to the contract and it can’t store f-ing phone numbers?!?

I was about ready to cram the phone back up the T-Mobile salesman’s…. well, I would’ve returned it, but the boy was so enamored, he committed to ponying up the dough from his allowance.

And I have a sneaking suspicion that even though we now have the Sidekick feature” package, that the battery life is *still* going to suck… Keep your fingers crossed.

P.S. I can’t tell you how much my son loves this phone…

December 23, 2007 spout

Posting from my OLPC PC

The form factor is cool, the OS is fine (although I’d prefer Windows) but the chicklet keyboard is worthless. I can literally type faster on my t-mobile dash smartphone. Anyone want an OLPC laptop PC for $200 + shipping?
December 12, 2007 spout

Conversing In Italian over the Interweb

Yesterday I got an email from a fellow named Corrado Cavalli to whom I sent a free copy of Programming WPF. When he received it and read through it, he posted a note on his web site, which of course, I went to read.

Now, Corrado lives in San Pellegrino Terme, Bergamo Italy, so his blog is in Italian. That didn’t stop me from reading it in English using Google’s language translation page.

Then, just to be cheeky” as my Australian friends say, I composed simple responses in English and translated them to Italian before posting them, you know, pretending I’m smart and international and such like. : )

To be somewhat confident I wasn’t asking him for improper knowledge of his dog, I did the Italian to English translation on the translated text and rearranged my English it bit when it wasn’t quite right.

All in all, I’d say it worked out pretty well, although I did get some flowers from his dog the other day…

December 10, 2007 spout

Give Them a Fish or Teach ’em To Fish?

Dvorak asks this about One Laptop Per Child:

Does anyone but me see the OLPC XO-1 as an insulting let them eat cake’ sort of message to the world’s poor?”

I can see his point, but I don’t see how decades of giving food and support to the 3rd world has helped them to become part of the 1st world. Maybe access to the world’s information so that they can educate themselves and learn how to solve their own problems might work a little better. It’s worth a try at least.

November 30, 2007 spout

MS Math Add-In for Word 2007

MS Math Add-In for Word 2007

I mention this because this is just the thing I’ve wanted to be able to check my kid’s math homework: the Microsoft Math Add-In for Word 2007.

For example, after installing it, I can open Word, press Alt+= to get myself a new equation and then enter:

x^2 +2x + 2 + 3x - 4x^2

it translates into:

If I right-click and choose Simplify, I get the following:

If I right-click again and choose Plot in 2D, I get:

If I’ve got an equation that I want to solve, I can enter it:

and then right-click and choose Solve for x and get all the possible solutions:

This even works if you have multiple equations with multiple unknowns, which means this is good through at least 8th grade Algebra. Wahoo!

November 27, 2007 spout

1 Setup == Innumerable Uninstalls?

OK, what’s the deal with installing 1 product (Visual Studio 2008 beta 2) and having to do 22 separate uninstalls?!? How is this a good thing?

November 27, 2007 spout

Why aren’t Windows settings stored in %HOMEPATH%?

Normally, this is the kind of question I’d pose and then provide an answer, but this time I just don’t have one.

If my Word settings were stored in %HOMEPATH%\WordSettings.xml, I could edit the file, back it up, carry it to other machines and generally manage it. Instead, my settings seem to be stored in the Registry, %LOCALAPPDATA% or %APPDATA%, but who knows what’s stored where or how to manage it.

Obviously, Unix already does just this and I’m jealous. If I had settings stored somewhere I could understand and apps that actually used XCOPY deployment, I wouldn’t have to uninstall at all — I could just delete.

These are the thoughts you have uninstalling VS05 and VS08b2…

November 26, 2007 spout

I had to load FireFox on my machine yesterday

In general, IE7 more than meets my needs. It shows me the web pages I want and it works well. However, there is one killer feature that FireFox has that I desperately needed yesterday that caused me to load it onto my machine. It’s not my default browser and it doesn’t replace IE7, but FireFox is there and fulfilling my one killer feature needs nicely.

What’s the feature, you ask? Well I’ll tell you: sane content scaling. IE7 has Ctrl+, but it works very poorly, unlike FireFox, where it works fabulously.

Here’s the problem. Yesterday, I started reading the most excellent C# 3.0 in a Nutshell online, but the Text Zoom +” button didn’t increase the font size nearly enough for me to read on my giant LCD monitor. So, I started pressing Ctrl+ on IE7 and the text got bigger, but it didn’t wrap the text inside the window, instead giving me horizontal scroll bar. This confuses me, because IE wraps text just fine when the window is resized or when the text size changes — why can’t it wrap when the content is scaled?

Anyway, FireFox rescales things very nicely and made my online reading very pleasant.

November 26, 2007 spout writing

C# 3.0 in a Nutshell, LINQPad and Pure Genius

I absolutely love what the Albahari brothers (Joe & Ben) have done with C# 3.0 in a Nutshell. Not only is their prose concise in a way that mine is not, but I have learned a bunch of stuff about LINQ I didn’t know, they built a tool (LINQPad) that lets you experiment with LINQ interactively in a way that the designers of LINQ themselves don’t support and the tool has all kinds of wonderful features that LINQ, SQL and Regular Expression programmers alike will want to use regularly long after they’ve read the book.

And if that weren’t enough, the tool comes with an integrated tree of samples that follow along with the material in the book, teaching the material from another angle and reinforcing it perfectly. It’s pure genius and if I ever write another book, it’s a model I’m going to follow. Very highly recommended.

November 5, 2007 spout

Volunteering as Christmas Present?

When I was a kid, Christmas was my favorite holiday because my entire family (grandparents, parents, siblings, cousins, aunts and uncles) would get together at our lake cabin, chop wood for the fireplace by day and play games at night, culminating in an hours-long gift opening bonanza on Christmas Eve where each of us would watch the opener open a gift, youngest-to-oldest, one at a time. Did we like opening? Sure, but even better was seeing the look at the person’s face when you’d managed to get them just the right thing because you saw them all the time and you knew what they wanted.

Now, I’m building my own family in Oregon, but I still have parents and in-laws and grandparents that need Christmas presents. Do I know what they want and need? No, because I hardly ever see them. Do I get to see their faces when they open the gifts? No, because I’m in Oregon. Does that get me off the hook? No, because when the presents don’t show up in time, one or two have been known to call and complain. So, what’s a remote relative to do?

In the past, I’ve floated the idea of sending donations in their names to various charities, but that seems kind of like a cop out, as there’s no real thought or effort in it. Plus, it’s not every much fun to open.

This year, I thought I’d give an hour of volunteer service and then write a little story about it for them to read around the tree in our absence. I’ll pick an organization that fits their personality. For my step-mom, I might walk dogs at the local Humane Society (she likes dogs). For my Grandmother, I might volunteer to drive some elderly shut-in on her holiday errands (as I do for her when I can when I’m in town). Then, step-mom and Grandma can hear about how the hour went and share it with whoever they’re opening presents with by reading my description out loud. This way, someone gets something they need, I’ve put in the effort to show my loved on that they really are loved and there’s a little something under the tree.

Thoughts? Has anyone done something like this before? Does anyone have any ideas for Portland-area organizations that can help me get my volunteer hours in this holiday season?

October 29, 2007 spout

The Future of Telecommuting

I truly believe that the future of employment will be much more individualistic and that requiring people to move will be an anachronism. Right now, phone + LiveMeeting is about 50% as good as being there; you’re limited in what jobs you can do based on how much a part of your job being there” actually is. We already have the pieces of technology to push being there” to about 80%; we just haven’t put them together yet. When we do, a bunch more barriers are going to come down. Until then, some folks are on the bleeding edge and isn’t that what this whole industry is about anyway? : )

October 28, 2007 spout

Working Remotely for Microsoft: Misc Tips & Tricks

  • I used to drive up because it gave me the freedom of traveling whenever I wanted and I always had a car on the far end. Besides the speeding tickets, the other big problem was the amount of human energy it takes to drive back and forth so often.
  • I’ve taken the train, which I love because of the comfy surroundings and the electron dispensers, but if I want to be at a 9:45am meeting on Monday morning, I have to leave on the 2pm train on Sunday, which really cuts into family time.
  • Now I fly. The drive to the airport is only 30 minutes and I’ve never gotten a ticket along the way. When I get there, I use the express line to Seattle flights and get myself a Chai tea on the far side of security, itself made easy by long practice and my slip-off Crocs. The flight is short and I’ve long ago dropped off luggage that I leave in building 42, so I only have to bring clean undies in my laptop carry-on. When I land, instead of renting a car, I take a cab and get the benefit of the HOV lane when means I can take the 8am flight instead of the 7:30am flight, giving me 30 more minutes in bed. When I arrive, I have a junker freebie car I leave in the parking lot for tooling around town.
  • I split my overnights between my long-time friend and mentor Don Box and a local hotel. I stay at the hotel because I don’t want to overstay my welcome and I stay at Don’s because he and his family have made me feel so at home that I can’t not stay there. As much as Don would prefer I be in WA, he has really gone a long way to enable my lifestyle and I love him for it.
  • Sometimes when I’m on a roll, I’ll keep going long into the night, just like the old days at DM. And sometimes when I’m not feeling it, I’ll take the afternoon off and see a movie with my sweetie. It’s all about the balance.
  • I’ve always had an office for when I’m in Redmond, but I’ve always made sure I was the first guy on the double-up list when things get tight. Now only does this give me more face time when I’m in town, but I look like a hero and the guy who rooms with me only has to put up with me 3 days out of 10. I also let the other guy decide how to lay out the office, since my real office is set up just how I like it at my house. I’ve worked on couches, in the hall, in conference rooms, in the care and at the local Starbucks on 156th. Give me a laptop and wi-fi and I’m good to go.
  • Keep a machine setup inside the firewall. Every once in a while, VPN won’t let you do anything except terminal serve into a machine, at which point you can do anything just like you were there.
  • Make Microsoft pay at least half of your phone and internet bills.
  • Just because you’re working from home, you should expect adequate equipment to be supplied by your employer. Over a 4.5 year period, Microsoft has supplied me with two laptops, a 20″ LCD monitor and a printer-fax-scanner-copier, all in my home office.

Tomorrow, I’ll post the final entry in this series with my thoughts about the future of telecommuting.

October 27, 2007 spout

Working Remotely for Microsoft: What Are the Consequences?

When I went to work for Microsoft without moving up, I knew I was making a tradeoff. Before Microsoft, I spent a lot of time traveling, so MS meant staying home much more with my family. It also meant, because of MSs cultural bias, that my rate of advancement would be considerably slower than it would be if I was local. In fact, I was prepared to be completely unpromoted as several senior folks I trusted at Microsoft promised I would be. As it turned out, even though I came into Microsoft at a fairly high level (high enough that it wouldn’t have been hard to not meet expectations even if I were local), I was promoted. I doubt seriously that I’ll be promoted again, but I never thought I would be promoted at all. In fact, I’ve often referred to my Microsoft job, especially my new one on a product team, as the world’s greatest dead-end job.” : )

I know this sounds bad, but it gives me two freedoms. First, and most importantly, it gives me the freedom to spend evenings and weekends with my family (especially since I shipped the last book I plan on working on for a long, long time) and to put them first. This was the conscious decision I made going it and I’m happy every day that I made it. The second freedom that took me by surprise is that I can focus on the parts of my job that I really love without worrying about picking up tasks just because they’ll look good at review time. It’s almost like I’m one of those Microsofties with fuck you money” without the actual money. : )

Because my current boss cares deeply about making me as successful as I can be, we’ve talked about me having direct reports. I’ve done it before and I believe I could do it effectively again, even remotely (I’ve run successful remote development teams all over the world). However, because of the strong MS bias, I told my boss that I’d only take direct reports that had bought into the downsides of being remote, even if they’re local. If I’m not perceived as effective because I’m remote, then by extension, neither will anyone that works for me. My boss hasn’t pushed it since our conversation on that matter and frankly, I don’t expect to get any reports, but he’s surprised me before, so we’ll see. : )

Tomorrow: Misc tips & tricks.

October 26, 2007 spout

Working Remotely for Microsoft: Can You Communicate Effectively From Home During Meetings?

Communicating during a meeting is an art unto itself and has its own set of considerations:

  • Learn to love LiveMeeting: If you can’t see faces, the next best thing is whiteboards and what’s on each other’s computer screens. For whiteboards, you really need a video camera, which I’ll talk about later. For desktop sharing, I’ve tried NetMeeting, VNC, Terminal Services (in shadow mode) every version of MS Messenger, Office Communicator, Vista Meeting Space and LiveMeeting and a bunch more I’m not remembering. The only one that works consistently through firewalls (mine and Microsoft’s) and is easy to get bootstrapped is LiveMeeting. Learn how to start a Meet Now” meeting (I have an URL that starts up the Meet Now: Chris Sells” meeting but I have no idea where I got it) and use it! I’ve actually heard Don Box, who hates working with me when I’m not in the room, say LiveMeeting is better than you being here!” And when you’re jointly working on a shared document or shared code, it’s pretty damn good.
  • Get a LiveMeeting monkey: If you’re going to do a remote presentation, make sure there’s someone on the other end with LiveMeeting tested and running that can project your slides for you while you narrate.
  • Learn the short path through LiveMeeting: Microsoft employees, like most humans, don’t like to be distracted by things they don’t care about. They don’t want to install a new piece of software on a machine they just got working again last week and they certainly don’t know how to use it. Make sure you can talk them through the shortest path to getting LiveMeeting installed and sharing their desktops. The first time, this takes 10-15 minutes of disk churn (unfortunately), so ideally you’ll do it before the big meeting.
  • Keep time zones in mind: Martin was at GMT+0. Tim was at GMT-5. Microsoft is at GMT-8, as am I. Being working and available for meetings, phone calls and quick turn emails is important, otherwise, your team is going to start forgetting to include you in ad hoc stuff, as was a problem for Tim and completely impossible for Martin.
  • Meet new people face-to-face: I go up to Microsoft 3 days/2 nights every other week with the idea that I’m not going to get much actual coding or writing done, but I’m going to get face time with new people I need to start relationships with. When they hear you’re remote, most folks at Microsoft will want to postpone the meeting til you’re in town. To make them comfortable with you and to put faces to the voices, that’s a good idea the first time. However, after that, phone calls are just fine, especially when combined with LiveMeeting.
  • Learn your address book: When a meeting room is scheduled, the scheduler doesn’t know the phone number for the meeting nor are they even going to remember that you’re calling in, so you need to know how to get the phone number yourself. At Microsoft, the address book lists conference room phone numbers as conf room [blg]/[room],” e.g. conf room 42/5646″. If you have any trouble or you need someone to call you a cab for the airport on the last day of your trip, you can look up the receptionist for the building you’re in with Reception Bldg [bldg],” e.g. Reception Building 42″.
  • Get your own personal conference call number: If more than one person is calling into a single meeting room, have your personal conference call phone number and code ready. Again, Microsoft issues these to anyone that wants one (and again I can’t remember where I got mine : ).
  • Take meeting notes: If you are finding yourself missing out what’s going on during meetings while you’re on the phone, offer to take the meeting notes. That way, when you have questions, you’re asking as the guy taking notes not the annoying guy who’s too full of him/herself to move.
  • Play solitaire: If you’re not taking notes and you find yourself zoning out during a phone meeting, either because you’re surfing the web or starting to do real” work, you need to do something that will occupy your eyes and your hands while keeping your ears and brain free to pay attention. For that I recommend solitaire or, when I’ve really let my work interfere with my home life balance, I like to put the dishes away or fold clothes. Handy access to the Mute button on your phone covers up the clink” noises. : )
  • Learn to intuit what’s going on to the whiteboard: I find that the single biggest downside to not being there in person, especially on a product team, is not being able to see the whiteboard. Microsoft has a face-to-face, brute force culture; if a design or implementation problem can’t be solved in two sentences in email, that’s cause for a whiteboard scribble session. What I’ve learned, however, is that most such whiteboard scribbles look the same: there are going to be some boxes, some lines and some letters. The most powerful thing about what’s happening on the whiteboard is not the whiteboard itself, but the story that’s told while the boxes and lines are being scribbled. With some practice, you can learn to guess what’s on the whiteboard by listening to the story, even if you have to ask a clarifying question or two. Further, just the mere act of saying something like Well, I’m just guessing, but what I think you think drew is…” More often than not, the folks on the other end of the phone will say something like, Wow. That’s pretty close, Chris, except that…” With a little practice, you too can become a whiteboard whisper.” : )

That’s not to say that I wouldn’t love a better solution for remote telepresence then I’ve got. I’ve tried a number of experiments over the years and right now Scott Hanselman and I are trying yet another one. For me, a basket of laptop that my team can carry to meetings for me that’s running Skype for a/v sharing (it works through firewalls and does great noise cancelation), with a high quality pan/tilt/zoom camera I can control from my end is the killer app for remote employees. Scott’s got more of a mobile IvanAnywhere mindset, but between the two of us, we hope to cobble together something that closes 80% of the remaining gap I can’t close with the communication tips I’ve listed above.

Tomorrow we’ll discuss the career consequences of working remotely at Microsoft.

October 25, 2007 spout

Working Remotely for Microsoft: Can You Communicate Effectively From Home?

Assuming you can focus on work and you can find someone to hire you, effective communication is the next issue you’ll run into. When I was working for DM, practically everyone was remote, so our communication was based on email conversations that would be long and involved, sometimes lasting for days. However, that’s not the case at Microsoft, where brevity in email is valued and meetings are called for the tough issues. How do you fit into this culture? I use several techniques:

  • Over-communicate: I like to check and double check the things I heard and read vs. the things I’ve seeing done. I did X. Can you check it and make sure it’s what we agreed on?” We agree that you were going to do Y. How’s that coming? I looked at that last check-in you made and you seem to be doing Z. Why?”
  • Pick good email subjects: Lots of times, people have so much email, if the subject isn’t relevant, they don’t bother.
  • Keep emails short: At Microsoft, we have literally thousands of mailing lists and it’s not unusual for a single employee to belong to tens of them, generating 200-500 emails/day. If you want to be heard in that ruckus, you have to be succinct. If you get a reputation for long, rambling emails, especially without a summary, your missives will be ignored.
  • Summarize long emails at the top: When I need my email to go over a page, I summarize it at the top with a single sentence or two. That saves folks from having to dig through an email to get the gist.
  • Resend emails: I know Raymond Chen says not to, but if you don’t get an answer to an email, send it again. I can’t tell you how many times the first email was ignored, but the second email was answered.
  • Reply to yourself: If you’re asking a question that doesn’t get answered, follow up with the answer when you get it. I’ve had threads of conversation that were 80% me. At least they’ll see you’re there so they’ll remember to keep sending the paycheck. : )
  • Follow up on hints: Sometimes you’ll see something go by in an email that implies a different understanding than you had when last you talked to folks. For example, you’re expecting to participate in a design review on Wednesday, but someone sends an email including the sentence like, We’ll have to have this question answered by Tuesday’s design review anyway.” In the hallway/meeting/face-to-face communication culture of Microsoft, decisions are made and changed all the time without a written follow-up, but most of the time you’ll see the new data referenced in some kind of way. When that happens, follow up, e.g. I thought the design review was on Wednesday. Has it been changed?”
  • Read those status mails: You’re saving all kinds of time and being more productive by skipping those random conversations in the hallway, so you can afford to actual read your colleagues’ status emails. I also like to follow up on them, asking questions about the stuff I’m curious about. Often it helps me get my own work done and it almost always means I can integrate my work with that of my team’s better.
  • Own the efforts you’re involved in: It’s very easy to get focused on your own work and get out of sync with the team. If you’re dependent on other folks to get their work done so that the thing you’re doing gets done correctly and on time, you’ve got yourself a powerful motivator to communicate.
  • Get everyone on your team to use IM: IM is a wonderful simulation for hallway conversations that works even when the target of your question/comment is in a meeting (it’s common for Microsofties to have their laptops open during meetings). At Microsoft, even if folks don’t have a personal IM account via Yahoo or Live Messenger, they do have one with Office Communicator. If you’re trying to get someone that’s never online with it, instead of sending them an email with your question, send them a link to the Office Communicator installation and a request for them to log in. If that doesn’t work, start calling them and asking them the same thing. They’ll get the hint. : )
  • Pick up the phone: A ringing desktop phone is a novelty at Microsoft that few folks will ignore. Use it to startle them into submission! : )
  • Schedule a meeting for a phone call: If you can’t get your team on the phone for a quick discussion, schedule a 15-minute phone call.

Tomorrow I’ll focus on remote communication during meetings.

October 24, 2007 spout

Working Remotely for Microsoft: Can I Find Someone To Let Me Work From Home?

Assuming you decide you can and want to work from home for Microsoft, now the trick is finding someone that will take you. The first time, this took me years. As my writing and speaking became more popular, I’d get more regular calls from someone at Microsoft with the perfect job for me.” Each time, I’d ask them if I had to move and when they replied, Of course” as if the entire pool of worthy workers lived in Washington, I’d politely decline. Eventually when the question came up, Sara Williams said, No need to move” and I went to work for MSDN. As is often the case with one’s first Microsoft job, it wasn’t a long-term fit (a software engineer needs to be on a product team!), but finding a product team took me took 6 months of digging. All the groups I talked to wanted me and they all were happy to move me (some even offered to move my extended family up, too, eliminating my main anchor for staying in OR), but culturally they just didn’t know what to do with a remote guy.

Eventually, persistence, and my long experience working remotely, paid off and I actually had two competing offers (and I’m *so* happy about the one I chose). Microsoft has a *ton* of open positions and they get more open about remote employees all the time. Keep at it!

Tomorrow: Can You Communicate Effectively From Home?

October 23, 2007 spout

Working Remotely for Microsoft: Can You Focus On Work At Home?

First off, I don’t recommend remote work for folks who don’t like spending the vast majority of their time away from their colleagues, sometimes having trouble focusing on the work in favor of household duties or interactions. In fact, the ability to focus on work while at home is the #1 issue you’ll have to face as a remote employee and I’ve seen it drive 80% of folks back to the office. I’ve always been naturally in the 20% bucket on that issue.

As an example, when I first started at DevelopMentor, my office was in an open back room separated from the dining room by a hallway kitchen. My two infant boys had me in clear view when I was handcrafting RPC packets for communication with a DCOM server, hanging on the child gate, crying for me to play with them. My wife also had in plain sight when she wanted something from the high shelf. My family often heard me protest, You know, I am actually working over here!” I eventually built a door, purchased Melissa a stool and learned to be very mushy about the split between work and home life. My family’s actually been very supportive and I’ve always preferred the work environment I’ve established at home over any I’ve ever had from an employer, if for no other reason than my home has my family in it.

My advice to anyone that wants to switch to remote work is to try it for a month or two first. Are you able to balance work and family life when you’re at home? Are you able to go for days or weeks without the hallway conversations with your colleagues? Can you communicate effectively in ways that aren’t face-to-face? If you don’t like it, don’t force yourself into it. For example, while DM instructors didn’t seem to have any attrition due to remote work, all of the names I listed above as remote Microsoft employees have either quit, moved to Redmond or complained bitterly during their transition (Scott’s still new : ).

Tomorrow I’ll discuss Can I Find Someone To Let Me Work From Home?”

October 22, 2007 spout

The Whiteboard Whisperer: Working Remotely for Microsoft

I’ve been at Microsoft about 4.5 years, the whole time a remote employee,” i.e. I work mainly from my home in a suburb of Portland, OR but the teams I’ve worked for have all been based at Microsoft HQ in Redmond, WA.

Microsoft is traditionally a company that moves the bulk of their employees to WA, especially for product team and related duties. Of course, we’ve got subsidiaries and sales world-wide, as well as the occasional technology team in talent hot spots around the world, but there is a large corporate bias towards moving new hires to HQ. In fact, so much so that when we’ve got open spots, I’ve learned not to recommend someone that I know won’t move.

And yet, there are notable exceptions. Martin Gudgin worked from England for a number of years. Tim Ewald worked from New Hampshire. Scott Hanselman works from Portland, as did Rory Blythe. Sometimes if there’s enough need and the right role, the distance bias can be overcome. And when it does, I sometimes get an IM, an email, a phone call or a meeting request so that I can answer the question: how do you do it?

Tune in tomorrow for Can You Focus On Work At Home?”

October 19, 2007 spout writing

Fun With GridView*RowPresenter

Fun With GridView*RowPresenter

I was searching for advanced WPF tree samples the other day and ran into the tree-list-view sample:

Notice how the left-most column does the indenting, while the rest of the columns line up nicely. The code for the tree-view-sample is a little C# and a bunch of sophisticated XAML templates I didn’t understand, so I stripped it down to the bare nubbins to discover what was going on. Assume a simple class holding the data:

class Person {
  List<Person> children = new List<Person>();
  public string Name { get; set; }
  public int Age { get; set; }
  public List<Person> Children { get { return children; } }
}

The juicy bit that makes the tree-list view above possible is the GridViewRowPresenter:

<Window ...
  xmlns:local="clr-namespace:WpfApplication10"
  Title="GridView*RowPresenter Fun">

  <Window.DataContext>
    <local:Person Name="John" Age="13" />
  </Window.DataContext>

  <GridViewRowPresenter Content="{Binding}">
    <GridViewRowPresenter.Columns>
      <!-- NOTE: must explicitly create the collection -->
        <GridViewColumnCollection>
          <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" />
          <GridViewColumn Header="Age" DisplayMemberBinding="{Binding Age}" />
      </GridViewColumnCollection>
    </GridViewRowPresenter.Columns>
  </GridViewRowPresenter>

</Window>

Here, we’re creating an instance of the GridViewRowPresenter, which is the thing that the ListView creates for you if you use the GridView. Here, we’re using it explicitly and setting the columns explicitly, binding it to our data and yielding the following:

Notice that we’re showing a single item, arranged as a row of values according to our column definition above. It’s boring and not at all interactive, at least because we don’t have a header, which we can get with an instance of the GridViewHeaderRowPresenter:

<Window.Resources>
  <GridViewColumnCollection x:Key="columns">
    <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" />
    <GridViewColumn Header="Age" DisplayMemberBinding="{Binding Age}" />
  </GridViewColumnCollection>
</Window.Resources>

<StackPanel>
  <!-- NOTE: must share access to same column collection to get shared resizing -->
  <GridViewHeaderRowPresenter Columns="{StaticResource columns}" />
  <GridViewRowPresenter Content="{Binding}" Columns="{StaticResource columns}" />
</StackPanel>

Here we’re creating an instance of the row presenter, passing in a reference to the same columns collection used by the row presenter so that the column sizes and positions are shared between the header row and the row presenters:

If we want more than one piece of data, all we have to do is use an items control with an item template that in turn creates a row presenter for each item in the collection:

<Window.DataContext>
  <x:Array Type="{x:Type local:Person}">
    <local:Person Name="John" Age="13" />
    <local:Person Name="Tom" Age="12" />
  </x:Array>
</Window.DataContext>

<Window.Resources>
  <GridViewColumnCollection x:Key="columns">
    <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" />
    <GridViewColumn Header="Age" DisplayMemberBinding="{Binding Age}" />
  </GridViewColumnCollection>
</Window.Resources>

<StackPanel>
  <GridViewHeaderRowPresenter Columns="{StaticResource columns}" />
  <ItemsControl ItemsSource="{Binding}">
    <ItemsControl.ItemTemplate>
      <DataTemplate>
        <GridViewRowPresenter Content="{Binding}" Columns="{StaticResource columns}" />
      </DataTemplate>
    </ItemsControl.ItemTemplate>
  </ItemsControl>
</StackPanel>

Now, we’ve got a stack panel that combines the header to the grid view rows with the grid view rows themselves, one per item in our collection:

Now on a rush of discovery and simplicity, I took the next step to show hierarchical data, hosting the data in a TreeView control and using a hierarchical data template so that I could build the tree list view shown above with the tiniest bit of XAML and code:

<Window.DataContext>
  <x:Array Type="{x:Type local:Person}">
  <local:Person Name="Chris" Age="38">
    <local:Person.Children>
      <local:Person Name="John" Age="13" />
      <local:Person Name="Tom" Age="12" />
    </local:Person.Children>
  </local:Person>
  <local:Person Name="Melissa" Age="39" />
  </x:Array>
</Window.DataContext>
...
<StackPanel>
  <GridViewHeaderRowPresenter Columns="{StaticResource columns}" />
  <TreeView ItemsSource="{Binding}" BorderThickness="0">
    <TreeView.ItemTemplate>
      <HierarchicalDataTemplate ItemsSource="{Binding Children}">
       <GridViewRowPresenter Content="{Binding}" Columns="{StaticResource columns}" />
      </HierarchicalDataTemplate>
    </TreeView.ItemTemplate>
  </TreeView>
</StackPanel>

Unfortunately, that’s where we run into the limit of what we can do without cranking things up a notch:

 

Beside the border around the tree view (caused by focus), the worst part about our simple tree-list-view is that, while each grid view row has the proper column sizes and relative positions, because the tree does the indenting, all of the columns are offset, not just the first one. The key to fixing this problem is to put the styling for indenting into the template for the first column only using the CellTemplate property of the GridViewRowColumn, taking over the drawing of the tree view items, which is what the tree-list-view sample does.

August 28, 2007 spout writing

“Programming WPF” (finally) shipping!

John Osborn of O’Reilly and Associates had this to say in my morning email:

Congratulations, guys. The book is printed and shipping! Just got my copy this morning and it looks great. A very substantial body of work, to say the least.

Thanks for all of your hard work on this project. Now to crank up the PR machine and make sure no book shelf is without a copy.”

Wahoo!

August 17, 2007 spout writing

How to write a book - the short honest truth

I found this on digg.com and liked the short, honest style. Bottom line: anyone can write a book; it takes real work to write a good book.
August 14, 2007 spout writing

“How you doin’?”

I wanted to figure out how to emit a new CLR type at run-time using Reflection.Emit and Google revealed the following article: Generating Code at Run Time With Reflection.Emit in DDJ.As usual, I skip most of the initial prose to the first code sample (I don’t need some author’s fancy intro — I just want the code!). Then, I’m reading along and I find some phrases I enjoy, e.g.

If you plan on generating lots of calls to Console.WriteLine(), you should be aware that the ILGenerator class exposes a method for just that purpose: ILGenerator.EmitWriteLine() generates the exact same code as our example. (Could this be the first assembler ever devised that includes explicit support for creating Hello, World” sample programs?)”

and

When creating a dynamic assembly with Reflection.Emit, you must declare, ahead of time, what you plan on doing with it. Do you want to run it or save it? Or both? (Of course, if your answer is neither,’ then you should probably should have stopped reading this article long ago.)”

By the end of the piece, I’ve enjoyed the story and it told me exactly what I wanted and then some, pointing out some pitfalls I would’ve missed, being entertaining along the way. It’s rare that I enjoy an article so much and I’m thinking I should send the author an email, congratulating him/her on his/her tight, fun prose.

And then I get to the author bios:

Chris Sells is a blah blah blah.”

Shawn Van Ness is a blah blah blah.”

Of course, now I remember Shawn writing this piece and me helping him with the polish. At this point, I feel a bit like the Joey Tribbiani of Windows technical writing…

July 17, 2007 spout writing

Programming WPF, 2e (RTM Edition) on Amazon!

Buy your copy today! : )

P.S. I read the QC1 (Quality Check 1), all 859 pages of it, in two solid days this weekend. I found a bunch of nits, all of which will be fixed before you see it in August. Wahoo!

June 14, 2007 spout

The T-Mobile Wing rocks! ’til the battery dies…

I was really loving my T-Mobile Wing with WM6, Pocket Office, external micro-SD slot, slamming keyboard, beautiful ClearType display, one-handed usage (even though it is a PocketPC, I almost never needed to pull out the stylus), blue tooth (very high quality!), wi-fi, Edge and a slamming keyboard! (yes — it was that slamming.).

Unfortunately, I couldn’t keep it. After four days of the battery going dead after 12 short hours of my normal usage, e.g. email, texting, surfing, etc, it was dead. I turned off wi-fi, blue tooth and DirectPush to no avail. The T-Mobile Wing is just too cool for the battery and T-Mobile didn’t have a bigger one to give me.

So it’s back to my i-mate smartflip (hurray for data sync!). I was *so* loving that slamming keyboard…

May 28, 2007 spout writing

Why do we pick on journalism majors, so?

Here’s another one:

For example, if we had had a background in journalism, we might have used one-based indexing instead of zero-based indexing to…

That Ian didn’t like, but it still makes me smile (and if you’re not a smiling author, why be an author at all?!?).

May 28, 2007 spout writing

Sometimes I crack myself up

I forgot until the copy edit review process that I’d dropped this gem into a footnote:

On August 4th, 1997, the world’s oldest person so far, Jeanne Louise Calment, died at age 122, having taken up fencing at age 85 and out-lived the holder of her reverse-mortgage. Although I firmly believe that Ms. Calment is showing us the way to a richer, longer life, it’ll be a while yet before we need the full range supported by the Int32 class (2,147,483,647 years young).

This is what happens when you write into the wee hours of the morning… : )

April 29, 2007 spout writing

On becoming an empty nester…

I submitted the final manuscript for Programming WPF, 2nd edition, by Ian Griffiths and Chris Sells to O’Reilly and Associates this morning for publication. Of course, there’s stuff still to do (today we hit step 8 of 18), but this represents a major milestone in the life of any book.

I have mixed feelings when I finish a book. The last few have been especially intense, as I have a real day job on a Microsoft product-team-to-be, so it’s just been evenings and weekends. With this much work to do, you have to focus hard and the work becomes a part of you. This means that giving it up is also hard. My boys are just now becoming teenagers, so it’ll be a while yet before they leave home, but I imagine I’ll feel the same kind of melancholy I feel now — happy to see something you’ve put so much of your life into make its own way into the world, but hard to have the cord cut.

On average, I’ve been an author, co-author or a with” on 12 books over the last 12 years. At one time, I had open contracts on four separate books. This book represents my last planned book. I’m now truly an empty nester.

So, what’s next for me in this new phase of my life? Well, I’ve already started some stuff. A couple of weeks ago, I started a little gooey shell for monad (I call it gonad”  : ). And last Friday, I started private piano lessons (a blast!). I’d like to pick up my other hobbies again, too, but for the life of me, I can’t remember what my other hobbies used to be…

April 29, 2007 spout writing

Glyn Griffiths: Ian’s Dad and Damn Fine Reviewer

This was an email I sent to Glyn Griffiths, the final external reviewer on the WPF 2ed book before we submitted the final manuscript for copy edit and publication (and which has been posted here with his permission):

Mr. Griffiths, in chapter 7, you had a couple of comments about what happened in the 1ed of the book vs. what we’ve got now in the 2ed of the book. The first such comment was:

The first edition of the book had …selected by going backward and forward…’ which I think is better. [ed: as compared to selected back and forward’]

This is one of several instances I’ve found of improved wording in the first edition that seems to have been lost in this one. Is this because work on the second edition was started using a text base that was earlier than the final version of the first edition?”

To answer your question, the post-copy-edited version of the 1ed is in Framemaker. Apparently, ORA does have a process for getting Word documents out of Framemaker for just this reason, but I didn’t know that, so we started with our pre-copy-edited 1ed Word documents when we started the 2ed. Since so much of the 2ed prose is different than the 1ed, this doesn’t concern me overmuch, but it’s worth avoiding for the 3ed.

And now here’s my question: how the hell do you know what was in the 1ed at this level of detail? Have you memorized it so that you can do a diff in your head? Do you have it open in front of you so you can compare? I can’t imagine what powers you possess to be able to make comment such as these, but I’m happy to have you use them for good and not evil.

P.S. With your kind permission, I’d like to post your comment on my blog so that others may have a greater understanding of where Ian gets his monster intellect.

April 16, 2007 spout writing

My Foreword To ChrisAn’s “Essential WPF”

Now that Chris Anderson’s most excellent Essential Windows Presentation Foundation has transitioned to the physical world, I thought I’d share my foreword:

Thank God there weren’t more people like Chris Anderson when I was making my living outside of Microsoft.

I work at Microsoft now (two doors down from Chris, in fact), but not all that long ago, I was an instructor at a Windows developer training company. My brethren and I were led by a deep-thinking PhD candidate that applied the same rigor he applied to a scholarly pursuit that had to stand up to the crush or be crushed” mentality of academia. We learned how to think clearly as a defense mechanism and to communicate clearly as a survival technique. If we didn’t do it to his exacting standards, he’d sweep us aside and redo our work before our eyes (we learned to call it swooping” and you worked hard to avoid the phenomenon).

In a similar fashion, we learned to ignore the tutorial and reference materials produced by our vendor of choice, because it was clear that however clearly they may or may not be thinking inside their hallowed walls, it was certain that they weren’t up to communicating it with the rest of us. Arguably, our whole job for close to a decade was swooping” Microsoft itself, redoing their materials in the form of short course, conference talks, magazine articles and books. We called it the Microsoft Continuing Employment Act,” treating it like a pork barrel entitlement program that kept us in the style to which we had grown accustomed.

In fact, we made a nice living traveling the country saying things like, remember to call Release,” avoid round-trips” and ignore aggregation” because these were clear guidelines that distilled for developers what Microsoft couldn’t manage to say for itself. That’s not to say that there weren’t clear thinkers inside of Microsoft (Tony Williams and Crispin Goswell being two of my very favorites), but the gap between the beginner and the reader of such advanced writings was largely unfilled in those days.

With this book, that gravy train has run right off the track. Chris Anderson was one of the chief architects of the next-generation GUI stack, the Windows Presentation Framework, which is the subject of the book you’re now holding in your hands. You’d have thought that the very nature of the architecture job, that is, to make sure that the issues deep, deep inside were solved properly so that others could come along and build the trappings that made it into plain sight, would disqualify him from leading the developer from go” to whoa,” but that’s not the case. Chris’s insight allow him to shine a light from the internals of WPF to those standing at the entrance, guiding you through the concepts that form the foundation of his creation (and the creation of more than 300 other people, too, let’s not forget).

As the author of a competing book from another publisher, I can’t say that this is the only book you’ll ever need on WPF (or they’d have me in front of a firing squad), but I can say this with certainty: it belongs on your shelf within an easy reach. I know that’s where my copy will be.

April 14, 2007 spout writing

Best WPF Resources?

I’d like to provide a list of the best WPF resources, including real-world apps, free web resources, SDK docs, samples, blogs, etc. If you’ve got something that belongs on that list, I’d love to hear about it. Thanks!

April 11, 2007 spout

“Student who needs to interview a programmer”

Jimmy, a very polite 14-year old student of Washington Manor Middle School in California had an assignment to interview a computer programmer. I have no idea how he found me, but I did my best to help him out.

[jimmy] Thanks for your time! Here are the questions…

[jimmy] How long have you been working in this profession?
[csells] I’ve been a professional programmer of one kind or another since I was 20 years old, so 17 years.

[jimmy] How did you realize you wanted to be a computer programmer?
[csells] I had three professions in my mind as a child, first magician, then architect and by the time I got my first computer in high school, I decided I wanted to be a programmer. From that point on, I was pretty much a full-time programmer who took time out during the day to go to school.

[jimmy] What kind of education did you have to have?
[csells] BS in Computer Science from the U of MN, MS in Software Engineering from the Oregon Graduate Institute

[jimmy] What are some of the classes you took in High School that maybe helped you in your career choice?
[csells] The course that made me want to become an architect was my Jr. high school drafting courses. The thing that made me want to be a programmer was using first my friend’s computer and then mine. By the time I got to my programming classes in high school, I knew much more than the teacher (and, in fact, he would often pull me out of my other courses to fix other people’s computer problems).

[jimmy] Tell me about a typical day in this job.
[csells] For the last two years, I’ve been involved in an incubation” project at work, which means that I’m in a small group of engineers doing advanced product development thinking. We look at a bunch of problems that developers are having building software on the Microsoft platform and build various experimental pieces of software to see if they would be useful in helping developers build applications that are more secure, more robust and more full-featured, while still helping them to build them faster.

Toward that end, my day is filled with design meetings where we run design ideas past our peers, build our ideas and then try to use them to build applications the way our customers would. I spend about half of each day in verbal and written communication, e.g. meetings, presentations, emails and design documents, and half the day writing code, specifically C#/.NET.

[jimmy] What skills are important to be successful in this position?
[csells] Communication, both written and verbal, customer empathy, logical thinking, debate, compromise and willingness to live with vague, under-specified problems and requirements.

[jimmy] How would you describe the responsibilities of the position?
[csells] With my team, it’s my responsibility to not only generate and try new ideas, but also to push the good ideas into customers’ hands. That can include everything from forming my own product team, to forming ad hoc virtual teams” from existing product groups around the company, to selling” my ideas to product teams to get them to ship them with their products.

[jimmy] What long and short term problems and opportunities do you think this career faces?
[csells] Short-term, there’s a shortage of computer science graduates, so high-tech companies, Microsoft included, are doing what they can to make sure that they attract smart, motivated, educated, experienced software folks. This includes higher salaries, better working conditions and better benefits, all of which is good for folks in this industry.

Long-term, software engineering is changing rapidly, both how we build and apply our development tools and how we turn our craft into an actual engineering discipline. The tools I’m using this year are more full-featured, more rigorous and, at the same time, simpler than the tools I used even a few years ago. I don’t anticipate that change slowing down any time soon. We’ve got a long way to go before we’ve got a solid set of principles that can make software into the same kind of measured, certifiable activity that engineering fields like civil, electrical and mechanical engineering now enjoy.

[jimmy] What are the positives and negative about being a computer programmer?
[csells]
Pros:

  • flexible work environments
  • fun work (if you like bending a computer to your will)
  • rapidly evolving
  • challenging
  • important — the entire world is being remade by software

Cons:

  • vague requirements from customers that don’t really know what they want (but they sure know what they *don’t* want…)
  • engineering discipline left up to individuals, leading to a wide-range of software quality
  • lots and lots of work to do, making it very easy to balance the work/home life far away from non-work related activities (all work and no play makes Jimmy a dull boy : ).

[jimmy] Is there anything else about being a computer programmer that you would like to tell me about?
[csells] If you’ve got the disposition, programming and related software engineering work can be extremely rewarding, not just for the fun and satisfaction of taking control of a tiny virtual universe, but also because of the real difference software has and continues to make on real people’s lives. Over the last three decades, I believe that software has literally changed the world for the better and I see that trend accelerating. Bottom line: It’s fun, flexibly, in-demand and makes the world a better place – what could be better than that?

March 27, 2007 spout

The Microsoft “Sells” Department

So, I’m sitting in my office pair programming with Geoff Kizer when my phone rings. It says Microsoft” on the display, so I figure it’s one of my brethren.

Hello?”

An angry voice replies, I’m calling you because your technical support sucks and I’m tired of being put on hold!”

I’m sorry? Are you a Microsoft employee?”

No! I’m a *customer*! I’m trying to use Windows Vista Ultimate 64-bit and it doesn’t work!”

Oh.” Now I’m reaching way, way back into my distant technical phone support past. First, defuse the anger by empathizing with the customer. Well, on behalf of the 70,000 Microsoft employees, I’d like to apologize.” That was a little over the top — have to dial it down a bit next time…

Second, try to take things back a step and establish a rapport with the customer. My name is Chris. What’s yours?”

Calming down a bit, John.”

OK, John. I can’t claim to know everything there is to know about Vista, but I’ll answer your questions if I can.”

How do I get the icons to be smaller on the desktop? No matter what the resolution is, they’re always huge! I want them to be small like on XP!”

Are you at your computer now?”

Yes.”

OK. I know you can change the icon size on the desktop. Let you look around a little.” At this point, I’m opening up the Personalize control panel, finding nothing about desktop icon size. I used the cool narrow-as-you-type Help. Nothing about icon size (although I can change the icons themselves). Now I’m cursing Vista myself. I don’t see it here,” I admit to John.

At this point, I look up and notice I’ve gathered a crowd outside my office, including my boss and his boss, all laughing because a) dealing with angry customers is not the most fun job in the world and b) they’re glad it isn’t them.

At this point, Mr. Kizer reaches over to my computer, right-clicks on my desktop and shows me the context menu option that actually changes the icon size, which I share with John, making sure he’s happy with this solution before moving on.

And move on we did. John has one more problem, which I repeat back to him to make sure I’ve gotten it right, emphasize with him and try to help him reproduce it. When we can’t, I send him an email, asking for some additional data when he is able to reproduce the problem so that I can follow up with a fix, apologizing again for the trouble he’s had today, both with Vista and with tech support.

After about 15 minutes, John thanked me and asked me if I was in Sales or Support.

No. I’m a developer,” which was close enough to true for your average person.

He then told me how he got to my phone in the first place. Apparently, he had called the main number and was tired of being put on hold by our support, so he told our voice-recognition system that he wanted to speak to Sales,” I’m guessing to give them a piece of his mind. That day, Sells” was enough of a match to Sales” and suddenly, I’m the one talking to John.

At no point during this call did I consider sending John somewhere else for help. He’d already been through our support and didn’t like it. I can’t make people purchase Microsoft products. I can’t make people like Microsoft products. However, that one day with that one customer, I was going to do my best to help one customer to not hate Microsoft. Sometimes that’s all you can do and I was proud to do it.

March 10, 2007 spout writing

Programming WPF: Rough Cuts

If you can’t wait for Programming WPF to be on the shelves (I know I’m having trouble), then you can read the chapters as we write them. These chapters have not gone through the technical reviewing stage or the copy editing stage, but they’ve been through the baptism of fire that is co-author review and both Ian and I are nuts for grammar, so they should be pretty readable. Enjoy.
March 3, 2007 spout

Using my XBox 360 for Corp. Video Conferencing

I’ve been having another adventure in social video conferencing, this time with my team in Redmond. It all started with Doug brought his 360 into our new conference room, which is just an office with a coupla white boards, some comfy chairs and a 37″ LCD panel for projecting.

Once we got the 360, I purchased a year Live Gold subscription and a live camera for $30, turning it into a video conferencing solution. Now, every morning at scrum, I’m sitting in my living room, telling folks in building 42 what I did yesterday, what I’m doing today and whether I’m blocked or not and they can see as well as hear me. When we go around the room, somebody turns the camera for me and it’s my turn when we get to the LCD panel.

You might ask why we don’t just use Live Messenger’s video support and the answer is — configuration and hardware. Live Messenger’s video just never seems to work out of the box w/ people’s s/w and h/w firewalls and even if it did, nobody’s got a camera on their laptop. Now, the only thing my team mates need to do to see me is turn on the LCD panel and accept my request for video.

That’s not to say that the experience is perfect. I’d love it if the xbox video conferencing:

  • Allowed each side to run video at full screen. I just don’t need to look at myself and when we go picture-in-picture (the LCD is also used for projection), the video’s not very useful.
  • Allowed me to remotely, instead of locally, select zoom regions.
  • Allowed me to control a camera that supported pan, tilt and zoom in hardware.
  • Supported noise cancellation. As it is, I still have to place a phone call to get onto the speaker phone in the room. If we try using the headset as a roaming mike, the feedback makes it unusable.

However, for the $30 incremental cost of the camera + year of live, it’s a solution good enough that we’re using it more and more. Have I mentioned how much I love my xbox 360?

January 21, 2007 spout writing

Boogers and My Writing Process

I’m supposed to be writing today, but John (my eldest son) is also doing some writing as part of his homework. However, after watching him struggle with just the topic (the phrase Always aim for the moon. Even if you miss, you’ll end up among the stars” [which isn’t even the correct quote]) to try to write the fully-formed essay, I give him a little lesson about how I write. Plus, since I’m supposed to be writing, this blog post is an excellent avoidance technique.

When I write, I told my son, I have to write giant books starting from empty pages. I can’t just have a topic and start writing, I have to have something to break up the whitespace first. So, as a demonstration of this technique, I asked the fruit of my loins, an apple from my tree, for a topic. He said, without so much as a second of hesitation, boogers.”

So, we started by brainstorming booger-related topics:

  • can be dry and crunchy
  • can be wet and chewy
  • flick em
  • eat em
  • wipe em
  • come from noses
  • wipe em on somebody
  • wipe em on tissue
  • wipe em under something

The brainstorming is just a list of facts in whatever order I think of them that I know about the topic that I may or may not decide to share with my readers. While brainstorming, I don’t judge — I just type whatever comes up. After brainstorming, I spend some time rearranging my facts into some kind of outline to lay out my order and my main topics into which the facts fall:

  • intro:
    • what they are
    • formed from dust and other irritants in the air
    • can be dry and crunchy
    • can be wet and chewy
    • come from noses
  • how do I get em out of my nose:
    • Kleenex
    • finger
    • friend’s Kleenex
    • friend’s finger
  • what do I do with em now that I’ve got em out of my nose:
    • flick em
    • eat em
    • wipe em
    • wipe em on somebody
    • wipe em on tissue
    • wipe em under something
    • straight blow in the shower
  • summary
  • overrun (although I’ve decided I don’t want in my finished piece)

During the outlining phase, it’s often the case that more facts come up and sometimes even whole categories of facts. As you’re forming the story, that’s when the gaps make themselves clear. At this point, I generally jump into the first fact, turning it into the first sentence, adding supporting sentences, transitions to the second fact and so on. Sometimes, though, especially with shorter pieces, I’ll write the summary to make sure I’ve got it in mind as the write the entire piece. This idea of the story that I want to tell is what Don Box calls the spine,” and it’s the most important part. Once you’ve got the spine, everything else falls into place.

summary
Boogers happen to everyone and they’re good for you. However, when there are too many, you gotta get em out. I recommend that you use a combination of Kleenex and your finger (for those hard to reach spots). You should make sure to throw the Kleenex away and wash your hands, although the shower straight blow is a good alternative. You should never, ever flick or wipe your boogers on something besides Kleenex, because who wants to find them?

At this point, I’ve gone from a blank sheet of (virtual) paper to a place where I know the spine, the details and the ordering; most of the hard work is done.

Obviously, brainstorming + outlining + summary + details = completed essay isn’t exactly a unique perspective on the writing process. Still, how often does one get the change to turn boogers into a positive learning experience for one’s progeny? : )

January 4, 2007 spout

Five Things You Don’t Know About Me

I’ve been tagged a coupla times, so it’s time I fessed up with Five Things You Don’t Know About Me:

  1. In college, I was in a fraternity and not just a geek fraternity, but an actual, national, recognized social fraternity (Phi Delta Theta). I figured I was geeky enough in high school, so needed a place to learn to at least hide my dorkiness. Obviously, I failed, but it was a very fun four years. : )
  2. In college, I coded in Unix using VT100 emulation software via a modem to my school’s DECs from my Mac IIcx running System 7 (I worked two jobs all summer to earn half of the $6000 it cost me to purchase the thing in 1988). It was the combination of the best programming and best UI experience at the time (although on two separate OSes). After graduation and working a job for a coupla years where I programmed Unix all day, I needed to look at Windows 3.1 for the first time because I had an interview at Intel. I could only stand to use it for about 10 minutes. They hired me anyway as a Windows programmer and, thank goodness, it’s much gotten better. Windows is now my favorite programming and UI experience (and I’ve used both Unix and Mac OS X several times since then to make sure).
  3. I am a fetishist; my fetishes are domain names and phone numbers. I can’t think of a cool domain name without a) checking to see if it’s available and b) purchasing it if it is (the one that sticks in my mind is clownporn.com, but that one was long gone). If I ever have a cool idea for an app, I must first purchase the domain name (I own appsettings.com and I just purchased 16 domain names the other day for another thing I want to do). Likewise, if I see a 7-digit phone number without a 0 or a 1 in it, I am physically compelled to surf to phonespell.org to see what the possible 7 and 8-letter words are (my old home phone number was 642-JOHN, the name of my eldest son). Of course, I’ve written my own program to do the permutations of numbers to letters, but phonespell does that cool dictionary lookup and grouping thing. I also added the phonespell support to Dave’s Quick Search Taskbar Toolbar Deskbar.
  4. I have jumped out of a perfectly good airplane (not Alan Cooper’s plane).It was just before I got married and I took my best man. We both used parachutes. The fall was surprisingly quiet, but the stop at the sudden bottom was unpleasant.
  5. The equal-rights-for-humans theme that sometimes pops up on this site isn’t because I’ve seen friends discriminated against and now I have to change the world (I don’t actually know very many people that are homosexual), but rather because I think it’s the right thing to do.

I tag Don Box, Chris Anderson, Michael Weinhardt, Tim Ewald and Ian Griffiths.

P.S. What’s the deal with the shape of the Pentagon and the Seal of the US on money (the eye at the top of the pyramid)? Damn you Doug Purdy for getting me The Illuminatus Trilogy when I’m supposed to be writing a book!

November 24, 2006 spout

Xbox Video Marketplace Worked Great For Me

I tried the Xbox Video Marketplace on my 360 today. For 160 points ($2), I was able to purchase the season 2 premiere of Venture Bros (which is hilarious, btw) and 17% into the download, I was able to start watching it commercial free. Quality was high and I’m downloading Star Trek: The Enemy Within (a transporter accident creates an evil Kirk) for another $2 as I write this. The next experiment is a movie, but I’ll wait for the wife to come home before we decide which one to pick.

The experience was seamless. Recommended.

P.S. I think gays and lesbians have just as much right to get married and to be parents as heterosexuals.

November 23, 2006 spout

I’m Thankful for Windows Vista

Of course I have no credibility here (I’m part of the evil empire, after all), but I have to say, I’m really loving the Windows Vista Ultimate RTM. I know the Vista team takes a lot of crap for being late and for not being revolutionary enough, so I thought I’d let the Vista team know that I have yet to find something that isn’t just better in Vista than in XP. Here are a few things I really like:

  • I no longer have to do Ctrl+Esc, R before I can type something to run (I’m a huge keyboard guy); I just have to type Ctrl+Esc and start typing. This savings alone has ruined me for XP. (And before you point out that I can just use Win+R, I don’t like the Windows key: it’s not on all keyboards and it’s not always in the same place.)
  • If I want to search for a program in my voluminous start menu, I just do Ctrl+Esc and start typing. When the list of results contains my target, I press the down arrow to pick the one I want and press Enter when I get there.
  • If I want to search for content on my computer, I just do Ctrl+Esc and start typing (once search is set to index my entire computer — I wish that were the default). If I want to be specific that I just want to search content or file name, I can use the content:” and name:” designators, e.g. content:foo name:foo.cs”.
  • If I want to find a setting in a particular control panel app, I open the control panel and start typing — the results point me at the specific control panel applet and page with that setting.
  • If I want to find something on the internet, I press Ctrl+Esc and start typing, then press the up arrow (to get to the Search the Internet” option) and press Enter, which brings up the results in my IE7 favorite search engine.
  • If I want to find something in my large list of installed programs, I open the Programs and Features control panel and start typing (I found the renamed Add and Remove Programs” control panel by searching for uninstall”).
  • Before you narrow my list of likes about Vista to pervasive search” (which, obviously, I love), I also really like the sidebar. It’s amazing how often I glance over there to get some quick piece of info that’s always being updated for me rather than start some app, interrupting what I’m doing (e.g. lately I’ve been waiting with bated breath for MSFT to hit 30). I’m anxious for lots more sidebar gadgets.
  • I love that the desktop is in the Alt+Tab list.
  • I love the 3D Win+Tab list.
  • The games, both new and old, are uniformly gorgeous.
  • I really love the new look n’ feel, including the animations and the new start menu, both of which I turned off in XP.
  • I love that it just works on my 2-year old Dell laptop w/o any muss or fuss. I only have a Windows Experience Index of 2.0 because of my graphics card, but using Vista is still a very pleasant experience (and I have Aero glass around the edges of my windows and everything).
  • I really love Windows Meeting Space. I’m a big user of Live Meeting because of my remote employee status and Windows MS is a simpler, cleaner, peer-to-peer version of the only parts of LiveMeeting I every actually used, i.e. sharing apps and sharing files. To have it included for free is huge.
  • I love having Media Center included, too.
  • I love that I can do picture slide shows from zip files as well as from folders.
  • I like the new Sync Center, one-stop shopping for my offline folders (which I love) as well as managing my smartphone’s files.
  • I really like the real-time thumbnail of apps when I hang the mouse over icons in the taskbar and in the Alt+Tab/Win+Tab list.
  • I love that .NET 3.0 is included out of the box.
  • I love that every app I’ve tried, including an app I originally wrote for Windows 95, just works.
  • I love that I find new features all the time.
  • As I’ve mentioned, I like the clearification.com site. In fact, I liked it so much, Mel and I want to see Demetri Martin live in Portland. Very funny.

Seriously, given the experience with recent pre-release versions of Vista, I thought I was going to just stick with XP. I’m so glad I didn’t. Vista rocks.

P.S. I’ll continue to desensitize/scare away readers with political/religious/social messages in future posts. Until then, Happy Thanksgiving!

November 22, 2006 spout

Dammit!

There are a very few games I could call great.” Doom (of course). Half-Life 2. Burnout Revenge. Mario Kart. And last week, I added another game: Gears of War. Wow. I’m almost exclusively a first-person-shooter person (although I never liked the Halo series), but GoW has converted me to 3rd person. It rocks.

The one flaw in GoW is that it’s too damn short! I’ve already finished the entire game on casual,” so now it’s time to start over again on hardcore” and begin the n-year wait for GoW 2.

P.S. I believe in God, but am not a member of any religion. I was confirmed Catholic, but am no longer one.

November 13, 2006 spout

Costco + Busted Xbox 360 = Happiness

After a scant 6 months of service, my Xbox 360 yielded up the dreaded to play this disc, put it in an Xbox 360 console” error (where do you think I was putting it?!?), which indicated a problem w/ the DVD drive. Ironically, this only became an issue after playing Gears of War for an hour or so (OMG is that a great game), even though it was happening consistently across my entire game library.

Calling 360 technical support yielded an offer of a repair, if I was willing to pay $140 (+ shipping) and wait 10 days for transit time. Having invested more than $1000 into my 360 and taken it into my home as a family member (ranking just below the kids but well above the dogs in the pecking order), I couldn’t abandon it. This part of my experience yielded a very important lesson:

Lesson #1: Modern-day consoles should be treated like PCs, not VCRs, and warranteed appropriately.

I’m so used to refusing the warranty when I purchase a piece of consumer electronics (and normally it is just a scam), that I didn’t even think to get the warranty on this one. On the other hand, I warranty ever Dell laptop I buy w/o a thought (and it has paid off many times). The XBox 360 (and I imagine the Play Station 3) are useful enough, that it’s worth the warranty fee when things go wrong and complicated enough that things are much more likely to do so, like your average laptop.

Luckily, my clever wife remembered that she’d purchased the 360 at Costco (she’s the one that brought it home — how cool a wife do I have?!?), which has a very liberal return policy. So, Costco took back my broken 360 and in return gave me:

  • a brand new XBox 360 (which plays Gears of War consistently wonderfully)
  • one extra controller
  • one extra game (Xbox Live Arcade Unplugged Volume 1)
  • my old HD w/ our saved games (instead of the new one)
  • a $15 credit

You read that right — not only did they give me a new Xbox with more stuff in the bundle, but because the bundle was now cheaper, they refunded me the difference. I’m now hoping my 360 breaks every 6 months til they’re paying me to take the new one home w/ me… All of this leads us to lesson #2:

Lesson #2: Costco rocks.

In fact, Costco is such a great store, that I can ignore lesson #1, because I know that they’ll replace my Xbox again in 6-12 months if it breaks again.

P.S. I’m in favor of legalizing marijuana (although I’ve never smoked any myself)

P.S.S. I put in that postscript because I don’t want readers to think that I was scared off (or wised up, depending on your POV) from the response to my last post. : )

November 8, 2006 spout

Our Long National Nightmare is Over

Since at least 2001 we’ve been stuck in a quagmire of missteps, indecision, corruption and the eroding of our freedoms. Some of us feared it would never end.

But the US House and Senate are now officially out of the hands of the Republicans, and that’s cause for much rejoicing. Let the balloons drop and the dancing begin! It’s a new age.

P.S. apologies to Mr. Petzold for ripping off his blog post, but when I saw it in my RSS reader, I thought that the above would be the subject of his latest essay and that we would finally have something on which to agree. It’ll be my luck that he’s a staunch Republican and I’ll hear about my misguideness tomorrow… : )

November 4, 2006 spout

Pay As You Go Phones For the Boys

Back in writer avoidance mode, I did some research into PAYG phones for the boys based on some recommendations from friends, colleagues and Wikipedia. This is what I found:

Company Entry-Level
Phone Cost
Initial Airtime Additional
Airtime
Coverage
In My Area
Virgin Mobile $20 $20 (100 minutes) $11/hour uncertain
T-Mobile ToGo $30 $10 (30 minutes) $20/hour good
Firefly Mobile $80
(no keypad)
$7.50 (30 minutes) $15/hour reported
Tracfone $20
(shows time left)
$40 (120 minutes) $20/hour reported
Boost Mobile unknown
(bad website)
unknown
(bad website)
$12/hour reported
Cingular GoPhone unknown
(bad website)
$10 (40 minutes) $15/hour +
$1/day for usage
crappy
Verizon INpulse $70 $10 (100 minutes) $6/hour +
$1/day
reported
Net10 Wireless $40
(shows time left)
$30 (300 minutes) $6/hour reported

Assuming I trust my kids to call whoever they want (so long as they pay), it seems clear that Net10 is the way to go. It’s effectively $10 for the entry-level phone (because it comes w/ $30 of free airtime) and $6/hour for more time after the first 300 minutes are gone. Plus, the Net10 phones show the amount of time left on the account, so the boys can monitor it themselves easily. Neither AT&T Wireless or Cingular has good reception in my area, so who knows what the reception would be, but for $40, it wouldn’t be expensive to find out and they sell them at my local Safeway…

October 18, 2006 spout

Isaiah Okorie Asks “How do you do what you do?”

From: Isaiah Okorie

Sent: Friday, October 13, 2006 08:06 AM

To: csells@sellsbrothers.com; csells@microsoft.com

Subject: XSellent!!!

 

Hi Chris,

 

I am  a .Net developer working in Ghana, West Africa. I have been reading your articles for a while now and listened to you whenever the opportunity came along. I think you have been very inspirational to my own work.

[csells] I’m happy to hear that. Thanks.

 

If you don’t mind, I would like to know how you are able to organise you work. How are you able to prepare for your conferences and still be a prolific author?

[csells] I think I’d sum it up as: Commitment + Fear. First, I commit to something, then I let the fear of bad consequences, i.e. giving a bad talk, missing my deadline, writing something inaccurate, etc, motivate me to do a good job. Unfortunately, this means I spend more time working then I’d like, but generally the results turn out pretty good.

 

What discussion groups, conferences, blogs (if any) are a must for you?

[csells] Since becoming an MS employee, I lurk on a few internal aliases based on the technologies I’m interested in. Externally, I hang out on slashdot.org, joelonsoftware.com and computerzen.com and that’s probably about it. It used to be lots, lots, lots more, but I just don’t have the kind of time I used to. As far as conferences go, I generally only do the PDC and my own DevCons.

 

How are you able to keep up with the changes? What books do you read?

[csells] I keep up with changes by a) a broad familiarity with as much technology as possible and then b) committing to using it because it feels like it’ll be the right thing and c) using fear to motivate me (recognize a pattern? : ). I read books on demand given the topic I’m into, and then it’s 3-5 books in a week for immersion. Frankly, after writing a few books, I’m a bit of a snob, so I don’t read a lot of technical books for fun the way I used to.

 

Now you work at Microsoft, how do you manage your usual tasks’?

[csells] Honestly, it’s hard to keep up with the personal mail; I don’t do as good a job as I’d like. The web site stuff, e.g. blog, tools, spout, Genghis, etc, is catch as catch can. As soon as this last book is done (WPF Programming: The RTM Edition), I plan on trying to get some balance back into my life.

 

Many thanks for your inspiring hard work.

 

[csells] My pleasure.

September 27, 2006 spout

Horning in on Hanselminutes

It took a while, but I was finally able to horn in on an episode of Hanselminutes. Thanks for having me, Scott!
September 8, 2006 spout

Amazon Unbox — what about my TV?

I don’t want to download movies via Vongo or Amazon Unbox to my PC; I want to download them to my TV and smart phone! YouTube works because the videos are short, so watching them on my PV happens right now or not at all. Any movie or TV show service that doesn’t let me play the result on my media center or take it with me on my phone, I just don’t care. Does anyone want to watch 30+ minutes of video sitting at their desk or staring at their lap? I don’t get it…

September 5, 2006 spout writing

Congrats To Mr. Petzold on this WPF Review

In the world of Windows technical writing which has so much competition, there’s rarely any money involved, one dreams for reviews like these from KarstenJ:

Tim Sneath walked into my office the other day and laid Charles Petzold’s Applications = Code + Markup on my desk.  I’m only to Chapter 7 of 31 chapters and I am riveted.  I already have that feeling when reading a great novel when you don’t want it to end.  It actually does read like a novel to me, with a narrative arch as it negotiates its methodical way through the WPF jungle of APIs.”

Congrats, Charles.

August 18, 2006 spout

Fixing the Internet

About 18 months ago, I asked for an intern and boy did I get one. He doesn’t want to be mentioned, but he’s done some pretty cool stuff with the site in his spare time (he’s also a very busy web development consultant):

  1. Dug into what it would take to rebuild sb.com from scratch in ASP.NET 2.0 (although we differ on the moral implications of the license on Community Server 2.0)
  2. Updated 404 page that tracks usage on dead/non-existent links, even missing URL #frags
  3. Server-side link and client-side #frag forwarding
  4. tinysells.com implementation (e.g. www.tinysells.com/4) and administration console (i.e. book co-authors)

#4 was very cool, because it enables me to put links into my writing that are easy for the reader to type and that are easy for me to update when the real URL changes (none of the other URL redirection sites allow administration post-facto as far as I can tell).

#3 is also cool, because of the primitive site authoring tools I use (FrontPage), so when I move spout/index.htm (the content of spout/default.aspx) to spout/archive.htm (the content of spout/archive.aspx), all of the links that folks have put into their own content are broken. Now, we’ve got a means for tracking when those links are broken and for forwarding them, even using my silly client-side name #frags. That even means that when folks form their URLs incorrectly (this one was never right and should always have been this) can be caught and corrected on my side.

Anyway, I wish I could tell you about this guy cuz he does great work and he deserves move business. Hopefully this post will shame him into it. : )

August 18, 2006 spout

The Internet Is a Meritocracy

It’s easy to think that if you’re already got a high page rank in google, that you’ll get more than your far share of traffic, polarizing the internet into a small number of sites that get all the hits. Luckily, according to Topical interests and the mitigation of search engine bias,” published in the Proceedings of the National Academy of Sciences, that’s not the case:

Our result has relevant conceptual and practical consequences; it suggests that, contrary to intuition and prior hypotheses, the use of search engines contributes to a more level playing field in which new sites have a greater chance of being discovered and thus of acquiring links and popularity, as long as they are about specific topics that match the interests of users as expressed through their search queries.”

In other words, if you’ve got something relevant to say, the folks that care will find it. Yet again, letting the internet decide yields the best result.

Source: Is there a googlearchy?

August 15, 2006 spout writing

$33 On Bookpool: Windows Forms 2.0 Programming

The nice folks at Bookpool are running a special on Windows Forms 2.0 Programming: only $33! Enjoy.
August 14, 2006 spout

24 and the Comic Book Archive

I’m an avid 24 watcher and one of my favorite parts of the show (offsetting the fact that Jack never so much as cracks a smile let alone giving us a nice Wahoo! I did it! I rock!“) is when one of the technies sends her screen” to another computer. Man! I want that! It’s so often the case that I’ve got a bunch of morning news sites and documents I’m reading through that I get onto one computer in my house and want to send to another computer for reading (maybe it’s the computer downstairs or the Tablet), but there’s no way to do that. I want a little glyph next to the Minimize button called Send that lets me pick a computer to send the screen to.

And what does that have to do with the Comic Books Archive, which was archiving digital images of almost 3000 comic books at last count? These are folks that have figured out how to digitize a specific media and provide a specialized format (the Comic Book Reader format) and provide a specialized reader (cdisplay), which would make an excellent thing to send to a Tablet PC, along with PDFs, Word docs, web sites, 18,000 books from Project Gutenberg, and anything else that you’d like to share between your own computers or those of your friends and colleagues.

In April of 2005, Paul Thurrott mentioned something called application sharing” that would enable sharing of individual apps via terminal services instead of entire winstations. I don’t know if we’re actually building such a thing, but I in addition to being able to reach from one computer to another to grab an app, I’d also like to send one.

Wouldn’t that make Jack proud?

August 13, 2006 spout writing

Get ’Em While They’re Hot

Even though the 1st printing was just in May of this year, Windows Forms 2.0 Programming just entered the 2nd printing. Thanks for reading!

August 11, 2006 spout writing

We Sold A Copy of ATL Internals!

You said it couldn’t be done, but ATL Internals, 2e, has a review! Thanks, W.

August 8, 2006 spout

The Media Center PC ain’t a desktop; it’s a server

I’ve seen some flack lately about how the Windows Media Center Edition-style computers haven’t changed how folks consume content. Man, it sure has changed mine. Sure, you can put a MCE box on your desk and watch TV from your chair, but who the hell wants to do that?

A MCE box belongs in a living room or bedroom somewhere or even in a server closet. In fact, while I have my MCE box attached to my bedroom TV, I use it as a media server for music, video, photos and recorded TV shows. My media is available at every PC in my home and at every TV w/ an MCE extender box (I have an XBox on one TV and an XBox 360 on another). This setup allows my media room” to be my entire house and allows my family room media setup to consist of an HDTV and an XBox 360.

What’s not to love about that?

August 3, 2006 spout

3 Degrees of Email Separation

Microsoft is a sea of answers if only you can find the right person to ask. In my experience, I get a lot of those incoming questions, both internally and externally. Often, I don’t know the answer, but I can direct the email to someone closer, who will either know the answer or the right person to ask and so on.

Depending on how well a person in this chain is at answering this email, this process can take minutes or days, but it almost always ends up with the person that knows the answer within 3 emails. Often this chain involves an internal mailing list (lots of external questions end up on internal email aliases, insults and all : ), which doesn’t necessarily shorten the chain, but it does tend to shorten the response time.

I consider the ability to follow this chain to an answer one of the huge benefits of my industry — I wish I was able to tap into it in other disciples, e.g. health care, financial, home repair, etc. Likely these chains exist in other areas, too, I just don’t know the first link in the chain. I actually tried to establish a financial chain one time, but that just pissed off the guy who was always my first email. : )

July 30, 2006 spout writing

Custom Settings Provider in .NET 2.0

I updated the SDK RegistrySettingsProvider to implement IApplicationSettings and built a sample to demonstrate how to integrate it (or any .NET 2.0 custom settings provider) with the settings designer-generated code. Enjoy.
July 29, 2006 spout

Laura Foy makes on10.net for me

I had my first on 10 experience today (I was following the links to the PhotoSynth stuff) and I have to say, I instantly fell in love with Laura Foy. I know that Erica Wiechers (of The .NET Show and MSDN TV) has a huge geekboy fan base (and it was fun to work with her @ MSDN), but Laura’s interviewing style and her personality made me subscribe to her interviewer-specific RSS feed on 10.

In fact, Laura makes me wish I did something besides developer-related stuff. What do I have to do to be interviewed by Laura Foy?!?

P.S. I wanted to title this blog entry Laura Foy is a major babe,” but Laura is a fellow Microsoft employee and that would be inappropriate. Also, the whistling and cat calls would be way out…

July 23, 2006 spout writing

An Embarrassment of WPF Riches

I just realized that Avalon is getting a book treatment unlike any other topic in my memory:

User and GDI had Petzold. Win32 had Rector. MFC had Prosise. COM had Box. Indigo’s got no big names I’ve yet seen, but Avalon gets Anderson, Petzold, Nathan *and* Griffiths?!? It’s going to be a bloodbath in the market, but the readers are going to benefit. Why couldn’t I have picked a lightweight topic, like, oh, I don’t know, ASP.NET 2.0? : )

July 17, 2006 spout

DVD Wars. Huh. What is it good for?

Here’s the thing I don’t get about the next-gen DVD Wars.” When I moved from VHS to DVD, I got much higher quality output and random access to content. Given that DVDs are already letterbox, what do I get moving to an HD DVD format? Is the quality that much better? Are there other features I get that I’m going to really want? The only feature I wish I had was the ability to easily burn the main content of my DVDs to my computer for random access like I get w/ music today. Will the next-gen formats support that?
July 6, 2006 spout

Struggling with NUnit (2.2)

The one where I get System.IO.FileNotFoundException in NUnit in a bunch of different ways and suggest some possible solutions.
July 6, 2006 spout

Struggling with NUnit (2.2)

Struggling with NUnit (2.2)

I had a very unpleasant afternoon trying to get NUnit working, so I thought I’d share my troubles and my solutions (such as they are). A search revealed a lot of folks with the same troubles, but precious few explanations or solutions. The NUnit Quick Start documentation does a wonderful job telling you how to write a simple TestFixture class with one or more Test methods (and even an optional SetUp method). However, as far as I could tell, there wasn’t any part of that tutorial that said “Hey! Add a reference to nunit.core.dll’ as well as nunit.framework.dll’ to your project or neither nunit-gui nor nunit-console will work;” you’ll get a System.IO.FileNotFoundException when you don’t have nunit.core.dll (the Exceptions Details menu item doesn’t help):

Also, when you start up nunit-console, you better darn well be in the current working directory of the test assembly as well as nunit.core or you’re going to get the same message in the console. Likewise, if you start nunit-gui. Further, if you just run nunit-gui, create a new project and then add an assembly, you better have known to save the .nunit project file in the same directory as the assemblies you add, or you’ll be getting the same message again.

And, as if that weren’t enough, you’ll get this message again if you add nunit integration as an external tool to VS05 (via the Tools | External Tools menu item) using the instructions in the docs. The docs say to use $(TargetPath) and $(TargetDir), but those variables expand to the obj directory on my machine (although that seems wrong to me), not the bin directory, and the obj directory doesn’t contain the referenced assemblies. I never was able to get a VS05 external NUnit tool to work.

Luckily, it’s very cool that nunit-gui doesn’t keep test assemblies locked and notices when an assembly has changed from underneath it, so that once I do get it started with the appropriate working directory, it works nicely.

As it turned out, there were a lot of ways to get that FileNotFoundException message and I’m pretty sure I found them all before finding any ways to actually make nunit work. None of these things are NUnit’s fault it’s damn hard to do dynamic assembly loading in .NET but it’s still on you to make sure NUnit is configured properly.

Finally, the tutorial shows but doesn’t say that you better make your test methods public. Since NUnit uses Reflection, it doesn’t need the classes or the methods to be public, but I guess they decided that was an interesting knob to let the developer turn. I’d have preferred to let the default permissions work (internal) to save myself typing, but that’s just a nit.

June 27, 2006 spout writing

When to ship a book is hard to know these days…

Mr. Petzold beat me to the punch on the Windows Forms 2.0 book and he’s going to do it again on the RTM Avalon book. However, such a thing is dicey, as Mr. Petzold points out.

It was in researching the Windows Forms 1.0 book when I grew to be scared of finalizing a book before the technology was finalized; that’s when they added AllowPartiallyTrustedCallersAttribute and it screwed up the entire No-Touch Deployment story. Toward that end, we didn’t ship the WinForms 2.0 book til after the .NET 2.0 bits went gold and we won’t ship the paper copy of the Avalon 1.0 book til then, either (although I understand ORA is going to be shipping early electronic drafts of our work as we do it). I have to sacrifice 2-3 months on the shelves to my competitors, but I get to be less scared of big, last minute changes.

It’s a judgment call, though. In this era of books with 12-18 month shelf lives, I can’t say Mr. Petzold’s not right…

June 16, 2006 spout

PM Skill #9: Team Off-site

I’ve been doing some design work with a small part of my new team for a few months now and we’ve gotten largely on the same page with each other. However, there were 20-some odd folks that we hadn’t done a good job keeping on the same page, so ChrisAn proposed an off-site. I proposed the format:

  • 45-minute slots for each bucket” of design functionality with the owner of the bucket leading the discussion (my boss, Adam, wanted to make sure that at least half of each talk was *not* lecture from the speaker). Each session was followed with a 15-minute break.
  • 90-minute break-out sessions where each person had to pick their technology bucket and work with the owner to produce a 2-page functional spec and a 2-page technical spec.

If this format sounds like a tweaked DevCon to you, then you know where I got the format.

We started at 8am (1-2 hours before most folks start their day @ MS), so that gave us a little shared adversity to help build the team.

The 45 minute sessions made sure that the presenter had to get to the meat quickly, while the 15 minute breaks allowed folks some downtime to catch their breaths, check their email and chat with their brethren (this was a new team, so bonding” time was an important element).

The 90 minute break-outs allowed folks to self-select into the bucket that most interested them, validated that we had the right buckets (any bucket w/ too few people would be cut, whereas any bucket w/ too many people would be split), helped establish the base-line for each bucket’s future (we used the off-site to kick-start the buckets) and gave the team a seemingly impossible task given the amount of time they had (shared impossible task == more team building).

Like your average DevCon, the DesignCon” worked pretty well. We generated a ton of issues in each bucket that the owner hadn’t yet thought of and gave the entire team a kick-start down the road to shared pov. Also, since we had some folks from other, related teams and from upper management, we made sure we were communicating up and out as well as internally.

Of course, just as no DevCon is perfect, neither was the DesignCon, but if you’re looking for a way to get your team pointed in the same direction, I find the DesCon format a good one.

May 24, 2006 spout

T-Mobile Smartphone Fun Facts

A coupla weeks ago, the AT&T wireless cell phone reception at my house went through the floor. I called up the nice folks at Cingular and they guaranteed me that my reception would improve if I moved my old AT&T account to Cingular (Cingular owns both, after all). When that didn’t work, I went to the mall, signed up for T-Mobile, went to my house and, when the reception was much better, had em move my phone number over. Since then, I’ve been moving my smartphone along with me (I have a QTEK 8500 on order, but my Audiovox 5600 is still the greatest thing to happen to me since my first laptop). Here’s what I’ve found:

  • To get the data working (assuming you’ve selected that account option from T-Mobile), set up a GPRS connection that connects to the internet and uses wap.voicestream.com” as the Access Point (no user name, password or DNS addresses). There’s no need for a proxy connection, but make sure that your IE connection options use the internet as its network (I mistakenly had it set to WAP at first).
  • To use the phone as a modem for use in connecting to the internet, pair the phone w/ your computer using Bluetooth (make sure to put the phone into discovery mode so that Windows can find it) and then use the new COM port that Windows adds (COM4 on my machine) to set up a dial-up network connection, using *99#” as the phone number (no user name or password). I get this working when I called T-Mobile and they walked me through the setup, even though the Audiovox isn’t a supported phone and the tech support guy had no documentation on one.
  • This isn’t phone related, but once you’ve got a T-Mobile data plan, you should be able to use WiFi from your laptop at a T-Mobile HotSpot by using your 10-digit phone number as the user name and the last 4 digits of your SSN as your password (I haven’t tried this yet, but I plan to!).

Theoretically, I should be able to use ActiveSync via Bluetooth, but I haven’t figured out how to make that work yet.

So far, I’m loving T-Mobile, not just cuz of the rates and the features, but also because they seem to understand that some folks aren’t going to want to be stuck with the phones that they sell and they actually help you make them work. T-Mobile’s not the biggest network, but apparently that makes em try harder. Recommended.

May 23, 2006 spout

Don’t want to skew Amazon reviews

While I don’t mind being called tacky by one of this generation’s best technical writers, I do mind the idea that the folks that would abuse the system would skew the Amazon reviews. While I don’t hide the fact that I ask people to post reviews for my book, I’ve always been proud that I’ve never asked them what kind of review to post and, when Amazon’s system had a hiccup recently, none of my books had any reviews posted by me (unlike 50% of the other books on Amazon).

So, the idea that folks would just post a review having not even read the book was something I never considered (and why you don’t want me writing your security subsystem). So, consider this offer rescinded. You can post a review on Amazon or not, good or bad, as you choose.

However, as to the signed copies, I still want you to have those. So, the first 5 people to tell me the 2nd word in the 3nd paragraph of prose on page 444, I’ll send you a signed copy. Whether you purchase a copy or just go to the bookstore and look up the word is up to you.

May 22, 2006 spout

Google’s 2-day interview process

May 22, 2006 spout writing

Post an Amazon review and you get my royalties

Update: Whoops — didn’t think of the ways to abuse this system. I’ve updated the offer here.

If you post a legitimate review on Amazon for Windows Forms 2.0 Programming before the 4th of July, 2006, I will personally send you my royalties for that copy of the book ($4.77 — don’t spend it all in one place : ).

You have to put your email into the Amazon review so that I can communicate with you about your address and Sells Brothers, Inc. can send you a check, but good review or bad, my royalties for one copy of the book are yours.

The first five reviewers also get signed copies shipped to their home (I’ll get Mike to sign it, too). Again, the email needs to be in the post.

May 19, 2006 spout writing

WinForms 2.0 book @ the printer

WinForms 2.0 book @ the printer

The one where the brothers Sells and I travel to Ann Arbor, MI to see Windows Forms 2.0 Programming being printed. It’s well worth the trip, if you can talk the publisher into arranging it.

May 19, 2006 spout

The Sells Brothers Meet the Edwards Brothers

The Sells Brothers Meet the Edwards Brothers

Years ago, Tim Ewald made an off-handed comment about how cool the real book printing process was and that I should take the boys to see it if I ever got the chance. Two weeks ago, we got the change and this is what we saw.

The printer for Windows Forms 2.0 Programming was Edwards Brothers, Inc. in Ann Arbor, MI. The boys and I took the 8pm flight from Portland, OR to Vegas, then the 11pm flight to Detroit, arriving at 6am, having gotten about 3 hours of sleep during the flight (the boys first redeye!). On the way out the door, we’d been a little rushed (I was trying to finish off the flooring in the new laundry room so that Melissa could have her washer and drier back after its long absence during the renovations), so had left all of the carefully prepared contact info and directions sitting in my office, meaning that the first thing we had to do was to sit in the airport near a hotspot and download driving directions. This and a trip to the restroom for a teeth brushing and a fresh shirt and we had caught our 2nd wind.

We picked up our car and had a very pleasant trip to Ann Arbor, where we stopped at Mike’s Coney Island for pancakes and omelets (I had the pancakes and my youngest surprised the hell out of me by ordering an omelet — they grow up so fast!). We arrived at Edwards Brothers around 7:30a (in some time zone) and learned that they had been in business for a little while longer than Sells Brothers, Inc:

Unfortunately, we’d arrived before our escort, the very lovely Ms. Cindy Rohraff, so she caught us napping in the parking lot around 8am. Still, as we entered the lobby, it was clear that they were as excited to show us around their operation as we were to be there:

After Cindy purchased caffeinated sodas (Microsoft has spoiled me enough that I hadn’t come prepared to actually *purchase* sodas…), we began our tour and the first thing we saw was a big basket of the rejected bits of my book:

As it turns out, these bits weren’t rejected on content, but rather on printing quality.

The size of the printing floor is enormous. It felt like 4+ football fields in there and I’m sure I saw at least 50 different books in various stages of production. In this picture of the boys and Daryl (in charge of printing our job), you can get some small sense of the size of the place:

For all those jobs, Edwards Brothers employees are constantly throwing away covers, inserts and signatures” (bundles of pages that get stuck together to produce a book) that don’t meet their quality standards. In fact, I saw one guy throwing away what must’ve been 100 freshly printed book covers because he’d examined one of them with a magnifying glass and found a flaw. These guys are serious.

Next, we found our way to the input end of the printer, where they feed in 2-ton rolls of paper:

If you look closely, you’ll see that their are two rolls of paper connected here. Only one is fed through at a time, but when the first is out, the 2nd is spliced in automatically without ever slowing down the printing process, providing a virtual infinitely long roll of paper. A cache of paper is kept on rollers to enable the time it takes to splice:

When the splice happens, the rollers at the top and the bottom (not shown) get close together as the cache is used up and then after the splice, the rollers expand again as the cache fills up. That’s not to say that the printer doesn’t stop at all. When it’s running, the paper goes through the process so fast, the words and images are a blur, but whenever there’s a problem, the process grinds to a halt and restarts w/o issue.

After the cache, the paper feeds into the printing machine (or machines, depending on how many colors the output needs):

and comes out all printed:

The printing itself happens with ink that’s been spread over thin metal plates containing the laser-etched images of the book in 48 page sets, one plate for each side. The paper goes through the printer between the two plates. Here you can see Daryl changing the plates:

To support the ability to change the plates, the printer opens in the middle with hand cranks, which Daryl let the boys operate:

Daryl was one of the long list of people that bent over backwards to show us around and explain to us the process (Thanks, Daryl!). The plates themselves are shown here:

After the pages are printed, they’re rolled and cooled to set the ink:

After the ink is set, the paper goes into a machine that cuts it and turns it along three separate paths (you can see one of the paths continue over the top of the cutter):

Each path of paper is routed through a folding and bundling machine:

Once out of the bundling machine, the bundles are gathered together:

compressed (losslessly):

and stacked on pallets in sections (my book had 27 sections) for transport to the bundling department:

In my case, the cover:

and the color insert:

were printed by another vendor, but Edwards Brothers is fully capable of printing these elements. In fact, my book is pretty trivial compared to the tricks that the EB folks can do. I think next time, I’ll ask for a two-part cloth-bound hardcover with stained edges just to test em. : )

All 6500 copies were printed in one day and stacked over in the binding section of the printing plant (and again, notice the size of this place):

All of the sections were then stacked into the collating machine:

After this, my batteries ran out of power temporarily (they helpful staff at EB replaced em for me), so I can’t show you pictures, but once the books are collated and the spines bathed in glue at two temperatures (275 and 300 degrees Fahrenheit), the covers were attached and crimped and the books given the wheel treatment” as they exited the machine on their way to the cutter:

The cutter was this very scary machine they called the guillotine” and  was able to cut all three edges of my 1000 page book in a single slice and then stack the books into neat piles:

Not all the books survive the trip through the cutter (much like a real guillotine):

Once the books have been trimmed, they’re boxed and put on a conveyer to the shipping department. The shippers are responsible for lifting every single book (I apologized for my wordiness) and putting them onto palettes that are wrapped in plastic and hoisted by forklift:

The forklift stacks each palette in the warehouse for shipping:

That’s not all. The little bits of paper that were the edges of my book and the low quality copies are shredded and compressed into giant chunks:

Like the books, the cubes of paper are stacked in the warehouse for shipping:

The waste paper is shipped off to a recycler for use in other books, whereas the books themselves are shipped to distributors, like Amazon, Borders and Barnes & Noble. By now, the first of the pre-orders should be being fulfilled. The ones that aren’t sent off for sale are given to vain authors that need a physical manifestation of their work to really understand the amount of time and energy that goes into producing their book:

Special thanks go to Cindy, who was our most gracious hostess and to the staff and management of Edwards Brothers, Inc, for their work in producing such a high quality product. I also have to thank the boys for their infinite patience in indulging their father traveling to the middle west of our country to hang out amongst the stacks and stacks of books in progress. And, of course, thanks go to the readers. I hope you enjoy reader the book as much as I enjoyed working on it.

May 12, 2006 spout writing

A C# Bedtime Story Updated for C# 2.0

Seeing a reference to A C# Bedtime Story as a generic definition for .NET delegates in a recent DDJ article inspired me to post the new and improved version that takes into account C# 2.0′s anonymous delegate support. Enjoy.

May 9, 2006 spout writing

ATL Internals, 2e, available for pre-order

ATL Internals, 2e, this time with ATL 8, is available for pre-order on Amazon.com. For those wondering what the world needs with such a book, I refer you to the preface:

.NET has hit the Windows programmer community like a tornado, tipping over the trailer homes of the ways that we used to do things. It’s pretty much swept up the needs of most web applications and service applications, as well of most of the line-of-business applications for which we previously used Visual Basic and MFC.

However, a few stubborn hold-outs in their root cellars will give up their native code only at the end of a gun. These are the folks with years of investment in C++ code who don’t trust some new-fangled compiler switches to make their native code managed.” Those folks won’t ever move their code, whether there are benefits to be gained or not. This book is partially for them, if they can be talked into moving their ATL 3/Visual C++ 6 projects forward to ATL 8 and Visual Studio 2005.

Another class of developers that inhabit downtown Windows city aren’t touched by tornados and barely notice them when they happen. These are the ones shipping applications that have to run fast and well on Windows 95 on up, that don’t have the CPU or the memory to run a .NET application or the bandwidth to download the .NET Framework even if they wanted to. These are the ones who also have to squeeze the maximum out of server machines, to take advantage of every resource that’s available. These are the ones who don’t have the luxury of the CPU, memory or storage resources provided by the clear weather of modern machines needed for garbage collection, just-in-time compilation, or a giant class library filled with things they don’t need. These developers value load time, execution speed, and direct access to the platform in rain, sleet, or dark of night. For them, any framework they use must have a strict policy when it comes to zero-overhead for features they don’t use, maximum flexibility for customization, and hard-core performance. For these developers, there’s ATL 8, the last, best native framework for the Windows platform.

April 18, 2006 spout writing

WinForms 2.0 book just about ready

Mike and I submitted our last round of comments to the WinForms 2.0 book last night. The way it works is, after we submit the final” manuscript, the copy editor has his/her way with it. Then Mike read all 1300 pages, making sure that the copy editor didn’t change the meaning of anything. After that, the publisher moves everything from Word to Quark so that they have the control they need to produce photo-ready copy for the printer and sends us a set of PDFs.

With the PDFs in hand, we both read the ~1000 pages again (the move to Quark puts in the final styles), looking for things that got messed up during the move between software packages or new things that we notice. Theoretically, we’re only checking for formatting, but I always take this opportunity to read the entire book all the way through with fresh eyes (which is why I made Mike do the copy edits — so I had some time away from the book to get fresh again). That yielded about 50 pages of comments for the publisher to apply, including dropping about 5 pages of content that didn’t add enough value to be worth the space.

And then the iteration begins. We submitted 50 pages of comments on round 1, they provide round 2. We submitted 10 pages of comments on round 2, they provide round 3. Last night, we submitted about 4 comments, none of which would ever be noticed if they weren’t submitted. I asked for a round 4 (just cuz I’m anal), but for all intents and purposes, we’re done. And how do we party animals plan to celebrate? We’re taking 90 minutes for lunch. Off campus! : )

By the time all is said and done, not counting the front mater or the index, chapters 1-19 and appendices A-F will be 960 pages. It was about 1300, but we cut and we tightened up the styles to keep it to 3 digits while still covering roughly twice the technology (WinForms 2.0 is about twice as full-featured as WinForms 1.x). We were careful about not cutting anything useful, but we were ruthless about cutting stuff that didn’t meet the bar. Hopefully you’ll like the results.

Windows Forms 2.0 Programming is supposed to be printed the first week of May, so you should order yours today!

March 16, 2006 spout

I just watched my son learn to fear the computer

When kids are young, they have no fear of computers or anything else. My eldest, when he was 2.5, knew how to detect what OS he was running (I dual booted Win2K and Win95 at the time), remember which OS his games needed, reboot, choose the non-default OS from the boot menu and start his app like it was the most natural thing in the world. Even though he couldn’t read, he learned all of the functionality of the app by choosing all of the menu items and pressing all of the toolbar icons just to see what they did. He had no fear.

Tonight, my youngest was working in Word, writing a paper that’s due tomorrow (of course). After he was finished digging through the thesaurus on the right-hand side, he wanted to close that part of the window, but accidental pressed the X to close the document he was working on (which, of course, he hadn’t saved). When he was asked if he was sure, he thought he was being asked if he was sure he wanted to close the thesaurus, so he pressed Yes.”

The moment his document disappeared is when he learned to fear the power of the computer to throw away his work.

What did he do wrong? How do I explain it to him? What did we do wrong as an industry to teach my son to fear a tool meant to help?

March 11, 2006 spout

My $366 Vista PC

My $366 Vista PC

This morning, I read about a $159 computer from a review on the PC Magazine site:

I called my local Fry’s, and while they were no longer have the $159 sale (apparently quantities are limited”), they would be willing to sell me one for $171. While I was there, I got a 1GB memory upgrade and a 256MB ATI graphics card. Here’s the equipment I went home with:

  • Fry’s Genuine Quality 3131 PC: $170.99
    • 1.67GHz CPU
    • 128MB of RAM
    • 40GB HD
    • 10/100 integrated Ethernet
    • 56KB modem card
    • 52X CD-ROM
    • Stereo speakers
    • Keyboard + Mouse (including roller ball)
  • ATI Radeon 9550, AGP 8x/4x, 256MB DDR RAM: $94.99
  • 1GB RAM SIMM(for a total of 1.1GB of RAM): $99.99

I then added an LCD panel and a DVD drive I had laying around. Total cost $365.97.

When I got the PC, it came pre-installed with Lindows, the Linux distro meant to look and act like Windows. And I gotta say, it wasn’t too bad. Then, because they ship a free CD that runs directly w/o an install, I plugged in Ubuntu, another popular client-side Linux distro which was also surprisingly easy to use. Neither was as familiar as Windows XP, of course, but they were both a lot easier to use then the last time I ran Linux.

At 12:04am, I started the Vista Feb 06 CTP installation. At 12:44am, I was running Vista, it having recognized all of hardware (except the sound device) from my $366 PC, including enabling those cool glass” effects and the nifty animations, integrated search and all the neat things you’ve read about in the Vista reviews.

I know I work for the man,” but even so, I’m seriously impressed. The install was fast and seamless. The performance is way better than I thought it would be. And the little UI tricks are fabulous. I can’t do any media stuff cuz my audio device wasn’t recognized, but it was cool when I tried to play video and a DVD, that the Vista Media Center UI came up (my complete home entertainment needs are served with a coupla TVs, a Media Center PC and an XBox).

I know, I know, I got the OS for free, but come on! It’s still beta and it runs great on my cheapo PC! I don’t know what Vista’s going to go for, but I bet the whole she-bang (including LCD panel and DVD drive) could be had for ~$500 when Vista ships. Plus, I’ve only been playing with it for about an hour, but I already don’t want to go back to my XP boxes…

P.S. This post was composed and posted from visto,” my new Vista PC.

February 25, 2006 spout

testing

1.2.3…
February 25, 2006 spout

PM Skill #9: Learn From The Masters

Of course, when you’re learning to do something, whatever it is, you should check out how a lot of different folks do it. For example, the author of The Game learned to be a PUA from a variety of sources. One PUA guru of PM love is Brad Abrams and he regularly spills his guts onto his blog (plus, you’ve got to love his numbering scheme…):

Enjoy!

February 24, 2006 spout

PM Skill #8: Give Credit Freely

Engineers are people, too, and appreciate pats on the back as much as anyone. In fact, many of us are so socially needy that we’re willing to trade attaboys” for money (and hence the fuel that drives the OSS community).

The beauty: praise is cheap. Blocks of plastic, plaques, bowling night morale events, etc, all cost money and can be the cause of derision as often as pride. On the other hand, sincere praise freely given doesn’t cost a thing, but it’s often much more appreciated.

So why doesn’t praise happen more often? I think one reason is because we’re engineers, so we’re trained to focus on where our work falls short, often completely ignoring when it lives up to expectations. Also, sadly, it’s not uncommon for folks to want to take credit for themselves . However, as PMs, we have to remember that just because we give the presentation or write the status email doesn’t mean that we did the work. We need to be explicit about giving credit.

So, the next time you’re giving a talk, don’t say And this feature does …” say This feature, which Pete implemented, does this…” When you’re writing that status email, don’t say We implemented feature XXX this week…,” say Carol and Joe implemented feature XXX this week…” As soon as you do this, Pete, Carol and Joe know that you appreciate their work and that whoever you’re communicating with knows that they did good things. Appreciated team members are happy team members.

So, does that mean you should praise things you don’t necessarily appreciate, just to keep your team motivated? Absolutely not. As soon as the praise sounds empty, you’ve done more harm than saying nothing at all. Definitely look for opportunities to give credit, but don’t make stuff up that you don’t believe.

But what do you do to get praise for your own work if you’re busy doing all of this praising of your team mates? Nothing. Praise from yourself is called bragging” and it makes you look stupid (I know this because I struggle w/ this constantly). Give your praise freely and let others do the same. If you’re effective, people will say good things and that’ll be enough.

February 15, 2006 spout

A Reviewing Trick I Learned A Long Time Ago

I learned this way of reviewing artifacts from Cal Caldwell, a friend of mine from my instructor days. The technique is for doing code reviews, but I’m going to be using it later this week for some design docs. Anybody who recognizes this technique can chime in with what it’s called:

  • Every reviewer gets a different hat,” i.e. a POV that they adopt when reviewing, e.g. looking for coding guidelines, looking for readability, looking at a feature from an architecture pov, looking at it from a particular customer pov, etc. Anyone can have feedback on anything, but the idea is that with different folks wearing different hats, you get a greater coverage.
  • Every reviewer brings review comments to the meeting, i.e. you reviewer before hand and only report at the meeting.
  • Every reviewer must start with something nice! Too often, engineers focus on the negative. Saying nice cushions the blow and reinforces the good things so that they don’t get cut.
  • Each piece of feedback will be logged (hopefully by the person that provides it) and spoken to the reviewee, but will not be argued with. If a reviewee disagrees, they keep it to themselves, asking only clarification questions to make sure that they understand the feedback. What feedback is applied it up to the reviewee and any follow up arguments happen offline.

That’s it. The best code reviews I’ve every participated in used this technique and I can recommend it highly for that. On Monday, we’re going to use it to get through a large number of design docs, so I’ll let you know how that goes.

February 15, 2006 spout

Scrum is very focusing

We started using scrum in my group this week and I’m already finding myself pushing aside work that I would normally sign up for in other groups. Scrum gives you to choice of being able to say I did what I said I was going to do yesterday” or I didn’t.” I want to always be able to say the former or have a good reason why not. Is I was working with this other group” a good reason when the rest of your team is focused 100% on the thing? This is going to play hell with MS culture, but in a good way, imo.
February 10, 2006 spout

Multi-Touch Interaction Research

Wow. I wonder how many years that existence of the mouse has set us back because it delayed us from using this.
February 10, 2006 spout

My Favorite Wiki: pinvoke.net

I guess wikipedia is cool, but the wiki that provides a vital service in my life is pinvoke.net, which provides an enormous, user-contributed list of Win32 API mappings for .NET. I find it useful not just because folks are contributing tons of stuff I use, but also because I find it a wonderful place to drop code for my own later use, e.g.

This is the closest thing I’ve seen to a working code repository that is just as easy to contribute to as it is to use. Highly recommended.

P.S. I think this kind of functionality should be built into the SDK docs. I’ll ask em.

February 3, 2006 spout

PM Skill #7: Use That Meeting Time!

It’s very easy, as the PM, to not want to waste team time in a meeting, letting folks go when there’s still 30 minutes left. In fact, lots of folks will praise you for your short meetings. That’s fine if all of the work for that meeting has been done, e.g. everyone’s reported their status, all of the open questions have been decided, etc.

However, it’s often the case that in these meetings, other issues will come up to be discussed in future meetings to be scheduled at another time. Don’t let your concern for your team mates’ free time tempt you to let em go! It’s hard enough to get the folks you need together in a room. Once you’ve got em there, use em.

For example, if you’ve got the team together for weekly status that’s scheduled for 60 minutes, it often only takes 30 minutes. In that 30 minutes, you may decide that a subset of the team needs to get together for an hour design discussion on whether to spinning text boxes to your next software project. As a dutiful PM (aka mom”), you’ll often find yourself saying, Sure — I’ll set that up.” Then it’s your job to find an hour on everyone’s calendar while that issue remains open and the project drags on.

Don’t do it! Instead, peel off the folks in the status meeting that need to be in the hour design discussion” and have the meeting right then and there. You’ve already scheduled the weekly status for 60 minutes, so you know those folks are free and just dying to get back to reading email in piece in their office — put em to work instead! Who the hell knows how long a design discussion is going to take anyway? It’s just as likely to go under an hour as over, so you might be able to wrap up the issue right then and there, skipping the need for another meeting altogether. Believe me, your team mates will thank you for that!

January 31, 2006 spout writing

Japanese version of Avalon book

I thought someone might be interested in the Japanese version of our WPF book. Personally, I love the cover.
January 31, 2006 spout writing

Pre-order “Windows Forms 2.0 Programming”

I just noticed that Windows Forms 2.0 Programming,” by Michael Weinhardt and Chris Sells, is available for pre-order. I’ve had a lot of requests for info on this book, so now folks can watch this space. Mike and I have finished the copy edit rounds, but we still haven’t seen the final PDFs, so it’s still going to be awhile (hopefully no later than early April).
January 31, 2006 spout

IE7 Beta 2 worth the download

I’ve been using IE7 for the last week or so and it’s definitely worth the download. Just Ctrl+/Ctrl- itself is worth the upgrade, imo…
January 25, 2006 spout

Imperative vs. Declarative

Savas showed me this great example from a book he’s reading. Consider this:

F = m * v

Using an imperative interpretation, this is a expression that, when evaluated, multiplies m and v, putting the result into F.

Using a declarative interpretation, this is an equation and is completely equivalent to the following:

m = F / v

The imperative interpretation allows me to execute. The declarative interpretation allows execution as well as addition reasoning.

January 22, 2006 spout

Netflix for Books?

I know, I know, I hate books.” Still, books are where most of the content I love is, so I live with em. However, it’d be nicer if there were a Netflix for books, like there is for DVDs and games. I think the public library should be become such a thing and I’d happily pay $15/month for mail delivery and return.
January 19, 2006 spout

I want a service that “rips” books

Assuming the Sony Reader is cool, I still won’t have all the content I want and I certainly don’t want to repurchase all of my books. In the same way copyright law enables me to backup my CDs and DVDs, I want to rip” my books and comics for electronic use. I’d like the same technology that the Google and the Amazon folks are using to digitize existing books (the folks that litter USENIX with copyright materials must have a cool setup, too). My understanding is that, unlike CDs and DVDs, which are easy to read via computer, books are not, so I’ll need a service where I can box up my books and send em for ripping, resulting in a shiny DVD filled with my words and images, ideally OCR’d enough to allow full text search. In fact, after a while, the book rip houses would have most books on file, so I’d only have to prove that I own a book and they could email me the electronic version, saving us both the shipping charges. In further fact, this is an additional service that Google and/or Amazon could provide, since they’re already ripping” the books they sell…

January 18, 2006 spout

I Hate Books

I hate that indexes suck and that they don’t support full text searching across my entire collection.

I hate that I have to guess which ones I’ll need or want so that I can carry them with me.

I hate that I need a light to read them, potentially bothering the driver or a sleeping spouse.

I hate moving them, making shelves for them and searching for them on the shelves.

I hate that I can’t take notes in them — not even the ones I own — without breaking out into a cold sweat (although, to be fair, that’s more about my librarian mother than the book itself : ).

I hate that I have to buy a book twice if I want to listen to it instead of read it (and I hate that there’s no way to pronounce pictures or code).

I hate that if the local book store doesn’t have a book, that I have to wait for somebody to deliver it.

I hate that my local book store doesn’t have reviews of the book, whereas my on line book store doesn’t let me flip to whatever page I want.

The one thing I don’t hate about books is the content. That part triggers my thoughts and my emotions in me that are so strong, I put up with all the things I hate so I can get to it.

Why isn’t there an iPod for books (is it because iBook is already taken)? Why isn’t all print media, e.g. novels, poems, comic books, news papers, magazines, etc, available in electronic format?

January 17, 2006 spout

PM Skill #6: Be The Team Mom

In an ideal world, a PM would be able to get together with their team, lead the discussion til everyone agrees what they’re going to do and while they’re doing it, hang out on the beach answering the odd question on their smart phone til the work is scheduled to be done.

At Microsoft, we don’t live in an ideal world.

Instead, we have roving bands of PMs prowling the halls looking for resources, trying to get things done. Because this is an accepted part of MS culture, people actually listen when a PM shows up at their door to pitch their idea and ask them to help. And, so long as it fits into the broad goals they’ve set up with their boss and their other commitments, and it’s more fun then the thing they’re supposed to be doing, they often say yes.”

This means that folks on your team often have multiple commitments that they have to decide between. It’s like when you get married or close friends, you’re going to have more than one family to visit at Christmas time. However, you have to put your blood relatives first, making them your top priority and squeezing in the other families when you can, e.g. Christmas Eve Eve.

As a PM, you have to know what the blood relationships” are for each of your team members. Are you their second or third family? If so, you have to take Christmas as celebrated on.” However, if they’re in your first family, then you take top priority and you should feel free to act like their mom.

Traditionally, it’s the mom’s job to make sure people are healthy and happy (doing stuff they like), making sure that they’re eating right (getting pizza during late night coding sessions) and that they’re getting special treats when they deserve them (public announcements praising their work).

Likewise, it’s the mom’s job to remind them of their chores (their task list), check their report card (make sure their tasks are up to the quality bar) and to guilt them when they forget Mother’s Day (keeping up with the schedule).

As the PM, you’re the team’s memory, the catch-all for crappy tasks nobody else wants to do and the one that makes sure everyone is working well together. You’re the glue and the conscience. If the teammates on your team aren’t waking up thinking of tasks you want done and going to bed hoping they’re making good progress on your tasks, then, according to MS culture, that’s your fault.

So, make sure folks are unblocked and happy, but also make sure they’re doing what you consider their top priority and that they’re doing it right and one time. Trust that they’re doing what they should be, but make sure they know what you think they should be doing and that they’re doing it right.

The downside is that such a world doesn’t scale without PMs at every level, but that’s why MS has PMs, Lead PMs, Group PMs and Product Unit Managers, all of them acting as the mom for their families.

January 16, 2006 spout writing

A Toast to WPF

A Toast to WPF

Here’s a review you don’t get very often:

Your WPF book is excellent. So good that I actually chose to read it instead of watching in flight entertainment from my trip to London in Dec… I liked it so much that I asked for some champaign, and continued to read it non-stop till I reached London from UK. Here’s a photo. Good job!”

I’m glad to here our book goes nicely with a glass of champagne, although maybe Parimal will change his mind when he sobers up or the jet lag wears off. : )

January 16, 2006 spout

PM Skill #5: Unblock Others First

PMs often come from the ranks of engineers who’ve been promoted” (aka taken away from the code to go to meetings). Many fight this trend, reverting to their old close-the-door-and-solve-the-problem habits to solve problems, which, as I’ve mentioned, doesn’t work at all well when you’re managing a team.

Even worse, a PM has to do something that’s very weird to most people — they have to help other folks get their work done before they tackle their own work. I call this unblock others first.” This has implications:

  • You have to be in constant communication with all the folks on your team via meetings, 1:1s, phone calls, IM, email, etc. However your teammates like to communicate, you have to be ready to receive and respond quickly. The longer you wait, they longer they’re blocked and the further out your ship date goes.
  • You have to learn to be interrupt driven and good at switching between tasks or you’re never going to be able to swap into the tasks you’re being asked to help with and then back into your own tasks. This is very counter to engineering work, where you have to be able to keep lots of ideas in your head all at once while you work on a deep technical task and interruptions are the enemy.
  • You still have to balance your interrupt-driven PM time with your concentrated technical time, or you’re never going to be able to stay technical enough to keep up with your team. This is the one I struggle with the most. How can I be responsive to unblock my teammates while still having uninterrupted time to myself for technical work?

This last question is the fundamental contradiction when you’re a product PM and it’s one that different PMs balance differently. Some swing a lot toward the technical and risk losing touch with their team and thereby building the wrong thing or missing their dates. Some swing toward the management, losing touch with the technology and losing the respect of their developers. Of the two, swinging too much toward the technology is the biggest danger, but only by a little.

I deal with this by trying to set aside at most a day here or there where I can ignore my team and concentrate on something technical, but I have a very hard time actually doing it. Frankly, I love the constant task switch that goes w/ PMing and I get bored if I go too long without it.

Hi. My name is Chris and I’m a PM. Can I get a hug?” : )

January 12, 2006 spout

PM Skill #4: Exhibiting the Behavior You Want

At our last team milestone, we had stepped up the pace in the last two weeks to make sure that we were done in time for a demo by one of our internal stakeholders (demoing your stuff is a wonderful way to communicate, but having other folks build on your stuff to demo their stuff is even better [so long as they remember to mention your stuff]). When we decided to step up the pace, I let everyone on the team know that I was available 24/7 until the demo, providing all my contact numbers. I was actively working on a chunk of the implementation, so I would send out status and check-in mails whenever I had completed something, often in the middle of the night or early in the morning (I didn’t get much sleep for those two weeks). When folks had questions, I was there to answer them, day or night. I was working long and focused hours and I was making good progress against my goals to meet the deadline for the demo.

In other words, while I never once asked the team to double their work efforts, once we’d all agreed to meet the shortened deadline, I stepped up my pace, let them know I’d stepped up my pace and expected them to do the same. This is the same no matter what behavior you want, whether it’s working long hours (only temporarily, though, else you’ll burn out your team), showing up to meetings on time or getting powered sugar on your keyboard. Some individual members of your team may not change their behavior, but they definitely won’t if you’re not willing to.

January 12, 2006 spout writing

Survey: The Future of Publishing

Karen Gettman, my editor at Addison-Wesley, called and asked me a bunch of questions about the future of publishing yesterday. After our discussion, she asked if I knew anyone else and I volunteered to put a survey up on my web site.

To answer this survey, send the questions below and your answers to Karen.Gettman@AWL.com. Also, include your phone number so Karen can call to follow up (she finds the phone conversations to be most illuminating when it comes to really figuring out how people want to get to info — we spent a bunch of time talking about hardware and software for ebooks). Thanks from Karen for your help!

  1. How do you learn about things to keep current in your job?
  2. What questions have you recently had and how did you search for the answers?
  3. How do #1 and #2 work well and poorly today?
  4. How would you like your information served up?”
  5. What part of content (besides the content itself) do you value the most (name of its creator, form factor, etc.)?
January 11, 2006 spout

PM Skill #3: Getting Things Done

Fundamentally, a PMs job is to get things done. If you’re going to plan and ship while keeping your team happy, you’ve got to plan, ship and keep your team happy. All of this pre-supposes you can get things done.

Getting things done isn’t magic. For example, I’m sure everyone reading these words can get something done all on their own. However, when you’re a PM, you’ve got to lead a team to get something done and that’s a little trickier. Here’s what I do:

  1. Identify a problem, e.g. I don’t like doing Sudoku with pencil & paper.
  2. Identify a solution, e.g. put Sudoku into Windows.
  3. Identify your customers, e.g. Sudoku freaks that would prefer a better experience than pencil & paper.
  4. Figure out the folks that care one way or the other, e.g. the people that decide what goes into Windows and pitch your solution, either convincing them it should be done or convincing yourself it shouldn’t. In most cases, your solution will need to change a bit to match your agenda to theirs.
  5. If you still think it’s a good idea, find the folks that need to approve of the work (it may be the same folks that decide) and negotiate what success looks like, e.g. a user of Windows can choose Sudoku from the Games menu of the next version of Windows and have a happy Sudoku playing experience.
  6. Find the folks that need to help, e.g. the people that actually puts things into Window, and plan the work, e.g. write Sudoku, debug Sudoku, test Sudoku, get it into the manifest of files that make up the Windows setup, etc.
  7. By now, you’ve got a group of people involved with your idea. At Microsoft, these people are called stakeholders, and form the team of folks getting things done, whether it’s approving the work, enabling the work, doing the work or using the work. With these stakeholders, you need to schedule the work. Scheduling accurately is a whole other topic, but to get things moving, you basically need an owner for each and every task in your plan and you need that owner to commit to a date, e.g. you (the PM) bill spec Sudoku by 1/1/06, Bob will write Sudoku by 2/1/06, Pete will test it as Bob writes it, etc. Also, if the work is more than a month or so, break it into milestones so that people see steady progress.
  8. If these people aren’t enough to get the job done in a reasonable time frame (as determined by your schedule), you’ll need to get additional resources, either by hiring or convincing other people that already work with you to spend their precious time working on your idea.
  9. Now that you’ve got a set of tasks and a schedule, you need to execute. That means making sure everyone’s got what they need to do their work, including time, tools, the right information, etc. This also means gathering information about how folks are doing and sharing it with the stakeholders (a lot of them, like your boss or his boss, won’t be doing the work, but will care about it). Finally, executing as a PM means holding the schedule up in front of the individual faces on your team every once in a while and motivating” them into living up to their commitments, where motivation” includes encouragement, bribery, shame, nagging, reminding them what problem you’re trying to solve so as to keep them on track, etc.
  10. When you’ve met your criteria of success (which will involve more stakeholders, time, tasks and/or resources than you thought), ship it. Do not forget this step! I know it’s silly, but unless you’ve got an ever-decreasing list of tasks that shows you’re getting closer to a real ship date instead of further, you’ve lost one of your major executing motivations. In fact, getting close to a goal is so important for the health of your project and your team, that you should have as much shipping in your schedule as possible, which is why must non-trivial projects are broken down into milestones, each of which you’ll share with some set of your stakeholders, e.g. daily builds stay internal while betas are shared with customers.
  11. After you’ve shipped, don’t forget to post-mortem. In fact, I like to do port-mortems after each milestone. This allows you to decide what went well and poorly so you know what to repeat and what to avoid in the future. In addition to increasing your team’s knowledge so that you can do better next time (or at least not do any worse), the post-mortem is a great time to really highlight the team’s accomplishments, making sure to point out the work that individuals did. People need to know that their work is appreciated. That’s not to say you need to plunk down a chunk of Lucite on their desk, but a simple thank you” with specifics in front of a crowd goes a long way.

As an example, after the 2005 PDC, I wanted to make sure that Avalon and Indigo worked very well together. Obviously, that’s not something I can do myself (I have check-in rights to neither team’s source code). I’m not done with this work yet, but here’s how it’s coming along:

  1. Problem: Avalon and Indigo didn’t work together during my PDC talk as I would’ve liked.
  2. Solution: Getting a set of Avalon/Indigo technology samples into the SDK (a technology sample is minimalistic, the SDK already has a bunch of Avalon/Indigo application samples, which attempt to show something more akin to real-world usage).
  3. Customers: Developers using Avalon and Indigo together.
  4. Pitch: I made my pitch to the people in charge of the SDK samples for Avalon and Indigo. They liked the idea and became my first stakeholders. They also reminded me that WinFX included Workflow, which quadrupled the pairings of technologies, i.e. from Avalon/Indigo to Avalon/Indigo, Avalon/WF, Indigo/WF and Avalon/Indigo/WF, and required an extra stakeholder. They also reminded me that I’ll want to get someone from the SDK team itself involved, because I’ll want to make sure there’s a special section in the SDK samples that lists integration samples separately from the individual technology samples.
  5. Success: A set of samples that show the right” way to integrate the technologies and meet the standard sample bar of quality, e.g. they compile, they run, they pass FxCop, etc. This definition of success reminds us that the problem isn’t that we don’t have enough samples, but that the pieces of WinFX don’t work together well enough, which is why getting architects from each technology into the room together to decide what’s right” (and changing the technologies appropriately) is the real job. Getting samples into the SDK is just the thing we’re doing to motivate this activity.
  6. Plan: We’ve got a list of samples that cover integration scenarios, what technology pairing they each cover, who owns em, who’s authoring em and milestone dates, e.g. code complete, architectural review, submission, SDK drop release date.
  7. Schedule: We composed the schedule by looking at the samples we wanted to do, picking the releases of the SDK that we wanted to hit (different releases had different features that we wanted to integrate together) and then backing it up from their, i.e. if we want to hit the Foo CTP, the submission deadline is n, we’ll need m weeks to turn around architectural feedback, so we need to be code complete and have the review on n-m, etc.
  8. Resources: Remember that this project started with just me, but now includes a decision-maker (or two) from Avalon, Indigo, Workflow and the SDK as well as sample authors and point people to get individual tasks done. In addition, there’s my boss and the bosses of all of the folks doing the work that have to approve how folks spend their time, all of whom have to be kept informed and can have input to the process. Some folks are part of the team because they were convinced of the importance of the work and some are part of the team because their bosses were convinced and asked them to participate, but none of them work for me. It’s common for a PM to run a project composed entirely of people that don’t work for them, so sharpen up your people skills.
  9. Execute: We meet semi-weekly to make sure we’re still on track and to identify any addition tasks and owners, e.g. adding the new section to the SDK, etc. Also, I’m the author of a bunch of the samples, so I have to meet the deadlines personally. As the PM, if I don’t meet my own deadlines, I’ve got no leg to stand on when I ask others to meet theirs.
  10. Ship: We’re coming up on the first code complete deadline, which was delayed a bit because we needed a stable internal build of a WinFX CTP that we’re targeting to have the first set of samples placed into. Once we get the first set running on the right CTP, we’ll review, fix problems in the samples, file architectural issues we discover in the review process as bugs against the individual technologies, submit the samples to the SDK team for their quality check and out it goes!
  11. Post-Mortem: We haven’t done this yet, but I things I expect to see come out of it is how to keep this work going. There are lots of combinations of technologies that we promote at Microsoft and there needs to be a way to make sure that they work well together, which, after all, was the whole point of this exercise.
January 10, 2006 spout

A Mac that runs Windows?!?!?!?

Holy shit! I Macintosh that runs Windows!!!

After Jobs’ presentation, Apple Senior Vice President Phil Schiller addressed the issue of running Windows on Macs, saying there are no plans to sell or support Windows on an Intel-based Mac. That doesn’t preclude someone from running it on a Mac. They probably will,’ he said. We won’t do anything to preclude that.’”

I can’t tell you how long I’ve waited for a laptop built by Apple running Windows built by Microsoft.

January 5, 2006 spout

I’m really digging live.com

I’ve tried all the portal sites at one time or another (yahoo, google, etc), but none of them have ever stuck til now. Since I gave up on subscribing to blogs, I find myself surfing to two sites every day: slashdot.org and live.com. I like getting the news headlines and I really like the gadgets (not one, but *two* versions of Wahoo! [both of which end in tris” for some reason…]).

It’s not perfect (the menu on the left obscures some text, there’s no auto scrolling while you drag and it doesn’t seem to like my smart phone), but it’s definitely sticky,” at least for me.

January 5, 2006 spout

Mobile Movie Listing Sites Compared

On a recent mailing list discussion, folks posted a large number of URLs for mobile movie listing sites. Since searching for movies is one of the things I like to do on my smart phone, I did a quick compare and contrast, looking for the site that would give me a quick list of movies by my house. Here’s what I found:

Yahoo Mobile: once I chose my location, it showed me theaters, not movies in my location. I don’t pick the movie I want to see by theater, I pick it by title and time.

Google Mobile Search (XHTML): required me to enter movies , but once I did, showed me a nice list of movies (in random order) along with running times and a rating (although I have no idea where the ratings come from), the genre and the maturity rating. Clicking on a movie showed me a list of times by theater, an address and a phone number. Once I save the URL into my smart phone favorites, this site could be handy…

Fandango Mobile: crashed when I entered my zip code.

Hollywood Mobile: asked for a zip code, then showed me a list of movies. Clicking on a movie didn’t show the theater closest to my house, so that dropped it from my list of potentials.

Metracritic Mobile: shows movie reviews, but doesn’t allow me to enter a zip code to show movies near my house.

Moviefone Mobile: can find movies by movie or theater in a cute tabbed interface. However, instead of showing me all the movies, it made me pick by category. Once I picked a category and a movie, it showed the local theaters and times.

IMDB Showtimes & Tickets: until this review, I’ve been using IMDB for my movie times. It’s designed for a desktop browser (they don’t have a mobile version I know about), but for a given zip code, you get all the movies, the IMDB rating, the maturity rating and the local theaters. You can also choose to look at the results by theater and easily change the day (e.g. tomorrow’s movies) or sort by theater. There’s a lot of scrolling around on a phone, but before this review, it was the one I used.

Of all of the sites, IMDB has the most capability, but it’s awkward on the phone. I think I’m going to see how the Google mobile movie search stands up to regular use.

December 29, 2005 spout writing

Dirty Publishing Secret: Indexes Suck

I hate to say it, but indexes are the one place where I skimp when writing a book. I go round and round on sentence structure, figures, story, flow, coverages, what to cover, what to leave out, section headings and all of the other minutia that goes with writing a book, but I never bother with the index.

The index is one of those things where, as an author, you can write the index yourself, complete with page numbers (added manually) or your can let the publisher outsource it (although be careful when signing the contract — some publishers will charge the author the outsourcing fee!). So, for no work, I can get something that’s OK, but generates some complaints (maybe 1 out of 20 is about the index) and let Safari, Amazon and Google be the full-text search equivalent (even good indexes suck compared to that) or I can do a *ton* of work to reduce the number of complaints to 1 out of 30 (this is just a guess but it nicely justifies not doing the work, don’t you think? : ). As it turns out, the publisher will let you proof an index, but I have yet to figure out how to do that.

Anyway, that’s why most indexes suck. Sorry. I think you should read my books cover-to-cover, memorizing as you go, eliminating the need for an index anyway. : )

December 28, 2005 spout

PM Skill #2: Building Consensus

I know the phrase building consensus” is a touchy, feelie term, but it’s the best description of one of the most important skills a PM can have. As a PM, you’ve often got responsibility but no authority, which means you have to spend time convincing everyone that the work you need done is in their best interests to do. Getting a whole group of people pointed in the right direction is the consensus” part. The building” part is how you get there.

One way to build consensus is to hole up in your office for days on end, drafting a plan down to the task and sub-task level, emerging only when you’ve got everything just right, presenting it to the team in one, fell swoop. I’ll call this the engineering way” of building consensus, because it seems to be the first reflex of software engineers new to the PM world. Unfortunately, this way almost never works. The first problem with this technique is obvious: there ain’t no way your plan is going to survive contact with your team. They’ll question the highest level assumptions that affect the next level, which affect the next level and so on. Even if, eventually, your plan was 100% the right one, you can’t just jump to the end game w/o bringing your team along with you. The second, less obvious, problem with this technique is that, while you’re holed up in your office, the rest of the team will have splintered into factions, going in their own directions and building their own ideas of what the team should be doing which you now have to steer them away from.

My preferred technique for building consensus is what I’ll call the big mess.” The idea is you get the team (or a representative sample of the team) into a room and you ask the leading questions, e.g. What are we trying to accomplish? How do we get there? Who does what? How does that fit into the bigger picture? How do we involve folks outside the team? I call this technique the big mess,” because that’s how it starts and it only gets better through discussion and debate, led by the PM. One nice thing is that it’s usually a lot faster than holing yourself in an office, because you don’t have to make all of the planning decisions yourself (sometimes you don’t make *any* planning decisions), although you better be a fast hand at keeping track of the team consensus as it builds and playing it back periodically to make sure everyone’s staying in sync (Oliver Sharp turned me onto MindJets MindManager software for this task). One downside of this technique is that it keeps the decision makers on the team from doing anything else while you’re hashing through the mess, but the upside of this is that they’re not off pushing into a bunch of different directions.

As a tweak to the big mess” to make it a bit less messy, I like to have a small proposal to seed the process. It’s always easier to start a discussion with folks telling you what they don’t like about an existing set of ideas then to start with a blank sheet of paper. If this seed” comes from my mind alone, I stop myself from holing up in my office for days by giving myself only the hour before a mess meeting to prepare such a seed. I can mitigate some of the mess with a seed that I’m willing to dig up, but I actually make things harder if I show up with a fully formed tree that needs chopping down before the team is happy (see the engineering way” of building consensus above).

If I want to show up at a mess meeting with a seedling, I can spend more time nurturing my budding consensus with a bunch of pre-meeting 1:1 meetings with the decision makers on the team to get their take. This only works if I’m able to come up with something that takes the majority of folks’ concerns and ideas into account and if I circle back with folks on refinements to the things we discussed before in the pre-meeting meeting. In this way, things are still a mess, but it’s the PM that deals with a large part of it up front.

Ideally, if you have a pre-mess mess (my name for the collection of pre-mess-meeting meetings), you can show up at the mess meeting to merely tweak and ratify, but this is a rare thing indeed. If I were you, I’d be prepared for the mess and use pre-mess discussions as a way to inform how you lead the discussion.

December 23, 2005 spout

PM Skill #1: Communicate, Communicate, Communicate

I think the title says it all: if you’re a PM, you’ve got to communicate. That includes to your team, your management, your partners and your customers. As I mentioned, I’m a big fan of getting people’s raw feedback with informal chats. I also like to schedule regular 1:1s with as much of the team as I can.

For folks not on the immediate team, I like to give them updates at the ends of milestones in the form of a PowerPoint presentation. The outline often looks like this:

  • Milestone Goals
  • What we did
  • What we learned
  • What’s next (goals and activities for the next milestone)

This lets folks give feedback on several levels, i.e. did we pick the right goals, did we do the right things, how do we apply what we learned, what should we do next, etc. It also gives them lots of places to tell them how their own work and requirements fits in with ours so that we can make sure we stay in sync.

For these kinds of presentations, you know you’re not having them regularly enough if management has to ask for one or if you can’t put one together in a day or two. You want folks to see you communicate proactively, not reactively.

For folks on the team, I like to send around weekly (or near weekly) status emails:

Goals

  • goal 1 (100% done)
  • goal 2 (50% done)
  • etc.

Summary
In the last week, we …

Plans
In the next week, we’ll …

Tasks (from the bug database)
csells 452 12/13 Post PM Skill #1: Communication

I also like to post each status mail internally so that folks can skip a particular status or come into the team later and still get caught up quickly (a SharePoint site is excellent for this).

Often it’s the case that team members won’t read all (or even most) of your status emails. Don’t let that stop you from sending them! At the very least, it helps you keep your head around what’s going on and what needs doing. Also, it’s comforting for team members and management to know that status is available even if they don’t read the emails, because it lets them know that someone is watching the details. Plus, when someone asks a question that’s answered in the status, I tend to reply with the status email as an attachment, letting them know that someone’s all over things.

December 22, 2005 spout

PM Skill #0: Know Your Job

I’ve been a Program Manager (PM) at Microsoft now for about 2.5 years. Before that, I’ve been a managing contractor, a lead author, an engineering manager and a chief architect (both for commercial and shared source projects). Over a 12 year career, I’ve not only contributed to lots of shipping projects, but have lead several.

Most recently, I’ve been applying that experience to being a PM on a real Microsoft product team, which is its own unique experience. I’ve only been doing it for a few months, during which I spent a lot of time studying internal PM training materials and asking my exemplar PM brethern how they do it. At the same time, I’ve been helping a colleage get up to speed on just what it means to be a PM, so I thought I’d use this blog for what I think it’s best at — writing down what I believe and having people tell me where I got it wrong. So, consider these posts (like all posts on this site) to start with in my opinion.”

A PMs job is to ship the right thing on time and on budget, while keeping your team happy. There’s a lot in this sentence, so let’s break it down:

  1. ship” – first and foremost, the job of any PM is to start with a goal, either self-imposed or assigned, and ship an implementation of that goal. If you don’t ship, the rest doesn’t matter.
  2. the right thing” – unfortunately, shipping ain’t enough, you also have to ship the right” thing by some definition of right.” This is the most ambiguous part of the job, because any one goal can have many, many implementations and even the goal might not be the right one. My personal definition of right includes getting buy in from your team, your management, your partners (internal and external) and your customers (internal and external). You’re allowed to do whatever makes all those folks happy (and good lucking finding the intersection : ).
  3. on time, on budget” – this is all about execution. As a PM, it’s your job to lead your team through planning, scheduling, resource management and delivery.
  4. keeping your team happy” – this one is hardest for many engineers, because it involves keeping your team happy, focused and productive. There ain’t no rule book for this one, although I find a useful technique to be something widely known as management by walking around.” Many folks won’t tell you how they really feel in a meeting, but if you can catch em on a phone call or in their office, 1:1, they’ll give you their real gut,” which is vital to making sure that folks are happy, motivated and on the right track.

I’ve got more opinions about other vital PM Skills, which I’ll post as the spirit moves me, but hopefully at the rate of about 1/day til I’m dumped the entire contents of my brain, making room for other things. : )

December 18, 2005 spout

How come nobody says “impeach?”

WARNING: This is my political side bubbling over. If you only want fun stuff about my kids or technology, this post ain’t for you.

Clinton engaged in an consensual adult act in the west wing and endured the impeachment process.

Bush sics the NSA on us w/o due process, starts a war so he can look tough for his dad and continues to dismiss global warming as a myth. Why aren’t we impeaching his ass?

December 16, 2005 spout writing

Windows Forms 2.0 Book Samples Posted

Mike did some last minute clean-up and checked in the files, so I’ve uploaded the code sample for the Windows Forms 2.0 book. Enjoy.

December 16, 2005 spout writing

Windows Forms Programming 2005 in C# Submitted!

I packaged off the final chapters, figures and PDF files for submission of the WinForms 2.0 book this morning. Michael made it easy by fixing all the last minute nits I found, producing the PDFs and bundling all of the figure files together (he separated the graphics from the Word docs using a WinForms 2.0 program, of course!).

In spite of the fact that I’ve been working on long-lead prototype coding for the last month and Mike’s been moving to the US from Australia, we managed to get the book submitted a full 15.5 hours early (they meant midnight when they gave us a 12/16 deadline, didn’t they?!?).

I’m so excited to get the book in your hands, that I’ve asked Mike to check in the files he’s got checked out so that we can post the code samples ASAP. It’ll still be a while before the book is in your hands, though. We took 22 months to write it, but it’s the 3 months it takes to print it that always sticks in my craw the most for some reason. : )

Wahoo (2)!

November 23, 2005 spout

A C# 2.0 anon delegate “gotcha”

I’m a huge fan of anonymous delegates, but I ran into a gotcha this morning when using anon delegates inside a for-loop:

class Worker {

  public event WorkCompleted Completed;

 

  public void DoWork() {

    Console.WriteLine(Worker: work completed”);

    if( this.Completed != null ) {

      foreach( WorkCompleted wc in this.Completed.GetInvocationList() )

        wc.BeginInvoke(delegate(IAsyncResult result) {

          // Use wc from surrounding context

          int grade = wc.EndInvoke(result);

          Console.WriteLine(Worker grade= {0}”, grade);

        },

        null);

      }

    }

  }

}

When I run this code, I get the follow exception:

System.InvalidOperationException:
  The IAsyncResult object provided does not match
  this delegate.

What’s happening, of course, is that the wc variable continues to change after the dynamic invocation happens instead of the value being stored away, one for each call to BeginInvoke, as I’d intended. One fix for this problem is to pass the value I wish I could take off the stack as the async state argument:

class Worker {

  public event WorkCompleted Completed;

 

  public void DoWork() {

    Console.WriteLine(Worker: work completed”);

    if( this.Completed != null ) {

      foreach( WorkCompleted wc in this.Completed.GetInvocationList() ) {

        wc.BeginInvoke(delegate(IAsyncResult result) {

          // Pull the value out of async state

          WorkCompleted wc2 = (WorkCompleted)result.AsyncState;

          int grade = wc2.EndInvoke(result);

          Console.WriteLine(Worker grade= {0}”, grade);

        },

        wc);

      }

    }

  }

}

This isn’t quite the elegant code I’d like to write with anon delegates, however. I can do a little better by creating a variable on the stack specifically for use in the delegate:

class Worker {

  public event WorkCompleted Completed;

 

  public void DoWork() {

    Console.WriteLine(Worker: work completed”);

    if( this.Completed != null ) {

      foreach( WorkCompleted wc in this.Completed.GetInvocationList() ) {

        WorkCompleted wc2 = wc; // Copy wc for use in delegate

        wc.BeginInvoke(delegate(IAsyncResult result) {

          int grade = wc2.EndInvoke(result);

          Console.WriteLine(Worker grade= {0}”, grade);

        },

        null);

      }

    }

  }

}

In this case, each time through the loop, a new variable is created on the stack specifically for that invocation of the loop and is therefore unchanged by the time the anon delegate is executed. This still isn’t quite ideal, but it’s not too bad.

November 15, 2005 spout

Turning off special features in DVDs and CDs?

Does anyone know if it’s possible to turn off the special PC features of DVDs and CDs? I’d like to avoid Sony-sponsored virus enablers on CDs and required players for DVD content and just treat each of these CDs and DVDs as un-special. Is such a thing possible?
November 13, 2005 spout

USB HD w/ OS/Apps + FolderShare = Portable Computing?

If you could boot Windows Vista from a USB drive large enough for the OS and apps, like this version of Linux, and log into FolderShare for your data, you could use any computer that allowing booting from USB into a temporary terminal (although device drivers would be a challenge).

November 11, 2005 spout

After the writing is done

Today Michael Weinhardt and I submitted the final chapters of Windows Forms 2.0 Programming in C#” for review. Mike has worked his butt off for the last 20 months to bring this revision about, taking a fresh look at every single chapter, not only for updates to the technology, but also for story. The book is far, far better than it was without him and he deserves your love and praise when the book is released (hopefully in April of 2006).

Since this is Mike’s first book, I imagine he thinks that most of the work is done. Here’s the list of things I sent him that still needs doing:

  1. Mike will make changes to the chapters based on reviewer feedback, being careful to leave in change marks so I can see what he’s changed
  2. I’ll review each chapter, approving or rejecting changes and making my own edits and comments and we’ll repeat this til we’re both happy
  3. We’ll send everything by our post-reviewer-comment-application reviewer and apply his feedback like steps 1-2
  4. I’ll update the preface after Thanksgiving, sending it by Mike and our final reviewer til we’re all happy (and in the process, you’ll put in your acknowledgements)
  5. We’ll each update the frontmatter.doc to include dedications
  6. I’ll update the TOC.doc to match our final TOC
  7. Mike will pull out all of the figures into separate bitmap files (.bmp)
  8. By 12/12, we’ll upload the complete final manuscript, both Word and PDF versions, and send it off to AW
  9. Hopefully AW will send it along to Betsy, my most favorite copy editor ever, and she’ll mark it up, sending Mike the marked up pages to approve or disapprove each copy edit
  10. AW will drop PDF versions of each of the final chapters to us, which we’ll submit change lists for
  11. We’ll ask for updated PDFs, cuz the publisher traditionally only applies half of the feedback on each round, so we’ll repeat 10-11 til they get them all
  12. Sometime in April of 2006, we’ll each get a big box of books with our names on the front cover, which indicates that they’re on their way to the book sellers, e.g. B&N, Amazon, Borders, etc. At this point, I’ll update the web site and post the sample code while Mike updates the app that tracks errata
  13. People will send us email telling us how much they like the book to butter us up before asking a technical question. We’ll answer each question to the best of our ability and ask each questioner to post a review on Amazon.com
  14. Some of the questioners will submit bugs in the book, which we’ll track in the errata database
  15. When a print run has been exhausted (the initial print run will be between 10K — 20K copies, with subsequent print runs between 3K — 5K copies), AW will ask us for a list of changes for the n+1th edition. For some reason, they’ll always ask for those changes less than a week before they need them
  16. AW will send us each a copy of the n+1th edition, which we’ll use to check that the errata we submitted was actually applied (for some reason, publishers don’t always apply all the changes we ask for), marking errata in the database as fixed in the n+1th edition
  17. Repeat 13-16 for 18-24 months til everyone that wants a book on this technology has purchased it
  18. Get started on Programming Windows Forms 3.0 in C#,” repeating steps 1-17 after all of the chapters have been submitted for review

I figured Mike has had about 12 hours to enjoy being done,” so it was high time to crush his spirit. : )

November 8, 2005 spout

Have I missed anything?

I’ve noticed that various prolific bloggers feel the need to tell me that they’re going to stop blogging for more than 24 hours. That’s one of the things I love about RSS readers: no matter how long someone goes away, so long as I’m subscribed, I here their every utterance.

On the other hand, what I’ve come to hate about RSS readers is that nothing gets by me. Keeping track of absolutely everything was exhausting, so I went cold turkey. I’ve been off #R since I repaved my machine a coupla weeks ago. I still surf to slashdot.org about once/day, but that’s it. No Scobelizer. No Don. No Ian. No Dilbert or Gizmodo or any of the 100s of other items in my OPML that I can’t even remember. No RSS reader of any kind.

So far, I’m enjoying the extra time on my hands. Have I missed anything?

October 31, 2005 spout

What’s a group of geeks called?

Sloth of bears.

Army of ants.

Murder of crows.

Tribe of monkeys.

Embarrassment of richest.

What about geeks? Conference? Shy? Intelligence? Slather?

P.S. this site on collective nouns has a bunch of fun ones. I think I like smack of jellyfish” best…

October 29, 2005 spout

Testing ASP.NET 2.0 port of sb.com

Pay no attention to the may behind the curtain…
October 26, 2005 spout

The Most Amazing Consumer Experience

I just had the most amazing consumer experience and I just had to share it.

I was looking for the local Mom & Pop computer store in my area and I stumbled across www.puzzlecomputers.com. His site doesn’t mention a store, but I left him a message asking if he could upgrade my computer or point me at the local Mom & Pop. Not only does he do that kind of work, but he came to my house, picked up the two computers I wanted to use as parts, e.g. case, RW-DVD, HD, etc, recommended and purchased the new motherboard, CPU, memory and quiet power supply, put them all together (including modifying my old proprietary Dell case to fit), brought the whole thing back to my house and then spent another hour installing another HD I had lying around. The specs on the parts were 1GB of RAM (upgradeable to 2GB), 2.8GHz AMD processor and ABIT motherboard with all the trimmings.

The whole thing, parts, labor, delivery, etc. cost $400. Plus, he hauled away the extra parts so I don’t have to look at them. And when the drivers didn’t install right away, he was available for phone support.

Highly recommended. I wish all my consumer experiences were like this one!

October 24, 2005 spout

WF Activity Context

I was playing around with a state machine workflow in WF and ran across something that I didn’t except. Apparently if you have a an activity that can be other than a singleton, e.g. inside of a loop or as part of a state machine workflow, then an activity can not be accessed by it’s workflow instance variable. For example, the following works just fine in a sequence workflow:

public partial class Workflow2 : SequentialWorkflow {
private void code1_ExecuteCode(object sender, EventArgs e) {
// Retrieve Comment property from typed event sink (generated by wca)
string comment = this.eventSink1.Comment;
    Console.WriteLine("Order approved w/ comment= {0}", comment);
  }
}

However, in the case where the activity can be executed more than once, it’s my understand that each time through, there’s a new activity object that’s different from the named activity associated with the workflow. To get a hold of the current activity, you have to traverse the activity tree, which you can access in a code activity via the sender’s parent property:

public partial class StateMachine1 : StateMachineWorkflow {
void code2_ExecuteCode(object sender, EventArgs e) {
// Retrieve Comment property from typed event sink (generated by wca)
    Code codeActivity = (Code)sender;
    IOrderService_Events.OrderApproved eventSink2 =
      (IOrderService_Events.OrderApproved)(codeActivity.Parent.Activities["eventSink1"]);
    string comment = eventSink2.Comment; // eventSink1.Comment will be unbound
    Console.WriteLine("order approved w/ comment= {0}", comment);
  }
}

I haven’t figured out whether this makes sense to me yet, but that’s how it is. You can get the code here.

October 24, 2005 spout

Typed WF Communications Details

If you downloaded the samples from my previous two forays into WF communications programming, you probably couldn’t get them to build. The problem is that when I packaged things up, I removed the bin directories. I haven’t figured out just why this causes everything to stop building, but with the help of Dennis Pilarinos, I rearranged the two projects into three:

  1. communications interface (CommunicationLibrary): the data exchange service interface definition, compiles into CommunicationLibrary.dll

  2. communications activities (WorkflowProject1): uses a pre-build step to generate the typed activities generated from the communications library using the wca tool, references CommunicationLibrary.dll and compiles into WorkflowProject1.dll (nice name, eh? : )

  3. application (EventSinkAndMethodInvoke2): the app that uses the typed activities, references both CommunicationLibrary.dll and WorkflowProject1.dll

It’s only by separating the communications activities into a separate assembly that things can build and rebuild reliably. You can download the newly configured code here. Enjoy.

October 21, 2005 spout

I’m starting to speak in numbers

Someone posted an URL to a mailing list I’m on. My response to his post was 404.” I bet you know what I meant w/o thinking about it. He knew and responded as if I’d written in English. This reminds me of the old joke about the guys that’d be around each other so long, they replaced back the same old jokes with numbers and make each other laugh. It’s a funny old world.
October 17, 2005 spout

Web Services and Data Binding?

What does it mean to bind to a web service? It’s not hard to think of taking the result of a web service and binding it as input to some set of controls, but what about changes to that data? Should data from web services be read-only, requiring an explicit call to add, remove or update or should their be some standard WS-CRUD standard? What do you nice folks do?
October 16, 2005 spout

More Workflow Communications Spelunking

Here. The one where I take Dennis’s suggestion, try wca.exe with my workflow communications problems, and discover as many more problems as I solve.
October 16, 2005 spout

More Workflow Communciation Spelunking

More Workflow Communciation Spelunking

After complaining about the inability to bind directly to event inputs, Dennis suggested I try the Workflow Communications Activity generator utility (wca.exe). If you point it at an assembly that contains interfaces decorated with the DataExchangeService attribute, it will generate typed invoke method and event sink activities for each method and event in the interface. To support this, I moved the communication interface, IOrderService, and types the interface depends on, i.e. Order and OrderEventArgs, to a separate library project and added the following post-build step:

"C:\Program Files\Microsoft SDks\Windows Workflow Foundation\wca.exe"
  "$(TargetPath)" /o:"$(SolutionDir)\EventSinkAndMethodInvoke2"

The reason I added this as a post-build step in the library project instead of as a pre-build stuff in the actual wf app, is because I want to have the types to program against whenever the library changes. However, either way, to get the new activities to show up on the toolbar, you have to build the application. Once I’d done that, I updated my workflow using the typed activities:

Unfortunately, just as I was capturing that screenshot, the Workflow Designer couldn’t find the activities, so it dropped them from my workflow without so much as a by your leave,” reminding me where much of the early WinForms Designer.

However, two nice things result from these generated types. The first is that my design-time experience, either in the designer or in the XOML, is improved because I don’t have to do a bunch of parameter binding:

<SequentialWorkflow
  x:Class="EventSinkAndMethodInvoke2.Workflow2"
  x:CompileWith="Workflow2.xoml.cs"
  ID="Workflow2"
  xmlns:x="Definition"
  xmlns="Activities">

  <ns0:CreateOrder
customer="Fabrikam"
    orderDescription="42&quot; Plasma TV"
    ID="createOrder1"
    MethodName="CreateOrder"
    InterfaceType="EventSinkAndMethodInvoke2.IOrderService"
    xmlns:ns0="IOrderService_Operations" />

  <ns1:OrderApproved
ID="orderApproved1"
    EventName="OrderApproved"
    InterfaceType="EventSinkAndMethodInvoke2.IOrderService"
    xmlns:ns1="IOrderService_Events" />

  <Code ExecuteCode="code1_ExecuteCode" ID="code1" />

  <Terminate
Error="*d2p1:ActivityBind(ID={orderApproved1};Path=Comment)"
ID="terminate1"
    xmlns:d2p1="ComponentModel" />

</SequentialWorkflow>

The other nice thing is that, because the typed event sink has properties that directly expose the event arguments, i.e. Comment and Order, instead of just via parameter bindings, I can bind to them in the b1 build of WF. This reduces my coupling, because the terminate activity doesn’t know where it’s getting it’s input, and it takes away that global variable” feel I had when I was binding parameters in and out of fields on the workflow itself. If I want to access the event sink’s typed properties directly, I can do so, as shown in the code activity’s handler:

public partial class Workflow2 : SequentialWorkflow {
  void code1_ExecuteCode(object sender, EventArgs e) {
    Console.WriteLine("Order: approved w/ comment= {0}", orderApproved1.Comment);
  }
}

I really like that typed activities are generated for me based on my data exchange service interfaces, but it’s still a manual, multi-stage process today. I’d prefer that it happened automatically, like typed resources and settings in VS05. If that can’t happen, I’d prefer to be able to bind directly to the parameter binding list that the generic event sink activity already knows about. At least that way, if there’s a problem, my workflow doesn’t get destroyed because of it.

The updated VS05b2, WF/WinFXb1 sample code is available for your enjoyment.

October 14, 2005 spout

Workflow Communication Spelunking

Here. The one where I figure out how to communicate into, out of and between WF activities, but not in a satisfying way.
October 14, 2005 spout

Workflow Communication Spelunking

Workflow Communication Spelunking

I just an interesting week taking a crash course in Windows Workflow Foundation (formerly WWF, not just WF) programming. My big hang-up was, how do I communicate into, out of and between activities?

I started with Dennis’s explanation of communications into and out of a workflow. The fundamental idea is that, once a workflow has started, you can’t talk to it directly. Instead, you set up a communications interface that the workflow can use to talk to the host and that the workflow can use to watch for events from the host, e.g.

[DataExchangeService]
public interface IOrderService {
  void CreateOrder(string customer, string orderDescription);
  event EventHandler<OrderEventArgs> OrderApproved;
}

The interface is marked with the DataExchangeServer attribute to mark it as an interface suitable for host<->workflow communication, but other than that, it’s a normal .NET interface. The host, i.e. the chunk of code that creates the WF runtime, implements data exchange service interfaces as singletons, e.g.

class OrderServiceImpl : IOrderService {
  Dictionary<Guid, Order> _workflowOrderMap = new Dictionary<Guid, Order>();

  public void CreateOrder(string customer, string desc) {
    _workflowOrderMap.Add(BatchEnvironment.CurrentInstanceId, new Order(customer, desc));
  }

  public void ApproveOrder(WorkflowInstance wf, string comment) {
    if (OrderApproved != null) {
      Guid wfId = wf.InstanceId;
      OrderApproved(null, new OrderEventArgs(wfId, _workflowOrderMap[wfId], comment));
    }
  }

  public event EventHandler<OrderEventArgs> OrderApproved;
}

With this implementation, the host is allowing the workflow to call the CreateOrder method (which we’ll see it do later) and to subscribe to the OrderApproved event. The CreateOrder method uses its arguments to create an Order object and associate it with the ID of the currently executing workflow (available via BatchEnvironment.CurrentInstanceId). Remember, the service implementation is a singleton, but any number of workflows can call it, so when they do, we track information on a per workflow basis.

WF Question #1: How do I associate objects directly w/ a running workflow instead of tracking things in dictionaries?

The OrderApproved event is used to get information into the workflow.

In our scenario, imagine we’re creating an order, approving it (w/ a comment) and logging the result. In my sample, I have a workflow imaginatively named Workflow2” which captures this sequence:

The invoke method activity is bound to the CreateOrder method of the IOrderMethod method:

<InvokeMethodActivity
ID="invokeMethodActivity1"
  MethodName="CreateOrder"
  InterfaceType="EventSinkAndMethodInvoke2.IOrderService">
  <InvokeMethodActivity.ParameterBindings>
    <wcm:ParameterBinding ParameterName="customer" xmlns:wcm="ComponentModel">
      <wcm:ParameterBinding.Value>
        <?Mapping XmlNamespace="System" ClrNamespace="System" Assembly="mscorlib" ?>
        <ns0:String xmlns:ns0="System">Fabrikam</ns0:String>
      </wcm:ParameterBinding.Value>
    </wcm:ParameterBinding>
    <wcm:ParameterBinding ParameterName="orderDescription" xmlns:wcm="ComponentModel">
      <wcm:ParameterBinding.Value>
        <?Mapping XmlNamespace="System" ClrNamespace="System" Assembly="mscorlib" ?>
        <ns0:String xmlns:ns0="System">42" Plasma TV</ns0:String>
      </wcm:ParameterBinding.Value>
    </wcm:ParameterBinding>
  </InvokeMethodActivity.ParameterBindings>
</InvokeMethodActivity>

In this case, we’re hard-coding the custom and order description fields, but in a real workflow, you’d take those as input parameters.

WF Question #2: How do you pass input parameters into a workflow?

WF Question #3: Is it legal XML to have a processing instruction in the middle of a file, e.g. ?

After the workflow creates the order, it waits for a human to approve it via an event sink activity:

<EventSinkActivity
ID="eventSinkActivity1"
  EventName="OrderApproved"
  InterfaceType="EventSinkAndMethodInvoke2.IOrderService">
  <EventSinkActivity.ParameterBindings>
    <wcm:ParameterBinding ParameterName="Comment" xmlns:wcm="ComponentModel">
      ...
    </wcm:ParameterBinding>
    <wcm:ParameterBinding ParameterName="Order" xmlns:wcm="ComponentModel">
      ...
    </wcm:ParameterBinding>
  </EventSinkActivity.ParameterBindings>
</EventSinkActivity>

The event sink waits for the host to fire an event, which has several interesting bits. The first interesting bit is the parameter names, which are bound to the public properties of the OrderEventArgs class passed to the OrderEvent event:

[Serializable]
public class OrderEventArgs : WorkflowMessageEventArgs {
  Order _order;
  public Order Order { get { return _order; } }

  string _comment;
  public string Comment { get { return _comment; } }

  public OrderEventArgs(Guid workflowInstanceId, Order order, string comment)
: base(workflowInstanceId) {
    _order = order;
    _comment = comment;
  }
}

Notice that the custom OrderEventArgs class derives from the WorkflowMessageEventArgs class and passes in the workflow instance ID. This is required so that the event can be routed to the appropriate workflow. Without it, you’ll get the following illuminating error in beta 1:

An unhandled exception of type System.Workflow.Runtime.EventDeliveryFailedException’ occurred System.Workflow.Runtime.dll”

WF Question #4: Can we get more descriptive exception messages?

Luckily, this error only happens when you’re running under the debugger; it’s swallowed completely when your program runs normally.

WF Question #5: Can we get exceptions at runtime, too?

Notice also that the OrderEventArgs class is marked with the Serializable attribute. This is required to cross the boundary into the workflow. Without it, you’ll get the ever helpful EventDeliveryFailedException exception.

WF Question #6: What boundary are we crossing when fire an event into a workflow?

Further, all objects sent into a workflow need to be serializable as well, like the Order class (also yielding EventDeliveryFailedException if you forget):

[Serializable]
public class Order {
  Guid _orderId = Guid.NewGuid();
  public Guid OrderId { get { return _orderId; } }

  string _customer;
  public string Customer {
    get { return _customer; }
    set { _customer = value; }
  }

  string _desc;
  public string Description {
    get { return _desc; }
    set { _desc = value; }
  }

  public Order(string customer, string desc) {
    _customer = customer;
    _desc = desc;
  }
}

Firing the event is as easy as calling our helper function from outside of our workflow to cross the boundary into the workflow:

class OrderServiceImpl : IOrderService {
  ...
  public void ApproveOrder(WorkflowInstance wf, string comment) {
    if (OrderApproved != null) {
      Guid wfId = wf.InstanceId;
      OrderApproved(null, new OrderEventArgs(wfId, _workflowOrderMap[wfId], comment));
    }
  }

  public event EventHandler<OrderEventArgs> OrderApproved;
}

Notice that we need the workflow instance ID, which we pass in via the WorkflowInstance we get when starting the workflow:

static void Main() {
  WorkflowRuntime workflowRuntime = new WorkflowRuntime();

  // Add IOrderService implementation
  OrderServiceImpl orderService = new OrderServiceImpl();
  workflowRuntime.AddService(orderService);

  workflowRuntime.StartRuntime();
  workflowRuntime.WorkflowCompleted += OnWorkflowCompleted;

  Type type = typeof(EventSinkAndMethodInvoke2.Workflow2);
  WorkflowInstance wf = workflowRuntime.StartWorkflow(type);

  // Simulate human decision time and approve the order
  System.Threading.Thread.Sleep(1000);
  orderService.ApproveOrder(wf, "this is a *fine* order!");

waitHandle.WaitOne();
  workflowRuntime.StopRuntime();
}

Once the event data is fired into the event, the event sink’s parameter binding provide enough infrastructure to be able to access the data in subsequent activities, e.g. the code activity that comes right after the event activity:

<Code ExecuteCode="code1_ExecuteCode" ID="code1" />

In the code1_ExecuteCode method, my code can reach over to the event sink activity’s parameter bindings and access the data that was fired into it:

public partial class Workflow2 : SequentialWorkflow {
  void code1_ExecuteCode(object sender, EventArgs e) {
    Console.WriteLine("Order: approved w/ comment= {0}",
eventSinkActivity1.ParameterBindings["Comment"].Value);
}

There are three reasons I really don’t like this code. The first is that I have to cast to get something typed out of the Value property and I don’t like casting. The second reason is that this technique only works through code; I can’t bind to a parameter from an event sink to a property on another activity, e.g. the Error property on a Termination activity. The third, and most damning reason, is because this induces coupling from my code activity to my event sink activity. I don’t want this coupling to be captured in code, which is another reason to really like the declarative data binding solution.

WF Question #7: Why can’t I bind event sink parameters as input into other activities?

Unfortunately, while I can’t solve reasons #2 or #3 very well, I can solve them partially and I can solve #1 nicely by adding some fields to my workflow class:

public partial class Workflow2 : SequentialWorkflow {
  Order _approvedOrder;
  string _approvalComment;

void code1_ExecuteCode(object sender, EventArgs e) {
    Console.WriteLine("Order: approved w/ comment= {0}", _approvalComment);
  }
}

The _approvedOrder and _approvalComment fields can be bound to the event sink parameters like so:

<EventSinkActivity
ID="eventSinkActivity1"
  EventName="OrderApproved"
  InterfaceType="EventSinkAndMethodInvoke2.IOrderService">
  <EventSinkActivity.ParameterBindings>
    <wcm:ParameterBinding ParameterName="Comment" xmlns:wcm="ComponentModel">
      <wcm:ParameterBinding.Value>
        <wcm:ActivityBind Path="_approvalComment" ID="{/Workflow}" />
      </wcm:ParameterBinding.Value>
    </wcm:ParameterBinding>
    <wcm:ParameterBinding ParameterName="Order" xmlns:wcm="ComponentModel">
      <wcm:ParameterBinding.Value>
        <wcm:ActivityBind Path="_approvedOrder" ID="{/Workflow}" />
      </wcm:ParameterBinding.Value>
    </wcm:ParameterBinding>
  </EventSinkActivity.ParameterBindings>
</EventSinkActivity>

Now, when the event sink activity fires, these two workflow fields are populated so that by the time the code activity is executed, they’re ready for use, all typed up and ready to go. However, while this reduces coupling to some degree, i.e. the code activity just hopes that somebody provides the data and not that is has to be a specific activity, this is not the same as failing to execute an activity until you have valid values to pass to a function. Instead, it’s like setting global variables, hoping they’re set properly when the code that accesses them needs them and having no idea what’s affected if you have to remove them.

Still, with the parameter binding in place between the event sink parameters and the workplace class fields, I can bind the input to an activity:

<Terminate
Error="*d2p1:ActivityBind(ID={/Workflow};Path=_approvalComment)" ID="terminate1"
  xmlns:d2p1="ComponentModel" />

Clearly, this is binding syntax only a mother could love, but luckily the designer did it for me, it’s going to change in the next beta and it does most of what I want, i.e. bind the input of the Error property on the Terminate activity to something produced by another activity. It’s not the same as binding the event sink activity parameters directly, thereby allowing me to shed this dirty global variable feeling, but it’s oh so close.

The VS05b2, WF/WinFXb1 sample code is available for your enjoyment.

Props to Dennis Pilarinos and Anandhi Somasekaran from the WF group for help figuring this out.

October 10, 2005 spout

Open Office is a “real” thing

I use my family as a litmus test of when things are real” or not. None of them have technology backgrounds or training, so if something is real to them, it’s real. For example, it was my grandmother that asked whether she need Windows 95 (she didn’t have a computer, mind you). I head from my folks about spyware and phish attacks. And now, my sister-in-law asked me if she should be upgrading her Windows ME machine to OpenOffice.

Of course, OpenOffice isn’t an OS, but as far as she knows, MS Office is her current OS, so maybe OpenOffice is what she needs.

I believe that it’s in her best interest for me to steer her away from unsupported OSS software unless I want to become her tech support liaison (difficult, since I’ve never used OpenOffice). Also, she’s looking for something that will function with little or no problems,” which I can’t claim of any software, free or not.

Still, it makes you wonder if these OSS guys could really make a credible play for the desktop. Obviously, they’re not going to produce Office 12 or Windows Vista anytime soon, but they’re nipping at our heels pretty credibly if they can attract the attention of the secular members of my family. How much longer before OSS becomes good enough” for most uses and the latest thing you buy from actual software vendors is just fancier? In fact, how many actual software vendors do we really have left anyway?

October 8, 2005 spout

I’m also a huge Ian fan, as you should be

Ian Griffiths, my co-author on Programming Windows Presentation Foundation, is very well worth your attention.

He was a colleague of mine at DevelopMentor and now teaches for PluralSight.

I’m on a private mailing list filled with the smartest people I know and Ian is the one we look to for the definitive word on a wide variety of wacky technologies. In spite of his tendency to write long missives covering huge areas (or because of it), he’s the one guy I always read on that list. He’s also graces the off topic mailing list a great deal and, of course, the blogesphere.

Ian wrote the XAML Appendix that Don so loves, as well as half the rest of the WPF book, including layout, custom controls and resources, all of which I constantly refer to. It goes without saying that his feedback made a huge difference in the quality of my own writing. When I asked Ian to co-author with me, I knew I was obtaining one of the community’s most potent secret weapons.

If you’re not an Ian Griffiths fan yet, you soon will be.

October 8, 2005 spout

I’m a fan

Charles Petzold taught the first generation of real Windows programmers.

Charles Petzold sold so many copies of Programming Windows 3.1 that he broke the MSPress accounting software.

Charles Petzold helped define what it means to write books for Windows programmers.

I’m a Charles Petzold fan. I’m also a fan of the other luminaries of this community, including Jeff Prosise, Jeff Richter, Matt Pietrek, John Robbins and Don Box.

They’re the giants that provide the provided the shoulders.

P.S. Petzold has literally sold more copies of Programming Windows 3.1 in a single quarter of the 16-bit years than I’ve sold of my books in a 10-year writing career.

October 8, 2005 spout writing

Wise Advice from Tyler Brown

How can you argue with someone so obviously intelligent?
October 7, 2005 spout

How I Stopped Worrying And Learned To Love the Reboot

Here. The one where I give you the behind the scenes look at the most disasterous and most amazing talk I’ve ever given: Avalon + Indigo = Magic” at the 2005 PDC.
October 6, 2005 spout

The Competition

Charles Petzold says he doesn’t envy me. Hell, I’m just flattered he knows my name. Like the rest of my generation, I learned how to program Windows from Petzold.

Still, even though Petzold doesn’t envy Ian and I for writing the beta edition of the WPF book, it hasn’t turned out to be so bad. Oh sure, we wrote against first a creaky CTP, then a slightly less creaky beta 1 RC, but we made it mostly work. Of course, but the time the book was published at the PDC, MS had released a new version, making some of the details of our book obsolete, but not so many that we weren’t able to catalog the changes for readers w/in a week or so of the PDC bits. We’ve also posted samples for both beta 1 and the September PDC and we plan on posting changes and samples for every major version from now til the WPF v1.0 version of the book.

Plus, I happen to know that another competitor” is constantly bombarded with copies of the book on the desks of his colleagues, while a friend makes parts of our book required reading for the people he’s working with.

Still, all of that pales in comparison to the real value of getting a book (or any product) out as early as possible: feedback from the readers (users). I got a ton of feedback on my early Avalon writings and now we’re getting more from our book readers, all of it feeding into the pipeline to make the book better the next time around.

With all of this in our favor, I don’t envy Petzold having to start from scratch…

P.S. I have to say, the only thing better than beating Petzold, my long-time hero, in sales and reviews is having him complain about me on his blog. I’ve peaked. It’s all down hill from here… : )

October 6, 2005 spout

How I Stopped Worrying And Learned To Love the Reboot

A while has passed since the 2005 PDC, so I can laugh about it now, but at the time, things were not fun at all.

It started long before the PDC. Doug Purdy and I were asked to do the Avalon/Indigo interop” talk. We got together and I volunteered to PM it (PM is a verb as well as a noun at MS). Over lunch (we both love CPK), we hammered out our ideas for a fun demo that showed off the integration points between these two technologies, split the tasks, set the dates and off we went.

My first task was to gather the graphics we’d need for our Avalon front-end, since neither Doug nor I are artists. I asked newly hired Adam Kinney, who did a fabulous job. Everything good about the app is Adam’s fault. Thanks, Adam! I was also to build a script for our demo that we could run by folks internally, which I did.

Doug’s job was to put up a web service that I could write my app against. The problem is that Doug has far, far more responsibility than I do, since while my day job is to PM a group of about 5 people, Doug’s is to PM a group of about 250. At MS, when you’ve got too much to do, the time you set aside for a lower priority task is often pimped” to service the higher priority task (that’s a technical term : ). I got pimped — hard (without so much as a kiss…).

When you’re pimped at MS, one handy trick is to schedule a working” meeting, where you sit in the room with the folks that were supposed to do the work on their own and you work with” them, i.e. look over their shoulder and give them shit if they’re not working on your thing. Unfortunately, the only time I could get with Doug was 6pm-10pm one evening, but I took it and we spent a pleasant evening writing our bits of the app and making them work together under WinFX beta 1.

Then the September CTP bits came along that we were to give away at the PDC. I spent a few hours porting my bits, but Doug didn’t have the time to do his til just before the PDC, so we didn’t get a chance to integrate our two apps til the week of the PDC itself.

But let’s back up. I’m at the PDC Tuesday morning. My Avalon app portion is ported and running, as is Doug’s Indigo app portion. I go to the keynote in the Microsoft employee overflow where we get to make fun of the people on the screen w/o disturbing anyone and we’re having a good ol’ time. I don’t see Doug, but that’s not surprising, so I head up to the speaker lounge, grab a network connection and drop him a line.

By Wednesday afternoon, I still hadn’t heard from him. I drop him another line. Still nothing. Martin Gudgin, my long-time friend and Doug Purdy direct (aka Martin works for Doug), places a call to him for me. Doug picks up. He can do that because he’s not on a plane down to LA. No, he wouldn’t do that because planes freak him out. Instead, he’s on a train. The ride is 35 hours long and he’s still in the middle of it. I won’t see him til later this evening, if at all. At least he’s safe and he’s using the training ride to polish his demo, so I go to a party and feel better.

I awake to find an S+ in my inbox. S+” is what what softies call an Outlook appointment request because we used to schedule meetings using a program called Schedule Plus and, like many things at MS, the noun was verbitized. The S+ is from Doug and he wants to meet to me this morning to have a working meeting to do our integration. I’m happy to do so, so I report to the speaker’s lounge on Wednesday at 10am.

Except for commitments, like Doug’s other talks, my Windows Technology Off Topic mailing list member mini-DevCon and a tiny bit of sleeping, Doug and I are working on the integration of our demos from Wednesday morning at 10am until Friday morning at 4am (our talk is at 10:30am Friday). To get things to work, we’re battling issues we never saw before because in an effort to give our customers the latest and greatest bits, the CTP has regressed on the Avalon/Indigo integration front.

For example, while the add-in that adds Avalon/Indigo features to VS05 modifies the Add Web Reference to create an Indigo client-side proxy, there is no way to set the flag to give us async methods and the generated code for endpoints with more than one method doesn’t actually compile (nor is it easily fixed to compile). The command-line utility, svcutil, generates async methods and the output compiles, but when the async methods are called, they block the UI thread. The worker thread is still spawned and used, mind you, it’s just that the UI thread is blocked til the worker thread is done (handily defeating the purpose). Even when we switch the client to use BackgroundWorker so that async calls are really async, the first Indigo call takes 20+ seconds. We didn’t learn this til later, but this was apparently due to a DNS look-up error when Indigo was used with a network connection (we were using two machines to be as real-world as possible…). This list went on and on.

We did finally get it all working by 4am, but by then we were swearing at everyone and everything that had gone into the creation of either technology, which made us good company for the other last-minute-Lou’s that were hammering away at their demos into the wee hours of the morning (although Doug and I had the dubious honor of being the last ones in that damn speaker lounge).

I woke up early, so I headed to our session early. Doug had another talk right before ours, so I thought I’d get things set up, test them out as much as possible, etc. Sitting in the back of the room about 15 minutes before the other talk was about to end, I started my laptop up from Hibernate mode just as my cell phone rang. It was a friend, so before my machine had fully booted, I flipped the lid closed again and answered my phone. Just then, the speaker ended his talk, so I ended my call and wandered to the front of the room with 45 long, juicy minutes to set up.

I sauntered onto the stage. I got out my power cord in a leisurely fashion and started my laptop to boot.

I hooked up my power cord and thought I saw a hint of blue on my laptop screen and it was booting again.

I watched more carefully and yes, that was the BSOD. I shutdown the power completely and waited a few seconds. Booting again gave me a BSOD again. Minutes are ticking by, eating into my comfortable lead. The IT guys are coming up to test my laptop’s video output and to hook up the mic. I ask if someone technical could help me. They get onto their radios with a hint of panic in their voices.

By now, I’ve trying safe mode booting, both into Windows and into the command prompt, both of which yielded a BSOD. Then I remember my CD case. I always carry a set of CDs with me with my most critical software, just in case (those old instructor habits die hard). I had recently gone through it and cleaned out a bunch of stuff, so the single CD left in the case is my Windows XP SP2 boot CD. I put it in and pray. As it turns out, I’ve got plenty of time to establish a connection with my maker, because it takes ages for that XP CD boot to get somewhere useful. I chose the Recovery Console and wait.

In the meantime, Martin has wandered in to say hello. It’s about 10:10 and my talk starts in 20 minutes. I ask him if he’s got WinFX and VS installed on his laptop. He says he’s got WinFX and a version of VS installed, but neither are the PDC bits, so they’re not likely to help me (I was up til 4am getting my bits working for the PDC build — I couldn’t imagine switching versions on the fly). I ask him to find someone else with a machine I can use. In the meantime, I’m checking the PDC boxes. They’ve got two, both running WinXP (great!), but neither running WinFX or VS05 (boo!). All I can do from these machines is run my PowerPoint deck, but because this session was meant to be code only, we’ve only got about 3 slides. Without the demo, we’ve essentially got nothing.

Now it’s 10:15 and the audience is gathering. Also gathering are people trying to help. One guy’s got a machine with the right bits, but they’re running in a VPC, which is not the greatest place to show off Avalon (but thanks, whoever you are, for trying!). One attendee offers his laptop, which has the right bits installed, but he doesn’t have a power cord and there’s only about 30 minutes worth of battery life left. Rob Relyea (I think) finally comes up with his shuttle PC with the right bits and a power cord and starts hooking it up, along with everyone else I can find that might be able to help me, all of whom are now busy hooking up PCs in line line that nearly bows the table on the stage.

At last, I’m at the recovery console and I’m running every command I can think of, e.g. fixmbr, fixboot, chkdsk, etc. Most of the commands are saying scary things like Are you sure you want to execute this command? It might work, but I can’t promise not to cause flames to shoot out the USB slots.” I’m typing y” as fast as I can cuz I’ve got nothing and at least flames would be engaging.

Now it’s 10:20 and Doug has just shown up from his previous talk. He boots his laptop without a problem, the sound guys have their way with him, his video works and he announces that he needs caffeine. Of course, I’ve got adrenaline shooting out of my eyeballs by now and I want him to feel my pain, so I tell Doug his is absolutely not going anywhere. He says he is. I tell him he’s not. Now, Doug and I are both big, loud guys, so all of the folks in the front rows, including representatives from the technologies we’re demonstrating that asked us to give this talk, are witnessing us fighting with each other minutes before the talk begins. Finally, Rob to the rescue again, offers to get Doug some coffee.

At around 10:25, all of the fixthis and chkthat commands have been run and I reboot. For the first time in almost an hour, I can log into my laptop and I start to think I might actually get to give my first PDC session ever (did I mention I felt a little pressure?). We pull up the finished version of our app and test it end to end. There’s still the initial 20 second lag, but it all works. Brimming with confidence that only comes from avoiding a bullet with your name on it, I hook up the video on my laptop.

All that comes out is scrambled garbage.

Now we’re panicked again, frantically futzing with the video settings. They all seem mostly right, so we change some things that shouldn’t matter, but nothing fixes the problem.

We can’t get the video to work and now it’s 10:30.

The sound guy puts on my mic and practically dives off the stage in case something does burst into flames, as seems the logical next event.

I pull up the slides on one of the PDC computers so we can start the talk and reboot my laptop at 10:31.

At 10:32, we’ve started the talk. Doug is telling folks who we are and why we’re here. I’m looking for the backdoor.

I log into my laptop, start up the talk on the same slide that’s currently showing and press the switcher to show my laptop’s video.

It shows and I am Superman.

This is where things get fun, because at our most morose, Doug and I are loud and obnoxious in a way that most audiences like. By now, we’ve poured so much energy into the talk right up until literally the very last minute that now we’re practically levitating.

Doug has the idea to take questions first, so I’m writing down a list of stuff that has nothing to do with the talk, all the while we’re making fun of each other and the audience. The audience eats it up.

I’ve got a developer from Indigo and a PM from Avalon in the front row that we bring up on stage because they’ve just gotten engaged and we made them kiss to show off the power of Avalon and Indigo integration, I announce that I got ordained on two separate internet churches the night before in case they wanted me to marry them on the spot. They politely decline, but the audience eats it up.

I show off our application with increasingly funny caricatures of Doug and me. The audience eats it up.

We start into the actual code integrating Avalon and Indigo, joyfully pointing out the problems with the current versions of each other’s technologies, making sure the audience knows the current state of the bits and how to work around problems while pledging to fix things by RTM. After a bit of trouble, we get our integration code working across the network between machines and give each other an enormous hug, professing our undying love for each other and guess what? The audience eats it up.

It’s like a TV sitcom with a laugh track every 60 seconds, except that Doug and I are just riffing and the laughter is real. I’d say it was the speaker version of jazz and it rocked the house.

Of course, as was inevitable, we got to a place where our demo finally failed, but only after we’d gone over our allotted time by 5 minutes and Doug redeemed us with 10 seconds more typing, an off the cuff demo and a flourish, at which time we wisely took our bows and got the hell off the stage.

What was the result? Lots of folks said stuff in their evals like, Siegfried and Roy have nothing on Chris and Doug. It was a perfect way to wake up on the Friday of the conference.” However, some folks dinged us for too much show, not enough substance,” and they were right. We would’ve shown more stuff if we could have, but frankly, I’m just happy one of us didn’t spontaneously combust.

The best results of the talk was that Doug went home with a giant list of bugs to get fixed before the WinFX RTM and I kicked off the WinFX Cross-Pillar SDK Technology Sample Working Group” dedicated to making sure we have a much greater set of SDK samples to show off and drive quality into the cross-pillar integration points between Avalon, Indigo and Workflow. I’d actually like to poke my head out of the speaker lounge at the next PDC and I’ll be damned if I’m going to let the quality of these particular technologies stop me next time if I can help it (and I can).

Still, I find I have a new appreciation for jazz…

October 3, 2005 spout

I don’t ever want to unpack my books

I don’t ever want to unpack my books. Instead, I want a paperback-sized tablet PC whose sole job is to run eReader loaded with all of my books. It’s work like Project Gutenberg, the Open Content Alliance and Safari that may finally make this happen.

However, like my DVD and music collection, I am willing to purchase my book collection one more time in digital form, but only if it is non-DRM’d so that I can use the book where ever I want to. It’s no good to be to be able to read my book at my PC, but not in bed or in line at the airport.

September 30, 2005 spout

I need Outlook’s new anti-phishing support

Forget that my family constantly asks me things like I got an email from eBay today that said my account was closed. Should I click on the link and give them my credit card details?” Forget that I’m constantly having to watch every single link I touch. No, I need Outlook’s new anti-phising protection because with all my computer education and experience, I got bit by an phishing attack.

In my defense, it was the perfect storm opportunity:

  • We’ve just moved and I’m still dealing with a ton of change of address issues
  • I ordered several books from Amazon in the old house that hadn’t been delivered before we moved
  • I had just placed an order that morning on Amazon that morning w/o my caching settings, forgetting to update my credit card billing info

So, when the Amazon email came in telling me that there were problems with my account, I didn’t hover my mouse over the link before clicking it. When the page came up, looking just like an Amazon page, including the bit where they strip away most of the options when you’re entering payment information, no alarms went off. Even when they asked me for my PIN, which I don’t use for my credit card, so I don’t know it, I entered everything else, e.g. login ID, password, credit card, expiration and even that extra code they stick on the back these days and pressed Submit before I thought anything might be amiss. It was when they complained about the lack of PIN and sent me back to the same page to enter it that, too late, I thought to question this site.

Of course, I canceled that credit card right away and began changing all of the sites where I use that same user name/password combination (most, frankly). But still, it put a kink in my day (and I honestly don’t know all of the sites where I use that user name/password combo).

And so, while I’m installing Office 2003 SP2 as we speak, I have to wonder: why is it that anyone can send an email claiming to be whoever they want? Isn’t that a problem worth disrupting the world a bit to fix? I think it is.

September 26, 2005 spout writing

Programming WPF Samples & Change Notes Posted

Here. I’ve posted the b1 and Sept (PDC) CTP samples and change notes for Programming Windows Presentation Foundation so that you can use the book for either beta 1 or the Sept (PDC) CTP bits and be equally successful. Enjoy.
September 22, 2005 spout

My Product Group Fun: Part 2

September 22, 2005 spout

My Product Group Fun: 2

I am having so much fun, I can’t not tell you about it.

After a few months of wallowing, I found out something about myself: I’m really good at digging into the state of the art, whether it’s one technology or a feature across technologies, if I have a problem I’m trying to solve. However, if I’m just wandering in a space w/o an explicit goal, e.g. give a presentation, build an app, write an article, I’m lost; I just can’t muster any juice. What this means is that when I present my thinking in an area where I’m wandering aimlessly, I’m not married to any of my conclusions. If someone pushes back, I can’t really get behind my conclusions because I just don’t care. If you’re giving a presentation on how you think a certain technology should be used and you don’t have a firm opinion one way or the other, that’s just death.

So it wasn’t pretty for my first couple of months in my new project team. I never felt like I was making any progress because I didn’t understand what problem we were trying to solve. How can you know how much further you’ve got to go if you don’t know where you’re headed?

So, when my boss walked into my office with an actual problem, I jumped at it. He asked me to understand one of the internal applications that another team built at MS and give a presentation on it. The presentation was to a group of architects from across MS. The idea was to pick something to build that was real and that we could learn from as we attempted to apply what we hoped our product would be when it was done (developing prototype product functionality along the way). The catch: I had 36 hours to prepare the presentation (16 of which would commonly be used for sleeping), there weren’t any product architecture docs and nobody knew anyone from that team. I didn’t get much sleep, but I did prepare a presentation that amazed the audience given the amount of time I had. Plus, we ended up picking that app and we’ve been building it all summer, with me writing some of the code and leading the team writing the rest of the code. We’ve been through two milestones and are in the middle of a third, learning a ton about what we were going to build from solving an actual problem. That learning has fed into a product plan that I’m working on with my boss and that we’ll use to capture our team’s thoughts and then getting our management and our internal partners on board.

This goes along with me learning how to be a real MS Product PM, giving my PDC talk, organizing a group to fix what I don’t like about the technologies that I found out about during the preparation of my PDC talk, working on three books and helping to get Genghis resurrected for .NET 2.0. So, I’m busy doing so many wonderful technical things that I can barely stand it. Wahoo!

September 18, 2005 spout writing

Please Post Reviews of Avalon Book

For those of you that reviewed or got free access to our Avalon book while we were still writing it, please please please post a review on Amazon.com. Thanks!
September 15, 2005 spout writing

WPF Book Sold Out Again, More Coming on Friday

You can also order them online. I find that even Thanksgiving is good for gift giving, as is Halloween! What could be better than the gift of knowledge?
September 14, 2005 spout writing

Programming WPF: Sold Out @ the PDC, More Coming

All of the initial copies of Programming the Windows Presentation Foundation have been sold out at the PDC. That’s a double edged sword, of course. On the one hand, it’s nice that so many people wanted a copy that they were gone by the time I got to see the remaining display copy on Tuesday after lunch. On the other hand, I want the publisher to have provided enough copies to feed a longer buying frenzy.

The good news is that another, larger shipment of the book will be available @ the PDC in the Marketplace store Thursday afternoon. Please form a line in an orderly fashion and keep the sleeping bags out of the normal aisle of traffic. : )

Or, feel free to purchase one online (or two — XMas is coming up!).

September 9, 2005 spout

MS Hurricane Katrina Relief Efforts

The following is an internal email published here with permission:

From: Lisa Brummel
Sent: Friday, September 09, 2005 1:54 PM
To: Microsoft
Subject: Update: Hurricane Katrina Relief Efforts

While the effects of Hurricane Katrina will be felt in the Gulf Coast for months and years to come, the contributions and volunteer efforts of thousands of Microsoft employees worldwide over the last week and a half have made a real difference in peoples’ lives. Fortunately, all of our employees in the region are safely accounted for.

I want to thank everyone who has been responding to requests by relief agencies for cash donations to meet the most immediate needs of evacuees. To date, a total of $9 million in cash, technology assistance and support has been donated by Microsoft and by employees. This includes $2 million from Microsoft for relief, recovery and rebuilding efforts, $5 million in technology assistance and support, and U.S. employee contributions totaling more than $1 million, which will be matched by the company.

In the hours and days following the hurricane, hundreds of Microsoft employees have used their creativity and initiative to help speed relief, often doing what we do best — using technology to solve problems and help improve people’s lives. These efforts by our employees are what make Microsoft a special place to work. I wish I could mention everyone by name, but since that’s not possible, let me share a few examples that will give you an idea of the great work people are doing.

  • Jim Carroll, a database architect from Birmingham, Alabama, and a half-dozen other Microsoft engineers from California, Florida, Alabama and Texas, worked virtually nonstop for four days to develop katrinasafe.com, an online tool being used by the states of Louisiana, Mississippi, Alabama and Texas, and by relief agencies to help evacuees find family members separated by the crisis. Since the site went live on Sept. 5, information about tens of thousands of evacuees has been registered on the site, and it’s being updated continuously with information from relief centers across the affected region.
  • Murali Krishnan, a group program manager in MSN, led an effort of about 100 Microsoft employees to build a secure Web site hosted by MSN to accept donations for the Red Cross. Krishnan’s team built the site — donate.msn.com — in just 20 hours, unheard-of speed for a project of this magnitude. The MSN Web site has already generated more than $3 million in donations for the Red Cross.
  • Dawn Gagnon, a mobility solutions specialist in Houston, arranged for the delivery of Microsoft Smartphones to 30 doctors at the main Red Cross medical triage site in Baton Rouge, and 150 Texas National Guard command post leaders being deployed to Louisiana to help with relief efforts. With land lines and switching stations down throughout Louisiana, the Smartphones were a top priority of the Texas National Guard to keep command leaders in touch. A makeshift assembly line of friends, family and neighbors at Dawn’s house worked for 12 hours to activate and charge the phones and make up waterproof bags that included car chargers and extra batteries.
  • John Morello, a senior Microsoft consultant in south Louisiana, saw the need for an e-mail system that volunteers could use to help evacuees connect with people they’d been separated from. The Microsoft Hotmail team created the accounts in under four hours, and this has already helped reunite dozens of families. Suresh Babu, group program manager at Hotmail, then orchestrated a cross-team effort to help tens of thousands of evacuees set up and use free Hotmail e-mail accounts to let friends and family know they’re OK, check in with employers, contact their insurance companies, even keep in touch with other victims of the hurricane.
  • Todd Ellison, a technical account manager in the Houston office working to assist local officials in relief efforts, walked into a wholesale computer parts distributor and asked if they would donate two laptop computers needed by the chief information officers of the City of Houston and Harris County, Texas. Five minutes later, Todd was out the door with two new machines.
  • Bill Steele, an Indiana-based Microsoft developer evangelist and private pilot, has been using his own twin-engine plane to shuttle food and supplies to areas of need. Flying out of Baton Rouge, Bill has delivered 17,500 MREs (Meals Ready to Eat), mostly to the lower part of Mississippi.
  • Steve Lough, an account manager in our federal sales office, led a team of senior Microsoft technologists working in partnership with Intel, Cisco and SBC at the Red Cross headquarters in Washington, D.C. to help create a communications infrastructure for relief shelters, establish computer kiosks for evacuees and Red Cross workers, and dispense financial assistance broadly. Microsoft also worked with the Red Cross to establish a solid core data infrastructure to meet the huge increase in demand on the agency’s IT system.
  • Blacks at Microsoft (BAM) is allocating funds to assist displaced students at historically black schools affected by the disaster, including Xavier University, Dillard University and Southern University of New Orleans.
  • In Redmond, a group of employees is putting together 200 boxes of sanitation and first-aid kits — about a ton of supplies. They’ll be shipped to the Microsoft office in Houston where Microsoft employees will pick them up and take them to a local airport, where four private planes are at the ready to fly the supplies to Baton Rouge. From there, they’ll be picked up by local charities and dispersed to those in need;
  • The folks at Bungie Studios, a Microsoft subsidiary that developed the Halo games for the Xbox, used the Web to sell more than $100,000 Fight the Flood” charity T-shirts online. The proceeds will go to the Red Cross, as will royalties earned from other Bungie Store products sold in September.

In addition, three of Microsoft’s Across America trucks, fully equipped with communications systems and advanced technology, are on their way to Red Cross relief operation centers in the Gulf Region to provide vital coordination capabilities.

Groove is being used by the Red Cross and the Army Corps of Engineers as a collaboration tool to enable communications for multiple partners in the relief effort, and Groove has employees helping on site at the Red Cross.

Our sales force is letting business customers affected by the hurricane know that we’re waiving software licensing fees for up to six months, and making premier support consultants available to help them get their IT systems back up and running.

The speed of these response efforts has been just incredible. I want to acknowledge Ron Markezich, our CIO; Jennifer Heard, GM of the South Central District, as well as Cathy MacCaul, Linda Testa and the Community Affairs team, for coordinating our efforts to support relief organizations, government agencies, educational institutions and customers.

I’m very proud of my company right now.

September 6, 2005 spout

I’m in

I feel like I’ve spent the last four days in hibernation, awaking like Rip Van Winkle to an entirely new environment. And while the new environment is still filled with boxes and won’t have internet, cable or phone til tomorrow, it’s still a very pleasant environment, flat so the boys can bike everywhere, near family, very near the schools, filled with friendly people (many of which have already introduced themselves and I’m worked double-hard this time to remember their names) and with plenty of potential for renovation (and the space that’s there is nice all by itself). There will definitely be an adjustment period, but overall, it was very nice to wake up in.

On a personal note, with the move, getting ready for PDC, my son’s birthday, my wife’s birthday and my 14th wedding anniversary, some of my personal relationships have suffered (I’m *so* sorry to have missed last week’s PND!). My have my apologies. I hope things will get better after the PDC!

August 22, 2005 spout

New Contractor Advice: Time Estimation

I got a time estimate from a friend who’s a brand new contractor in the area of home renovation (my wife made me promise to start renovations on our new place immediately as a condition of purchase). He’d already bid me an hourly rate, but I asked for a rough estimate of time spent. He hasn’t yet seen the place (we can’t talk the owner into letting us come over again), but he answered my question anyway, giving me an estimate 5x lower than I suspected it would be (Danger! Danger, Will Robinson!). I replied with the following advise on how a contractor should estimate time for maximum customer happiness (and therefore maximum revenue):

There are two schools of thought on time estimates. One school of thought, which I’ll call bait & switch,” says to knowingly under-estimate so that by the time the customer notices a slip, they’re committed and they continue with their contractor by sheer momentum, hoping it’ll all be over soon. This technique produces customers that either pay more than they thought or that force the contractor to cut corners to meet their initial estimate, lowering the quality. In either case, the customer tends to get unhappy, which hurts repeat business and word of mouth.

The other estimation technique I’ll call under-promise & over-deliver.” In this scenario, the contractor estimates their time very conservatively, then doubles or triples it to take into account the unforeseen. This estimate may scare the customer away, but a good contractor will say things like I hope it’ll be less, but I want to make sure that we spend enough time to make sure that you’re happy,” to smooth the way. Plus, when the contractor delivers early, the customer is happy, calls again for future work and says things like and he came in under the initial estimate!” to all his friends.

Obviously, very few people that read this site are contractors in the area of home renovation, but I think the advice applies to most forms of contracting. Take it as you will.

August 20, 2005 spout

The List

Lord keep me off of the list of people that don’t have to go through regular security checks:

The Aug. 5 memo recommends reducing patdowns by giving screeners the discretion not to search those wearing tight-fitting clothes. It also suggests exempting several categories of passengers from screening, including federal judges, members of Congress, Cabinet members, state governors, high-ranking military officers and those with high-level security clearances.”

Can’t you just picture the movie where the terrorists kidnap a Cabinet member, hold their family hostage and use them as a mule to blow up some airplane? I’ll take the anal probes at the airport, thank you.

August 19, 2005 spout

Cool New IVR Feature

In a (very) past life, I used to write intergrated voice response (IVR) systems aka voicemail hell.” It may not seem like it, but we spent a *ton* of time trying to make a voice output/12-key input UI as friendly as possible.

However, I never thought of the IVR feature I ran into today. While transfering my utilities to our new address, one of the utilities put me on hold and offered to call me back when it was my turn in line (promising me that I would not lose my place). I’ve got the world’s most perfect cell phone and the world’s most perfect Bluetooth headset, so staying on hold was just as easy as not, but still, that’s a damn cool feature.

August 12, 2005 spout

Chris does the Half Monty

Chris does the Half Monty
August 12, 2005 spout

The Half Monty

The Half Monty

I spent last weekend in Reno with Joel, my fraternity brother, wife’s sister’s husband and business partner (we have an investing business). We’d both been working killer hours lately and we needed a break, so we spent three days on a dirty boy’s weekend” (as another friend called it). We gambled and drank and ate and slept in and took in a showing of The Dukes of Hazzard and, one night, we went to a comedy club. The main act was a fabulous comedian that took his craft very seriously. In fact, he was so committed to what he did, that he went to all the trouble to have his hair cut so that it looked short with it tucked into his hat, even though it was really very long, just so he could whip it out in his act for comedic effect. During his act, he juggled a chainsaw, did an amazing card trick, road a unicycle, played music on the MP3 player he’d plugged into his mic, brought folks up on stage and had us all laughing the entire time. He had this way of bringing folks up on stage where he’d point at a person, ask them their name (e.g. Bob”) and then say, Folks, give Bob a hand as he comes up to help me out with this next bit.” He was a true entertainer.

After he’d had us busting a gut for about an hour, he pointed to me and said, What’s your name?” I answered him and he said, Folks, give Chris a hand as he comes up to help me out with this next bit” and up on stage I went. Now, from a distance, I look fairly normal sized, especially sitting down. Our comedian was a tad on the short size, frankly, so when I walked up on stage, I towered over him and his eyes got real big. Of course, I’m shy on stage, so I didn’t say much, but nodded and played along good-naturedly. I mean, hell, I’d once led an audience into a public pie lynching of a suited marketing person, so I knew the drill.

He looked at me and said, Chris, I want you to follow along with me. Do what I do. If you don’t do what I do, it won’t be funny. The funnier it is, the more likely you are to get laid.” Of course, I was in Reno w/o my wife, so unless Joel got frisky, I wasn’t going to get laid, but that didn’t mean I wasn’t enthusiastic about increasing my chances (and, of course, the audience was egging me on), so I nodded my head earnestly that I would do my best to follow along. He gave me a floppy cabby hat and put a top hat on his own head — I followed along. He did a little bit of spirit fingers” and I followed. He did some hip gyrations; I followed. Of course, the audience was loving this and I love it when the audience is having a good time, so I’m having a good time.

Then he started the music: You Can Leave Your Hat On,” by Tom Jones, made famous in strip routines the world over and most especially in the excellent movie: The Fully Monty.

I can see where this is going.

So can the audience.

Now I’m trying to remember what underwear I’m wearing.

Our comedian starts into his routine, doing flips and tricks with his hat that I try to keep up with, but it’s hard enough to balance a stiff top hat on your head, let alone a floppy cabby hat so, while I make the best of it, I’m only funny because I can’t do what this guy is doing. The best bit, of course, is when he holds his hat over his crotch, I follow, he gyrates, I follow, he lets go of his hat, I follow, his hat stays up and mine… does not (obviously he’s more likely to get laid at this point than I am : ).

After this, he pulls half his belt out and swings it around in a sexy manner; I follow, being as sexy as a giant, overweight geek can be (remember the fat guy from The Full Monty?). He throws his belt over his should and I do the same.

And then the inevitable. The music builds to a fever pitch, he reaches down and pulls off his pull-away pants in one smooth motion, throwing them over his shoulder and the crowd goes wild.

Then he looks at me expectantly and the crowd goes even more wild (especially Joel who’s nearly choking in laughter at this point). I raise my eyebrow to the comedian and he eggs me on. I raise my eyebrow to the audience and they egg me on. I remember that I’m no stranger to public nudity and a crazy audience is even more fun than a quiet photo studio, so I reach for my pants.

Of course, I’m not wearing my tear-away pants, so I’m laboriously unbuttoning and unzipping, following by carefully pulling off my pants over my sandals, which is not an easy thing to do without falling down when you’re 6′5″ and your center of gravity is someone near your left ear. But, I manage it and throw my pants over my shoulder, suddenly reminded of the underwear I chose for my day of revelry:

Now the comedian was nearly choking with laughter, but he said I did a great job and reached out to give me a hug (being careful to keep his hips as far away from mine as I was keeping mine from his), then shoo’d me off the stage. Then, while I’m still struggling to get my pants back on, the house lights go up, the act is over and the comedian is gone. And now, half the audience wants to shake my hand on the way out for showing off my polka dots on stage. It was a good way to start the weekend. : )

July 27, 2005 spout

Limiting/Monitoring my sons’ access to the ’net?

My 11-year old wants to do email and IM and he’s already surfing the web. Does anyone have any recommendations for good software to limit and monitor his internet access? Thanks!

July 16, 2005 spout

My First MsBuild Task

I wrote my first custom msbuild task this morning. I used the the Extend the MSBuild with a New Task topic from the msbuild wiki and it worked well to get me started. I started with the simplest thing that used at least an input property:

// HelloTask.cs
using System;
using Microsoft.Build.Utilities; // reference assembly of same name
using Microsoft.Build.Framework; // ditto

namespace MyFirstTask {
  public class HelloTask : Task {
    string _who;

    [Required]
    public string Who {
      get { return _who; }
      set { _who = value; }
    }

    public override bool Execute() {
      Log.LogMessage(string.Format("hello, {0}!", _who));
      return true;
    }
  }
}

My task implements the msbuild ITask interface by deriving from the Task helper base class, which provides the Log object, among other things. The only thing I have to do is implement the Execute method, which needs to return true on success. To prove that my task is called, I use the Log object to log a message (I could also log an error or a warning). The public Who property is set from the use of the task in an msbuild file. By marking the property with the Required attribute, I ensure that msbuild itself makes sure that a Who is provided.

Once I’ve compiled my task, I can use it directly from a .proj (or .csproj or .vbproj) file:

<!-- fun.proj -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Target Name="HelloTarget">
    <HelloTask Who="Joe" />
  </Target>
  <UsingTask
    TaskName="MyFirstTask.HelloTask"
    AssemblyFile="C:\MyFirstTask\bin\Release\MyFirstTask.dll" />
</Project>

Notice the HelloTask element, which creates an instance of my HelloTask class and sets the Who property. The mapping between the HelloTask and the MyFirstTask.HelloTask class in the MyFirstTask.dll assembly is in the UsingTask element. Running msbuild against fun.proj yields the following output:

C:\taskfun>msbuild fun.proj
Microsoft (R) Build Engine Version 2.0.50215.44
[Microsoft .NET Framework, Version 2.0.50215.44]
Copyright (C) Microsoft Corporation 2005. All rights reserved.

Build started 7/16/2005 7:04:09 PM.
__________________________________________________
Project "C:\taskfun\fun.proj" (default targets):

Target HelloTarget:
hello, Joe!

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:00.04

Notice the hello, Joe!” output by the task as its Execute method is called. Notice also that while the task is in its folder, the .proj file can be anywhere, so long as it has a UsingTask that maps appropriately. By convention, the UsingTask elements are kept in .targets files and put into shared folders to be used between multiple project files, e.g. Microsoft.common.targets, etc. Refactoring the UsingTask out of the .proj file and into a .targets file looks like this:

<!-- My.Fun.targets -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <UsingTask
    TaskName="MyFirstTask.HelloTask"
    AssemblyFile="C:\MyFirstTask\bin\Release\MyFirstTask.dll" />
</Project>
<!-- fun.proj -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Target Name="HelloTarget">
    <HelloTask Who="Joe" />
  </Target>
  <Import Project="c:\My.Fun.targets" />
</Project>

Of course, a real task does far more than this one, but it was hella easy to get started.

July 10, 2005 spout

Enjoying This Moment

Here.

The one where I enjoy the passing of the book writing storm, if only for a moment.

July 10, 2005 spout

Is it creepy that I think this is valid?

I’ve used this technique to keep people from dumping their work on me. Now I’m creeped out about it…
July 10, 2005 spout

Enjoying This Moment

I’m sitting at my computer on Sunday morning with nothing” to do (I mean, I could always work, but my team is good about taking weekends off). This morning comes after 3.5 months straight of evenings and weekends working on the Avalon book (I’m talking 20+ hours/week on the book on top of the 50-60 hours/week I spent getting up to speed on my new job). The final push was this week, which I took as vacation from work (“you took vacation to work!” my wife likes to say…).

Last night, I produced the 2nd draft of my last 1st draft chapter (which I was happy to trim by 17 pages w/o losing anything useful) and composed comments on a 2nd draft of Ian’s chapter that was in my queue.

This morning, I took care of a reviewer comment that’s been nagging me, sent Ian my feedback and composed a detailed schedule of the rest of my day which consists of:

  • wait for feedback on non-finalized chapters
  • apply feedback and finalize my last two chapters (30-60 minutes)
  • produce 2nd draft of book preface (1-2 hours)
  • review anything Ian sends my way (1-2 hours)
  • (maybe) review 1st draft of chapter from the WinForms 2.0 book (1-2 hours)

Compared to how I have been spending my time lately, that’s an extremely light day.

This book has been particularly difficult to write. Most of my writing has been on insights that I or the other members of the community have discovered in the use of the technology. These kinds of insights come after the technology is shipped and we’ve all had a chance to get to know it. Avalon, on the other hand, has a ways to go before it ships and the developer community is very small. Plus, some parts of Avalon don’t work very well or have changed significantly since I first learned about them. The consequence of this is that most of my writings on Avalon have had to have at least one massive overhaul as I a) learn the best way to think about them and b) update them to actually reflect the latest bits.

The rub is that by the time the book sees the light of day (it should be on the PDC show floor), the Avalon team will likely have shipped another version of the bits, obsolescing what Ian and I have worked like dogs to ship. Of course, we’ll post the errata and we’ll update the book for the Avalon RTM, but still, it hurts that most of you won’t be able to read the book when it’s a perfect match for the bits.

I get to read it, though, and I’ll tell you — right now, the book rocks. : )  And the reason it rocks? Ian and I have worked hard to make sure it does, of course, but it’s mostly been the internal and external reviewers that have done such a great job pointing out where we got it wrong. It’s tough to hear, especially when it means a complete chapter re-write (I just finished one of those last night), but I’m so happy with the results that I’m willing to love them anyway.

Now I’ve raised the bar impossible high, but screw that — I’m enjoying the moment…

June 23, 2005 spout

My Worst Job

Following Rory’s example, my worst job was where I spent two weeks with a friend working for his dad where the best of our two duties was to mow the doll factory’s lawn (we used to fight over who’s turn it was). The worst of the two duties was to sort leather remnants from the manufacture of furniture and car upholstery by color and texture into giant boxes, from which the underpaid immigrant women would construct dolls.

Talk about mind numbing… It drove home just how important it was to have a college degree.

I quit after two weeks because the amount of money I got for labor of that kind was nowhere near the degree of pain and suffering I endured, especially when I could just hang out at home for the summer. My friend, however, didn’t get that choice. Poor bastard…

June 20, 2005 spout

Theoretical Computer Science

accounting is to mathematics as engineering is to computer science.

I’m an accountant sitting in a meeting run by mathematicians. Unless I can use the math to do my double-entry book-keeping, I just don’t care. A mathematician cares only for the power of ideas and never needs to see the numbers.

As an accountant, I’ve read papers written by mathematicians and applied their ideas sparingly, but I’ve never seen a quorum of them discuss things before.

Fun. : )

June 20, 2005 spout

My Weekend

Dear Diary, this is how I spent my Father’s Day weekend:

  • Friday, 7:30am, dropped my family off at the airport so that they could visit relatives in MN
  • Saturday, 1am, sent around the check-in notice for my day job and went to bed
  • Saturday, 11am, woke up in book avoidance mode
  • Saturday, 3pm, started porting styles chapter to Avalon b1
  • Sunday, 4:30am, heard birds chirping, thought it would be a good idea to go to bed, still not done porting styles chapter and my butt hurts from sitting, plan to bring in a butt pillow tomorrow
  • Sunday, 4:31am, reflected on why I’m working so hard on a book when my readers feel the need to compare me unfavorably to certain rotund movie characters, resolve to stop writing books so I can have a life back that includes exercise (and doesn’t include reviewer feedback)
  • Sunday, 9:30am, woke up, called my Dad to wish him a happy father’s day, called my kids to hear them do the same for me
  • Sunday, 10:30am, back at it porting styles chapter (butt pillow in place)
  • Sunday, 1:30pm, finished porting styles chapter, started applying reviewer feedback
  • Sunday, 3:30pm, shipped out 2nd draft of styles chapter for 48-hour quick-turn review, started reading data binding chapter reviews
  • Sunday, 10:30pm, went to bed with data binding chapter only 1/3rd finalized
  • Monday, 5:30am, got up to make the trip to Redmond, didn’t finalize both chapters as per this weekend’s plan, but I’m so happy to not be applying reviewer feedback right now that I have a hard time caring
  • Monday, 1:33pm, composed this silly entry and working happily at my day job where reviewer feedback is not currently a part of my life
June 14, 2005 spout

The End of an Era

Today is Sara Williams’s last day. Sara was the first Microsoft employee that I met. In fact, she was the first MS employee that a lot of people met. She’s been at Microsoft for 14 years, which was long before it was cool for employees to talk to the outside world. She was a key part of MSs Developer Relations Group, whose job it was to do the outside world stuff while the rest of MS stayed inside and slid flat food under the door to each other.

Eventually, like others, Sara grew tired of Microsoft’s insular-ism and specifically our developer network’s unwillingness to embrace the community, so she launched GotDotNet which, inevitably, lead to her taking over MSDN altogether, which she developed Developer Centers and pushed a whole new way for Microsoft to embrace 3rd parties.

However, by far her most benevolent act was to hire me, a guy that refused to buckle to the pressure to move to Redmond and then she let me run roughshod over my colleagues putting up the Longhorn DevCenter and re-launching the Smart Client DevCenter. This set the stage for me proving myself in a remote-hostile environment and allowed me to eventually get myself onto an honest to gosh product team. It was all her.

Her departure from MSDN will leave an indelible mark on that organization and I can’t say that it didn’t play a factor my own decision to leave. Her departure from Microsoft is unbelievably sad. In many ways, Sara is Microsoft to me. She embodies each employee’s personal responsibility to our customers. She’s certainly not alone in her thinking at Microsoft, but that makes me no less sad to see her go.

Thanks very much, Sara. You made quite an impact on me. I wish you all the best and my undying adoration.

XXOO,
Chris

June 13, 2005 spout writing

Love Reviewers; Hate Reviews

I took a quick glance at some reviewer feedback for the Avalon book and already I’m trying hard not to hate the folks that send it in. Mean, hateful things like who is this guy?!?” and well, he’s never written a book” spring immediately to mind.

The thing is, reviewer feedback, especially harsh, blunt, spit-in-your-face reviewer feedback, is an extremely critical part of the book writing process (although, ironically, I most hate the reviews that sound like stuff I would write when I review…). Without reviews, authors don’t have any idea how their writing will be received til it’s published and we’re bound to do all kinds of stuff that’s reader or subject hostile that need correcting. Please, feel free to hit me with both barrels when you’re reviewing my stuff; I won’t promise to act on all the feedback, but I promise to consider all of it seriously.

I do have one request, however. This is something I try to do when I’m reviewing (and I’ve been known to make grown men cry): please start with something nice. This does two things:

  1. Gives the author a little ego boost before you chop his legs out from under him.
  2. Establishes your credibility as a reviewer. If you say something nice, especially if it’s insightful, e.g. Avalon data binding is a large topic, but I really love how this chapter presents practically all of it in an easy to follow manner,” then I’m much more willing to take feedback like, don’t let the sample app drive the chapter, make the technology coverage drive the sample” (not to pick on anyone in particular : ).

Of the two things, establishing your credibility as a reviewer is by far the most important because w/o it, there’s a good chance that the careful thought you put into your reviewer comments will not be fully considered (who wants to listen to a curmudgeon?).

Anyway, if you encounter me in the next month and I’m grumpty, it’s cuz I’m spending my weekends dealing with reviews. I might be crabby and violent, but at least I’m slow and easy to see coming. : )

June 9, 2005 spout

Never Give Up, Never Surrender

I was reminiscing today that I’ve been turned away from most decent places in my career:

  • I went to a stupid high school that raised my grades a full letter when I moved there from a decent school system, leaving me ill-prepared for college
  • I was turned away from MIT, CalTech and Stanford out of high school, settling for the U of MN instead
  • I didn’t even qualify for a phone screen from either Apple or Microsoft during or after college
  • I flunked most of my on-campus interviews and instead settled for a full-time position at the start-up where I’d worked during college (I was originally been hired there because it was run by alumni of my fraternity and I worked for beer money)

And yet, I got all I could out of every opportunity, performed all of the jobs I did manage to get with gusto, learned as much as possible and moved on to learn new things when it was time. Eventually, I found my way” and I think I did all right, but only because I didn’t let the door slams stop me. You shouldn’t either.

June 7, 2005 spout

Career Path for Developers?

Pete” email me the following questions:

I’m a senior software developer, age 34, specializing in C# development for Windows Forms / ASP.Net, having come from a VB background. Having had some (if not most) of my enjoyment of development sucked out of me by my current employer, I’m contemplating my next career move.

Thing is (and it’s not just me, several of my colleagues concur), where do I go from here? What is the career path of a software developer? I.e. junior developer, senior developer, guru, author,…? Is there such a thing as a career path for a developer (or anyone, these days)?

I surmise that developers such as myself (4th / 5th gen language developers) may actually be the first at the crest of this particular wave - I guess COBOL developers could have migrated into hardware / system maintenance, but what for folks like myself? I can’t see myself being a developer until I retire (31 years later), but I don’t really want to move into management either (perhaps software delivery manager, but not a full-blown person manager).

Or maybe this is just a mid-life crisis. Maybe those COBOL programmers were thinking the same thing. Maybe you’ve thought the same thing, and said Sod it, I’ll just learn as much as I can and write books.’ Maybe my malaise is indicative of the general malaise within IT at the moment (still suffering from the dot com crash, companies more interested in fixing up their offices than investing in IT, etc), companies not knowing their arse from their elbow when it comes to IT spending, etc.

We live in a world of ever-increasing technology, yet seem to be doing less development? Obviously there are still very clever people out there writing code for phones, text delivery. HDTV innards, etc., but is software development becoming stagnant? Are we still doing the same things with new tools? Why do we still not have modular development? Why are there many standards for Web Services? Where are the really, really cool applications?”

Pete,” those are all fine questions. I think there are a ton of interesting things to do for software developers in the world and being a part of a big company development machine is only one of them. I’ve done most of the rest (I consider Microsoft to my last job in this industry), so I can recommend start-ups, speaking, shared/open source development, consulting and writing as all valuable, interesting and fun experiences (although, as you might imagine, each of them has their downsides, too).

Or, even if you wanted to stay as a developer, I can recommend different kinds of software to be refreshing, e.g. I’ve spent a lot of time on code-based developer tools and now have moved to model-based developer tools (that’s not a big shift, mind you, but hey, I’m growing! : ). Maybe you’d like to switch away from front ends to back ends or to databases? Maybe you’d like to switch from imperative to declarative or logic? Maybe you’d like to go all the way on front ends and build games? Or maybe you’d like a platform like a mobile device better? (I personally lust after this one!)

Your malaise-related questions are good ones, too. It seems like you’ve identified a bunch of problems” in the IT industry. You’ve got two ways to handle this problem: ranting or doing something about it. You’ve done the former. Maybe you’d like to put on your start-up” goggles where problem” == opportunity,” bring some of your friends along and roll up your sleeves? Are you brave enough to risk the kid’s college fund to follow your heart? I’ve done it a coupla times and there’s nothing like it.

June 4, 2005 spout

More Skype Love

I was chatting with Mike in Australia today and we pulled up Skype as we usually do, cuz it just works, e.g. no connection problems, no echo/feedback problems, etc. However, we couldn’t get video4skype to work, so we tried switching over to MSN Messenger 7. The video worked just fine from MM7, but the audio was terrible, exhibiting volume, echo and feedback problems. So, we used a hybrid, i.e. MM7 for video and Skype for audio, which worked just fine.

This hybrid model is prevalent in my communications recently:

  • queued messaging: email for text and files, vmail for nuance
  • text chat: MSN Messenger 7 or Communicator, depending on whether the person is an employee or not
  • video chat: MM7 or Communicator
  • audio chat: phone, Skype, MM7 or Communicator
  • person-to-person app sharing: MM7, Communicator
  • group app sharing: LiveMeeting

Would it be too much to ask that one app do all of this well? Do I really need 6 different apps?

June 4, 2005 spout

Realistic Conference Expectations

I was chatting today with a friend that complained that he didn’t get any deep technical knowledge from a conference talk. I said that he had unreasonable expectations; the most he could expect from a good conference was the following:

  • Networking opportunities (hard for geeks; often works via friend-of-a-friend in bars and restaurants, but only if you have at least one friend and s/he has at least two)
  • Info triggers,” i.e. if you attend a 90 minute talk on MSMQ and you’re having or are about to have a problem that MSMQ solves well, the talk should a) let you know that MSMQ provides a good solution and b) where to go for more info
  • Entertainment (and that’s only the good conferences)

In general, every talk should be structured like so:

  • Name the thing
  • What’s the thing good for
  • A demo of the major use(s) of the thing
  • Here’s where to go for more info
  • Any questions?
  • Please remember to tip your waitress

That’s why I really love the idea of groktalks. If you attend 3 groktalks instead of 1 regular talk, the chances of you finding an info trigger are 3x, while still keeping your networking and entertainment chances even.

May 31, 2005 spout

Every PC Should Have A Camera, Mic + Stylus

I’ve been doing a lot of remote collaborative communications over the last decade. Email, IM and phone calls literally enable me to be an effective remote employee (along with my wit and charm : ). However, to take it to the next level as MS Communicator, MSN Messenger and Skype get real a/v conferencing and app-sharing features (that actually works through VPN and firewalls), every computer needs some extra equipment.

Most modern laptops come with built-in mics, but very few come with built-in cameras. Why should I have to use a strap-on webcam when the camera lens could be built right into the LCD screen? Plus, the mics and software really needs decent noise cancellation (MSN7 and Skype do this well, but not all apps do).

Still, I’ve got my phone, so I can live w/o audio and once I’ve already met someone, video is just a novelty, especially when compared with the power of app-sharing (it’s like you’re sitting right next to someone!).

The thing that I really need that I’m missing is for my computer, and everyone’s computer that I’m conferencing with, to have a stylus attached to their screen. The let’s just sketch something on the white board” is really the last remote collaboration frontier til we get some kind of fancy virtual presence” stuff going.

I don’t mean that every computer needs to be a Tablet PC. Frankly, I’m not very productive on a computer that doesn’t have a keyboard. But, I want to be able to sketch something right on my computer screen like a tablet can and instantly share it as I do so. Plus, and here’s the rub, I want everyone else to have a stylus, too. If they don’t, they’ll turn to the white board and I’m out of luck across the great divide.

May 31, 2005 spout

Blogging is not marketing copy!

As soon as corps hire bloggers as part of their marketing budget, they’ve missed the point completely. Marketing and PR folks are chiefly concerned with only saying the good things about their own products and (the good ones anyway) nothing at all about the competitor’s products.

Blogs are about the whole truth, which is why are the best corp bloggers are constantly in fear of losing their jobs.

Does anyone see a disconnect here?!?

May 30, 2005 spout writing

URLs in the Footnotes?

Here’s a question for folks. Right now, the 1st edition of the WinForms book has several footnotes like the following that include URLs:

The ntcopyres.exe tool can be obtained from http://www.codeguru.com/cpp_mfc/rsrc-simple.html.”

Unfortunately, unlike the browser you’re using now, while we can underline an URL in a book, we can’t do anything useful with you click” it, which forces you to type it. Since the URL above is by no means the longest in the book (MS likes to put GUIDs in theirs), I’d prefer not to put that burden on the reader if I don’t have to. With the invention of shrinkster, I don’t have to:

The ntcopyres.exe tool can be obtained from http://shrinkster.com/452.”

The problem with this, of course, is that I don’t really know if shrinkster is going to be around forever or if I want to tie my book to a single external resource that I can’t control. The idea I had this morning was to use both, which increases the size of the URL in print but gives the reader a shortcut and doesn’t hold me hostage to shrinkster*:

The ntcopyres.exe tool can be obtained from http://www.codeguru.com/cpp_mfc/rsrc-simple.html (shrinker.com/452).”

What do people think?

*Don’t get me wrong. I’m a big shrinkster fan, else I wouldn’t be dropping their links into my books at all.

May 27, 2005 spout

The Logic of Logic

May 27, 2005 spout

The Logic of Logic

My son came to me the other day and said, Dad, I need help with a math problem.” The problem went like this:

  • We’re going out to dinner taking 1-6 grandparents, 1-10 parents and/or 1-40 children

  • Grandparents cost $3 for dinner, parents $2 and children $0.50

  • There must be 20 total people at dinner and it must cost $20

  • How many grandparents, parents and children are going to dinner?

The reason this problem is interesting is because there are 3 variables, but only 2 equations:

  1. grandparents * 3 + parents * 2 + children * .5 = 20

  2. grandparents + parents + children = 20

Being a coder, I sat down to write the program to enumerate all possible solutions:

class Program {
  static void Main(string[] args) {
    for( int grandparents = 1; grandparents < 7; ++grandparents ) {
      for( int parents = 1; parents < 11; ++parents ) {
        for( int children = 2; children < 41; children += 2 ) {
          double dollars = grandparents * 3 + parents * 2 + children * .50;
          int people = grandparents + parents + children;
          if( dollars == 20 && people == 20 ) {
            Console.WriteLine(grand parents= {0}, parents= {1}, kids= {2}”,
                              grandparents, parents, children);
          }
        }
      }
    }
  }
}

Running this program saves my son the time to figure out the solution through tedious trial-and-error (plus, he didn’t even have to write the program, since I did that part — tricky little bastard, isn’t he?!?) by producing the following output:

grand parents= 1, parents= 5, kids= 14

That was all well and good til Alex, a friend of mine, boiled the problem down to a single-statement Prolog program for me (although this program doesn’t capture the range of values the variables can take on):

people_at_the_meal(Grandparents, Parents, Children) :-
  Grandparents * 3 + Parents * 2 + Children * 0.5 = 20,
  Grandparents + Parents + Children = 20. 

Then I went on to regale Alex about the time my grandmother asked me to schedule her tennis tournament for her on my computer. She had requirements like, everyone has to place everyone else at least once” and you have to lose twice to be out of the tournament” and nobody can play twice in a row” (it’s not good politics for a computer program to kill old ladies…). My grandmother’s problem statement doesn’t fit the traditional algorithmic statements that I’m used to using computers for, nor was I ever able to re-form the problem in those terms (it’s not like my grandma was ever going to leave me a bunch of money anyway…). Alex completely understood and informed me that the NBA has the same problem (with slightly sprier players) and they use logic programs to solve it. In fact, in his experience, these problems happen all the time in the business world.

Constraint Logic Programs (CLPs) break down into constants, variables over ranges and relations of truth, which together make up the constraints in a logic system. In my son’s case, the constants are the numbers, e.g. 3, 20, etc, the variables are the number of people of each type and the relations form the constraints, e.g. the sum of all people must be 20. The CLP solver” (in Alex’s parlance) provides the logic over a particular domain” (real numbers in our case) and knows how to do all the iteration and forward and backward chaining to solve the people_at_the_meal problem. A different solver would be able to solve my grandmother’s and the NBAs scheduling problem.

It was only after most of this discussion that I realized that I recognized the syntax that Alex had produced: it was Prolog, a CLP language I had blocked. I had taken a Prolog course in it in college and absolutely hated it, but not because of the things that allowed me to solve these kinds of problems: that was great. The things I hated were all of the algorithmic things that I needed to be able to do that Prolog was terrible at, e.g. take input, product output, suck in facts from data external to the system (like the NBA player roster), etc. CLPs themselves are damn cool.

May 24, 2005 spout

Frequent Flier Miles Suck (Airlines Suck)

I just called to cash in my Alaska Airlines miles on it’s partner airline Northwest for a trip 5 weeks in advance and they told me that they don’t have any seats available. I know is complete bullshit, because when I search for the flights on the web directly, they’re happy to sell me a seat for the specific day I want.

What they mean is, Oh no, sir, people actually want to pay to fly that day; we couldn’t possible honor our frequent flier commitments to award you travel on that day!”

Blackout dates, saver seats,” coach seats built for pigmes… the whole airline industry sucks and you can tell them I said so!

May 24, 2005 spout

Story-Driven Development

I’m a big believer in the write the story first” method of software engineering. Like client-first development” or the increasingly popular test-driven development,” story-driven development” is about writing what we want from our software before we write the software. This is different from spec-driven development” or even design-driven development” in that I mean actually writing the equivalent of one or more MSDN Magazine articles that you’d like to publish when your product is complete. I can’t tell you how many issues I’m able to work through using this technique and it’s highly recommended if you think in prose. Of course, as the product evolves, so do the articles until the perfect storm happens when the product matches the article and vice versa (modulo bugs, this typically indicates beta 1).

Today, after 5 months of marination, I awoke with the Intro to Our Stuff” article in my head and I’ve started outlining it. This one is really Intro to Our Stuff for Developers” piece, which corresponding Intro to Our Stuff for IT Pros” and Intro to Our Stuff for Business Analysts” pieces that needs to happen, too.

May 12, 2005 spout

Survey: Windows Forms Programming 2ed Length

There has been some publisher/author controversy around the length of the 2ed of Windows Forms Programming. WF2 has essentially doubled in size, so I was happy that it looks like we’re be less than twice the number of pages (700 for 1ed vs. estimated 1200 for 2ed). However, when I sent this estimate to my publisher last month, they were less than pleased. Apparently if you go above 800 pages, that tends to scare people and may cut into sales. Here are the options we wrestled with:

  1. Cut 400 pages of material out of the WF2 book, leaving it on the cutting room floor
  2. Ship a 1200 page WF2 book, increasing the cover price by $10
  3. Move 400 pages of material out of the WF2 book, releasing them as freely available PDF files on the web (continuing to index and refer to this material in the printed book)
  4. Split the book into two volumes, priced accordingly (probably $35 each)

There’s one piece of information that I’m share later that caused us to lean one way more than the other, but I’m curious what readers would choose when given this choice.

P.S. Believe me when I tell you that we’ve been diligent about cutting stuff that doesn’t belong in the book, although I admit that we’ve been unwilling to cut material that will be generally useful for WinForms programmers, even if it does decrease sales. I’m still hoping we’ll be able to get the page count below 1200, but the upshot is that option #1 has always been a non-starter for me.

P.P.S. I expect the first three reviews on Amazon to be complaints about whichever method we choose and reminising about how wonderful it was to get all of WinForms in 700 pages. Those kinds of complaints should be forwarded to the WinForms team in emails that start with You put too much good stuff into WinForms 2.0!” : )

May 11, 2005 spout

Damn I Love Skype!

Skype is the thing that seems to work best for my Australian phone calls (at least once/week if not more) and I love SkypeOut for when I’m just too damn lazy to walk across the room for the phone. If I could use a SkypeIn phone number for getting/sending faxes as well as placing and receiving calls and taking voicemail, I’d have one of those, too (only $4/month!).

That said, MSN7 seems to have fixed the a/v sharing problems through firewalls, so now I use it for that and MS Communicator is damn cool, too.

These communication devices are pretty important for a remote guy. Just today, I had an hour long video counseling session with my boss (it takes me about a year to feel like I’m actually capable of any new job I take) and another hour-long IM with one of the architects on my team arguing about what the hell we’re building anyway. The counseling session would’ve happened no matter where I lived, but even if I lived next door to him in Redmond, I wasn’t going to be sitting in the architect’s living room from 12:30am - 1:30am chatting with him; new comm was the enabler.

May 2, 2005 spout

I am not a graphic artist!

Whenever anyone hears that I program Avalon, the first thing they think is, Oh, good, let’s get Chris to create a cool looking UI for us!” They also tend to lump in data visualization expertise and user experience into that mix as well. On the beginning to experienced” scaled, I’d rate myself in the following way on these tasks:

  • Avalon programming: beginner to intermediate, depending on the bit of Avalon you’re taking about
  • Visualization expertise: interested beginner (I’ve attended a 8-hour Edward Tufte seminar, skimmed 3 of his books and wished for something more than the DataGrid)
  • User Experience design: intermediate in the realm of standard Windows applications but beginner when those limitations are removed, i.e. what Avalon enables
  • Graphic art: untalented hack

Seriously, I can’t draw myself out of a paper bag (or in one, for that matter). I hired all of the art done for my web site and I almost never draw pictures for my books. Instead, I write programs and take screen shots or make Mike draw the pictures for me.

Being able to program Avalon doesn’t make me a graphics artist any more than being able to program my financial calculator (which I can’t do anyway) would make me Warren Buffet. In fact, I’m closer to being Warren Buffett than I am to being a graphics artist, which should give you some indication about the gap we’re talking about here…

That’s not to say that some enterprising 3rd party couldn’t create tools to help artistic yarn heads like me produce useful Avalon graphics. If my experience is any indication, there are going to be a lot of developers moving to Avalon that are expected to create wonderful things w/o an artistic bone in their bodies. Somebody help!

April 30, 2005 spout

I enjoyed THGTTG

It wasn’t perfect, e.g. lots of the fun bits were gone and at least one sub-plot never got resolved, but I liked the new stuff, e.g. the motivation for the end of the movie and the romance. Bottom line: I laughed a lot. We did have a pretty decent local geek turn-out, so that made it even more fun, but it was a completely watchable movie and I’d definitely see it again.
April 26, 2005 spout

The Value of Scoble

There is huge value in Robert Scoble publicly criticizing his employer’s CEO. The value is this: when the GM of VSTS says ask me anything you want” concerning a recent pricing controversy, you can have confidence that Robert is going to ask the hard questions and push out the results as unedited as MS PR will let him get away with (I detected no edits in this piece). The world may not like the answers he digs out, but because Robert is risk-his-job honest, you have a high degree of confidence that what he says is the truth as he finds it.

Robert Scoble has become the Geraldo Rivera of technology reporting. Even if MS took away Robert’s camcorder, I expect O’Reilly, Fawcette, CNET, ServerSide, CodeProject or any of a number of other technology eyeball companies to hand it right back to him.

April 24, 2005 spout writing

Status of ATL Internals 2e

More people than you’d expect have been asking, so here’s an update on ATL Internals 2e.

This effort actually started in 2003, when Kirk Fertita updated the first 9 chapters to ATL7 as provided in VS 2002. Then he had to go work on his start-up, which represented his only income stream and would’ve gone belly up w/o him (selfish bastard! : ).

Then George Shepherd did a little work, writing bits of two new chapters on ATL Server before he had to bale.

Now, finally, we have an author that’s going to see this book to the finish line: Chris Tavares. I’ve written with him before and he’s excellent. He’s already ported chapters 1-4 to ATL8 as provided in VS 2005 and is on schedule to bring my and Brent’s work on ATL3, Kirk and George’s work on ATL7 and his own new work into a cohesive ATL8 book to hit the shelves 3-4 months after VS05 has hit RTM.

April 24, 2005 spout writing

Status on Windows Forms Programming 2e

Jose heard” that I’m working on an update for the first edition of Windows Forms Programming in C# for Windows Forms 2.0 (we’re not updating the VB.NET version due to poor sales for VB.NET-related titles in general). I didn’t mean to keep it a secret; it’s been listed at the top of my writing page for a year or more. : )

While we’ve been working closely together on the update, the bulk of the writing work is being done by Micheal Weinhardt, my main writing partner for the last coupla years or so. He’s got 90% of the book updated for VS05b1 already and is in the process of updating the whole thing to b2. After that, we pass it back and forth between ourselves for review-edit til we’re both happy. By the end of May, hopefully the whole thing will be out for review. After that, we apply reviewer comments and update at each successive beta/release candidate until the Whidbey team decides they’re done, at which point we send it to the publisher and 3-4 months later, it hits the shelves.

In addition to updating the existing material for WF2, we’ve made the following changes:

  • Split a Layout chapter out of the Forms chapter due to all of the extra WF2 layout functionality
  • Refactored the existing design-time and controls chapters and the standard components & controls appendix into the following chapters: components, controls, design-time 1 and design-time 2 (includes smart tags)
  • Split the applications & settings chapters into 2
  • Added a Document Management chapter for MFC folks finding themselves in the app framework-free environment of Windows Forms
  • Dropped the data access chapter as covered better in other sources
  • Re-wrote the data binding chapter from scratch with a story I always wanted to tell in WF1, but isn’t supported nicely til WF2 (object-centric binding instead of relational database-centric)
  • Refactored the drag n’ drop material into it’s own appendix
  • Added a What’s New in Windows Forms 2.0” appendix for those already familiar with Windows Forms 1.x
  • Dropped the delegates bedtime story in favor of beefed up coverage in chapter 1 (and a more general knowledge of delegates in the universe as a whole). Don’t get my wrong, I love that story, but it doesn’t fit into the overall theme of the rest of the book. I knew this when I first edition shipped, but I just didn’t take the time to update the book properly to live w/o it

I have to say that working with Mike on this process has been fabulous. An ordinary author faced with updating to a new version of a technology might just update the material and leave the story alone, even if it needs update. Instead, Mike took the time to reexamine the book from first principles, fixing the problems in the story that always nagged at me in the 1st edition and proposing improvements to stuff I was pretty proud of. In general, even without the update to the new technology, the book is better than the 1st edition.

April 15, 2005 spout

Now *that’s* how you want a Virtual PC to be!

I was using one of my computers this morning, surfing around, reading my email, getting started with the day, etc. After a bit of fooling about, I went looking for the work I wanted to continue from yesterday. I couldn’t find it. Then I went looking for the program I was using to work on the file. I couldn’t find it.

Just before I was about to reinstall things, I realized — I was running a VPC image, not the computer’s native image. I couldn’t freakin’ tell the difference! Nice…

April 11, 2005 spout

Reviewers Should Be More Like Roger

If you read the April 10th, 2005 review of my WinForms book, it has one feature that most of the other reviews don’t have (and I don’t mean pegging me as a from the VB world” : ); Roger has placed his email address on the review! If everyone did that, I wouldn’t spam the 5s, but I would follow up with the 1s, 2s and 3s to see what I could’ve done to improve the next edition. When I followed up with Roger, he had a bunch of specifics he’d have liked to see me fix. I don’t agree with all of them, but you better believe he’s on the list of reviewers for the second edition. Thanks, Roger!
April 11, 2005 spout

My First Week on an MS Product Team: Wallowing

April 11, 2005 spout

My First Week on a Microsoft Product Team: Wallowing

Last week was my first week on my new team. A lot of interesting things happened, some of which Don has already mentioned. For me, two especially interesting things happened. One, I found out why I was hired, in spite of my preference to work from kitchen most of the time, even though I’m working on a product group (which typically avoids my kind unless they’ve already worked for the team for a long time) and even though I’m working for a manager that’s never had a remote employee (he doesn’t even run IM!). Don’t get me wrong; it’s not like a skated through the interview process w/o passing.” But passing” isn’t enough when you work in a shower optional” environment (my house, not Microsoft : ). My team needs people with a skill that I’ve never seen applied to product development. Most of the people that have this skill are either a) already busy shipping Indigo or b) marked as a target (some of you should feel the laser sights on your forehead : ). The skill is the thing that allows me to write books and articles in my own special way. My team has a name for this skill; it’s called wallowing.”

For my team, the ability to wallow” means the ability to dig into a discipline, any discipline, and wallow like a pig in the mud” in that new discipline, forming questions, getting to the root of things, gathering fragmented truths together into wholes, communicating the truths to each other, gaining intuition, and generally spending time understanding the space without first coming to firm conclusions about what it is that we’re actually going to build. This skill is by far the most important thing I learned at DevelopMentor. The popping” sound I got in my head when I finally figured out COM is something that I’ll never forget (mostly because my head stopped hurting after 6 weeks of hurting very much) and it’s served me well over the years. For example, I wrote my WinForms book not because I had a ton of real-world experience” as my Amazon reviews claim, but because I knew very little about WinForms and was interested in learning. I wallowed in WinForms for 9 months, writing articles and an instructor-led short-course before ever writing a single word in my book. Once I’d wallowed, however, I was able to write the book itself in 5 months.

So, while I’ve used to wallowing as a way to produce talks and prose, it’s not a technique I’ve ever applied to product selection. In the past, I’ve come to a team where the goal was very clearly known, although the details were still up in the air (often ’til they were discovered as coding problems). I’ve even started my own software organization from scratch, but only after the core vision of what needed building came to me whole and I’d already built the prototype. However, with my new team, we’ve got a group of folks actively wallowing in a space, figuring out the right thing to build. This led to some initial frustration on my part.

Actually, frustration is too weak; for the 3 days of my employment, I was a drooling idiot with no hope of recovery. I’m used to not knowing stuff (that’s when the wallowing behavior is triggered), but I’m not used to not knowing what I don’t know. The reason that I was so frustrated was that I didn’t know my team was wallowing. My team has already been working together in this problem space for months. They’ve already put together a prototype and showed it to BillG. This evidence made think that the team already had a firm vision of what they were building, so I was in coming-to-a-team-to-help-build-a-known-product-mode as with every single product team I’d ever been on or heard of.

Firmly in this mode, I spent my first 3 days in architecture meetings, brainstorming our way through the main issues of our product.” At each meeting, it seemed like people had a firm idea of what they were building, because the items on the brainstorm list flowed like water from everyone but me. To give myself some ground on which to stand, I kept asking whether we were going to cover this customer scenario or that one and the answer would always be yes.”

This went on for three days and each day I felt like I knew less about what we were doing. Instead of drawing up a plan to build a v1 settlement on the moon, I felt like we were listing the issues associated with covering the entire surface with a 10-story city. My head was swimming. How could a brand new team be targeting that kind of scope? What the hell had I gotten myself into?!?

I’m not the kind of person that keeps frustration to myself. I spent a good deal of time trying to express my despair to my boss and my new team mates, but it took me 3 days to be able to wind back my assumptions enough to be able to ask, Do we even know what we’re building?” The answer that shined light into my gloom was no, we’re wallowing.”

And suddenly, all the conversations made sense. When they kept saying yes,” they meant yes, we’re still considering that possibility.” We were discussing enough issues to cover the surface of the moon not because we were going to do that in v1, but because we were still figuring out the right place and kind of settlement to build. We’d picked the moon and we’d put up a tiny shed to see what it was like to live there, but we hadn’t yet figured out what the next wave of settlers would need. And because we didn’t want to die in the process or kill that next wave, we were going to spend some real time exploring to make sure we were proud of our first city.

This process was a revelation to me. In the small to medium-sized software engineering projects in which I’d been involved to date, this kind of product planning was outside of my experience. I mean, even when I plan to wallow in the implementation details, I’ve never once wallowed in the issue of what to build. When I picked my WinForms book, I didn’t survey the .NET developer landscape for their needs; I just picked something I was interested in. I got lucky, but in the case of other projects, I have been less so (and sometimes expensively, spectacularly less lucky).

I told my sister-in-law this story and she was all ready to be upset for me. You mean, they never told you? You signed up to do product development and they don’t even know what they’re building?” she asked. I told her that I wasn’t upset at all. In retrospect, I was told that my team was wallowing, it’s just that my preconceptions about what a product team does at Microsoft blocked it out.

Further, this way of figuring out what to build is one I’m looking forward to. I’ve never been any good at this part of the product construction process. In fact, I once drove 2 hours north and cajoled Eric Sink into driving 2 hours south so that I could ask him how to answer this very question (micro-ISVs sound cool, don’t they?). His advice was fail fast.” That’s good advice and, having talked to my new boss, it’s something we’ll be doing, but we hope to do it while exercising wallowing as a product selection technique.

The second thing I learned this week is that, while I didn’t know this ’til after my 3rd day, my team is still wallowing. I told my sister-in-law that I wasn’t upset at all. I love wallowing. : )

April 9, 2005 spout

Geeks Rule and MBAs Drool

Eric Sink takes a long, long time to say the following (learn to let go, Chris [1]…):

The following is an example of one of the most common questions I get from developers who are creating a brand new software company:

Where can I find a partner to be a co-founder and handle the business side of things?

My answer: Don’t.

Do all that stuff yourself. You need the experience anyway. If you really want a partner, don’t find an MBA, find another geek like yourself. Don’t be afraid to allow your company to be very developer-centric for a very long time. By doing it this way, you’ll avoid a lot of problems and you’ll learn a lot.”

Like agile programming, Eric has just given us permission to do what we want to do anyway. Wahoo!

[1] One of my favorite duties at MSDN used to be developmental editing on Eric’s writing. I used to love how he’d work certain things into his piece, e.g. the thing my 9-year old son posts on his door, modulo s/Geeks/Boys and s/MBAs/Girls.

April 1, 2005 spout

My First New Job at Microsoft

Here. The one where I stop working for MSDN.
April 1, 2005 spout

My First New Job at Microsoft

Today’s my last day at MSDN. I will no longer be content strategizing for Longhorn/WinFX or smart clients or acting as liaison between marketing, evangelism and the product teams internally and developers externally. And I’m really going to miss it. MSDN took a flier on me being a successful Microsoft employee in a culture that doesn’t much like remote folk and made a very comfortable home for me. I could’ve gone on for a long time in that role.

Still, I felt another calling. At Microsoft, it seems like all of the action is with the product teams. To come to Microsoft as a software engineer and not work on a product team seemed like starting with the Yankees but never getting out of the dugout.

So, on Monday, I start in DSG (the Distributed Systems Group) aka the team that owns Indigo. I’ll be are looking at ways to extend the notions of modeling that we’ve incorporated deeply into the stack and make them more general” (or so my new boss says). I can’t tell begin to describe how lucky I feel. Not only do I get to be on a real product team, still mostly from my house in Oregon, but I get to work on a very juicy problem. Further, I get to do it with Oliver Sharp, one of the prime movers on the Indigo team, along with a growing group of other people way smarter than I. It reminds me of the heyday of a certain training company with which I once had a deep relationship.

Two weeks ago, Oliver sent me a list of 10 fun computer sciency things to dig into that could take months. Last week I was helping the team get ready for a BillG review. This week I was trading emails with the team and a Sr. VP on the direction of the market and how it affects our product plans. Is this what it’s like for an addict that’s given up their habit to take it up again? If software engineering is wrong, I don’t want to be right! : )

March 30, 2005 spout

Leaders and Legacy

Here. For an internal thingie, I was asked to write a short bio, define what I think a leader” is, describe my target legacy and list my biggest source of pride. This is what I came up with.
March 30, 2005 spout

I can feel Avalon changing me…

I can feel Avalon changing me…

I’m writing a tiny little application for my writing on ClickOnce in Avalon. In fact, to demonstrate ClickOnce, the app hardly matters, so I picked something really simple: an excuse generator. I didn’t even have to make up the excuses, as I stole them from an office gag gift two years ago and wrapped them in an excuse web service (which is a whole other story : ).

Binding to Data Defined in Code

The idea was to have an array of excuse strings like so:

public partial class Window1 : Window {
  static string[] excuses = {
    "Jury Duty",
    ...
    "It's Not My Job",
  };

public Window1() {
    InitializeComponent();
    this.DataContext = Window1.excuses;
  }
  ...
}

Once I had the collection of strings, I make them available for binding by setting them to the DataContext of the main window and the rest of the code would simply be a matter of binding a TextBlock to the current excuse like so:

<Window ...>
  ...
  <TextBlock TextContent="{Bind Path=/}" />
  <Button x:ID="newExcuseButton">New Excuse</Button>
  ...
</Window>

By binding the TextContent property of the TextBlock to a Path of /”, I’m explicitly saying don’t try to dig into each object in the collection looking for sub-properties, but binding to the item itself.” Initially, the TextBlock will show the first item in the list:

When the button is pressed, I change the output by selecting a random item from the collection and setting it as the current” item in the collection:

Random rnd = new Random();
void newExcuseButton_Click(object sender, RoutedEventArgs e) {
  ListCollectionView view =
    (ListCollectionView)Binding.GetDefaultView((IEnumerable)Window1.excuses);
  view.MoveCurrentToPosition(rnd.Next(view.Count - 1));
}

By grabbing the view for the excuses collection, I can do a number of things with it, including move the current item in the view to some specific position. When I do that, the data bound TextContent property of the TextBlock will be updated to show whatever is current:

So here’s the first thing that I’m notice that I really approach differently in Avalon: the data binding hammer is almost always the first tool I reach for in the programming box. In the old days, to write this app, I’d set the TextContent property directly in code. Now, I don’t even think to do that. Instead, I’ve got data and a property to set, so that’s data binding.

Binding to Objects Defined in XAML

But wait!” I hear you howl. What about internationalization?!?” I know. Hard-coded data in the source code is a bad idea. So where does it go? Into the XAML itself, of course, so that anyone working on the UI, whether for an English-speaking country or not, can add new items, port them to another language, etc. How to do it? Well, since XAML is an XML dialect for describing object hierarchies, I could define a new type (roughly):

class Excuse {
  string value;
  public string Value { get { ... } set { ... } }
}

class ExcuseData : List<Excuse> {
}

Then I could write my excuse data as a hydration of objects using the ObjectDataSource (roughly):

...
<Window.Resources>
  <ObjectDataSource x:Key="ExcuseData">
    <l:ExcuseData>
      <l:Excuse Value="Jury Duty" />
      ...
      <l:Excuse Value="It's Not My Job" />
    </l:ExcuseData>
  </ObjectDataSource>
</Window.Resources>
...

The XAML inside the ObjectDataSource will create an instance of the ExcuseData type, adding an object of type Excuse for each element, setting the Value property of the object using the Value attribute from the XAML. With the object data source, I can create a little data island” in the middle of my app where the list of excuses can be poked and prodded without touching the code.

Binding to Data Defined in XAML

Still, why go to the trouble of defining my own custom data type, which doesn’t have any behavior to speak of, when I’ve got the universal behavior-less data type — XML? I can use the XmlDataSource without any custom type at all:


 
   
      Jury Duty
      …
      It’s Not My Job
   
 

You’ll notice that the XML looks almost exactly like the object data source, except that instead of using an attribute to keep the juicy bits, I use the content area itself to store the data, very like the initial array example (I could have used XML attributes, but it seemed overkill in this case). One other interesting bit is that XPath of the XML data source itself. It defines the bit of the data island from which I’m pulling the data. If I had used /Excuses, the data collection would have had a single item with a bunch of children. But using /Excuses/Excuse, I’m exposing the children directly.

To use the XML data source, I need to set it as somebody’s data context in the hierarchy of controls and bind to it:

<Window ...>
  <Window.Resources>
    <XmlDataSource x:Key="ExcuseData" XPath="/Excuses/Excuse">...</XmlDataSource>
  </Window.Resources>
  <Grid ... DataContext="{Bind DataSource={StaticResource ExcuseData}}">
    ...
    <TextBlock ... TextContent="{Bind XPath=.}" />
    <Button ... x:ID="newExcuseButton">New Excuse</Button>
  </Grid>
</Window>

I should note that in future bits, I’ll be able to set the grid’s data context to {StaticResource ExcuseData} directly, but in the March 2005 CTP Avalon bits, I have to actually bind the data source to the data context in a double bind that blows my mind.

More importantly, notice that instead of using a Path to get to the data I want, I use an XPath. This allows me to further refine the XPath statement provided as part of the XML data source itself. However, since I don’t want to refine it any further, I use the XPath statement that says just use the content of each of the elements.” You’ll notice that I used .” in the XPath statement to provide this meaning instead of /” as I did in the case where I was using an object Path. The two syntaxi look the same, but are very different and you’ll want to watch yourself switching between the two.

Anyway, with the data moved to the XAML along with the UI and the binding logic, my actual code boils down to only the following:

public partial class Window1 : Window {
  Random rnd = new Random();

  public Window1() {
    InitializeComponent();
    this.newExcuseButton.Click += newExcuseButton_Click;
  }

  void newExcuseButton_Click(object sender, RoutedEventArgs e) {
    IDataSource dataSource = (IDataSource)this.FindResource("ExcuseData");
    ListCollectionView view =
      (ListCollectionView)Binding.GetDefaultView((IEnumerable)dataSource.Data);
    view.MoveCurrentToPosition(rnd.Next(view.Count - 1));
  }
}

So, this is really only a few lines of code, one to hook up the button event handler, one to find the excuse data from the window resources, one to get the view on the excuse data and one to move the currency pointer to some other random spot. The actual display of the data is left to the data binding code (which somebody else gets to maintain).

One other thing worth noting is that I had defining event handlers in the XAML. Even when it’s me writing both the XAML and the code, I don’t like the XAML making demands on the code. If the XAML handles an event, e.g. with an event trigger, than that’s fine, but don’t make requirements of the code form the XAML. Instead, provide hooks for the code to do its work, e.g. the x:ID on the ExcuseData and the TextBlock are both used in the code, but neither requires anything of the code. If you’re going to separate the presentation from the logic, this is the kind of thing you’ll want to think about.

Where Are We?

Two things I’m finding that Avalon has changed about my thinking. The first is that data binding makes itself into even trivial Avalon applications and its presence is appreciated. The second is that I want to push as much stuff into XAML as I can. Keeping the data separate from the code makes a bunch of sense and, for my trivial application, keeping the data inline with the rest of the UI was very useful. It allows for easy maintenance and localization while pushing as much of my application into declarations and out of imperative statements. The more I can tell the computer what I want instead of how I want to accomplish it, the better off I am.

March 30, 2005 spout

Leaders and Legacy

For an internal thingie, I was asked to write a short bio, define what I think a leader” is, describe my target legacy and list my biggest source of price. This is what I came up with:

I’ve been pretty much everything you can be in the IT industry including author, speaker, consultant, conference organizer, grunt in a start-up, CEO in a start-up, developer, tester, documenter, etc. I’m currently a content strategist for MSDN in the areas of WinFX/Longhorn and smart clients. I’m passionate about building products to make people happier, whether that’s because they’re more productive or because I’ve solved some hard problem or just because they lean back and say cool!” My biggest regret is that I’ve never yet been on a product team at Microsoft; to get the full experience, someday I need to do that! After that, I can retire and write novels from coffee shops around the world. : )

A great leader is someone that inspires you to do things you didn’t even know you were capable of doing.

The legacy I’d like to leave behind is that people can look back at their interactions with me and think that I helped make their lives better, whether it was an answer to a tough question or an insight that they hadn’t had before or a comment that tickled their funny bone.

The biggest source of pride in my life is the family I’ve built with my wife and two sons (the Sells brothers, whence the name of my web site came: www.sellsbrothers.com).

March 29, 2005 spout

La Vida Robot

March 21, 2005 spout

A Coder in Courierland

I always love reading about people that love their jobs. In this case, a Toronto coder gave up half his salary to get out of cubeland and onto the back of a bike as a courier. His descriptions, especially the diary entries at the end, make me pine for the part of my childhood when I’d spend hours on the back of the bike simply because it was the most fun thing I could think of to do. Recommended.
March 16, 2005 spout

I want XBOX Live virtual presence for my PC!

Robert points out a hilarious video of what happens in an XBOX Live session of Halo 2 when the other players find out you’ve fallen asleep. But, even more interesting than that is the ability for that kind of real-world fidelity to make it into a virtual world so that guys from across the country can all haze the guy in his sleep. I want that for my PC!

[via Scoble]

March 11, 2005 spout

Some Of My Favorite Books

Here.

I was just putting together a list of some of my favorite books as recommendations for a gift certificate I sent to a friend as a birthday present. If case you’re wondering (I know you’re all dying to know : ), here’s what I sent.

March 11, 2005 spout

Some Of My Favorite Books

I was just putting together a list of some of my favorite books as recommendations for a gift certificate I sent to a friend as a birthday present. If case you’re wondering (I know you’re all dying to know : ), here’s what I sent:

Thriller/Mystery

  • Angels and Demons,” by Dan Brown, is the prequel to the famous Da Vinci Code and much better, imo.
  • John Sandford’s long series about a millionaire cop in Minneapolis starts with Rules of Prey.” If I were to write my own series of novels, these are the ones I’d emulate.
  • A Time to Kill,” by John Grisham, is his first and by far his best book. The movie’s really good, too.
  • The Bone Collector,” by Jeff Deaver, is the first (and my favorite) in a series about a bitter, suicidal forensics genius that loses his career when an accident turns him a quadriplegic and he has to solve crimes from his bed. Avoid the movie.
  • Tough Guys Don’t Dance,” by Norman Mailer, is my favorite book by this Pulitzer Prize winner. The first chapter starts with a loser waking up from an alcoholic black-out, going out to look for his drug stash, finding his wife’s head instead and spending the rest of the book wondering if he killed her or not. Run, don’t walk, from the movie. If you have to be run over by a bus in the process, consider yourself lucky.

Fantasy

  • War for the Oaks,” by Emma Bull, is about a punk band leader that falls in love with an elf from the St. Paul, MN parks. No matter how many times I read it, but the end I’m always crying (and yes, I’m just that kind of sap).
  • The Silent Tower,” by Barbara Hambly, is the first of a three-part series about a modern day female geek that falls in love with a real wizard from another dimension. The relationship that builds between them is as good as any romance novel I’ve ever read (which is admittedly a small number…)
  • Of course, The Hobbit” and The Lord of the Rings” trilogy, by J. R. R. Tolkien has to be on anyone’s list. If you loved the movies, you’ll love the books. I believe that The Hobbit” is a better book over all; it’s tighter and happier and I’m very much looking forward to the movie, especially if Peter Jackson does it. However, my favorite part of the four books is the coming home” part at the back half of The Return of the King,” which is given a 3-minute scene in the movie (although I admit it’s a nicely done scene).

Sci-Fi

  • On Basilisk Station,” by David Weber, is the first in a long series about a driven, capable woman rising through the ranks of the space navy in spite of the extreme assholes working double-time against her. The main character is so compelling that I cry at the end of 3 of the first 4 books in this series (did I mention what a sap I was?).
  • Ender’s Game,” by Orson Scott Card, is about a boy genius coddled by his sister, tortured by his brother and abandoned by his parents to military school where he saves the world from bug-eyed aliens before he’s old enough for his voice to change. This book is widely regarded as one of the best pieces of modern science fiction that there is. The sequels in the original series are also excellent, but you can skip the other related series w/o missing much.
  • Snow Crash,” by Neal Stephenson, is a classic tale of a pizza delivery man/samurai named Hiro Protagonist” and his virtual reality gear. It’s also one of the seminal works in the cyberpunk” genre.
  • The Running Man,” by Steven King, is about a man that can’t tolerate his place in the society of the future, so rams a commercial airliner into the top floor of an evil television network responsible for man’s downfall (you can see the ending coming a mile away, but it’s still very satisfying). Much, much better than the movie.

Misc.

  • Shipping News,” by Annie Proulx, is an actual Pulitzer Price winner and as such, is different from your average reading” book. However, I love its quirkiness and the movie ain’t bad, either.
  • One L,” by Scott Turow. This is Turow’s first book chronicling his first year in law school. I read this one once every few years or so and it always makes me want to go to law school.
March 2, 2005 spout

IT Industry’s Own Jobs Training Program

My brother graduated from college with a BS in EE in 2000 and was, predictably, unable to find a job competing with certified, experienced engineers willing to work for the same money after the bubble burst. He was fortunate enough to be able to move into his Mom’s basement and get an interest-free loan for an MS in EE that lead to a wonderful job, but if you’re not so lucky (hey! I’ve got next dibs on my Mom’s basement!), then check out TechEngage:

TechEngage is a community-based non-profit organization founded to provide unemployed and under-“employed technical professionals with an affordable opportunity to obtain the high quality training they need to be competitive in today’s tough job market.”

[via Rod Paddock]

February 23, 2005 spout

On Being Socially Re-engineered

February 23, 2005 spout

On Being Socially Re-engineered

I do not consider myself weak-minded. For example, even though I’ve tried to let it happen, I’ve never been able to be hypnotized. Also, I’m often considered to be close-minded (although I do change my mind when valid arguments are presented, but most folks don’t argue very well, I find). So, why did a terrible High Risk Driver” course change my driving habits?

The course started as you’d expect: a room full of 18-25 year olds that did not want to show up anywhere on a Saturday morning, least of all at the local level 1 trauma center for 8+ hours of lecture. The main instructor was a high-energy trauma nurse that professed an vast personal experience with all things alcoholic. The traffic cop drove a motorcycle, which he made great pains to point out was the most dangerous vehicle to drive, and told a story about how he let a friend of his drive while they were both too tired in spite of his personal expertise in all matter of influence while driving, e.g. alcohol, drugs, cell phones, sleep deprivation, etc.

Of course, there was the obligatory Faces of Death” presentation through-out the day, but they were slides, not videos, so didn’t compare to the movies I saw in driver’s education class at age 16. Even the stories of the people in the pictures, while sad, seemed as much about capricious bad luck as about actual bad decision making. Some of the people from the stories even came to speak to us in their wheel chairs (except one guy that came in a suit and passed his business card around), but by far the most convincing and articulate of this bunch got his injury from a diving accident (that’s diving not driving).

The crowning event for the day was the tour of the trauma center itself. It was filled with people who’d suffered traumas, but the vast majority of them were there for non-traffic related injuries (unless you count the guy that rode a sled into a parked car on the one day we had any snow this year). How looking at the new, state-of-the-art MRI machine or seeing nurses drink coffee on a raised platform in the middle of the room helped us learn to drive more carefully, I have no idea.

And yet, despite my best efforts to avoid engaging with the materials of the class, I find that I am driving more carefully. I was always good at keeping my eyes on traffic and watching for kids and animals on the road, being quick to slow or swerve when necessary and rarely getting mad at the other drivers for bone-headed moves (unlike my wife, who curses every 3rd driver : ). However, now I find myself nearer the speed limit more often, sometimes under but always within 5 or 10 miles. And now, while I do still change lanes, it’s most often when I’m behind something large that gets in line of sight and not to get ahead a car length of two.

So, what changed my habits? It wasn’t the lame course as a whole, but it might have been one or two moments. It might’ve been when the traffic cop, when asked for the most dangerous driving habits, listed speeding and aggressive driving, which I’d previously considered the least dangerous.

It might’ve been the statistics. It’s not like they showed many convincing statistics at all, but the mere fact that they had been giving this lame course 4-6 times/year for the last 17 years spoke to me about the need for some kind of intervention. Obviously, the sponsors of this course thought it was having some kind of effect, else why continue it?

Or it might’ve been the company. I mean, their were some real losers in the room, including a 16-year old that admitted to a long list of bad decisions right out of your favorite gang movie. Frankly, to be lumped in with this crowd was just plain embarrassing.

However, when all was said and done, I think it was the math. The traffic cop timed himself doing his 10-mile commute going the speed limit and going 15 miles over the speed limit. The difference w/ zero other traffic on the road? 2 minutes. Do I really need to engage in what are considered the most dangerous driving habits, risk my insurance, my car, my license, my life and the lives of the people around me for 2 lousy minutes?!? That’s a bet I can only lose.

February 19, 2005 spout

I’m with Shawn — Constantine was Good

Here. After a movie dry spell that’s lasted since Thanksgiving, I agree with Shawn and was pleasantly surprised with Constantine. I liked it enough that I’d see it again. It’s not great, but it’s good and the guy playing Satan is fabulous.
February 16, 2005 spout

Hitchhiker’s Guide Might Not Suck

Here. After watching the Hitchhiker’s Guide to the Galaxy trailer on Amazon.com, I have to say, it might not suck. Any Portland Nerds that want to join me for the first show on 4/29 (but don’t tell my boss, he thinks I’m working that day… : )?
February 14, 2005 spout

Experimenting with Windows Alternatives

February 12, 2005 spout

Airing The Dirty Laundry

I was sitting at Jim Blizzard’s going away party the other night when my phone rang. This was the side of the conversation that the Portland nerds heard:

Hello?”

What?”

Well,why don’t you have any underwear?”

Put your brother on.”

Why doesn’t your brother have any underwear?”

Well, why does he think he doesn’t have any underwear?”

OK. Put your brother back on.”

Are you sure you don’t have any underwear?”

Look in your hand; is there any underwear in it?”

Then check your other hand.”

OK, how many pairs of underwear are you wearing?”

And how many pairs do you need between right now and the time I get home?”

Good. Bye.”

About halfway through the conversation, the nerds around me could no longer continue their conversations and were laughing openly. Ah, the joys of parenthood…

February 12, 2005 spout

Experimenting with Windows Alternatives

When I used to teach COM, we would brag about its cross-platform-ness, i.e. it worked across Windows 95, Windows 98, Windows NT 4, etc. So, when I’m talking about Windows alternatives, of course I mean Windows XP, Windows XP Media Center Edition, Windows CE and Windows XP Tablet Edition:

  • Windows XP: This is the workhorse of my day and with SP2, it’s even more wonderful than it was before. Love it.

  • Windows XP Media Center Edition: The mix of a pleasing 10-foot UI, picture, music and video playback, content and UI extension, PVR, Windows-based expansion and MCE extenders makes this a fabulous media client and server. Love it.

  • Windows CE/SmartPhone 2003 Second Edition: The 10-inch UI, the built-in apps and services, the extension apps, the internet access and a set of apps optimized for 9-key + joystick input all make this a fabulous user platform that’s replaced my phone, my mp3 player and even my laptop in some cases. Plus, I can build my own apps! I haven’t felt this way since my first laptop freed me from the tyranny of the desktop. Love, love, love it!

  • Windows XP Tablet Edition: I love reading text on this OS. The ClearText, the form factor and the scroll-specific buttons near the screen make it a wonderful reading experience. I also look forward to reviewing articles and book chapters with my tablet. However, I doubt I’ll get to it because I dread picking it up and being faced with all of the text input I’m forced to perform. Unlike the MCE or SP OSes which have been optimized for remote control/keypad input, the tablet is more general purpose and therefore supports far more general purpose applications. This means text input for dialogs and passwords and URLs and all kinds of other things where my poor handwriting is often painful. Of course, handwriting is faster than joystick/keypad input, but because there seems so much more input required in an average tablet session, it seems slower. I with the apps for the tablet were more special-purpose and optimized for stylus-only input. Love it and don’t so much love it.

BTW, I paid $6000 in college for my Mac IIcx that I used to log into the Unix machines in the lab, so I’ve had a full range of computer UI experiences. I do truly love Windows best.

February 11, 2005 spout

i-mate SP3 Smartphone: How do I love thee?

Let me count the ways:

  1. Pocket-sized and no bigger than my old dumb phone and tons smaller than tricorder-sized PDAs
  2. Synchronized calendar, contacts and inbox every 10 minutes everywhere I go
  3. IM and web browsing everywhere I go
  4. 512MB miniSD upgrade (for $60), giving me room enough for 300+ minutes of songs/audio books, making the phone a wonderful mp3 player, both for personal use (via the included stereo headphones) and in my car (via a $3 Radio Shack part, the Audio Adapter 274-373)
  5. Bluetooth headset, freeing me from untaggling wires all the damn time and letting me answer the phone while it’s still in my pocket
  6. Voice tags, letting my dial the phone while it’s still in my pocket
  7. Extensible with inexpensive custom apps of all kinds, including ones I can build myself in native or managed code (and a wealth of development information)
  8. Backlit ebook for darkened movie theaters during the commercials and the slow bits
  9. A quicky flashlight in a pinch
  10. Theoretically acts as a modem for my PC to give it an internet connection via my cell phone’s GPRS service, although I haven’t gotten that set up yet : )

That’s not to say that all is well. The following mars the i-mate’s perfection:

  1. When the keypad is locked and a notification pops up, the screen remains dark, but the Unlock button turns into the Dismiss button, which dismisses the notification w/o showing it first
  2. Notifications can only be snoozed for 5 minutes
  3. No WMP10 and WMP9 on the smartphone has terrible playlist management
  4. A dearth of web sites targeted at the smart phone. I’ve only found msnbc.com so far. I really miss a decent movie showtime info web site (imdb.com works, but it’s a pain)
  5. Cramped screen and keyboard (I’ve heard the Motorola MPx220 flip phone solves this problem)
  6. Doesn’t use Wi-Fi when it’s available
  7. No FM radio

It’s my understanding that some of these flaws are fixed in the later smartphones (like the Audiovox SMT5600), but even with the issues I mention, I can’t imagine that someone with a cell phone wouldn’t pick a smart one over a dumb one, nor can I imagine that more then a relative few would prefer a PDA to a smart phone. The smart phone represents a perfect storm of form factor, capability and developer tools. Keep your hands and feet inside the ride, boys and girls, it’s going to be a wild ride.

February 11, 2005 spout

Local Boy Does Good

Microsoft’s own Robert Scoble has broken his way into the secular press, with an article in both Fortune (Why There’s No Escaping the Blog) and The Economist (Chief humanising officer). Way to go, Robert!

February 9, 2005 spout

I Think VSLive Is *It*

It’s become apparent to me that for Microsoft-focused non-Microsoft hosted conferences, VSLive is it. I know that in the past that they’ve had financial problems, but I haven’t heard rumors of that for a while. Even more importantly, their attendance numbers and their coverage is top notch for 3rd party Windows developer conferences. If I was going to speak at a wide-reach Windows developer conference that wasn’t a TechEd or a PDC, VSLive would be it.

January 19, 2005 spout

The Reason For Code Access Security

I had a question in my inbox the other day that went something like this:

Since programming within the partial trust sandbox I get by default when using ClickOnce is so hard, why wouldn’t I just kick it up to FullTrust and let the user press the OK button?”

You can do that. Since ClickOnce supports user management of permission awarding for code deployed via ClickOnce (aka there’s a dialog that the user has to approve if the app wants more permissions than are the default), you could ask for FullTrust.

If I were you, I wouldn’t ask for FullTrust in my ClickOnce apps and not just because I don’t want users to be freaked out by the dialog box I expect to see that says Danger, Will Robinson, Danger, Danger!” Personally, I don’t want the liability. If I write code the requires FullTrust, I have to write my code to take full responsibility for its actions, including if the code is hijacked by other code to do bad things.

On the other hand, if I request the minimal set of permissions that I need, I’m walking with a net. If I miss an exploit, I’m limited to doing bad things inside of the limited set of permissions that the user has awarded to me and not the whole darn thing.

Full trust isn’t easier; it’s much, much harder. I like partial trust because I’m lazy: I don’t want to do the work to warrant the user’s full trust.

January 17, 2005 spout

Email Throughput

To get technical work done, I sometimes let my inbox fill up beyond what makes my comfortable. Today, that caught up with me, but I plowed into it and handled it like a man:

  • Handled 206 incoming emails (filed, deleted or dealt with in some other way):
    • Started with 47 emails in my inbox
    • Received 177 emails
    • Ended with 18 emails in my inbox
  • Sent 92 outgoing emails

I don’t normally track such things, so I can’t say if that’s a lot or a little, but it sure seemed like a lot to me.

January 2, 2005 spout

Death As A Possible Consequence

Here. The one where I describe my recent run-ins with the Oregon traffic police and my availability as the Bad Boy” in your boy band.
January 1, 2005 spout

Death As A Possible Consequence

When something legal comes up, I like to dig into it. For example, I did my own consulting contracts for years, I’ve testified against an Oregon state bill mandating Open Source Software (a bill that was never passed), I wanted to serve on a jury and I’ve recently become very familiar with the Oregon state eviction and small claims procedures for a rental unit I own. I find laws and procedures to be fascinating and, like most things, showing up is 80%.

However, I don’t like the law so much when I’m the defendant, as was recently the case when the state of Oregon was hell bent on suspending my driver’s license. It seems that if you get 4 tickets in 2 years that they like you to stay home for 30 days or at least take the bus more. I’ve had speeding tickets on and off for most of my life, but before this 2-year period which included a total of 6 tickets (thank goodness that the state of Oregon doesn’t count tickets in Washington), I hadn’t had a ticket for about 5 years. Incidentally, if I could manage to spread them out in a Bell Curve instead of in a Mandelbrot Set, I wouldn’t even have to be in this predicament, but natural has it’s laws and who am I to consider myself above them?

Anyway, the tickets should hardly count. One was cuz I didn’t slow down fast enough in one of those coastal towns where half of the tourist revenue comes from their 100 feet of road along the highway that drops from 55 to 25 with a sign posted behind a tree. Another was on the way to Burning Man. Sure, I was going a little fast, but I spent the next week driving the dusty BM roads on my bike — can’t we do some averaging here?!? Another was an actual speeding ticket around town and that one I’ll admit to, but the forth one was when I passed into a turning lane through a solid yellow line in rush hour traffic cuz I wanted to turn left and the line of traffic was way shorted than the line of traffic going straight, so I cheated over a few feet early. I mean, come on, that’s just an efficient distribution of traffic! I was avoiding gridlock! It was practically my patriotic duty to move over into the left lane early!

However, the truck that was waiting patiently to move over into the left turn lane until he had passed the solid yellow line just ahead of me didn’t see it that way. Nor did the police car that had just turned the corner coming towards me as I scooted around the truck, neatly avoiding the oncoming traffic, all executed flawlessly while my wife dug her nails into my leg.

So, I did what I do with all my tickets: I signed the back and I paid the money. I mean, it’s not like my hairy cleavage is going to change any cop’s mind, so what else could I do?

When the letter from the state came that said they’d like me to turn in my driver’s license for a month is when I started exploring options real quick.

So, I called my tax/business/family attorney, who gave me the names of three traffic attorneys. Unfortunately, each of them specialized in Driving while Under-the-Influence and I began to think that I’d have been better off if I’d have been drunk. Each of them advised me that there was nothing anyone could do for me. I signed the ticket and I was going to have to give up my license. I also felt a very and why are you wasting my time, you sober slug, I’ve got important drunk people to talk to” vibe, but that could’ve just been me…

Luckily, once it was clear I was going to hang up the phone without giving the 3rd lawyer money, he mentioned another attorney that specialized in sober traffic offenses. This new attorney was one smooth operator. After about 5 minutes of questions over the phone, he’d figured out the conviction” (when you sign the back of the ticket, you’ve agreed to be convicted” of a crime) most likely to be turned back to trial (the passing violation, of all things). How did he determine the likelihood of getting a trial? He knew the prosecutor responsible for that part of the state! He was going to call the guy up, ask him for a solid, they run it by the judge as a formality and bang! I’ve got a new trial and my suspension was suspended pending the outcome of the trial.

And what did I have to do? Show up in court and plea my case? (“You want the truth! You can’t handle the truth! You want me crossing that line! You need me crossing that line!“) Nope.

Bring three character witnesses? (I have pictured Rory on the stand trying to provide a credible character assessment. : ) Nix.

Lie under oath? (“Yes? Mr. Sells? This is Nancy Reagan. I’d like that Eagle Scout Award that my husband signed back, please. Seems you lied to get out of a traffic ticket…“) Nine.

All I had to do was send in a $750 check and do it quickly, please. As soon as it cleared the bank, I’d have my new trial (although it’s illegal for him to give me odds” on my ability to get a new trial, my attorney was clear that it wouldn’t be a problem).

Plus, I didn’t even have to go to the trial. In fact, in a very carefully worded letter from my attorney, he let me know that I should only come to court if I could say that I didn’t do it with feeling and confidence. If I couldn’t do that, I should just go about my business. Note that he never actually asked me if I did it or not. I find that a particularly fascinating and scary part of our legal system.

Anyway, at the trial, my conviction” (I have to put it in quotes or you might think I was a criminal [I mean, just cuz I committed a crime, doesn’t make me a criminal, does it?]) was over-turned in exchange for 8 hours of driving school.” This time, I’m using the quotes because there ain’t no actual driving schooling going on. Instead, this is a replay of those driver’s education movies where they show you Faces of Death 3” in an effort to scare you onto the straight an narrow in a very Old Testament, fire and brimstone sorta way. Here’s the descriptive paragraph from the letter I got in the mail yesterday:

You have been given the opportunity to participate in the High Risk Driving Course… The course is designed to educate drivers to the potential and very real consequences of high-risk’ driving behaviors. You will spend eight hours [in the course]. During this time you will hear several presentations on the consequences of high-risk driving, have contact with victims of traumatic injuries and their families, and discuss death as possible consequences of high risk driving choices. Participation in the course will include group discussions and testing, including essay questions and an evaluation of the course. We anticipate that facing the reality and potential consequences of high-risk driving behavior will positively affect the attitudes and behaviors that contribute to choices which place [you] and others at risk of serious injury and death… I understand that what I see and hear in this program is meant to have an emotional impact on me. I may experience psychological discomfort…”

I believe that participation in this program should qualify me as a bad boy” and thereby make me the recipient of all of the benefits thereof, e.g. the alleged good girls” that can’t stay away from bad boys” should now feel free to throw their undergarments onto the stage and to mob my limonene (it’s a white 98 Volkswagen Cabrio Convertible limo” [note the quotes] in case you’re confused). The fact that my financial portfolio is fully diversified using CFA-certified asset allocation techniques, that I was a Boy Scout, that I’m married to my first real girlfriend, that I was a member of the marching band, that I was going 20 miles/hour when I committed my most recent traffic crime” and that I wouldn’t actually drive with a suspended license, thereby causing all kinds of havoc in my life, should not detract from my obvious reckless, dangerous, high-risk” persona. Anyone need a bad boy for their boy band? I’m available…

December 31, 2004 spout

Earthquake Disaster Relief Information

I can’t begin to imagine what the earthquake survivors are feeling after so much death and tragedy. If you can help, please do so.

For more information, you can visit the International SOS organization’s Tsunami Update page and the ReliefWeb site.

Thank you.

December 29, 2004 spout

SlashDot is Wrong: MCE05 Rocks

Here.

I’m a very happy user of Windows Media Center Edition 2005 and have been for some months. Not only does it allow me unfettered access to audio, video and recorded TV from any PC in the house, but with the XBOX Media Center Extender, I can access all of this from any TV in the house as well (so long as its equipped with an MCE Extender). Further, I was able to use MCE to record several episodes of a yoga TV show for my sister-in-law and burn them onto DVDs with an evaluation copy of WinDVD Creator, making her very happy. I don’t know what the content restrictions” who-ha is about, but MCE05 works great for me.

December 20, 2004 spout

We Need NetFlix for TV

Sometimes I miss some made-for-TV movie or series that I’d really like to see and that I didn’t know about before hand so that I could point my ReplayTV or MCE at it. The world needs NetFlix for TV.

December 16, 2004 spout

Deuce Bigalow: European Gigolo

Am I the only one actually looking forward to this movie?

December 16, 2004 spout

Getting Out The Vote: Save Ctrl+F5 in VS05!

When I noticed the behavior that Ian describes in VS05b1 (that Ctrl+F5 no longer works to launch a console app with Press any key to continue…” at the end), I assumed it was a temporary bug. To learn that this feature was removed by design” is devastating. As a presenter and technology experimenter, I’ve probably used this as much as any single feature in Visual Studio with the possible exception of the text editor.

Don’t just site there! Vote to Save Ctrl+F5 in VS05! (I love MSDN Product Feedback : )

December 15, 2004 spout

Snorkeling Is Unbelievably Wonderful

I just got back from a 3-family, 6-day trip to Cabo San Lucas, Mexico (“a pleasant fishing village paved over for tourist hotels”) and it was fabulous. Since it was before the high season,” we had the place practically to ourselves. In fact, even though it was an all-inclusive place, the wait staff probably outnumbered the guests 3 to 1 at any given time. And it wasn’t as if they skimped on the food or the drinks, either! Every day, we had a giant buffet for breakfast, snacks by the pool for lunch and a 3-hour, 5-course meal for dinner. Plus, the weather was great and the pools were heated, so it was practically perfect.

The one blemish was when we drove to La Paz and couldn’t get out again. The detour signs pointed the wrong directions and all of the highways had the same number. We literally left and returned to La Paz 4 times, including the time we had to drive the rent-a-car guy back to his offer when something on the road disabled our car and we had to get a replacement. In 10+ years of business travel, I’ve never taken the comprehensive insurance until that day. I only had to pay for the half of tank of gas that I couldn’t fill up myself because to do so would’ve destroyed the engine (the rental company failed at first to see this as an argument for charging me less than 4x the going rate for gas, but I did eventually talk them down to only charging me 2x the going rate…).

Oh, and snorkeling rocks! We went to a calm little beach with a driver that brought all of the equipment, kayaks and a cooler of beers! But, I was completely distracted at my first snorkeling expedition ever. At first, I was blown away at the clarity of what I could see under the water and the ease with which I could breath (I expected to swallow a lot of water). Then, I was completely freaked out at the shear number of fish under the water (thousands!), even in areas with humans inches away. I felt like I was in an undersea remake of Hitchcock’s Birds and any moment I was going to be bait (and there were no phone booths around in which to hide). Then, I was amazed at how I was simultaneously part of and not part of this new world I was floating over. I must’ve snorkeled for an hour straight without pulling my head up. It was unbelievable and I got to share it with my wife and kids who’d never snorkeled before either.

After this wonderful family vacation, I can’t tell you how relaxed I am. At 9:37am, I think I’m ready for my afternoon siesta… : )

December 3, 2004 spout

Another Reason To Hate The Dentist

Most of the worst experiences of my childhood involve the dentist. I have an active gag reflex and a general aversion to sitting still for long periods with nothing to do but let somebody poke my soft innards with a metal stick, so the dentist chair has never been a good fit for me. Today, I got another reason to hate the dentist.

Because Beaverton does not fluoridate their water and because he’s a nine-year old boy, my youngest son Tom had 4 cavities to deal with today. He was nonchalant about the whole thing for the first hour alone in the chair while I waiting in the sitting room, never expressing concern or doubt about the experience to come, which made me believe that everything was going to be just fine. Even when he started crying a bit, I was able to maintain my seat, knowing that he leaned toward the dramatic. However, when he started screaming, that’s when all 6′5″ and 280 pounds of me barged through the door between the waiting area and the rending rooms, not stopping to ask the women milling around reception if that was OK and conscious but uncaring that the expression on my face stilled them to silence.

When I got back to the room where Tom was being impaled, the dentist was busy telling him that little girls cried less than he did. She further went on to tell him that he wasn’t feeling pain” at all but only pressure,” a sentiment she had to repeat several times while she asked the nurse to give her the extra gauze to staunch the profuse bleeding. I have to say that it was difficult to simultaneously comfort my son while expressing my displeasure at the dentist for both the potential physical and verified mental torture she was using on him. Probably it wasn’t easy for her to concentrate on her dentistry in a completely focused manner while I loomed over her, but that’s what you get for making my son cry for 30 minutes.

Anyway, at the end, as she informed me that she worked with children all the time and had two of her own (implying that the pain was somehow my son’s fault, I’m guessing), she also reached for the referral pad for another dentist to fill the other two cavities, saving me the trouble of asking.

I hate the dentist.

P.S. After a McDonald’s toy and chicken sandwich (eaten carefully from the un-decimated side of his mouth), Tom seems unaffected. However, I’m sure that the whole sordid experience will come roaring back to him in the future unless they’ve replaced the dentist with nanites and computer programs (or sledge hammers and chisels, which would be equally humane)…

December 2, 2004 spout

On Microsoft’s Transparency in 2004

Here.

Sir Black Xero (?!?) has a review of Microsoft’s increasing openness in 2004, summarizing it this way:

Granted, there are plenty of Microsoft teams that are still opaque when it comes to their roadmaps. (Office team, are you listening?) But Microsoft has taken some in 2004 in the right direction, customers, analysts and other company watchers seem to agree.”

Frankly, I’m pleasantly surprised at how far Microsoft has come opening up to the world. I hope we’re at a critical mass where it just can’t be stopped, but as an engineer, that’s hardly surprising. : )

November 26, 2004 spout

Hurray for IE QA!

From securityfocus.com:

It appears that the overall quality of code, and more importantly, the amount of QA, on various browsers touted as secure’, is not up to par with MSIE; the type of a test I performed requires no human interaction and involves nearly no effort. Only MSIE appears to be able to consistently handle [*] malformed input well, suggesting this is the only program that underwent rudimentary security QA testing with a similar fuzz utility.

This is of course not to say MSIE is more secure; it does have a number of problems, mostly related to its security architecture and various features absent in other browsers. But the quality of core code appears to be far better than of its secure’ competitors.

[*] Over the course of about 2 hours; I cannot rule out it would exhibit problems in a longer run.”

November 25, 2004 spout

Microsoft Amnesty for Software Pirates

November 19, 2004 spout

A Reason For A Home Gigabit Network

I finally figured out why I need a gigabit LAN, especially at my house: the Windows Media Center Extender (mine’s for my XBOX, which I bought especially for this purpose). It lets you get at the music, video, pictures, radio, PVR, live TV and pretty much everything else that Media Center exposes, but from any TV in the house and all with the fabulous 10-fit UI that MCE provides. I had to duct tape down the extra long wire from my office to my bedroom (I explicitly left out a network connection in the bedroom when I wired the place — who knew?) and my megabit LAN works just fine, but I can see needing more when I put one of these things on every TV in the house, which is pretty likely, since it rocks so hard. Wahoo!

Oh, and as if that weren’t enough, the XBOX Media Center Extender kit comes with a remote and remote sensor that works for playing DVDs, too, thus saving you the trouble of buying both. I’m in love!

November 16, 2004 spout

Art Tips for Programmers

As I think I’ve said before, as the capabilities of our UI platform expands, programmers are going to need to know a lot more about user experience and graphic art. Towards that goal, I offer a recent post on Slashdot that provides advise on how programmers can bone up for the latter. Anyone got any ideas about the former?
November 13, 2004 spout

Outsourcing to Arkansas

I love the idea of outsourcing to rural parts of the country because a) I like keeping jobs in the US if possible (although I’m not a protectionist by any stretch of the imagination), b) it gives the under-employed more choices and c) it’s another step toward my dream employment environment.

I see a future where people are listed like books on Amazon with ratings, reviews, descriptions (aka resumes), prices and availability, to be placed into a shopping cart to form ad hoc project teams based on the needs of the project and not on the locale of the participant or something as restrictive as employer.” I admit that I this article is only a small step and may not even be in the direction I’m hoping for, but as I’d like to live in a rural area (central Oregon) and still get to do interesting work at reasonable pay, I’m more than happy to read into things.

November 11, 2004 spout

ATOM is to RSS as XML is to SGML

Tim Bray finally provides a technical reason for ATOM to exist that I can get behind. Once every RSS consumer in the world (which really isn’t that many) also supports ATOM, we can move forward to a saner world.
November 11, 2004 spout

A Guy Worth Hiring

This guy deserves a flood of job offers. Make yours good!

November 7, 2004 spout

Concrete Examples of Software Factories?!?

I’ve been reading each of the Software Factories articles with great interest. Part 1 and part 2 did a particularly good job describing the elements of the problem space, I thought. However, when I get to part 3, I was ready to see a solution. Instead what I got was a long abstract piece defining the bits of what makes up a software factory. This is the kind of thing I’d be ready to read after I was shown a concrete example or two of working, running software factories. Do other people like reading these long, abstract articles? I find them tedious unless they’re filling in and generalizing the details of something that I’ve already got a handle on.
November 4, 2004 spout

It’s The Thoughts That Count…

Here. The one where I lead you through my thought processes to chase down the answer to a problem that doesn’t need solving in the slightest…
November 4, 2004 spout

The Importance of Reputation

Here. The one where my boy is falsely accused of pantsing a kid and avoids suspension because he’s known as a good kid.”
November 4, 2004 spout

Getting My Hopes Up On Episode 3

Dammit. The trailer for Star Wars 3: The Revenge of the Sith, actually looks good! I just know I’m going to get my heart broken again…
November 4, 2004 spout

The Country Has Spoken

This map of physical area that Bush won over Kerry (3.28M vs. 741K square miles) paints a pretty stark picture of just who the country wants to be their president. The choice they made makes me want to emigrate to Ireland with Robert Redford, but that’s another story…

[both links from Rick Childress]

November 4, 2004 spout

It’s The Thoughts That Count…

On an internal mailing list the other day, there was a question asking for how to make a tray notification icon come back up on the try after explorer.exe died and came back to life. Good notification icons do this and the asker wanted to know how to do it for Windows Forms. I had had a dearth of technical work at the time, so decided to dig into the problem and see if I could answer it.

I started with a dim memory of a piece in MSJ by Paul Dilascia on the subject. Searching on msdn.com, I found Paul DiLascia’s 2/99 MSJ C++ Q&A (http://www.microsoft.com/msj/0299/c/c0299.aspx) (emphasis added by me):

provided you have Windows 98 or the Microsoft Internet Explorer 4.0 desktop installed. Whenever Internet Explorer 4.0 starts the taskbar, it broadcasts a registered message TaskbarCreated to all top-level parent windows. This is your cue to recreate the icons. If you’re using MFC, all you have to do is define a global variable to hold the registered message and implement an ON_REGISTERED_MESSAGE handler for it.”

From there, I dug through the SDK docs on ON_REGISTERED_MESSAGE (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_on_registered_message.asp) and found:

// example for ON_REGISTERED_MESSAGE
const UINT wm_Find = RegisterWindowMessage( FINDMSGSTRING )

BEGIN_MESSAGE_MAP( CMyWnd, CMyParentWndClass )
//AFX_MSG_MAP
END_MESSAGE_MAP( )

Figuring I’d have to be able to call RegisterWindowsMessage from managed code, I surfed to pinvoke.net and found RegisterWindowMessage (http://pinvoke.net/default.aspx/user32.RegisterWindowMessage):

[DllImport(“user32.dll”, SetLastError=true, CharSet=CharSet.Auto)]
static extern uint RegisterWindowMessage(string lpString);

Now that I knew how to figure out the Window message value for which to watch, I looked back into the MSDN documentation on System.Windows.Forms.Control, the base class of Form and all other HWND-based classes in Windows Forms (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclasswndproctopic.asp) and the WndProc method I would have to override to catch the message, finding:

protected virtual void WndProc(
ref Message m
);

and:

All messages are sent to the WndProc method after getting filtered through the PreProcessMessage method.

The WndProc method corresponds exactly to the Windows WindowProc function. For more information about processing Windows messages, see the WindowProc function documentation in the Windows Platform SDK reference located in the MSDN Library.

Notes to Inheritors: Inheriting controls should call the base class’s WndProc method to process any messages that they do not handle.”

Putting this together, I figured you could add re-awakening” to notification icons in the following way (some compiler errors left in to keep readers on their toes : ):

using System.Windows.Forms;
using System.Runtime.InteropServices;

class MyMainForm : Form {
  [DllImport(“user32.dll”, SetLastError=true, CharSet=CharSet.Auto)]
  static extern uint RegisterWindowMessage(string lpString);

  static uint taskbarCreatedMessage = RegisterWindowMessage(“TaskbarCreated”);

  protected override void WndProc(ref Message m) {
    if( (uint)m.Msg == taskbarCreatedMessage ) {
      // re-show your notify icon
    }
    base.WndProc(ref m);
  }
 
}

After posting this answer to the list, I couldn’t help but crank up a quick app to test it (after fixing the compiler errors of course : ). To my satisfaction, it worked immediately. I put up a notify icon in Windows Forms, killed explorer.exe and was pleased to see my icon show back up again when explorer.exe was restarted.

However, just to make sure, I commented out my code to see my icon not be restored. Those of you familiar with the internals of Windows Forms know what happened next, of course, because my notify icon was restored properly to the tray even without my code, as illustrated by Reflector against the .NET 1.1 Windows Forms implementation:

public sealed class NotifyIcon : Component {
  …
  static NotifyIcon() {
     NotifyIcon.WM_TASKBARCREATED =
      SafeNativeMethods.RegisterWindowMessage(“TaskbarCreated”);
  }

  private void WmTaskbarCreated(ref Message m) {
    this.added = false;
    this.UpdateIcon(this.visible);
  }

  private void WndProc(ref Message msg) {
    …
    if (msg.Msg == NotifyIcon.WM_TASKBARCREATED) {
      this.WmTaskbarCreated(ref msg);
    }
    …
  }
  …
  private static int WM_TASKBARCREATED;
  …
}

What? Why would someone post a question about how to make something work that already worked? I figured that the questioner was referring to .NET 1.0 and I was digging through .NET 1.1 code.

However, reading through the 1.0 code showed the same support, meaning that neither the questioner nor I had bothered to check for this support before running off to add it. So, the lesson? Write your tests first!

Still, I learned a bit along the way and that was fun. : )

November 4, 2004 spout

The Importance of Reputation

My youngest son was called into the office today for pantsing a kid on the school playground. That is not at all like my son (he’s the sweetest kid you’d ever want to meet), but the principal was new, so she was talking about suspension. Luckily, the secretaries knew my boy, so they were able to point out the inconsistency of that behavior with the reputation he had built in 4 years at the school. It turns out that the pantsed boy was cutting in line in front of my son, who didn’t like it, so pushed him right back out of line again. The cutter” took a swing, my boy swung back and in the process (they’re only 9) they both fell. My son reached out to grab the boy’s shirt to catch himself, not knowing that the other boy was also falling and got the pants instead, causing the aforementioned pantsing.”

The moral of this story is an old saying I heard when I was a kid and have lived by since: If you rise at dawn, you can sleep til noon.” In other words, if you build yourself a reputation for good things, when occasionally you stray, folks will cut you some slack. The converse of this rule is that if build yourself a reputation for bad things, that could well stick with you for a long, long time…

October 25, 2004 spout

Here’s Some Marketing I Can Get Behind

I just got an email from Netflix letting me know that they’re lowering my monthly fee from $22 to $18. The only thing vaguely marketing” about is that they used $21.99 and $17.99. There was no upsell. There was no limitation of service at that new lower price. There nothing additional I had to do to get the savings. When’s the last time you got that kind of service from a vendor? I love Netflix.
October 14, 2004 spout

Consider Yourself An Artist

d.code has a lot of great stuff to say in his post, but hands down my favorite is this:

How many software developers at Microsoft consider themselves artists first, and software developers second?”

This is the thing that separates today’s Windows software from tomorrow’s. IMO, this is the line between Windows Forms and Avalon. The former is hands down the best way for software engineers to build professional UIs that we’re familiar with under Windows today. The latter is for artists to build things we’ve never seen before. I know this is scary for software engineers who don’t know how to be artists (lord knows I don’t) and for companies that don’t have artists (better get some), but crossing this line is necessary to get from the best of today to the promise of tomorrow for Windows.

October 14, 2004 spout

Randy Jackson on Pleasing the Gods

Randy Jackson enjoyed my recent .NET Rocks appearance because of my discussion of how I like to learn things. I only remember talking about two strategies: ignoring the docs” and hyperventilating” but his take on it was so beautifully worded, I had to share it with you:

I’m referring to flying in that strata called by some of my PhD’ed friends as the Shirley McLean’ possession experience, where the actual act of jumping in to the unknown pleases the Gods in some twisted way and the outcome is usually beyond our expectations.”

I don’t get the Shirley McLean reference, but I love the bit about pleasing the Gods by jumping into the unknown.

And yes: today I’m going to read you my email because today, clever people insist on emailing me. : P

October 14, 2004 spout

A Quote To Live By

I watched the first few episodes of the award-winning HBO series Angels in America” and hated it (but I still love NetFlix for making is so darn available to me).

However, while I didn’t identify with any of the characters (except, potentially, the hot nurse/angel), I did really resonate with one of the quotes, which went something like this (and feel free to correct me if you recognize the quote and I got it wrong):

Don’t run your life by what you want. That changes with a whim. Run your life on what you believe.”

That really struck the Midwestern Eagle Scout idealist engineer in me.

October 11, 2004 spout

“How is anyone supposed to know that?”

The high priests that run the Internet and the IT industry have betrayed the trust of the secular community.

My wife called me over to her computer the other day when she was worried about an email stating a problem with her eBay account. By reflex, I said, Oh, just ignore that.”

What? Why? They’re going to shut off my eBay account,” she said, motioning me over more urgently this time.

Looking over her shoulder, I saw an email that looked very official, including the eBay logo.

See?” she pointed at the From line. It’s from ebay.com.”

I know, sweetie, but hang the mouse over the link they want you to click. It’s a number; it’s not ebay.com”

Looking at me like I’d just broken the news about Santa Claus, But how is anyone supposed to know that?”

I didn’t have an answer. There really should be one.

October 11, 2004 spout writing

All The Fun, Half the UK Price

Curt Johnson, my marketing guy at Addison-Wesley, has let me know this morning at the UK Amazon is having a 1/2 price sale on my Windows Forms book this month. Plus, the UK guys have their own reviews that are just as nice as the US reviews. Who knew? : )
October 7, 2004 spout writing

You Too Can Be A Technical Writer!

October 7, 2004 spout

Settings, Collections and VS05b1 (oh my)

I sat down to write a new Windows Forms application in .NET 1.1 the other day, but the Visual Studio 2005 beta 1 called to me with its menu strips” and its user settings” and most especially its generics,” and I just couldn’t resist.

To start with, it was such a pleasure to add a menu strip, add in the standard menu items (including graphics), then just strip it down to just the menu items I wanted. Then, as I added new menu items, the menu item object names were set for me based on the menu item text, e.g. startRetrievalToolStripMenuItem instead of menuItem1, which was fabulous. Not everything was wonderful, e.g. I couldn’t drag and drop menu items or use Alt+arrows to rearrange them , but overall the new menu control was a pleasant experience.

Even more pleasant was the app/user settings model. To add a setting to my application, all I had to do was bring up the properties of my project, add a named setting of whatever type I wanted (more on this later) and choose whether it should be an Application setting or a User setting. Both kinds of settings are loaded automatically when the app starts and all I had to do to save them was call Properties.Settings.Value.Save() when my main form shut down. Then, with the settings in place, e.g. MyUserSetting, I could get to it after the app started from anyone in my app with a type-safe access, e.g. Properties.Settings.Value.MyUserSetting.

And this didn’t just work for built-in simple strings and ints and such like. Oh, no. I was allowed to add custom and collection types like System.Collections.Generic.List as well. Plus, using generics, the underlying XML serialization mechanism worked great, because all of the types are known at compile-time (settings are stored in standard XML .config files @ c:\documents and settings\\Local Settings\Application Data\\\\user.config). Being able to declaratively set app and user settings of any type and then just use them in a type-safe manner, saving them with one line of code, loading them with zero lines of code and not having to flatten my collections into comma-separated lists made things so pleasant until I hit the ugly realities of beta software, especially as new features interact with existing features and each other.

For example, because the default AssemblyVersion attribute is set to 1.0.*” in AssemblyInfo.cs (which has moved to below the Properties folder of your VS05 project), every time I compiled, all of my settings were lost. That seems very counterintuitive to me. Why should a user lose all of their settings with the new version of the application? To work around this, I changed my AssemblyVersion attribute to a hard-coded string that I now have to remember to change manually, blowing the benefit of having a version number that changes automatically with each build.

As another example, like C++ const” of old, generics infect your code; use them in one place and you find yourself using them all over. That was fine with me (the generic Predicate for finding things in a List was so handy!) except that as of b1, the Windows Forms Designer gets all unhappy when you use generics. I have every hope that this will be fixed by b2, but as of right now, if I wanted to use the Designer (and it’s so sweet, how could I not want to use it?!?), I had to strip out any methods or properties in my visual code that exposed generics (although method and property implementations with generics works just fine).

Stripping out List brought me to the use of ArrayList instead. That worked just fine (System.Collections.ArrayList is even available via the Browse button when setting up app/user settings) until the XML serializer couldn’t serialize instances of the custom type that I was using to populate my ArrayList. The error looked like this:

Could not use Xml serialization for setting: SelectedExchanges. --->
System.InvalidOperationException: There was an error generating the XML document. --->
System.InvalidOperationException: The type MyNamespace.MyType was not expected.
Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.

When I start up the debugger to see the line of code where the error is happening, I ended up in Main because the code is part of the Application start-up for which there is no source code, making this even more difficult to debug. The problem was that the underlying serialization engine didn’t know what to do with this custom type. The clue was the mention of the XmlInclude attribute, which you can use to tell the serializer what types may be in the ArrayList, but you have to have somewhere to hang the attributes. In this case, that lead to a custom ArrayList type for the express purpose of informing the serializer (making me really miss the use of generics, where all of the types were specified at compile-type for me automatically):

[System.Xml.Serialization.XmlInclude(typeof(MyNamespace.MyType))]
public class MyList : System.Collections.ArrayList {
  public override object Clone() {
    MyList newList = new MyList();
    newList.AddRange(this);
    return newList;
  }
}

Notice also the Clone method. I added this later because the base ArrayList Clone method creates an instance of ArrayList, not my custom MyList type. Of course, since this was all run-time type errors, I couldn’t let the compiler tell me about these problems; I had to run my app and find them. Very frustrating, especially when generics makes these problems all go away.

Still, I’m very much enjoying the new productivity features in VS05 and Windows Forms 2.0 and when they work better together, I’ll be even more happy.

October 7, 2004 spout

Every Story I’ve Ever Written

I was working with a potential author on an article he’d like to write covering some ground I left uncovered in my original No-Touch Deployment piece for MSDN Mag. Anyway, he sent me the list of topics and then said the following:

There is a fair amount of material here it might benefit from being broken into chunks. I think I will write about small chunks at a time and then we see how much belongs in one article. Rereading your original article it struck me that you had [a] story that held it together, I need to find one for me.”

I’ve heard this kind of thing before, i.e. people ask how I turn a seemingly random set of topics into a story.” I’m all for that, but it’s not really such a chore. In fact, here’s the essence of every technical piece I’ve ever written:

So, I want to build this thing that needs to do this, that and the other. I started with this, did it this way and it worked. Now I need to do that. Oops. That didn’t work the way I thought it should. Here’s what I need to do to work around the problem. OK, now I want to do the other… [repeat]”

The secret is really building up from what the reader already knows with some minimal new, interesting thing and keep on like that til you’ve covered the ground you want to cover, stringing things together with transitions that give the reader the impression of one contiguous story. If you really want to get fancy, put a personal anecdote at the front that you use as an analogy, bring it up a few times during the piece and then wrap up with something clever that ties the your anecdote together with the ground you’ve covered by extending the analogy in a humorous way (but that’s optional).

September 29, 2004 spout

BankOne: Special Victims Unit

I have a BankOne Visa card that I use for Sells Brothers, Inc. as a charge card for expenses like computer equipment, technical book purchases and strip clubs (you know — business expenses : ). Apparently somebody got a hold of the number and started making charges with it today. A $19 charge was approved, but the $331 charge swung the BankOne AI software into action and the charge was declined. They called right away to confirm the activity and when I didn’t recognize it, they credited me the $19, canceled the card, put a new one in the mail, sent all three major credit card agencies a notice so that my credit rating wouldn’t be affected and put an affidavit in the mail so that I could swear that the $19 charge wasn’t mine. All of this defense against identity theft cost me 5 minutes on the phone, a few days wait while I receive my new card, a signature and $0. Amazing.
September 6, 2004 spout

The Week Before Burning Man

September 6, 2004 spout

The Week Before Burning Man

I was just listing my activities for the week before Burning Man and amazed even myself:

  • Shopping for and celebrating my wife’s 36th birthday

  • Helping to prepare for and then watching Sells brother #1 test for his Jr. Brown belt in karate (he was amazing)

  • Hosting my aunt and grandmother on a very rare 4-day trip

  • A day-trip to the beach

  • Celebrating the birthday of Sells brother #2

  • Coordinating the update, from my house and at the last possible moment, of more than 100 pages on microsoft.com to reflect the recent announcement of WinFX being made available on down-level versions of Windows (this included 3 all-nighters)

  • Preparing for and running a 2-day garage sale of the stuff I pulled out of my house over the last 8 months in my own personal episode of Clean Sweep

  • Packing for 5 days in the desert (I worried about survival and my wife worried about having enough costumes…)

Of course, after that I spent a week at Burning Man, and today we’re cleaning the playa out of everything, preparing the boys for school, hanging out with the relatives for Labor Day and celebrating our 13th wedding anniversary. Starting tomorrow, I have to figure out what to do with the Longhorn Developer Center now that WinFX will be available on down-level windows, co-author two Avalon books and one Windows Forms book and run the Applied XML Developer’s Conference 5. Should be fun. : )

August 16, 2004 spout

Where Are You In The Software Practitioner Triad

In his piece Software Practitioner Triad (I know it’s old, but I just got pointed to it by Phil Weber), Alan Cooper points out three different folks needed to design and build software:

  • Architect: responsible for determining who the user is, what he or she is trying to accomplish, and what behavior the software must exhibit to satisfy these human goals.
  • Engineer: technical problem solving via experimentation, not fettered with the demands of producing release code.
  • Programmer: producing a shippable product, consisting mostly of protective code that rarely—if ever—executes, but is dedicated to supporting obscure edge cases, platform idiosyncrasies, and error conditions.

I’ve done all three, but am happiest with architect and engineer. Where are you in your current job? Where do you want to be?

August 5, 2004 spout

Mensa Has an Open Enrollment Day

Mensa Has an Open Enrollment Day

I refuse to join any club that would have me as a member.” –Groucho Marx

I must fit into some kind of quota (Windows programmers? Authors? Norwegians? Big, Dopey, White Guys?) for Mensa to let me in

And don’t forget to steal the new flair, Rory… : )

August 2, 2004 spout

I want remote apps, not remote desktops

Ever since WinXP, I’ve been using Terminal Server a ton. Recently, I’ve been using Virtual PC and when Virtual Server is released, I bet I’ll be using a lot of that, too.

However, as enabling as TS and VPC are, I want more. Instead of logging into a desktop and having the windows trapped on that desktop, I want the windows from a VPC or TS session to just show up on my local desktop, maybe using title bar colors to tell me which ones are running on which machines. I know that X-Windows has provided this for a while, but I want this for Windows. That is all.

July 29, 2004 spout

I Can’t Imagine More Great Hackers

Here. According to Paul Graham, hackers only program Python and never program NT, so none of the people that I would consider great” hackers are, by Paul’s definition, great. Given the quality of the hackers I was mistakenly classifying as great, I can’t image what Paul’s bar must be (or it could be that he’s an elitist snob… : ).
July 27, 2004 spout

What Makes A Book Successful?

Here. The one where I pontificate like an arrogant windbag on the subject of what makes a book successful as if I knew.
July 27, 2004 spout

What Makes A Book Successful?

I got an email today from a friend who wanted to know what he could do to make the book he had in his head successful. I’ve thought a lot about this topic in the genre of Windows programming (I don’t have a clue how to make your bodice ripper successful), but had never verbalized it til now, so I thought I’d run it up the flag pole and see who burns it.

DISCLAIMER: I make no claim about whether following these guidelines will make your book successful. These are just things that I think about when I’m trying to make my own books successful.

  1. Write a quality book. I know this one goes without saying, but given the state of most books that make their way to the shelves, I thought I’d say it anyway. Karen Gettman, my editor at Addison-Wesley, says it like this, Be the first or be the best.” I’ve never yet had any luck being first, so I really try to be the” book in any given category. For example, I think the 6 guys who read the TAPI book would agree that I really nailed it. : )

    For me, the crux of quality (besides being able to string sentences into paragraphs and chapters in pleasant ways) is writing a book that describes how to do your work with the technology instead of that describes how the technology works. The difference is subtle, but it’s what separates, for example, a book that describes how to build real applications in WinForms using the appropriate tools from a book on the WinForms classes, methods and events. Likewise, the former fills in the gaps when a technology falls short whereas the latter is frustratingly silent on such topics.
     

  2. Have a significant audience. This is the one that’s killed me time and again. The Win95 user book was killed by Internet encyclopedias. The TAPI book was killed by the lack of PC/Telephony adoption. The ATL book was pretty well-received, but the audience was still not the audience size that you’d like (although it still sells nicely and we’re planning on having a 2e in time for Visual Studio 2005 and ATL 8).

    Having a significant audience was the thing that killed my friend’s book dreams when he called. Before our call, he was all excited about his technology (passion is an important part of the writing process and it’s the only thing that can get you through the murderous back-end of a quality book [on the other hand, I understand that people that write crappy books don’t have this problem, so there’s something to be said for that…]). After our call, he had to admit that the market just wasn’t there for anyone to purchase his labor of love once he’d produced it.
     

  3. Own the marketing. The truth is that even though publishers have full-time marketing folks, you are much more likely to know where your audience hangs out and how to reach them then they are. Plus, there are all kinds of guerrilla marketing” things that you are much more able to do than any publishing company. For example, these are some of the things that I like to do:
     

    • Answer questions online in your area of expertise. I’m continually surprised by the number of authors that don’t participate in the communities that support their technology. If you answer questions and then point folks to your book for more details enough times, folks will grow to appreciate your book without ever having picked it up (although don’t just point folks at your book without answering their question — that’ll just make you look like an asshole).
       

    • Ask for Amazon reviews of your book. People often feel the need to say something nice about my book before asking me a related question. In that case, I always take the opportunity to ask them to post a review and give them the URL to do so (the difference between finding my book on Amazon and just clicking an URL can make all the difference between whether they do it or not). I never ask them to post a nice review,” btw. I just encourage them to write what they feel.

      Why do I care about them posting their reviews? According to legend, the number of reviews a book has is a fair indicator of how well it sells, regardless of whether those reviews are good or not. I don’t know if it’s causal, but since I can only influence one of the variables, that’s what I do. Plus, the reviews look good to your family and friends when they pull up your books and since you’re not going to make any money writing a book, you might as well get something out of it. : )

      Why so I want the reviews on Amazon instead of blogs, newsgroups or BookPool? Because everyone goes to Amazon to buy books and that’s where I want them to see the reviews. In fact, if I see a review somewhere else besides Amazon, I’ll ask the reviewer to copy and paste it on Amazon so that all of the reviews are in that one, critical place (providing them the URL, of course, to make it nice and easy for them : ).
       

    • Continue writing in your area of expertise. There’s no better free advertisement for your book than that tiny bio at the end of an article that says Joe Grammer is the author of Essential EDI Programming in a Nutshell in 21 Days for Dummies.” Of course, that pre-supposes that the article is good enough for folks to want to read more of your work, but if it isn’t, you’ve got bigger fish to fry.
       

    • Bang on your publisher. Your publisher has a PR department and a marketing department. Talk to them. Ask them what they’re doing for your book. Watch where they go and make sure your book is represented. Watch where they don’t go and tell them to go there. Make sure your publisher signs you up to revise your book as the technology evolves.
       

  4. Pick your publisher wisely. Speaking of publishers, make sure you choose one you’re going to like. It’s easy to fall into the money trap, especially since every publisher on the planet can provide numbers about how they’re the #1 publisher in some way for your book and you’d be a fool to go anywhere else. Unfortunately, when you do the hourly math, most authors make poverty level money, so why not pick the publisher you’ll like the best? To find out which publisher fits you, you can either write for/flirt seriously with them or ask around. To save you the trouble of the former, I’ll give a brief overview of the publishers with which I’m familiar:
     

    • Microsoft Press. This is the big dog that all the other publishers a) think is given an unfair advantage and b) are constantly trying to get within striking distance of. MS Press is so far ahead on sales volumes that the rest of the publishers are scrambling for #2. I’ve never written for MS Press, but have seriously flirted with them enough to be scared by them. This was years ago before the great opening of MS and things may be different now, but at the time, MS Press seemed keen to fix” my writing to fit the official” story and to be very firm about schedules, neither of which made me happy (I was used to a more loving, lax environment : ). Plus, MS Press is famous for little clauses in their contracts for which authors need to watch (although all publishers do this — watch out for the one called Right Of First Refusal”).
       

    • Addison-Wesley. I’ve written all but one of my real books for Addison-Wesley and they have set the author environment standard against which I measure all others. In the old days, they’d throw advances and even grants at anyone with a pulse and then expect you to take 23.5 months to deliver on a 9-month contract while leaving you free to say pretty much whatever you wanted. Sadly, those days are over, but the idea of letting the author be the ultimate arbiter of what goes on the page has stayed. This comes from editors that are more like project managers in that they send nag emails when you’re late and send chapters off to reviews to gather feedback, but don’t ever really read the chapters (most AW editors aren’t technical). What this means is that you have a lot of freedom as an author until some reviewer you don’t agree with brings up something silly that the editor takes as gospel and whacks you with it.

      Luckily, if you’re writing for an AW series, you’ll have someone technical that can read and review your content, although in this case, you’ll want to make very sure that you see eye to eye with your series editor or you’ll find yourself butting heads.
       

    • O’Reilly & Associates. I’ve only written one book for them and it was a mixed experience. On the one hand, it was the wrong book (it should’ve been a Visual Studio Hacks book, but this was before the Hacks format was invented). On the other hand, ORA editors actually read the book and provide intelligent, thoughtful feedback. I really like that. On the gripping hand, ORA has built its reputation of steady quality by applying heavy copy editing to all of their authors to coerce those that aren’t writers into the ORA voice.” Most of the time, this works nicely. If you pick up any ORA book in any series, you know what you’re getting and lots of people love that (I love a lot of ORA books myself). However, if you’re an arrogant author (like me) who thinks that he writes better than the copy editors, you may be surprised with what the copy editor does to your stuff.

      Also, ORA doesn’t really have series so much as formats, e.g. Nutshell, Hacks, Developer Notebook, etc., so make sure you like the gimmick associated with a format before you sign up for one. To maintain that steady level of quality, they’re going to make sure you stick to the format closely.
       

    • APress. I don’t know a thing about APress except that I like Dan Appleman, Gary Cornell is a character and a half, they seem to have some good books and I’ve never written for them, so naturally I’d like to write for them for some day (I mean, just because my wife doesn’t allow me to fool around outside our marriage, why shouldn’t I be able to fool around in another genre? : ).

BTW, a lot of these same principles can be applied to your article writing, too, but there you know what they’re paying you up front. A bunch of my friends have done the math and for the same amount of work required to produce a book, they can produce articles that pay much better. But you’re not writing for the money, right? (Please don’t try to write for the money…)

July 21, 2004 spout

Hypothetical: What’s Best For Windows Developers?

Hypothetically, if you were a relatively well-known voice in the Windows development community (let’s call her Kris) and you were being pursued as a series editor for two publishers, call them O’Shawnasee Associated (OSA) and Anderson-Manderson (AM), which would you pick?

Suppose that both OSA and AM have a strong existing Windows presence, but AM has the edge in a quality .NET series with a strong voice already at the helm (call her Dawn) while OSA has a more scattered offering spread across format and media types. Would it be better for Windows developers if Kris lent her voice to the AM existing series, reducing the competition for authors between series, or should she work with OSA to gather their Windows editorial vision into a more cohesive whole, requiring developers to make a harder choice between publishers?

I know that this question is hypothetical and holds no importance in any pending decisions by anyone real, but I’m still curious about your thoughts. Please post your comments here.

July 21, 2004 spout

This is *so* the wrong direction…

I don’t want to turn bits into atoms in 3-5 minutes to hold a book in my hand, I want all my books, papers and mags in electronic format on a pleasant hardware platform! I’m planning on getting myself a tablet PC soon to test as a candidate (pocket/palm PCs sucked for this use the last I tried). Plus, where does the book data come from for all of these print-on-demand books and why can’t I download it?
June 30, 2004 spout writing

#1 Windows Forms Book

Here. The one where I toot my own horn much less subtly than usual (and I’m not known for subtlety : ).
June 30, 2004 spout

#1 Windows Forms Book

Wednesday, June 30th, 2004

I just got word from my publisher that, according to the industry-wide metrics they use, Windows Forms Programming in C# is the #1 seller in it’s category week-to-week by a wide margin over everyone but Petzold (who I’m still beating, but by a smaller margin). And while Petzold has sold more copies overall, he had a 2-year head start on me and I’m gaining. Further, earlier today, Amazon.com had the book listed as the #5 best selling computer book (although it’s at #10 right now with a sales rank of 459 and a ranking of 5 out of 5 with 52 reviews).

I normally try to toot my own horn a little more subtly than this, but the idea that I could learn Windows programming from the best-selling Windows book author of all time and then, 10 years later, beat his sales numbers makes me damn proud. Thanks to all the reviewers and folks that gave me feedback on the materials in my articles, to Shawn Wildermuth and Mike Weinhardt, who actually contributed material to the book and to Addison-Wesley for printing it (and then re-printing it, and then re-printing it… : ).

Discuss

June 26, 2004 spout

My Experiments In Social Video

Here. The one where I try a couple of experiments in social video to bring me closure to my friends and get half-way there.
June 26, 2004 spout

A Man, A Plan, A Canal, A Librarian!

A Man, A Plan, A Canal, A Librarian!

Saturday, June 26th, 2004

Can’t come up with a better palindrome than a man, a plan, a canal, Panama!”? Write a program and come up with one that’s 17,000+ words. I love computers and what people do with them.

The most extreme thing I ever did along these lines is when my airplane was circling an airport for some unknown reason and the United flight attendant announced a contest to keep our minds off the dwindling fuel and the terrorists on the ground (oh, wait, that’s Die Hard…). Anyway, she offered a free bag of peanuts (or something of equal value) to the person that could come up with the most words of 3 or more letters from the letters in the word united” (Always Be Closing…).

Did I put my Tim Ewald-expanded vocabulary to work? Did I scratch words onto a cocktail napkin as fast as I could think of them?

No. In the limited time I had, I wrote a program that would come up with random combinations of letters in brute force fashion, then dumped the unique ones to a file so that I could use Word’s spell checker to find the real words. I came up with 32. Did I win?

No. A librarian, using her own expanded vocabulary beat me with 34 (I had been running the program to generate 1000 possibilities to speed testing but forgot to flip it back to 10,000 when it came time to run it for real).

Did I stop there? Did I accept defeat gracefully, especially since it’s pretty clear I had cheated in the first place?

No. I went home and learned the STL permutation algorithm and wrote a program that compared against a dictionary from the web to find the 72 words of 3 or more letters in united” (including asynchronous updates to the UI as possibilities are checked [it takes a little longer, but it’s worth it…]).

Now I carry that program on my laptop wherever I go, just in case I run into that damn librarian again…

P.S. I did get to use my program one more time against my mother playing Scrabble. I got my all-time high Scrabble score ever on that day. She still beat me. Did I mention she’s got a bachelor’s degree in library science? Damn librarians…

Discuss

June 25, 2004 spout

My Day With Edward Tufte

Here. The one where I enjoy a day with Edward Tufte even if he unfairly blames PowerPoint for sloppy thinking.
June 25, 2004 spout

My Day With Edward Tufte

My Day With Edward Tufte

Friday, June 25, 2004

I spent most of Thursday in a seminar given by Edward Tufte, the author of several seminal books in the area of data analysis and presentation (with another, Beautiful Evidence, in the works). I enjoyed it thoroughly and here’s what I was able to capture:

Tufte’s Grand Principles

The goal of good information design is to minimize the amount of time spent figuring out the design of the presentation of information (or even admiring it) and maximize the time spent reasoning about the information. Good designs should be as nearly invisible as possible.

Tufte: The point of an information display is to assist thinking. Good design is clear thinking made visible. Bad design is stupidity in action. Chart junk is a good sign of statistical stupidity.”

My favorite Tufte term is what he calls designers brought in to make boring numbers look interesting: chartoonists.”

Ed’s Grand Principles of Analytical Design

  1. Show comparisons (this is big theme of Tufte’s)
  2. Show causality
  3. Show more than 2 variables, as the world we’re trying to understand is multivariate
  4. Integrate word, number and image (this is another big theme)
  5. Say from where the data came
  6. The value of an information presentation comes from the quality, the relevance and the integrity of the content, i.e. good design won’t fix bad content.
  7. Use small multiples, e.g. showing multiple pictures of sunspots on the sun over time
  8. Show and embed scales of measurement because it’s an essential part of the context
  9. Annotate everything and if the audience reads ahead great, they’re reading your material
  10. Use proven design templates (like those in Tufte’s books)

Tufte: Don’t let the marketing people corrupt your presentations by eliminating detail. Chances are, the people looking at the information know more than the marketing people. People haven’t suddenly gotten stupid just because they come to hear you talk. If people can read the financial tables and the sports tables from the paper, they can get read data from you.” (The last point assumes a good design.)

In my own work, I often remove detail for clarity, but I’m very careful to leave enough details to keep context. I admit, it’s a fine like to walk and hard to get right.

As a way to pack more data into a small space (and in an attempt to secure his immortality, imo), Tufte was inspired by Galileo’s work to create a new kind of graphic meant to be integrated into a sentence as yet another word. He calls them sparklines″ (the sparkline is the graphic before each word):

Sparklines pack a lot of information into a small space and are a cool alternative to graphics that break the flow of thought and need to be called out with a phrase like as seen in Figure 3.” I have a mind to implement them in Avalon when I get a chance.

90% Content

Tufte hates most kinds of user interfaces because they spend too much of the already low resolution screen on fluff,” e.g. menu bars, captions, navigation, etc, and too little on the content itself. As an example, he showed a screenshot of a photo display app that used only 18% of the screen for the actual photos. He wants nearly invisible operating systems and apps and 90% of the screen used for the content. He’s a big fan of Google News as a way to pack in a lot of information and he’s a big fan of scrolling. For web sites, Tufte recommends only a small set of links at the top of each page for navigation and nothing else. His own site is like this and I have to admit, I like it.

Design For High Resolution

Ed hates low resolution. He wants everyone to design for high resolution to be viewed at 22 inches so you can pack a lot of information in, showing comparisons and causality. He hates PowerPoint because it’s made to be viewed from 22 feet and doesn’t provide a lot of room for showing dense data, comparisons or causality. It’s far easier for humans to make judgments when they can see everything at once instead of sequenced one slide after another (or one damn thing after another,” as Tufte says : ). In general, he believes everything should be printed and that PowerPoint should only be used for showing pictures to an art class. I see his point, but ironically, when he wrote a paper on the problem of PowerPoint to be read at 22″, after 3 pages of him blaming PowerPoint for sloppy thinking, I put it down in disgust. If he had had his thoughts put together into PowerPoint-style format, I could have skipped ahead to find his real point, i.e. low resolution makes it hard to do serious analysis.

As a point for Tufte, when producing this summary of my day listening to him, I’m mixing prose, images and references, but I’m not producing it in PowerPoint. According to Tufte, 4 pages of prose is equivalent to between 50-250 PowerPoint slides and I have to admit, it would be hard to convey what I want to say about him in a PowerPoint deck without using a lot of slides and throwing away the subtleties. In general, I believe that PowerPoint is best for reminding the presenter what they want to say and is very poor for the audience. Instead of a slide presentation, Tufte recommends providing the audience 4 pages of prose, which they read 3-5x as fast as you could say it, and then having a conversation. Interestingly, he allowed no conversation during his own presentation but instead talked to various parts of his books and hand-outs.

 On the other hand, has anyone even read this far? Would you have gotten farther if I’d have summarized everything in slides, skipping ahead to the juicy bits when you got bored?

Giving Presentations

Tufte has a great deal of advice about how to prepare for and give presentations. To prepare, you must have great content (no amount of design or practice will fix bad content) and spend a great deal of time practicing (especially important if you’re not using PPT to remind you what to say). When presenting, follow these rules (these aren’t all of my rules, but I agree with them):

  1. Show up early to avoid problems and greet everyone at the door to learn their names, introduce yourself and begin advancing your cause
  2. Start talks with The Problem, Why They Should Care and The Solution
  3. Never start your talk with an apology, as it just make you look pitiful
  4. Use Particular/General/Particular when presenting information, e.g. start with a particular example of something, generalize it and then show another particular example that shows the same general characteristics (I use this technique all the time and it’s very effective)
  5. Use first person singular only to express opinion, i.e. this isn’t a talk about you but about a serious topic
  6. Give everyone at least one piece of paper (Ed prefers a single 11″ x 17″ folded in half with 4 sides of content)
  7. Knowing your content and respecting your audience is more important than knowing your audience if by knowing” them, you dumb down” your talk for them
  8. Avoid project slides (aka PowerPoint or the equivalent)
  9. Use humor as appropriate, e.g. hyperbole to make a point, but don’t tell jokes. Don’t alienate your audience because of a joke. Alienate your audience on the merits on your content!”
  10. Avoid the use of he” or she,” e.g. The user, he takes his mouse and moves it to his menu bar where he makes his manly choice.” Use they” instead.
  11. Make sure folks know you believe what you’re saying by getting out from behind the podium, getting close to people and use appropriate gestures. If you don’t believe what you’re saying, they’re not going to believe it.
  12. Finish early and something good will happen. No one will ever look at their colleague, commenting on how they wish you had gone on for another 20+ minutes.

I think that Ed has enough good things to say about how to approach the presentation and analysis of data that I would recommend that pretty much anyone involved in the presentation and analysis of information take the time and attend his day-long seminar.

Discuss

June 25, 2004 spout

My Experiments in Social Video

June 25, 2004

Because I’m a rarity at Microsoft, a remote employee, I’ve been conducting experiments in social video to increase my presence from afar.

Experiment #1: Mini-Me

My first experiment was a dedicated laptop for IM audio and video that sits on my desk in building 5. The idea was that anyone that wanted to chat with me could wander by my office and start an a/v chat w/ me nearly as easily if I was actually in the office. And then, when I’m supposed to be in a meeting, instead of requiring someone to bring their laptop, with a web-cam installed, and give it up to me for the duration of the meeting so that I could see folks, they could just grab the mini-me” laptop from my desk and bring it to the meeting.

Sounds nice, eh?

Doesn’t work.

The reason mini-me doesn’t work as a stand-in for me in my office is because there’s no standard account I can login with on my desktop, e.g. redmond\guest. The reason a standard account would be nice is so that I can leave it logged in all the time, tie its own .NET Passport to the account and put a shortcut on the desktop to make it IM me in video conference mode (I actually wrote an app that does just that). Unfortunately, it has to be an MS domain account so it has network access and if I leave an anonymous domain account logged in on a laptop all the time, that’s an enormous security hole. And if I make folks that want a quick chat with me log in themselves, they’ll will have to wait for their domain settings to migrate to the laptop, they’ll have to login with their own IM account, they’ll have to configure the web cam before using it and they’ll have to remember to logout when they leave for the next person. Frankly, I’m not worth all that trouble when they could just call, IM or email me.

So, the mini-me laptop is a bust unless I can figure out a way to get Internet access without Intranet access inside the MS corporate Intranet without requiring everyone to log in w/ their own account to get it. Oh, and it has to be in a way that works with wireless so that they can haul mini-me to a meeting without having to haul along a cable, too.

Experiment #2: Maxi-Me

My 2nd experiment in social video went quite a bit better. Last week I gave two 1-hour talks back to back to the AZ .NET User Group, but the trick was, I gave them from my house. The setup was two computers on each side. One was for NetMeeting app-sharing (using MSN Messenger to request Remote Assistance works, too, but I can never get MSN Messenger app-sharing going). The second is for the video (the CPU load was too heavy to do both on one computer). Voice was done over the phone, which they put through their PA system. They also had two computers, both attached to video projectors, broadcasting my screen using one projector and my image using another (can you imagine how disturbing it must have been to see the giant, pixelated maxi-me? I shudder at the thought : ).

The app-sharing worked well, as I was able to easily switch between PowerPoint and a Terminal Services session to my Longhorn box. The audio worked well because I insisted on 2-way audio so I could hear them ask questions (I hate talking into silence). The video was cool, because I could see them raise their hands, drift off, laugh, etc, but it required somebody sweeping the room on their end periodically (talking without seeing your audience is slow death).

Overall, it seems like folks were able to enjoy a remote presenter without too much trouble. Once I got em warmed up, the speaker phone and roving camera made Q&A very natural. I would try maxi-me again, although I’d love it if I could get mini-me working, too.

In general, I believe that ubiquitous a/v conferencing is inevitable. I just I’m just a bit ahead of the curve. : )

Discuss

June 16, 2004 spout

The Reason for ATOM

It seems to me that folks embrace ATOM mainly to get away from the guy that’s credited with inventing RSS:

I’m not running for president, I am not a corporate executive, and I don’t tell bedtime stories to adults unless its for fun and they’re friends. I can tell you what it feels like to be me, but I don’t know how it feels to be you. I’m willing to listen, up to a point, but unless your site is hosted on weblogs.com, I don’t understand why you’re hogging the microphone right now. I believe so strongly in the weblog world, that we should be grounded in truth. I think a lot of people participating in this dicussion are not grounded in truth, deliberately so, openly so. Shame on you, I say.”

This was said after he pulled down 3000 web sites he was hosting with no notice. ATOM is starting to sound more and more attractive…

Because this post has cauesd Mr. Winer to start swearing at me, I thought I’d remind folks of the following:

DISCLAIMER: This is a personal post of Chris Sells as an individual on my own personal web site and does not reflect the views or Microsoft as a whole or any portion of Microsoft.

June 7, 2004 spout

My First Presentation For A Distinguished Engineer

Here. The one where I get to present a technical topic to Anders Hejlsberg and it changes my brain.
June 7, 2004 spout

My First Presentation For A Distinguished Engineer

Monday, June 7, 2004

Wednesday was a good day. Not only did I get birthday wishes from all over the internet (thank you, Orkut), but I got to give my first presentation to a Distinguished Engineer (or DE, as we call them in humble tones). A DE is the top end of the individual contributor ladder that technical folks who want to stay technical — aka avoid becoming management – are on. Architects, e.g. Don, are one step down on that ladder and Program Managers (PMs), e.g. me, are even further down. In this case, the DE to whom I was presenting is someone that I’ve long respected and who invented and continues to guide my favorite programming language: Anders Hejlsberg.

A couple of weeks ago, Anders was digging through our docs on a topic in which he was interested because of the future directions he’s got in mind for C#. However, the particular information that Anders was looking for wasn’t in our documentation. So, he mentioned that he’d like someone to look into it and get the information for him. As a percentage of the 56K employees at MS, there are a very few DEs, so when one of them mentions that they’d like to see something done, that’s what happens. This doesn’t happens because a DE is your boss or because they decide whether you get a raise or not. This happens because smart technical folks get respect at MS and the smarter you are, the more respect you get. So, when Anders mentioned to BradA that he would like a brief on this technology, Brad found someone to give that brief: me.

Why me? Well, lately I’ve been talking to Brad about me doing some more technical work on WinFX and Longhorn. In the past, I’ve written and spoken a great deal about the good and the bad of various technologies and my thinking was that if I could get into a feedback loop with the product teams so that I could help prevent some the worse bits from making it out the door, giving me the opportunity to write only nice things about our technologies. Brad already runs the WinFX review team that’s in charge of making WinFX a nice place for developers to play, so when I volunteered to help with some of that work, it didn’t take long for him to take me up on it. And, after a few moments of hesitation when I realized that I only knew a little more than Anders about this particular topic, I jumped at it, digging into the technology, sending tell me more” and review these slides, please” emails to the various product groups in charge of those technologies (it’s amazing how quickly you get a response when you put I’m writing a presentation on your technology for Anders and…” into an email : ), revised the slides, woke up in the middle of the night with the perfect set of pictures to illustrate things, etc. In short, it was a blast and I learned a ton (which you know I like : ).

And the actual presentation was even more fun than the preparation. There are three kinds of talks. One kind of talk, which happens 80% of the time, is the kind of talk that doesn’t really affect you one way or the other. It kind of blends in with all of the other talks you’ve given and doesn’t really make an impact on you.

One kind of talk drains you completely. This is the talk where you just can’t get anyone to notice you at the front of the room and you pour all of your energy into it to make it acceptable at all.

And one kind of talk, my favorite, is when the juices are really flowing and you walk out of the meeting all excited and energized. This is the kind of talk that drives me and my colleagues to all-night diners for a debrief session. This last talk was the kind that I had this time with Anders and a couple of the product teams from around the company. I was really just guiding the discussion, with Anders leading and peppering all of us with wonderful, insightful questions. I had 20+ slides with overview, pictures, details and recommendations, but I only showed 4 of them (3 of pictures and 1 of recommendations). My inability to get through all of the slides didn’t matter: Anders got it all. He was interested in some of what I had to say, but also brought up points I’d never considered. What I think should be in our platform was changed by just listening to Anders ask questions. I could feel the synapses in my brain realign. It was amazing.

Things will absolutely change in our platform because of the desires that Anders expressed during my presentation. What a privilege.

Discuss

June 6, 2004 spout writing

MikeDub On Solving An Instance of Writer’s Block

It has been my pleasure to spend the last 2+ years writing with Mike Wienhardt. I remember fondly his first piece. When I give feedback, I work very hard to let the author know just exactly what I think so that they can bring their work to its highest possible potential. When Mike sent me his first draft, I was as careful as I could be to point out the parts that I liked to let him know that he had real potential, but basically, I ripped it apart. I have literally caused authors to tear up reading my feedback in the past, but I give Mike credit — he turned his piece around and came right back for more. We did this 5 or 6 times, but by the end, his first piece was better than most of the experienced authors filling magazines and web sites. It has been a real pleasure watching him grow into his writing talent and it made me very happy when he accepted the major writing duties on the 2nd edition of Windows Forms Programming in C# and when he took over my Wonders of Windows Forms column.

In his most recent blog post, it was very interesting to read about Mike working his way through the worst part of writing: writer’s block. Nearly all authors get this occasionally and it’s a real killer (and a pox on those authors that don’t suffer from it). It makes me proud to see him so concerned about his writing that he’s willing to share these kinds of experiences with the world. I wish more engineers took that kind of pride in their work. You’re setting an example for us all, Mike.

May 29, 2004 spout

Turning Science Into Engineering

It’s generally know that the thing we call software engineering” is nothing like that. We just don’t have anything like the rigor that real engineering disciplines do and we need them. I wonder if Brian’s quest to understand the real software life cycle and codify them constitutes another step down the road that the other engineering disciplines took to become predictable, schedule-able, reliable, budget-able and robust. I hope so.

May 29, 2004 spout

You Can Actually Schedule Inch-Pebbles

I haven’t read Coder To Developer, but I love the term that secretGeek has pulled from it: Inch-Pebbles.” When I was running DevelopMentor Software I learned to schedule from my then-mentor John Robbins, who learned it at NuMega (of BoundsChecker fame).

John’s insight was that nobody can look at a software release or even a feature and come up with an accurate schedule. Instead, they hold up their thumb in the wind and say, Hmmm… Two weeks.” Of course, it’s never anywhere close to that. However, if you break something down into tasks of 1-2 days, aka inch-pebbles,” those can be accurately estimated and then rolled up into how long each feature and then each mile-stone will actually take (“What? Three months?!? I had no idea…“). Once I learned how to schedule debugging time (rule of thumb: as long as coding time), we were able to schedule our software to w/in a week or two (although John, to show off, would pad a little and pick the day and time and deliver the golden master CD with balloons, champagne and marching band music : ).

At the time, we didn’t have a name for the granularity that could be accurately scheduled and, since I haven’t read Mike’s book, I don’t know how he defines the term inch-pebble,” but from now on, that’s what I’m going to call it and if that’s different from what Mike called it, well, then he’ll just have to update his definition in his next edition. : )

May 28, 2004 spout writing

Great Minds…

Here.

I love Luke’s RSS Aggregator [1]. He loves my book. For what more could a man ask?

[1] I just tried the lastest RSS Bandit — don’t get me started…

May 28, 2004 spout

Jury Duty

Here. The one where I spend a day at jury duty but don’t actually get to serve on a jury (and realize that serving on a jury was pretty darn unlikely in the first place).
May 28, 2004 spout

Jury Duty

Friday, May 28, 2004

Today was the first time that I was called to jury duty, even though I’ve been eligible for almost half of my life. I always dreaded being called when I was a consultant because the $10/day didn’t cover a day’s meals, let along the revenue I would miss as the sole breadwinner of the family. However, much like the body puts off illness when you just can’t afford to take the time (stress has its uses), my dread seems to have put off my jury duty til I had a full-time job with enough redundancy to live w/o me for a day or so.

Even when your job pays, most folks seem to want to get out of jury duty in any way possible. George Carlin says that the best way to get out of it is to admit to the judge that you know how to tell if someone is guilty, It’s all in the distance between their eyes…” Personally, I’m a believer in America’s system of justice (I’ve often fantasized about a life as a prosecuting attorney and as a judge), so I didn’t mind serving my turn on a jury. Unfortunately, it was not to be. While I went down to the court house, my number wasn’t even called to appear on one of the two juries needed today.

Doing a little math, I found out that the overall odds of me actually being on a jury were actually pretty low. Here are the stats:

  • 47 people showed as potential jurors on 2 juries

  • 28 were called for the 1st jury, of which 12 were needed

  • 15 were called for the 2nd jury, of which 6 were needed

  • According to the State of Oregon Washington County Jury Director, 70% of people that show up for a trial see the assembled jury and decide to take the plea bargain after all

  • Therefore:

    • Folks called to jury duty that were actually put on a potential jury: 91.5%

    • Percent of juries, once formed, that are used: 30%

    • People called for a jury actually placed on that jury: 42%

    • My chance of actually serving on a jury today: 11.5% or less than 1 chance out of 8

    • The opportunity to make the US justice system real for the brothers Sells w/o them actually committing a crime: priceless

Discuss

May 26, 2004 spout

This Absolutely Boggles My Mind

Here.

Steven Edwards is an OSS guy working with the Wine guys to build a new version of Windows from scratch called ReactOS. They’ve got 20-30 people, they’ve been working on it for a few years and they’re 6-8 months away from getting client-side of networking to work to the point that it supports HTTP.

Oh my god.

Why would anyone want to waste time doing this? I don’t even like to build my own autocomplete listbox when it’s already been done and that’s only about 12 lines of .NET code! Why the hell would anyone want to build Win32 all over again, let alone Win16 (what the Wine guys do)?!? We have all these programmers with all this free time and all they can think to do is to clone OSes and applications that have already been built? Why not add something new into the world?

I just don’t get it…

May 25, 2004 spout

Post/Reply Alphabet Soup

Newsgroups, mailing lists, web forums and blogs (with comments) are all very similar. Fundamentally, they’ll all about posts and replies. Sometimes the posts are replicated to servers around the world, acccepting replies in the same way. Sometimes the posts are replicated to a set of subscribers via SMTP and replies come in via POP3. Sometimes the posts are part of a web page and provided via HTTP, using HTML forms to take replies. Sometimes the posts are served up via a centralized server using HTTP + RSS or HTML, accepting responses via HTML forms or the CommentAPI. Fundamentally, it’s all the same thing, though: posts and replies. Why do I have to suffer with the limitations of any one of these protocols just to hang out with my friends to talk shop?

I don’t like newsgroups because I don’t like having a separate reader outside of my mail reader (and NewsGator ain’t anywhere close to what I want yet). Plus, newsgroups are very susceptible to spam, although the MS newsgroups are carefully patrolled to kill it before it spreads.

I don’t like web forums because I either have to poll the site (which RSS has cured me of) or the integration of the forum into my mail reader is limited to notification only. Plus, every single web forum has a vastly different UI and set of features and the inconsistencies bug me. On the other hand, web forums are pushing the envelope on features that I really want, like author and content ratings. I love mailing lists, but don’t want to duplicate any of the WinFX newsgroups in mailing lists just yet to avoid fracturing the budding developer community.

Blogs are wonderful, of course, and RSS is the only thing that’s worth me spinning up a whole separate reader than my mail reader, but it’s impossible to follow a thread of conversation between blogs or comments on other people’s blogs. On the other hand, the server-per-poster model is great because I can just subscribe to the posters that I like, increasing the signal to noise ratio substantially.

I think we should pack all of the features of mailing lists, newsgroups, web forums and blogs into a single backend and expose it via HTTP, NNTP, SMTP/POP3 and RSS as appropriate. Is it time for a new protocol that can be dumbed down to the existing protocols for the diehards that won’t give up their readers of choice? Personally, I’d like to get everything via SMTP/POP3 except for my RSS feeds (although I don’t know why — maybe it’s just that I can’t seem to get a handle on a keyboard-only mode for RSS reading in NewsGator the way I can in SharpReader…).

Discuss
May 21, 2004 spout

Employers Check References

I got an email asking to serve as a reference for a guy I’d never heard of today. Just so you know, especially in a down economy, employers check references. Also, it’s a good idea to ask a reference between adding them to your resume so they don’t have to respond, Roy? I don’t know anyone named Roy…” : )
May 21, 2004 spout

Another Killer App for Web Services

May 21, 2004 spout

Strengths and Weaknesses

Friday, May 21, 2004

I took a Gallup questionnaire and 3-hour seminar on the philosophy of strength-based development. The central idea is to identify one’s strengths and concentrate on those. This is opposed to general thinking which says that you should work on your weaknesses. According to Gallup, no one can really change their weaknesses much, but if you focus on your strengths, you can really make a difference in yourself.

As evidence of this claim, Gallup sites a study of teaching speed reading to average and above average readers. The average readers started at 90wpm and the speed reading course increased their speed to 150wpm, an increase of 67%. The above average readers started at 350wpm and increased by more than 800% to 2900wpm. Or, to put it another way, it was 10x more effective to concentrate on a strength than to try to improve a weakness.

The dark subtext of the strength-based point of view is that if I can’t really fix my weaknesses, then I can only really do well in certain kinds of ways. I don’t like this idea. It sounds too much like fate, which just pisses me off because I don’t like the idea that it’s my nature and not my effort that determines how well I do at something.

When I mentioned this to one of instructions of the seminar, she looked at my strengths and said, Oh, I see why you want to think it’s you that governs how well you do,” which didn’t make me feel any better. My strengths, in order, are Achievement, Command, Communication, Learner and Intellection. In other words, I like to get things done, tell people what I think, learn new things and think about them. This set of strengths wasn’t really a surprise, but here’s one: I think DevelopMentor was speed reading for my particular strengths. DM was an environment that encouraged all of my strengths and I stumbled onto it by pure, dumb luck.

On the other hand, before DM, I wasn’t nearly the Communicator that I am now. In fact, I think it would’ve been one of my weaknesses had I taken the Gallup questionnaire 10 years ago. And if that’s the case, I would have been discouraged from spending too much time working on it by, for example, teaching, presenting at conferences and writing courses, articles and books, which I think would’ve been a shame, because I really love to write.

So, while I like the idea of concentrating on one’s strengths, I still don’t like the idea of ignoring one’s weaknesses.

Discuss

May 21, 2004 spout

Another Killer App for Web Services

Another Killer App for Web Services

Friday, May 21, 2004

At the last Applied XML Dev.Conf., I went ga-ga over Amazon’s use of web services in their business and called it the killer app for web services.” Now I’d like to revise my statement: it think that it’s one of the killer apps for web services.

Here’s another one: exposing the functionality of all of those internal corporate services apps that are now exposed as web sites as web services instead.

Now that I’ve been back inside of a giant corp. adrift in a sea of sites to “help” me with the various business processes” that I have to execute, I yearn for them all to be exposed as web services. There are several problems with the internal business-processes-as-web-apps morass that we’re stuck in:

  1. The web apps are generic for all uses across all companies, which means that there are tons of options for other uses then mine, but I still have to deal with the UI for all of the options

  2. To get my business tasks accomplished, I have to string together several of these web apps in series, manually moving the data from one to the other

  3. Just going from one page of a web app to another, even in a corp. intranet, is so slow when you are always going to pick the same options and your fingers want to be far ahead of what the server can handle when generating the UI a page at a time

For example, here at MSDN, we have package source code sent to us by authors into an MSI with a EULA, code sign it with the Microsoft key and submit it for download to the MS download site. A year ago, it took me an hour of instruction to understand the process and it involved using VS.NET to build the MSI and two separate web sites, both with several pages and tons of fields to get a folder of files available for download by our good readers. This took me 30-60 minutes to do each time I had to do it, which made me cranky, so I built this:

This tool takes the minimum number of fields necessary to turn the source files provided by the author into a signed MSI. Plus, it’s a smart client, so the UI is snappy and I can make it smart about what specifically it should remember between sessions for our own uses. And, I can provide a single UI for multiple back-end services, duplicating the data between them as necessary w/o requiring the user to duplicate the data for me.

The way I was able to minimize the number of fields was to build all kinds of assumptions into the app based on how MSDN does things, aka the business rules, and build my own app that programmatically generates when I need. In other words, my app combines business rules with programmatic interfaces to save me and my friends all kinds of time (the process is now about 10x faster than it used to be and 100x less tedious and less error prone).

And that’s the beauty of allowing programmatic access to internal business processes: it allows each group in the company to build specific apps that meet their needs more specifically, letting them consolidate the processes into their own group-specific tasks. Not only does this speed things up and increase consistency for our customers, but it also removes the tedium and lowers the possibility of human error. If you could gain all those benefits, would you do it? That’s the promise of web services and SOA when applied internally, because it allows the groups that provide the services to be general-purpose, meeting the needs of all groups, but lets each group be specific when they apply it, instead of forcing a web interface that requires everyone to be general.

Am I alone in getting aroused when thinking about this kind of thing? : )

Discuss

May 19, 2004 spout

“No coding question unanswered for < 24 hours”

Here.

After the official question was discussed for a good long time — “What more can MSDN do for developers?” — I asked this follow-up question in 3 parts:

  1. How many of you are unsatisfied Microsoft developers? 0 hands raised
  2. How many of you are somewhat satisfied Microsoft developers? 0 hands raised
  3. How many of you are very satisfied Microsoft developers? 30 hands raised

After the session, one Portland nerd came up and told me that he can’t remember the last time that he had a coding question that went unanswered for more than 24 hours. Wow. We’d come quite a ways when that’s the case.

May 16, 2004 spout

3 Years of Spouting

Here.

The one where I reminisce on 3 years of The Sells Spout and my blog as a whole and wonder what it is that brings so many people to the site.

May 16, 2004 spout

3 Years of Spouting

Sunday, May 16, 2004

Yesterday was my 3rd anniversary of The Sells Spout. It’s hard to remember back that far, but this was before any wide-spread blogging software, either client or server, before RSS and before personal email addresses were rendered nearly useless by 157 messages/day about how to enlarge our genitalia, necessitating the eventual move away from newsletters.

At the time, I used FrontPage and tags to run my blog. I still use FrontPage + tags, but I also use web forms and SQL Server to track comments and generate RSS. In general, I see my site as a giant, categorized blog, e.g. Tools, Fun, Spout, etc, with a front page of descriptions of the items I add to my site and of interesting things I find in the world. Towards that end, I’d like to rebuild my site from scratch using some kind of content management system so that I can get a bunch of flexibility that I don’t have now, e.g. referral logs, auto-archive pages, comment notifications for me, rich comments, a smart client front end for reading from — and adding content to — the site, etc. I could add all of that to my own homebrew software, but I’d prefer to use something like .Text. In fact, assuming ScottW integrates .Text into ASP.NET 2.0, rebuilding my site with both is something that I’ve very likely to do.

The site itself is 9 years old, but my normal outlet of tools, code samples and technical writing wasn’t enough for me, so 3 years ago, I started editorializing on The Sells Spout. I don’t know what my site traffic was 3 years ago, but I know it’s grown ridiculously since then for no reason that I can discern. For example, last month my site served 885K sessions and 2.5GB in small pages, zip files and RSS feeds. While full 55% of the page hits were the RSS feeds (quite a number of you are keeping a close eye on me, apparently), that left 398K people/month visiting my site to read or respond to a topic from my blog (18.7% of the total), read about interviewing at Microsoft (10.6% of the total) or download a tool (4% of the total).

BTW, for those of you who would point out that my RSS feed is syndicated as the Editor’s Blog for the Longhorn Developer Center, throwing off my site stats because of the traffic on the DevCenter itself, I’ll counter with one word: caching. Kent Sharkey, the editor of the ASP.NET Developer Center and expert in all things ASP.NET, has built caching into the control that displays the Editor’s Blog from my RSS feed. Since it’s set to 60 minutes of cache per server and hosted on the 11-server MSDN web farm, that’s at most 8184 sessions/month to serve my RSS feed on msdn.com.

I don’t really know what draws that many people to my site, but 3 years ago, I stated my rules of engagement as follows:

  • I want to make people’s lives better.
  • I’m interested in putting food on my table.
  • I’m interested in what I’m interested in.

    After 3 years, my agenda remains the same. I find that strangely comforting.

    Discuss

  • May 15, 2004 spout

    BBC Coupling: I Laughed ’til I Cried

    The American version left me completely cold, but Melissa and I have just watched the 1st season of the original BBC series Coupling and I actually laughed several times til I cried. In fact, there was one phrase that I tried to repeat to my wife because it struck me so hard, but I literally couldn’t say it without losing my ability to speak (btw, the pride of my ear bucket” is the phrase and I’m typing it through the tears).

    May 14, 2004 spout

    The Advice of Our Fathers

    Here.

    The one where peanut butter and jelly remind me of my father.

    [ed: Just cuz Friends is over don’t mean I’m a gonna pick a new style to describe my Spout entries. If it ain’t broke, don’t fix it, my father always used to say…]

    May 14, 2004 spout

    The Advice of Our Fathers

    Being a Midwesterner, my father is a fairly stoic man and, unlike his son, doesn’t often speak just to hear the sound of his own voice. Still, I’ve managed to pick up a few gems over the years that my own sons are now forced to hear often, like If something is worth doing, it’s worth doing well,” It’s the hard things that are worth doing,” and It’s easy to figure out the right thing to do – it’s the hardest” (do you detect the Midwest work ethic in any of these sayings? : ).

    When I was having trouble with a pair of 6th graders (I was a 3rd grader), he said, Don’t start a fight, but make sure that you end it” (that was hard to implement…).

    When I went off to college, he said, Don’t go to bed drunk” (I always regret it when I ignore this piece of advise…).

    When I broke something of my wife’s and wasn’t contrite enough, my father, working on wife #3 at the time, said to me, You’ve got to be nice to your wife!”

    But the one that sticks with me most, the one I hear in my head almost every time I make a sandwich (and the one that caused me to write these words) is “Don’t get the God Damn jelly in the God Damn peanut butter!” To this day, with my father 1500 miles away in Fargo, I still make sure that there’s no jelly on my knife when I reach for the peanut butter.

    It’s funny what unintended impressions you leave on people. I wonder what about me will haunt my children?

    Discuss

    May 12, 2004 spout

    Your Should Be Using an RSS Reader for Everything!

    Ryan Farley posted today that he agreed with Josh Ledgard who said that you should use an RSS Reader for readings blogs instead of surfing to web pages. Josh finds that when he does this, it focuses him on the interesting posts and doesn’t waste his time reading stuff just cuz it comes from someone that interests you sometimes.

    So, RSS Reader: good. Surfing to blogs via a web browser: bad. Duh! : )

    Ryan goes on to say that my blog should be the expectation, i.e. that you should surf to http://sellsbrothers.com every day for my blog entries even if you use RSS for everyone else. While I appreciate the complement, Ryan, I can’t think of *anyone* that deserves that kind of treatment. If my entries aren’t interesting to you, then don’t slow yourself down to read them just cuz it’s me.

    Now, having said that, I sort my unread blog entries in #R by Author so that I can see all of Craig’s posts at once and pay special attention to them (along with several others). Does that mean they don’t need to be interesting? No. But, I do have that extra visual speed bump to slow me down a tad to double-check for interesting.

    May 8, 2004 spout

    “Down-to-Earth Marketing”

    In a recent post, Brendan Tompkins describes one of my recent Channel9 videos as down-to-earth marketing.” On the one hand, I find that ironic, as that particular video is me talking about the chaos that is MS culture and wondering how we get anything done at all, so if that makes you want to come then you belong here, Brendan. : )

    On the other hand, at MSDN we realize that we’re all in marketing. In fact, any individial or organization whose job it is to talk with customers is in marketing. The particular brand of marketing we use at MSDN is not marketing,” i.e. we package up the most technical, straight-forward information we can and get it into the hands of developers so that they can be successful using our platforms. Of course, the desired result is that more developers build most stuff on our platforms that causes more folks to purchase our platforms, which is why it’s a marketing function.

    Thinking of it as marketing is helpful, as it focuses me on what I’ve determined as job #1 in marketing: never say anything bad about your products that doesn’t have a solution. For example, recently I was giving a talk at Corillian (Scott Hanselmans day job) and I was very free with the problems in Windows XP (which is really just a keep trick to get the audience to like me), but only because I was pitching Longhorn as the solution to all of those problems (and, of course, the cause of no new problems : ). On the other hand, if I had focused on the problems of Windows XP without being right there with a proposed solution to this problems, not only would my talk have tanked (who likes to hear problems w/ no solutions?), but it would have been counter to the purpose of my job: driving customers to our products.

    So, am I a technologist? I like to think so. Am I engaged in the down-to-earth marketing that Brendan prefers? Absolutely. And good eye, Brandan!

    April 29, 2004 spout

    “The Great Windows 95 Trade-In Program”

    Oh man, Richard Childress nailed it.

    We should let people walk into their nearest Comp-U-Buy with their copy of any flavor of Win9x and give them a copy of Windows XP SP2 for free. And, if they happen to need a beefier computer to run XP, and they trade in a copy of Win9x at the time, we should take the cost of the OS off the price of the computer.

    Not only do we get rid of a significant portion of Win9x in the world, reducing our support costs, but we get XPSP2 into more hands, stimulate PC purchasing and reduce the number of versions of Windows that ISVs have to support. Of course, we eat it on the price of XP itself, but I bet the savings in support would make up for it.

    Who else thinks that Richard Childress is absolutely right?!? Let’s hear it!

    April 29, 2004 spout writing

    Safe, Even Simpler Multithreading in Windows Forms

    Mike Weinhardt adds a 4th installment to my series on threading in Windows Forms by illustrating the BackgroundWorker component from Windows Forms 2.0. I have to admit that after I saw this component, I felt very silly for not wrapping my own code up in this form. Thank goodness for .the Windows Forms 2.0 team. : )
    April 29, 2004 spout

    You Clever IM People Are Driving Me Nuts!

    What is the deal with people like Iristyle, josefiend, Mongo, Moribund the Burgermeister and the cheers component? These are the IM names of my friends” that are currently online in IM. I mean, come on! How the hell am I supposed to find Ethan, Joesephine, Scott, Shawn and Betsy if they hide behind these names?!?

    At least Iristyle and josefiend stay the same so that I can learn them, but Mongo, Moribund and cheers are merely temporary based on the quickly changing whims of the people on the other end of the line. I mean, I’m as much in favor of personal expression as the next guy, but not if it stops me from the chief component of the app they’re using, e.g. finding them and actually talking to them!

    And what’s with the guy that has nothing but characters that don’t even show up but render as the dreaded square! Can everyone please at least start their cleverness with their first names so that I can find you on the list? That’s what Brian Randell [Working at home], Carl Frankline [.NET Rocks!], Fritz [easp.net@torrance], Jeff - [Redmond] and even, LJ, just ducky, thanks, do and they seem like happy, fulfilled people. Thank you!

    Plus, while we’re on the subject, what is it with MSN Messenger’s invitation dialog? How the hell do I know who keith at pluralsight.com is? I know tons of Keiths and I’ve never heard of www.PluralSight.com (and even now that I know what it is, I haven’t a clue what www.PluralSite.com *means*). Can’t MSN Messenger give me a name along with the email? I get lots of request to be added to folks IM friend list and I’d like to be able to figure out who I’d like tracking my online life and who I’d prefer to hear from only via email.

    Thus endith today’s rant. : )

    April 26, 2004 spout writing

    Marc Clifton is a Prolific SOB

    I first heard about Marc Clifton on his work with MyXaml, a declarative UI language that shares a name and some principles with the XAML declarative language in Longhorn, but that works on .NET now. Until today, I had missed his earlier work on this subject: The Application Automation Layer: Introduction And Design, along with the rest of his 51 articles on CodeProject.com (wow).

    I’ve never met Marc, but I’d sure like to. He seems like an interesting guy, both because of his work and because of this statement in his CodeProject bio: Having no formal education in software development, he feels exceptionally qualified to inflict his opinions on the community at large regarding how programming should be done.” Now that’s the kind of attitude I like!

    Marc, if you’re going to be in the Pacific Northwest anytime soon, look me up!

    April 26, 2004 spout

    Chris Sells on Organized Chaos

    The one where I express my surprise that we ever manage to ship anything at all, let alone the best stuff there is.

    April 25, 2004 spout

    Post/Reply Alphabet Soup

    April 24, 2004 spout

    Freeing My Mind

    April 24, 2004 spout

    Freeing My Mind

    Saturday, April 24, 2004

    I’m a sucker for new experiences. It’s not that I believe that you only go around once,” because I don’t believe that. I believe that our job on this plane of existence is to raise our level of consciousness to the next level and that our souls are recycled from life to life on this plane til we’re ready for the next. So, I figure that anything I don’t get to do in this life, I can do in the next.

    And yet, I’m still a sucker for new experiences. In any given 10 years, most folks get 1 year of experience 10 times, but I think I’ve done pretty well at squeezing quite a bit out of my last 10 years. And I hope to continue to do that. For example, this year my wife and I will be attending Burning Man. We’d never been, but a couple of my friends from MSDN are helping us find our footing at what promises to be a very unique experience indeed.

    MSDN is, in fact, a haven for unique folks willing and able to help me try new things. As another example, last week I had a private meditation lesson from Henry Borys, MSDN editor, book author and meditation teacher for the last 30 years (he’s been teaching meditation since I was 4!). He runs weekend seminars and even a yearly trek to the Himalayas and while both sound attractive, my Redmond travel schedule almost never brings me there over a weekend (let alone to the Himalayas : ), so he invited me up to his place for a private lesson. It was beautiful. It was 30 minutes north of the hustle and bustle of the MS campus and right on the shores of the Puget Sound. We sat on his back porch, watching the sun set over the water and talking about his experiences in meditation (mostly in variations of transcendental meditation [TM in meditation speak]) and my experiences applying what I’d picked up on my own reading Meditation for Dummies (I have come to love the Dummies books).

    We spent almost two hours meditation and discussing meditation. Here’s what I learned:

    1. Meditation should be effortless. If you’re working at it, you’re not getting it.

    2. Don’t fight the thoughts to clear your mind.” That’s a sure way to keep them bubbling in your head. Instead, think of thoughts as the by-product of the purification of the mind that happens when you meditate and let them happen w/o paying them any attention.

    3. When you find yourself dwelling on your thoughts, go back to your mental mantra. Henry, as is traditional in the meditation teacher-student relationship, assigned me a mantra. Mine is a general-purpose and commonly shared amongst TM parishioners, but is still darn exotic to me, being in Sanskrit. The mere sound of it helps me and, since I don’t really know what it means (although I’m hoping it’s not send Henry money” in some subliminal form : ), it doesn’t distract me from the meditation (unlike my previous, self-chosen mantra free your mind,” which, while very meaningful to me, did tend to hinder).

    4. You’re not meditating for the act of meditation itself, but the benefits it adds to your life when you’re not meditating. While I’ve grown to like the act itself, I have also been enjoying a more peaceful, less stressed perception of life since I started (although it’s still too early to tell if this is merely the placebo effect).

    5. Don’t judge your meditation. Let it happen how it happens.

    6. Your meditation may uncover some deep-seated sleep that’s necessary for your body to experience, so if you feel yourself falling asleep while you meditate, that’s OK.

    7. Take 3+ minutes to come out of your meditation to avoid the bends.” Otherwise, you could easily come out of it too quickly, giving yourself headaches and/or making yourself irritable. I find that 60 seconds is enough for me, but I’m sure I don’t get anywhere near as deep as an expert, so I always take this process as slowly as I can.

    And one of the most fun techniques that Henry introduced was to realize that thoughts are merely interactions with your consciousness. This realization can make your thoughts abstract, which can actually push you deeper into the meditation itself. In other words, when you think of thoughts this way, the more you have of them, the better, which was non-intuitive to my previous understanding of meditation. Hearing this was a very there is no spoon” kind of moment to me.

    I was actually looking for some kind of introduction to meditation for months before I learned that Henry was a teacher, even though I’ve known him for more than a year, showing that once again, when the student is ready, the teacher will appear. I look at this experience as help along the way to a higher plane of existence, which I believe is defined within. And while I’m not a practitioner of any religion (I’m ex-Catholic), I do see this as a spiritual pursuit, blending the beliefs I’ve picked up with my brief brushes with Gnosticism and Buddhism and as popularized in The Matrix (although lost again in those stupid sequels). Free your mind, indeed.

    Discuss

    April 21, 2004 spout writing

    What’s New in Windows Forms 2.0

    Mike and I write our first cut and what’s new and cool in Windows Forms 2.0 in this month’s MSDN Magazine.
    April 16, 2004 spout

    The X in XP Stands for “Wow”

    I had coffee with Arlo Belshee today. He’s done years of successful XP programming and when I say successful,” I mean increased and predicable output. In fact, the techniques he described for XP programming, he also applied to sales/marketing and got the same level of improvements. He’s got an idea for the culture of a product team, including all levels of management, that makes me drool. If you get a chance to hear Arlo speak on this topic, you should do it. He’s downright inspiring.
    April 14, 2004 spout

    More On The Quest To Kill Code

    Here.

    The one where I find a half-way point between where we are in our development environments today and self-writing, self-maintaining, self-fixing super programs.

    P.S. Just to set your expectations, this style of description for Spout entries isn’t going to stop after the last episode of Friends. : )

    April 14, 2004 spout

    More On The Quest To Kill Code

    Wednesday, April 14, 2004

    You’re remember the last installment in my continued quest to find the next big leap in program producing productivity (the last two were OO and managed environments), where I thought I had it all figured out with generic algorithms. All we need is a sophisticated enough environment and wham self-writing, self-maintaining, self-debugging algorithms baby. However, after this evening’s Portland Nerd Dinner (you didn’t pass up a chance to meet Ward Cunningham, did you?), I’m thinking there’s one step in the middle (at least : ).

    So, picture the scene. After hearing about a guy that has a fob” on which he has to enter a password to get a 6-digit number that changes every 60 seconds to that he could log into his company’s VPN, declaring that that’s what happens when you let Keith Brown run the world (I love you, man : ), and describing the CSSM (the Chris Sells Security Model — which I can not only implement under .NET, but actually apply to code [maybe I’ll start a workspace…]), I turned to Ward and asked him the same question that I had asked the group from the last PND, i.e. “What’s the next big leap away in development?”, being careful not to give him my thinking from last time.

    Ward went a whole other way.

    And he got me thinking it’s a good idea.

    So, Ward starts describing how to use loose typing (as in computer science types” and what you do with your 101-Key Text Wizard) and TDD-style tests to infer types for your loose typing and I’m shaking my head, cuz I still gotta write the code.

    Then a long-haired guy to my left who’s name I never lernt (I meant to!), starts talking about how each leap in the past came from handling one detail that you don’t care about, e.g. register allocation, memory management, etc, and I think that has the possibility of helping me, cept the thing I want to get rid of is the code (I mean, if I can’t make a business on generating the stuff, then let’s kill it altogether : ).

    Then Jim Blizzard starts asking an interesting line of questions about whether a leap is really a leap til we’re passed it and we can look back and decide it was a leap. While I think a leap is a leap because you can feel it (I can still remember the joy of my first program [leap 1], hear the ping in my head when I understood OO [leap 2] and feel the rush in my veins when I got managed programming [leap 3]), I was very interested in Jim’s point because I think he was leading me somewhere [leap 4?].

    Then, Ward jumped in again with another scenario where you start from nothing and have a programmer at your elbow to translate the next thing you want as you desire it (the first such scenario was Ward’s Adventure Diet where you start with nothing, then add one kind of food/day til you pass the unit tests I guess [Ward actually put himself on this diet for a while — man, we are nerds]) and that’s when I nearly leap across the table so that I can get my own words in edgewise, literally telling Warm that he had to stop talking now so that I could.

    Because that’s when it all hit me.

    What I want is X1 for programs. I’ve fallen in love with X1 because it gives me immediate gratification. It still finds the same things that Outlook search and Explorer Search finds for me, but X1 does it in such real time that I can narrow in several fields at once based on what I know about what I’m looking for, e.g. some of the body content and/or who it’s from and/or what folder it’s filed in and/or when I got it, etc, until I see a small number of choices from which to pick and I can click on one and say aha! that’s the one!”

    I want X1 for programs. I want to start with nothing and keep refining it with commands like, I want an app,” I want a grid” and the data should come from here” and have my computer say, Would you like an app like this, this or this” and would you like the grid to look like this, this or this.” And I want my computer to know about every feature that ever been built into 3 or more programs, e.g. from remembering the spot my window was the app last ran to dropping in pivot tables, from reading/writing to/from databases to providing theming. Anything that doesn’t work in 3-6 choices, e.g. color themes do but individual colors don’t, I want a Property Browser/Windows Forms Designer-like experience and only when I get to implementing something that hasn’t already been implemented 3 times do I even want to think about writing a line of code.

    ’cuz here’s the thing. I don’t want to give up writing code. I love writing code. I just hate writing code that’s already been written. What I want is for a customer to go through all of the stuff in the Codeless, Human-enabled, Realtime, Interactive System (or CHRIS*, if you will : ) as described in the previous paragraph, get to an actual working system except that it doesn’t do some cool, unique thing that no one’s ever thought of before and then send it to me in an email along with a PO for how much they’re willing to pay for me to do the last bit.

    When the last bit’s been written 2 more times, it goes into the CHRIS and around we go again.

    And I was all happy with that answer and I presented it the PND crowd just before the Sells Brothers (who had come along and been absolute angels for more than 2 hours while I geeked out with my friends), lost it and started throwing their shoes at each other in the Washington Square Mall food court, at which point I had to leave, before hearing what Jim’s point was or what Ward was going to say after he said, OK, wait, what about this…” which is usually what he says just before he tells you that he’s already built what he’s been warming up to for the last 30 minutes and you find that it rocks.

    So, you guys damn well better tell me what happened after I left, especially if it’s better then the CHRIS!

    BTW, why isn’t anyone filming these PNDs? They’re the best techie conversations I have all month…

    Discuss

    * I swear that 90% of that acronym (abbreviation?) came out naturally and was only tweaked slightly at the end for marketing appeal. : )

    April 10, 2004 spout writing

    I’m Loving the .NET Fx ARM

    Here.

    The one where I learn a bunch of interesting stuff reading all of the annotations from The .NET Framework Standard Library Annotated Reference in one sitting.

    April 10, 2004 spout

    I’m Loving the .NET Fx ARM

    Saturday, April 10, 2004

    I enjoyed the annotations in The .NET Framework Standard Library Annotated Reference so much that I read them all in one sitting (in the bathtub, if you must know…). The annotations are where the authors put in their 2 cents about a particular class, method or property and it was very interesting. Here’s what I learned just from that part of the book:

    • You shouldn’t use ApplicationException for custom exceptions. Derive from Exception instead.
       
    • Because ICloneable.Clone doesn’t define whether it returns a deep or a shallow copy, it’s practically worthless.
       
    • Prefer UTF-8 because it takes up the same amount of space to represent ASCII characters as ASCII, but can also represent all Unicode characters (I knew that UTF-8 took up the same amount of space but hadn’t yet jumped to prefer”).
       
    • I was reminded of the System.Convert class, which does all of the same conversions that the various type-specific ToXxx and Parse methods do, but puts them all in one place.
       
    • There’s another use for the private interface method implementation syntax in C#:
      class Enum : IEnumerator {
        object IEnumerator.Current { get { return this.foo; } }
        ...
      }
      This syntax hides an interface method from general use unless you cast to the interface base class:
      Enum enum = new Enum();
      object obj1 = enum.Current(); // compile-time error
      object obj2 = (IEnumerator)enum.Current(); // this works

      The thing I never thought of that this enables is that it lets you override based on return type, which isn’t normally allowed in C#:
      class Enum : IEnumerator {
        object IEnumerator.Current { get { return this.foo; }
      Foo Current { get { return this.foo; } } ... }

      This private method implementation syntax lets you return the generic type as part of the interface implementation so that you can plug into standard idioms, e.g. foreach, but a more specific type for users of the type directly, saving the cast:

      Enum enum2 = new Enum();
      Foo foo1 = (Foo)((IEnumerator)enum.Current());
      Foo foo2 = enum.Current(); // no cast required
      This will be less interesting as generics take over, but still, it’s a useful trick.
       
    • DateTime is always assumed to represent local time, so if you convert to Universal time twice, you’ll change the value each time.
       
    • Since it’s possible to cast any number to an enum value, e.g. TrueFalseEnum tfe = (TrueFalseEnum)42, make sure to always check that an enum is a legal value. Theoretically this is a pain, but in practice, I tend to check enum values with switch statements, making the default case the error case, so it’s good to know that my code does the right thing.
       
    • The Threading.Interlocked class.
       
    • Jim Miller has way more birthdays than we do. : )
       
    • Jeff Richter agrees with me that the ThreadStart delegate needs an object parameter.
       
    • I should be using CompareInfo instead of ToLower for case-insensitive comparisons (although they don’t show how):
      using System.Globalization;
      using System.Threading;
      ...
      CompareInfo compare = Thread.CurrentThread.CurrentCulture.CompareInfo;
      if( compare.Compare("foo", "FOO", CompareOptions.IgnoreCase) == 0 ) {
      Console.WriteLine("the same"); }

    If I can get that much out of just the annotations, imagine what I could learn if I read the whole thing. : )

    Discuss

    April 6, 2004 spout

    Filling in Missing Computer Science Knowledge

    Here. The one where I ask a professor friend how to help my wayward, non-computer scientist friends up to speed on the foundation of our industry (which would be computer science, not greed : ).
    April 6, 2004 spout

    Filling In Missing Computer Science Knowledge

    Tuesday, April 6, 2004

    Sometimes I get emails from folks that don’t have a formal computer science knowledge and want the benefits of one w/o actually going back to college. Since I was disappointed in my own formal education (despite going on to better” my BS in Computer Science with an MS), I can understand this desire.

    My first thought was the MIT Open Courseware, which has a full course of computer science curriculum. However, while the course material is all there, unless there are officially sanctioned forums for each course, there’s really no place to ask questions even of fellow students.

    After thinking on it for a while, I thought I’d go right to my favorite source. Prof. Joe Hummel is a professor of computer science at Lake Forest College in Illinois and has spent a lot of time thinking about how to fill in missing CS knowledge in professional programmers (VB programmers, mostly) at DevelopMentor. Here’s what he said:

    For starters, I’d recommend a book by Brookshear called “Computer Science: an overview” (8th edition). It’s written for those new to CS, but introduces lots of nice CS concepts like algorithm analysis, theory of computation (e.g. that some problems cannot be solved!), and other things like OS, networks, DBs, etc. It’s a great starter book. After that, I’d recommend books on data structures and algorithms. After that, it really depends on what his interests are: Programming Languages? Theory? Operating Systems? Distributed Systems? Software Eng? AI?

    Discuss

    April 4, 2004 spout

    Welcome to 04/04/04

    That is all.
    April 3, 2004 spout

    The Future Is eBay for Services

    Here.

    With the bottom line more and more important, the era of company loyalty” and guaranteed employment” is long over. RentACoder.com takes this to it’s logical conclusion, matching vendors with jobs and money with qualified folks with the time and willingness to do the job at the asking price. As connectedness improves, the importance of being on site declines, the perfect market for services will develop, giving us eBay for employment.

    April 1, 2004 spout

    Let There By Light In The Darkness

    Here. The one where it’s late, I’m on my 3rd Diet Coke (I never use caffine), I stumble onto a piece of writing I like but have never published and decide what the hell
    April 1, 2004 spout

    Tune into .NET Rocks Live Tomorrow, 9am PST

    On tomorrow’s .NET Rocks Live, Rory and I will be interviewing Tony Bain, taking callers and, if tonight’s sound test is any indication, talking a lot of smack. Tune in here or here from 9am to 11am PST, Friday, 4/2.
    April 1, 2004 spout

    Let There Be Light In The Darkness

    Thursday, April 1, 2004

    I wrote this at the beginning of 2002 while channeling my energies into the Windows Forms book. I never published it, but I liked it (and I’m in writer avoidance mode as day #2 past my due date rolls by), so I thought I’d share it:

    The Dark Ages, a period of five centuries beginning in 5 AD, marked a time of intellectual darkness and barbarity. A ruling feudal class kept a firm grip on their over-worked peasants in small enclaves eking out a meager living from the soil. Only lonely, isolated monks were able to record knowledge using primitive tools to painstakingly inscribing it into hand-crafted volumes, each unique and each unavailable to their fellow man. Only pilgrims and adventures, willing to endure long journeys and brave many hardships, had the chance of obtaining this secret knowledge. Finally, the Renaissance, brought on by the spread of knowledge in approachable formats using inventions like the printing press, was able to rejuvenate a weary world and bring about a period of intellectual growth and achievement that continues to this day (interrupted only briefly by the Reagan years).
    The Browser Age, a period of ten years beginning in 1991, marked a time of user-interface limitations and lowest common denominators. A ruling standards body kept a firm grip on their over-worked participating members in companies large and small, eking out a meager living from IPO wind-falls. Only lonely, isolated web masters were able to record knowledge, using primitive HTML to painstakingly code it into hand-crafted pages, each unique and each unavailable to their fellow programmers. Only Perl programmers and regular expressionists, willing to parse tangled byte streams and scrape many screens, had the chance of separating the data from the presentation. Finally, .NET, brought on by the spread of the information available programmatically to rich client applications using inventions like Web Services and Windows Forms [ed: and soon, Avalon], was able to rejuvenate a weary software world and bring about a period of productivity growth and achievement that will continue until long after we retire (interrupted only briefly by the Internet Bubble burst).

    Discuss

    March 30, 2004 spout

    Buy My Comic Book Collection

    Here.

    I’ve had 2600 comic books bagged and boxed in my garage since I’ve had a garage. These are comics that I collected as a kid and had always planned on turning into Benjamins. However, when doing a massive do-it-yourself Clean Sweep on my entire house, I figured it was time. But I couldn’t sell them to a local comic shop, as they can only give me a tiny fraction of their worth, so I immediately thought about eBay. And that’s why the comics have been sitting in my garage for so long. The mere thought of cataloging, assessing, photoing and posting all 2600, even in reasonable groups, was way more work than I was willing to do. And so they sat.

    That is, until I was driving with a pack of MSLearning folks on our way to lunch recently in Redmond and came across a Bidadoo truck. I’d never heard of it, but they explained it as a new startup dedicated to taking your stuff, particularly your collections, and doing all of the grunt work to get it sold on eBay, including bringing in experts to help them figure out exactly what’s what. So I spent 5 hours putting making a list of what was in my 9 long comic boxes, hauled them up to their showroom” in Redmond and now they’re getting ready to put my entire comic collection on eBay for 33% off to top. They’ve got 34 of my X-Menu comics up on eBay in 6 bundles now and they’ll be doing the rest directly.

    So, in summary, buy my comics and check out Bidadoo (if for no other reason than their fun name — I’m a sucker for double meanings : ).

    March 28, 2004 spout

    Fun Meeting with a Longhorn UX Guy Last Week

    Here.

    He said, Do you think we should support RSS in Longhorn?”

    I said, Well, there’s that RSS Tile…”

    He said, Yeah, but shouldn’t we do more?”

    I said, Well, sure, what we should really do is blah, but we’d also need foo to make that work.”

    He said, Right. What if we did quuz to enable foo?”

    I said, Wow. That’d be cool. Can you actually make that happen?”

    He said, Yep.”

    Whoa.

    March 26, 2004 spout

    Time-Shifting Radio?

    I was reading Paul Vick, who agrees with Carl Franklin that the This American Life” weekly NPR radio program rocks (I’m paraphrasing : ). In addition, I really like Garrison Keillor, Whad’Ya Know?” and a bunch of the financial programs on AM radio. However, unlike my time-shifting TV appliance, I don’t have any good way to time-shift radio (the AM stuff is rife with commercials, so really needs a fast-forward feature). Anyone got something for me? Ideally, I’d be able to dump programs to an MP3 player for convenient playback.
    March 25, 2004 spout

    Checking Spec. Compliance at Build Time

    March 25, 2004 spout

    What Every Conference Room Should Be Like

    I want all of the MS conference rooms to be like this one so that they can broadcast high quality audio and video to me at my house. I especially want a RingCam.
    March 25, 2004 spout

    Checking Spec. Compliance at Build Time

    Checking Spec. Compliance at Build Time

    Thursday, March 25th, 2004

    Even though Ward Cunningham and I have been living only 4 miles away from each other for some years, I really didn’t know that he lived in in the same state til he sold his soul hired on at Microsoft. Since then, we’ve been meeting at a local Starbucks on a regular basis to shoot the shit in a very DevelopMentor/Tektronix-like way, i.e. ramble on about whatever til we hit on something fun to try. In one of those meetings, we were talking about requirements for a web services API that I’m working on and he took us off on what I thought was a tangent, but turn out to be very cool.

    Before Ward set me straight, I thought that Test-Driven Development (TDD) was when I built a little console app to test my APIs. I routinely do this before I write an API so that I can imagine what I wish I had to program against without being encumbered with an existing implementation. Then, I run my console app(s) afterwards for testing and regression testing, but only sporadically. I knew that NAnt let me run these tests into my build process, but since I’m a VS.NET guy and I haven’t done the NAnt/VS.NET integration work that I know I should do, I haven’t done as much with this as I knew I should be. Plus, as it was only me, it didn’t seem like such a big deal.

    What makes TDD a big deal, however, is when you’ve got a team of folks. Of course, every developer is expected to check in tests for their stuff and those would be run as part of the nightly build. But that’s not the cool part. The cool part is when another developer adopts my API and puts his tests into my build process. When someone adopts an API that I build, then make certain assumptions about how it works and what side effects they can expect. TDD lets Joe R. Programmer encode his assumptions as unit test code so that when I break his assumptions during an iteration of my API, I see it as part of my compiler output.

    Until I get a build error, I don’t need to know or care about Joe’s test. But when I do, I look at Joe’s unit test code and decide whether he was right. If Joe’s unit test is valid, I need to either fix my breaking change or be prepared to help everyone that uses my API to rewrite and redeploy their code. If Joe’s unit test isn’t valid, I’ve got to help Joe fix his code and prepare to help everyone else that made invalid” use of my API to begin with. The very nicest things about TDD is that fixing breaking changes” becomes the least painful thing to do!

    This is huge. In fact, it’s so huge, that MS should provide an end point for people to submit their own unit tests against our Windows and .NET APIs so that when we make breaking changes, we can either fix them or know the proportion of folks affected by this breaking change.

    Anyway, when Ward told me this, my eyes were opened and I was changed. But he was just getting warmed up. After showing me the power of formal unit tests across a team, he then went on to describe the power of putting the unit tests right into specifications themselves. For example, imagine a table in a spec laying out a series of inputs and expected outputs:

    Now imagine a parser that could read through this table and execute the code being specified, checking expected output against actual output, lighting matching output green and mismatched output red:

    This scheme lets designers define the spec long before it’s implemented and then check it’s progress as it’s implemented. Likewise, a spec itself can be put into the build process as another set of unit tests. Plus, the readability and maintainability of specs in this format is much improved and very much more accessible then unit test code.

    But wait, there’s more. This isn’t some pipe dream. Ward has a .NET implementation of it called the FIT Framework on the web and yesterday he and I played around with it in my kitchen. Our goal was to take Ward’s .NET FIT implementation and add support to it for SOAP endpoints. We started with the ISBN Information web service that we found on xmethods.org and defined the following spec:

    We specified the name of the FIT fixture” (which is the class that implements the tests in FIT), as well as the WSDL URL, the service type and method we’d like to test, the arguments we’d like to test and the results we expected to get. We mixed in some of Christian Weyer’s Dynamic Web Services Proxy and we got this:

    Notice that we’re not quite done yet, i.e. nothing is green and we’re not reaching into the retrieved XML and pulling out the Author, Publisher, etc. Still, while FIT requires a matching piece of code for every spec, we dropped a bit more metadata into the tables for the SOAP version, leveraged WSDL and have narrowed the project to a single piece of generic code for any WSDL-described SOAP endpoint (so long as Christian’s code can parse it).

    Our plan is to finish up the extensions to FIT for SOAP and to put it into practice on the SOAP API that I’m currently designing and even to push it into our build process if I can. Further, I’d like to build another FIT fixture that, instead of executing the tests, generates sample code to demonstrate example usage and expected output (including expected errors). Rest assured, when we get it working well enough for public consumption, Ward and I will publish the SOAP extensions for your enjoyment.

    But don’t wait for that! You can do TDD with custom actions in VS.NET 2003 and with the FIT Framework today!

    Discuss

    March 23, 2004 spout

    The Next Big Leap in “Programming”

    Tonights Portland Nerd Dinner was a barn-burner. Not only did we have the typical geek banter and laughter, but we spend some time on the question I posed the other day about what should replace character stream-based programming.

    The problem is that all of the hand-crafting of solutions doesn’t scale. The answer was posed by a fellow nerd who, who pointed out that we’ve already got a model for self-organizing, self-evolving, self-maintaining systems: biology. God didn’t hand code humans and zebras and platypi — he defined a class and instance encoding method (DNA) and an environment to serve as the runtime (Earth) and let us interact with and improve ourselves and our environment over time to solve the problem. What’s the problem? What species survives best on this planet. So far, we’re the winners, but we’ll see what happens at the next ice age or when the next asteroid hits.

    .NET and Longhorn have provided us a big step forward in terms of hand-crafting computer-based solutions to our problems, but only self-organizing, self-evolving, self-repairing systems can really scale. I know that IBM has done some work in this area with their automonic computing, but my personal favorite work on this topic is Genetic Programming III by John Koza. Anyone for a Genetic Algorithm Runtime (GAR)?

    March 20, 2004 spout

    Programming Stinks

    As much as I love writing code, I realized long ago that it’s really the act of bending my computer to my will that I really love. Programming’s just the only way to really do that. After a few decades, you’d have thought we’d have come up with something better. Our industry’s pioneers agree that programming is holding us back, but don’t really know what we’ll use to replace it. Ideas?

    March 19, 2004 spout

    Review: Hell House

    NetFlix brought Hell House” to my house the other day and I just finished watching it (in fact, the credits are still rolling).

    Hell House is the name of a specific kind of haunted house” exhibit that some churches run every year at Halloween. This movie is a documentary of the church that originated the practice and is in it’s 10th year, having had 75,000 guests over that period. The hook is that the church puts on little mini-plays showing real-life horrors, e.g. domestic abuse, rape, murder, drunk driving, abortion and, sin-of-sins, homosexuality (which doesn’t hurt anyone, of course, but gets them on the news every year).

    At the end of each tour through the Hell House scenes is a room with a member of the church applying age old used car salesman techniques to pressure people into converting or recommitting to the church. There success rate is 20%, which is why hundreds of churches around the country have adopted this practice.

    It amazes me that such a thing actually happens. The techniques they use reminds me of a cross between the horror movies we was made to watch in driver’s ed and the pressure our society puts on our children to believe in Santa. Don’t cults get into trouble for this kind of thing? Truth is truly stranger than fiction.

    March 19, 2004 spout

    Have Some of WinFS Today

    I have absolutely fallen in love with X1. I don’t search my email, attachments or file system anymore; I just type a few character into filter fields until the results have narrowed enough to show me what I was looking for. This is but a small part of what WinFS is going to enabled and it already saves me hours/month. Highly recommended.
    March 18, 2004 spout

    Quick Review of 4 California Theme Parks

    Just flew in from California… and boy are my arms tired!

    We did 4 California theme parks in 4 days and here’s what I thought:

    1. Magic Mountain: great rides, but even before spring break, the best rides had waits of 2-3 hours, so we didn’t get to go on them (although Scream rocked). Also, the price gouging was gratuitous, including $3 for a soda, $.87 for a packet of ranch dressing and extra money for a bunch of the activities after paying to get into the park, e.g. virtual reality ride and rock climbing. Over all, thumbs down.
    2. Disney’s California Adventure: Surprisingly good. The production values are high, even making the waiting as fun as possible, just like in every Disney park. The Bugs Life it’s hard to be a bug” show was hilarious and the Soarin’ Over California ride took my breath away. Plus, all of the rides that had analogs in Magic Mountain were better at California Adventure. This was the winner of the trip. Thumbs up.
    3. San Diego Sea World: The day was a little overcast and their major ride wasn’t running, but the shows were fun and it was a nice, mellow experience after two intense days. Also, the food was noticeably better than the other parks (although $50 on lunch for 4 was a bit much). More on the meal front: I called Don on the road between Sea World and the hotel in LA and he recommended In-n-Out Burger, which none of us had ever had before. My oldest son mentioned that meal more than Sea World, so both get a thumbs up.
    4. Disneyland: This park needs an overhaul. Their one really good ride, Indiana Jones, was closed and all of the rest of the rides were only interesting for the nostalgia factor (plus they broke down a lot). When I brought my 4-5 year olds here 4 years ago, it was really great to see the place again through their eyes. Now that they’re older, the place holds no attraction for me. Thumbs down.

    Over all the trip was a thumbs up if for no other reason than I was without my laptop for 4 days and didn’t really miss it. Then I come home to find that you dang kids have TP’d my blog! : )

    March 11, 2004 spout

    Avoid the GAC

    Thursday, March 11th, 2004

    The .NET Global Assembly Cache (GAC) is a misunderstood and misused beast. For all intents and purposes, it provides what COM and windows\system32 do, i.e. a machine-wide place to drop shared DLLs. Of course, the problems with sharing DLLs in a machine-wide spot is that it leads to a set of well-known problems collectively called DLL Hell.” There are many problems, but the biggest is that when a shared DLL is updated, you’re really updating an unknown set of applications. If the set of applications is unknown, how can you possible test them before making this change? And if you can’t test them, you’re likely to break them. What this boils down to is that any of the shared spots for updates, whether it’s a COM CLSID, windows\system32 or the GAC, are dangerous and should be avoided. And this is why the preferred .NET deployment scenario is xcopy deployment,” i.e. having your own private copy of each DLL that you test and deploy with the rest of your application.

    Aha!” you say. “The GAC supports multiple version of an assembly! When a foo.dll is updated to v1.1, v1.0 sits right along side of it so that your app *doesn’t* break!” Of course, that’s absolutely true. But if that’s the case, why do you care? I mean, if there’s a new assembly available but your app isn’t picking it up, what difference does it make?

    Aha again!, you say. I can put a publisher policy into the GAC along with my assembly so that apps *are* updated automatically!” That’s true, too, but now, like any of the machine-wide code replacement strategies of old, you’re on the hook for an awesome responsibility: making sure that as close to 0% of apps, known to you or not, don’t break. This is an awesome responsibility and one that takes MS hundreds of man-years at each new release of the .NET Framework. And even with those hundreds of man-years of testing, we still don’t always get it right. If this is a testing responsibility that you’re willing to live with, I admire you. Personally, I don’t have the moral fortitude to shoulder this burden. For example, we do sign genghis.dll when we ship it so that folks can put it into the GAC if they want, but we make no promise of backwards compatibility between versions and therefore we do not ship publisher policy DLLs. Instead, we expect folks to use xcopy deployment and catch the problems at compile-time and test-time.

    So, if the GAC represents such a massive burden, why do we even have it? It’s for two things that I’ve been able to identify:

    1. Fixing critical bugs without touching the affected apps (and without breaking anything!)

    2. Sharing types at run-time between assemblies deployed separately

    #1 is what you get when you install Windows hot fixes and service packs via Windows Update. A ton of design, implementation and testing time is spent to make sure that existing code won’t break before shipping these fixes.

    #2 is needed if you’re going to be sharing types between assemblies that you can’t deploy as a group but absolutely must keep to the same version of things. .NET Remoting peers are in this category, but only if they’re deployed in separate directories so that they won’t share the same set of types available via xcopy deployment. However, if .NET Remoting peers are deployed on difference machines, the GAC won’t help you anyway as you’ll be manually insuring the types are the same across machines. BTW, the responsibility of keeping multiple machines to the same set of types (and the same framework for hosting those types) spawned an entirely new way to talk between machines, i.e. web services, so .NET Remoting itself is something to avoid unless you can administer both ends of the pipe for simultaneous updates.

    Another scenario that fits into #2 is the Primary Interop Assembly (PIA). A PIA is a COM interop assembly that’s been pre-generated and dropped into the GAC so that everyone that adds a reference in VS.NET to mso.dll (the COM library for Office) gets office.dll instead (the .NET Office PIA). That way, everyone can talk to the same set of types instead of everyone getting their own incompatible interop types generated on the fly. However, PIAs are primarily a way to make sure that VS.NET has a central place to pick up the shared types without regenerating new incompatible types.

    Notice that Saving hard drive space” wasn’t on my list of reasons to use the GAC. I just purchased a 60GB, 7200RPM hard drive for my laptop for a measly coupla hundred bucks. I don’t want to hear about you jeopardizing the reliability of the applications on my machine to save a tiny percentage of that space. Hell, when I buy a HD, I give 50% of it over to apps anyway, so help yourself and keep my apps running by avoiding any machine-wide space for updating shared DLLs, including the GAC! Thanks.

    Discuss (did I miss any reasons to use the GAC?)

    March 10, 2004 spout writing

    WinForms Programming in C# 3rd Printing Ships

    Here.

    I find it unbelievable that after umpteen books, I finally seem to have blended quality with quantity as the C# version of my WinForms book enters it’s 3rd printing after only 8 months in publication. Wahoo!

    March 9, 2004 spout

    Study: We’re Eating Ourselves to Death

    Here. Ouch. I resemble that remark
    March 8, 2004 spout

    Putting the Fun Back In Programming

    I know that I’m no longer untainted because I work in the big house, but I just don’t get this. Do developers really want to build the same thing over and over, project to project, app to app or do they want to spend their time building cool, new stuff? Is .NET or Whidbey or Longhorn any different from continuing the foundation that we’ve built before? Does anyone really miss building their own file system or declarative content flow or toolbar? Will anyone miss building their own animation, object serialization or secure communications framework? I mean, building these infrastructure pieces is fun, but even more fun is pulling these pieces together to build something that’s never been built before.
    March 2, 2004 spout

    Living Two Lives

    Here.

    I would say that I’m really living two lives. The first is what you see and today it’s very boring as I’m sitting very still looking at a 14″ LCD panel all day long making almost no noise. When my family comes home, that’ll be more outwardly interesting, but it skips the entire reality of what I’m doing while I live that second life inside the machine.

    In the upcoming documentary, Almost Real, Ann Shin explores folks living the extreme virtual life, e.g. monks leading prayer and SM folks doing their thing, all over the Internet (in case you need it, my safety word is yellow” : ). These people are living very real virtual lives, often more real than there normal lives. Is that OK? Is that unnatural? I think it *is* OK. Why should the virtual life inside of our creations be any less valued than our so-called normal” life (which was just created by the Overlords to test their simulation machine : ).

    Anyway, it all boils down to one thing: impact. Are you impacted by the things that happen in the virtual world? I know I am. Sometimes it’s negative and sometimes it’s positive, but it can be just as strong as the impact I feel in my normal” life. For me, most of my most meaningful impact happens in the real” world, but as technology advances, I think more and more of that balance will tip, whether that’s OK with you or not.

    February 29, 2004 spout writing

    Suggestions for WinForms Programming 2/e

    Here.

    My co-author for the 2nd edition of Windows Forms Programming, Michael Weinhardt, doesn’t have enough to do to with the new features in Whidbey or all of the stuff that I wished that I added to the 1st edition but didn’t. No, he wants more, so he asked me to ask you nice folks what you’d like to see.

    The goal of the 2/e edition of the book is to cover the features of WinForms Whidbey as well as related .NET features that are important to WinForms programmers. Also, we’d like to continue to encapsulate WinForms community best practices. What did I miss in either of these categories that you’d like to see in the 2/e?

    February 26, 2004 spout

    Same-Sex Marriages *Should* Be Allowed

    Being from the Midwest (and big and dumb-looking besides), most folks assume I’m a homophobic. As it turns out, I’ve known a few homosexuals in my life, but not very many. Or rather, I suspect that I know a lot more of them then I recognize, but I never think about it. I never think about it because it doesn’t matter.

    Real love is rare enough that people should be able to love and live and *marry* whoever the hell they want to and I resent a government that thinks that they get to decide who’s love counts and who’s love doesn’t count (although I do support parents being able to decide whether their minor children should be able to marry).

    So, I’m with Robert Scoble on this one: Homosexual couples should be treated by society the same as heterosexual couples.”

    BTW, you can save yourself the trouble of responding if you’re going to say anything other than +1”, as I won’t be responding to any kind of negative comments on this issue. There is literally nothing you can say to change my mind, so don’t even try.

    February 24, 2004 spout

    Of Mixed Career Minds

    Here. The one where Microsoft’s up-coming Mid-Year Discussion and a late night IM chat with Lutz Roeder makes me introspective.
    February 24, 2004 spout

    Of Mixed Career Minds

    Tuesday, February 24th, 2004

    Don and I have an ongoing debate — whether everyone was put on this planet for one purpose or whether a person gets to choose their path. This all started back in the middle of the bubble where we thought that we were so smart that we could take our success in training and turn our minds to anything we chose. We thought we could be anything, but used to talk most about politics (and Don even promised to get me elected as mayor of Beaverton) and religion (I’d like to get in on the ground floor of one of those free love” cults : ).

    Of course, the bubble burst, giving of us perspective on just what part of the success was us and what part was the go-go economy. Now, most of us that used to have those conversations work at Microsoft as a place to keep doing fun work without traveling to globe trying to keep up our old standards of living. These days Don talks about all of us having a specific place in the world and that he’s pretty darn sure that he’s found his (and you should see the guy; he’s in there, fighting for what he thinks is best for the platform and building quite an impressive reputation base to extend his influence wider and wider). He’s also of a firm mind that I’ve found my place and that I should be a s/w guy of some kind for the rest of my life.

    So, I’m of two minds. On the one hand, I’m happy with the spot I’ve carved for myself in the Windows developer community and I think that there are plenty of fun s/w challenges to meet. Plus, my resume helps me get good gigs.

    On the other hand, I’m not a big fan of being predestined” to anything. I don’t like the idea that fate or even my inborn predilections decides what I do and don’t do in my life. I also still think that I’m smart enough and flexible enough that I could start another career. My latest fantasies revolve around moving into a place that my wife could afford on her nurse’s salary while I write novels and spend my afternoons filling the public education gap my kids are experiencing. Previous fantasies include getting my jurist doctor at Harvard and becoming a courtroom prosecutor on my way to being a judge (I always know what’s best for everyone : ). Also, the equities market calls my name and I’ve got a little property investment business on the side that could use more attention. So, I’ve got plenty of things I’d like to dig into before I die that have nothing whatever to do with my background or training. In fact, I’ve got so many other things to try that Lutz was making fun of me just last night, Haven’t you noticed that everyone in 2004 wants a new career?” Still, should I stick with what’s safe because I may never achieve in other industries what I’ve achieved in this one or should I roll the dice and takes my chances, knowing that life is pretty short to spend it all doing the safe, comfortable thing?

    Don’t get me wrong; I’m not going anywhere just yet. I’ve started this Longhorn thing and I’ve got lots more to do there before I’m done. But I do think about hitting the reset button some day and starting over again from scratch. What do you guys think? Have any of you hit the reset button and ended up reading this post? Has anyone tried to escape from this industry only to end up back here and are happy they did? Does anything think that my hubris is going to get me into serious trouble? : )

    Discuss

    February 22, 2004 spout writing

    Adding Ref-Counting to Rotor

    Here.

    Well, I can’t put it off any longer. I wanted to wait til Chris Tavares and I were able to figure out what the problem was, but after months of help from the Compuware guys using a complementary hunk of their latest and greatest profiling software, we’re no closer to finding out what causes the massive slow-down in compiling Rotor when we add our ref-counting implementation to it. The problem, of course, is that if we can’t figure out what the problem is, we can’t optimize our implementation to fix it.

    The good news is that once we wait for the compilation to complete, the hybrid ref-counting (for deterministic resource management) + ref-tracking (for memory management) programming model is a thing of beauty. No longer do you have to write Dispose methods or even call Dispose methods, because our updated JITter takes care of it for you.

    However, because compilation of Rotor makes such nice use as a managed test of our implementation and because it currently sucks butt perf-wise, we’re stuck. If you’re into the low-level guts and you’ve got the time (that’s what Chris and I ran out of), we’d love your feedback on our perf problems. Who knows, if we can make it efficient, MS might stick it into the next version of the CLR… (but I don’t work for that team, so don’t hold me to that : ).

    BTW, I’d like to really thank Chris Tavares for his implementation work. It was my idea and my funding, but he did all the work up to and including several drafts of the paper. All I did was complain. Thanks, Chris, and I hope you’re enjoying your child, which is a far better way to spend your free time than implementing my cockamamie ideas in Rotor.

    BTW2, I’d like to take this opportunity to publicly apologize to Brian Harry. It is definitely the case that ref-counting *can* be added to .NET but I have in no way shown that it *should* be done. Thanks for letting me try, though. : )

    February 5, 2004 spout

    Severe Beating Shown, CBS Shocked/FCC Investigates

    Or rather, that’s the headline I wish I could post. However, instead of CBS and the FCC getting freaked out about the insane amount of severe violence on TV, available to our children any time of the day or night, they’re worried about 3 seconds of breast. Idiots.

    February 1, 2004 spout

    On Behalf of Software Engineers, I’m Sorry

    Here. The one where an hour of phone support with my step-mom causes me to feel embarrassed about what we put normal humans through to use our software.
    February 1, 2004 spout

    On Behalf of Software Engineers, I’m Sorry

    Sunday, February 1st, 2004

    I just got off the phone with my step-mother and boy are my arms tired. She way trying to do a mail merge. I told her about a month ago put data into an Excel spreadsheet in a data-like format (and I sent her an example spreadsheet to start from). Then, after entering the data into her spreadsheet, I recommended to her that she choose Mail Merge from the Tools menu in Word and she’d be home free.

    Of course, she wasn’t. For example, after choosing her Excel spreadsheet, she was asked if she wanted to use first name, Sheet1$, Sheet2$ or Sheet3$ as her data. Having zero idea what SheetN$ was, she chose something vaguely human-sounding, which was exactly what she didn’t want, then was frustrated when her data didn’t come up. Later, after going away to buy hundreds of dollars worth of books (none of them telling her how to do Mail Merge using words that she could understand, btw), she opened up her document and was presented with a dialog box asking whether it was OK to run an SQL statement. What’s SQL?” she asked. Nothing that any normal human should ever have to see,” I replied, growing more embarrassed about the state of the output of my industry by the minute.

    Later, when we got the data working with the merge (Remote Assistance, even over a slow phone line to Fargo, ND, works *very* well, once I figured out how to take control of her computer [answer: Take Control in the upper left]), she turned her attention to reformatting her letter. For example, she’d pasted some text from the web, which, by default, left this weird web formatting instead of making it look like the rest of her letter, so the styles were very different. Luckily, selecting the text and turning off the bold was enough, otherwise I’d have either had to reformat her entire letter or talk her through doing it. And how did I tell her to turn off the bold? By selecting the text and pressing Ctrl+B? Why did I tell her that? Because Word had taken the Bold toolbar icon off the toolbar and I couldn’t imagine describing to her what the little chevron was for so that she could get it back.

    I’ve listed only a small percentage of issues I worked through with her, but lest you think otherwise, my step-mom is no idiot. She’s a nurse anesthetist, so has to keep tons of details in her head all day long or people die. Also, she’s trained her dogs to win first place obstacle courses in competitions around the country, one of whom was said to be untrainable. But when it came to Mail Merge, she worked for three weekends straight before giving up and calling me. It’s clear to me that for anything but the simplest of tasks that computers are not even close to ready for normal humans. On behalf of the software engineers everywhere, I’d like to apologize to Charlene (my step-mom) and the rest of the normal humans everything who are merely trying to make computers actually work. Hopefully Longhorn will fix this problem, but until then, I recommended that she return her computer to the manufacturer and get herself a Nintendo. After working through this with her for over an hour, I was only half kidding.

    Discuss

    January 31, 2004 spout

    What Would You Save If Your House Was On Fire?

    Here. The one where I spend a peaceful Saturday morning contemplating my life’s possessions.
    January 31, 2004 spout

    What Would You Save If Your House Was On Fire?

    What Would You Save If Your House Was On Fire?

    Saturday, January 31, 2004

    On a recent thread on my favorite mailing list ever, Jon Kale answers the question what would you save if your house was on fire,” which triggered my own thoughts along this line.

    Assuming I’ve already made sure that the humans and the pets were out of the house, I’d make sure to grab my Omega X-33 (purchased during the bubble, of course), but since I go almost nowhere without it, it’s not likely to be burned up w/o its owner.

    Also assuming I had a set of back-up CDs/DVDs for the last year in my safety deposit box (which I don’t have right now… please excuse the pause while I purchase a DVD burner… OK, $155 got me a top-reviewed DVD+R/DVD+RW drive with 30 blank DVD+RW disks delivered), the thing I would most miss is my book collection. The computer books could be replaced on demand, but my collection of just-for-fun books has literally taken a lifetime to collect and cull down to just things that I really love (click on the picture to get a closer look).

    Often, when I want something comfortable to read, I’ll scan the shelves til something pops out at me and re-read it. Also, when friends & family come to town, I often take them to Powell’s City of Books and we play the Top 5 Books of All Time” game, purchasing what they point out for me and writing their name in the book so that when I read it, I can talk about it with the recommender (man, I’ve gotten some wacky books that way…). Losing those books, especially the ones I haven’t gotten to yet, would really hurt.

    On the other hand, because you never know when you’re going to need to jam, my goal is to fit my entire set of positions on a memory hypercube (or whatever). But how do I back up the books when the atoms themselves are so satisfying? I mean, how can I recapture the feel of my leather-bound The Complete Frank Miller Batman, the back-pocket-worn The Silicon Mage, my copy of The Hobbit and The Lord of The Rings signed by my mother when I received my Master’s Degree because she read them to me when I was 10 or the ancient copy of The Complete Sherlock Holmes given to me by my father and to him by his father?

    But even if I wanted a lossy digital backup of my books, how do I do it? I mean, I can scan all of my books and graphic novels, but only by destroying them. Why haven’t books, which are produced in digital form, made the transition to electronic availability? Are we waiting for the Tablet PC to get to a point of ubiquity?

    So, in summary:

    • How do I back up my favorite atoms?
    • What would you save if your house was on fire (after humans and pets)?

    Discuss

    January 30, 2004 spout

    MS Blogging About Longhorn 14% of the Time

    Here. Just following up again on When In Doubt, Ignore Longhorn to point out an interesting survey of MS bloggers by David Weller. Apparently, out of 56 recent blog entries by Microsoft employees, 8 were related to Longhorn. That’s about 14%, which is a little higher than the 10% that I argued for, but I bet if you took out the ones from me (whose job it is to talk about Longhorn), we’d be closer. : )
    January 30, 2004 spout

    Betting on Longhorn-Only?

    Here. The one where I address some specifics about what amout of effort you should be putting into Longhorn right now.
    January 30, 2004 spout

    Betting on Longhorn-Only?

    Friday, January 30th, 2004

    In response to my post yesterday (When In Doubt, Ignore Longhorn), Shaun asked whether he should be targeting Longhorn-only right now:

    [ed: the following has been edited to remove identifying remarks at Shaun’s request]

    Thanks for all the great posts and community participation over the past year. Your recent ‘Ignore Longhorn’ post alarmed me a bit. I hope that was not born from some aspect of it being pushed past 2006.

    Anyway, I know you are busy, so I will get to the point. We are mid-sized, established s/w company, and a Microsoft shop to the core (SQL Server, Analysis Services, VB, we embed VBA etc…). I am facing a huge decision regarding building our next gen app architecture. We need to ship in 1H 2006, and (IMO) we need to target rich and reach, so Longhorn is on my list of possible directions along with some ASP.NET 2.0 / ClickOnce combination.

    I am enjoying working with Longhorn (XAML in particular), but I’m having a hard time shaking the feeling that I am taking too much of a gamble if I go Longhorn-Only, but some of the aspects are just so compelling. On the other hand, I’d hate to make a huge 2-3 year dev investment in ASP.NET only to ship something in 2006 that is not revolutionary/differentiated. I firmly believe our existing 3 million lines of solid COM code has plenty of life in it too.

    Any insight or advice you might have would be greatly appreciated. I know it is probably difficult without understanding our company or market, but maybe some general advice to someone who is targeting a 2006 release. I guess my other worry surrounds the Longhorn adoption rate, but obviously none of us can predict that!

    Here was my answer:

    Shaun, if you think that Longhorn is going to help you build a differentiated product that’ll help you be more successful, then great! That’s why we’re building it.

    On the other hand, if I were you, I wouldn’t put all my money into a single investment. Instead, I’d use some diversification strategies like you would with your financial portfolio. At this point, the ship date of Longhorn, along with the list of features it will support when it ships, is merely speculative. I won’t put more than 10% of my available investment time/money/staff into it, leaving the rest of my portfolio for getting the most I can from my existing and/or near future technologies.

    Specifically, you ask about ASP.NET 2.0 and Windows Forms/ClickOnce. Both of those technologies rock. ASP.NET is going to be the way to build web sites and services for the next decade at least, even after Longhorn’s been out for years, since it has the reach across our existing OSes and competing OSes. Plus, ASP.NET 2.0 has a dizzying list of new features that people will spend years just taking full advantage of. For reach, you can’t make a better investment than ASP.NET.

    For rich, on the other hand, Windows Forms + ClickOnce is a killer combo. The updated Windows Forms in Whidbey along provides some amazing new capabilities, not the least of which is the new GridView, which you can read about in Michael’s new Wonders of Windows Forms piece. Also, look for a What’s New in Whidbey Windows Forms” piece in MSDN Magazine RSN. ClickOnce (which you can learn more about in Duncan’s ClickOnce piece and in Jamie’s ClickOnce talk) is the way to deploy rich clients in Whidbey and in Longhorn, so digging into that technology is a very good idea.

    As time goes on and Longhorn becomes a more solid development investment, you should put more of your portfolio into it. If you’ve got plenty of time/money/staff, than 10% now could mean an entire pilot project in Longhorn, which would be a good thing. But if you’ve got limited amounts of time/money/staff that you really need to yield a dividend now, Longhorn is dangerous for you and should only be something you dabble with at this point.

    For you specifically, a mid-sized company, you should carve off a chunk of your dev. staff to build a pilot in Longhorn. This lets you dabble while the rest of your staff is busy with existing and near future technologies. And as you dabble and notice things that don’t work at all as you expect or need, let us know! Operators are standing by to take your calls! We’re at a stage in our development process where we’re able to give much more attention to the fundamentals than we will be at beta, so the 10% you put into Longhorn now could yield large dividends in the future.

    And as to your follow up comment, I’m happy that you enjoyed my response, but I’m pretty sure an autograph from Sting would be cooler. : )

    January 29, 2004 spout

    When In Doubt, Ignore Longhorn

    Here.

    The one where I list my favorite sources of information for development with today’s shipping .NET Framework.

    January 29, 2004 spout

    When In Doubt, Ignore Longhorn

    Thursday, January 29th, 2004

    A guy walks into an exotic car dealer and asks the salesman the price of the fancy new Ferrari in the corner. The salesman looks at him with a sad look on his face, shakes his head and says, I’m afraid, sir, that if you have to ask, you won’t be able to afford it.”

    If you’re wondering whether you should be paying attention to the information on Longhorn that has appeared on the web and in the news lately, then you shouldn’t be. Longhorn RTM is years away. This is the most lead time we’ve given on any Windows operating system ever. The reason we did it was so that we could get super early adopters to give us meaningful feedback while we still had enough of the development cycle left to make meaningful changes. If you’re not a super early adopter, than Longhorn is just going to be noise that you should ignore til the beta hits.

    For day-to-day development, you should pay attention to .NET 1.1 news sources. For the near future, you’ll want to listen for Whidbey, the next version of the .NET Framework, which should work on all supported OSes when it ships. Here are a list of my favorite news sources for current information and near future information:

    .NET Framework 1.x Information Sources:

    • MSDN: The vast majority of existing and new information you’ll find on MSDN is on currently shipping technologies. My Developer Center brethren post tons of new stuff every month all about helping you be successful today. Also, one part of the Longhorn Developer Center that you should check out is the Preparing for Longhorn section, where I keep resources that you’ll need to know about today so that you can keep Longhorn in mind for tomorrow (or the day after tomorrow : ).
    • MSDN Magazine: MSDN Magazine does a fabulous job of helping folks take advantage of .NET 1.x and have recently been doing articles on Whidbey and Yukon.
    • MSDN Columns: If you haven’t seen the columns that MSDN hosts online, you’re missing a ton of great stuff from experts in the field. Besides the Longhorn columns (which you should ignore if you’re in doubt!), my personal favorite is Wonders of Windows Forms, which has also been focused on taking the best advantage of Windows Forms and where Michael Weinhardt has just started with a series of Whidbey Windows Forms topics that’ll make you drool.
    • GotDotNet: This site is host to a raft of content and tools and code samples from the .NET product teams along with active web forums.
    • CodeProject.com: CodeProject is my favorite user-contributions site and has tons of new source code samples and articles all the time about all manner of existing Microsoft technologies.
    • DotNet Newsgroups: The newsgroups are a hotbed of information on current technologies and are staffed by a large number of Microsoft employees to answer your questions.
    • International .NET Association (INETA): Don’t just sit around and code by yourself, find a user group near you!
    • DevelopMentor mailing lists: The .NET mailing list hosted at DevelopMentor launched a development culture. Their mailing lists are still tops in my book.
    • .NET 247: I can’t tell you how often my Google searches on Microsoft-related technologies yields an answer on this site.
    • Most Microsoft bloggers: Sure, Box, Anderson and Scoble hog the limelight, but some of my favorite bloggers concentrate on today’s technologies. Don’t miss Adam, Chris, Duncan, Dino, Kent or Raymond.
    • Whidbey Series on MSDN TV: If you want some info on the not-too-distant future, Erica Wiechers’s series of Whidbey topics on MSDN TV is a great place to start.
    • Whidbey/Yukon PDC talks: Contrary to popular belief, most of the talks at the PDC were not Longhorn-related and it’s not too late to catch the videos or download the slides if you weren’t able to catch them all.
    • Scott Guthrie’s Blog: For juicy bits of ASP.NET 2.0 information, you can’t beat Scott Guthrie’s blog.
    • theServerSide.NET: I haven’t spent much time on this site yet, but Richard Burte, an MS PM, says he likes it well enough to add it to this list.
    • What did I miss?

    That’s not to say that Microsoft is going to stop talking about Longhorn in the WinFX newsgroups, on the Longhorn Developer Center and in blogs of all kinds. We do this so that those folks that can think about the distant future today have a chance to make their voices heard at a time when we can most take advantage of what they’re saying.

    However, there continues to be more information than any human can consume on current Microsoft technologies, so don’t be alarmed when you see something go by with Longhorn in the title; just ignore it until you think that Longhorn can help make your business more successful. That’s why we’re building it after all. : )

    January 15, 2004 spout

    Bush: Get Your Own Dream!

    Here.

    It bugs me that Bush would steal JFKs dream of getting off of our planet, especially after we’ve already done it. Why not reach for getting America off of foreign oil by developing alternative energy sources, freeing us from the need to screw around with other countries and making us targets for terrorism? That’s a cool dream. But noooo, you can’t do that one, because you’re just a shill for US big oil!

    Sorry about that… I now return you to your regularly scheduled programming.

    January 9, 2004 spout

    Surprised by Microsoft’s Openness

    Here. The one where even I’m surprised at how open Microsoft is willing to be.
    January 9, 2004 spout

    Surprised by Microsoft’s Openness

    Friday, January 9th, 2004

    I get a lot of emails from folks surprised about how open Microsoft is being lately, mostly due to all of the blogging we’ve been doing lately (some of us started long before we ever became employees). However, even I was surprised in an internal blogging meeting today filled with a bunch of MS bloggers. During the meeting, we talked about a bunch of the benefits to MS and to our customers. Sara talked about how blogs are driving more traffic to MSDN than our own headlines. Robert described his green, yellow, red” scale for determining whether to blog about something (believe it or not, he does decide not to sometimes : ).

    And then Adam Sohn from marketing talked about the need to police ourselves, describing some of the downsides in regards to blowing some group’s launch plans or unconstructively criticizing another group. He preached caution when approaching the line between what was good for the customer and what was good for Microsoft. After listening to what I began to interpret as a message of self-censorship, I asked Adam a warm up, Isn’t it true that a lot of the stuff close to the line’ is what our customers find most valuable?” He agreed that it was. And then I asked Adam my real question, So, when we get close to that line, do we err on the side of our customer or ourselves?”

    Now, you have to remember that I’ve been a contributing member of the Windows development community for a lot of years. I’ve seen how aggressive Microsoft is in everything it does to always be on top. So when I asked on what side of the line I should come down, I fully expected to be told to keep the shareholders in mind.

    Of course, you know what his answer was or this story wouldn’t have made it into my blog until after my tenure at MS was complete (or just before : ). He said, without hesitation, Err on the side of the customer.”

    That blew me away. Of course, I’ve been doing just that since before I became an MS employee and Robert rides the ragged edge all day long, but it was *very* nice to hear that guy with the PR and legal battle scars tell me to keep the customer first and foremost in my mind.

    Thanks, Adam. You’ve confirmed my decision to work at Microsoft.

    January 3, 2004 spout

    On Genghis, WinForms and How to Move Towards Avalon

    Saturday, January 3rd, 2004

    Inspired by my pending interview of Don Box, Paolo Severini sent along an interview for me.

    Paul: Being a faithful reader of your books, articles and of your blog, I’d like to ask you a few questions about LH, Avalon and the future of WinForms. Before all, let me say that I’m really fascinated by Longhorn, and especially by Avalon. I installed the PDC stuff as soon as I received it through my MSDN subscription and I’ve begun exploring it with pure geek” enthusiasm. Everything is extremely interesting, but I’m now not sure what to do with it.

    Chris: I know what you mean, Paul. I’m going through that myself. Suddenly having so many fewer barriers tends to throw off the engineer in me. I’m working through it by begging the Longhorn User Experience team for guidance, learning Adobe Illustrator, reading graphic design books and trying to open my mind to the graphic designer inside us all (I hope : ).

    Paul: Paraphrasing one of the questions you proposed to Don Box: what should a WinForms programmer *really* do today to prepare for Avalon?

    Chris: If you want to write code today that’ll work well on Longhorn tomorrow, write WinForms today. WinForms in Whidbey gets tons more features and I expect they’ll be some cool new Longhorn-specific stuff when the time is right. If, when you’re preparing a Longhorn version of your application, you’d like to host Avalon controls from your WinForms app or even build Avalon apps that host your WinForms controls, you’ll be able to do that in Longhorn via WinForms/Avalon interop.

    For maximum flexibility in the code you write now, be very thorough about separating the data from the view of the data so that you can write a 100% Avalon front end to replace your WinForms front end if such is your need. Likewise, be very thorough about separating the data from the storage of the data is that you can take advantage of WinFS.

    Paul: I’m very grateful to MS for having disclosed their future technologies so soon, and more generally, to have become so opened” to outsider’s eyes, with so many devs and PMs now blogging about their work.

    Chris: Me, too. Without this openness, I’d get into lots more trouble. : )

    Paul: But I somehow also think that maybe LH was presented a bit too soon. Since it’s not planned to be released before 2006, chances are that the shipped version could be significantly different. (Will it? Is it already? Can you write anything about that? :-).

    Chris: I used to think that we were unveiling Longhorn too soon, too. However, the later in the development process we get it out to reviewers, the fewer major changes we’ll be able to make based of your feedback. What that means, of course, is that some major things are going to change between now and release, but those changes will be based on decisions that include feedback from you. The downside is that you’ll have to relearn some of the things you learn with these bits. Hopefully, the upside is that most of what you have to unlearn will be replaced with something significantly better.

    Paul: Furthermore, even when the new presentation subsystem will ship, it seems like it won’t be easy to write code that supports both the new and the old platforms, being they so different, and that could slow down its widespread acceptance even more. So I’m afraid that we’ll all have a difficult time writing user interfaces, having to decide whether to take advantage of the new features or simply stay with the old portable libraries. After all, there are today still (too many) people running Windows 9x. And Windows XP is such a great OS that won’t universally be replaced so soon.

    Chris: I’ve already mentioned how well WinForms will work under Longhorn, so I think I’ve answered part of your question. However, you’re asking something deeper here, i.e. when do I give up the old way” that has more ubiquitous support for the new way?” In this case, you’re talking about .NET and Longhorn, but you could as easily be talking about DOS and Windows or Win32 and .NET. This is the eternal struggle and the reason that we need software engineers in the first place. As with all such questions, the answer is it depends.”

    My general purpose answer is to always pick the newest thing that meets my requirements. The newer the technology you pick, the longer the shelf life. Can I build cool, scalable apps that take advantage of the high resolution monitors and GPUs of tomorrow in DOS? Absolutely. Do I want to? Hell no. Can I do it in WinForms? Yes, although it’ll still be harder than doing it on Avalon. Will I increase my available market by targeting DOS today? The answer used to be yes,” but for a while now it’s been no.” What about WinForms? The answer is definitely yes” today and will be for a while yet, even after Longhorn ships.

    The answer to the question of when to adopt new technology has too many variables for me to provide any general advice better than as soon as possible.” Of course, Microsoft wants the answer to that question to be sooner rather than later,” and we’re working to make Longhorn kick-ass for developers, business users and consumers so that ubiquity is taken out of the equation as soon as possible. Please use all channels of communication you have into the company to help us make sure we’re doing that. The WinFX newsgroups are one good place for such feedback. They are heavily monitored by all of the WinFX teams and the Longhorn User Experience (Aero) Team.

    Paul: I found out that the PDC build of Avalon doesn’t really work in kernel mode but simply uses two (unmanaged) DLLs, milcore and milrender built upon the old GDI APIs (to the point that it is actually possible to run Avalon on XP). Of course, that’s bound to change, as Chris Anderson wrote, with the new video driver model and when the desktop composition stuff will get turned on. But wouldn’t it be nice if a subset of Avalon ran on XP? After all, not every app will take advantage of its more advanced features.

    Chris: Before I answer this question, I just wanted to point out that GDI is not part of the Avalon rendering path. Instead, Avalon is built on DirectX, which is built directly on the drivers. GDI is still supported, of course, but it’s a parallel rending path to Avalon’s.

    The answer to the core question, i.e. why not ship Avalon on XP, is one of resources. Chris Anderson once told me that something like a man millennia has gone into the development of Avalon thus far. Even if Chris was exaggerating for effect, that’s still one hell of a lot of work. That work has gone into building an architecture that allows application developers to take advantage of features present all the way down to the hardware level, including changes at every point in the presentation stack. What kind of work do you think it would take to make a subset of that available under Windows XP? Or Windows 2000? Or Windows 98? What kind of work do you think it would take to support those features on those down-level operating systems in their subsetted states? If we’re looking at a release years into the future already, how many more years are we willing to wait to release Avalon in a form that works in a subsetted form on those OSes? And what will we ship to our customers expected a new OS in the meantime?

    It may be that you could come up with answers that you love to these questions. Would our other customers answer them the same way? Would our shareholders answer them the same way? Would your answers best position us against our competitors?

    Even if you got a subset of Avalon that works across .NET platforms today, would it really enable you to be more successful at your business or is it an engineering gosh that’d be neat?”

    I know that our product teams really listen to our customers these days, so if you’ve got specific scenarios that you need enabled to be successful, please let them know.

    Paul: Furthermore, if XAML is, in the end, only a way to glue together a graph of CLR objects, why don’t use it also to build WinForms UI? Both these options would make the transition much easier.

    Now that’s a question I can provide a more satisfactory answer to, I think (sorry about that last answer : ). In the Longhorn PDC bits today, you can generate WinForms apps using XAML for the very reason you state. Likewise, if you’d like to try a subset of XAML in today’s version of the .NET Framework, there are not one, but two 3rd parties providing early access to projects to allow this to happen. Given the amount of work that has gone into, and will go into, getting Avalon out the door, I doubt very much that their versions of XAML will be full-featured, but it may help ease the transition, as you say.

    Paul: That brings me to ask you about the future of WinForms (about which I’m now reading your book and really enjoying it). In the near future I will surely have to write WinForms code. But is it still worthwhile to spend time studying and trying to improve it? (I personally think so). Or should I rather concentrate my interest learning everything about the new LH technologies? So I’m back on the question about how to prepare for Avalon…

    Chris: I’d say that it absolutely makes sense to continue to write WinForms applications for years to come. Not only in WinForms a great platform for client applications today, but in Whidbey, it about doubles in size and capability. Plus, WinForms applications will continue to work great under Longhorn and will form the core of an application that needs to take advantage of Longhorn features under Longhorn but continue to work on the rest of the .NET platform. Unless you are planning to target only Longhorn, WinForms is absolutely where you should be spending your client development effort today and for years to come.

    Paul: Speaking of WinForms, one of the things I’ve never liked is the absence of windowless controls. It has been said that windowed and windowless controls are difficult to make live together, and that’s true. But windowless controls are sometimes very useful (and cool! just think to the Windows Media Player UI). I found in your Genghis page that the Windowless control architecture” feature is still opened” and I’d like to try to work on it. (In the past, I wrote an ActiveX control container that supported windowless controls, so I wouldn’t start from zero).

    Chris: Windowless controls were meant mostly as an optimization when creating thousands of Window handles brought the platform to its knees. Some folks also used windowless controls as a good way to fake non-rectangular controls. In modern implementations of User32, neither is much of an issue, so windowless controls provide a service that is no longer required in most cases. In the specialized cases where it is still necessary, I find that building an aggregate control that does the drawing of multiple controls that you would have made windowless in the past solves most of my needs in this area, although your mileage may vary. Given that Genghis has most of the rest of the features that I wanted for it, but no windowless control architecture, I’d say that folks seem to agree with me that windowless controls are no longer as important as they once were.

    Paul: But I also noticed that the Genghis project has been still for a few months, so I’m now wondering if it is still alive and if my project still makes sense now that Avalon is on its way. May you give me an advice?

    Chris: I was waiting for a wizard that would generate MDI, SDI and multi-SDI applications before shipping the next drop of Genghis, but there are enough new things and fixes that we should have another version of Genghis out in a week or so. If you or anyone would like to build the wizard (or just send Scott Densmore email begging him to finish the one he already started and has promised to me several times) that’d be great.

    Thanks for your wonderful job and for the time you dedicated to this mail. I just hope my English was understandable… :-)

    Best regards from Italy,
    Have a wonderful new year!
    –Paolo Severini

    December 24, 2003 spout

    Lending a Helping Hand

    Here. Normally I wouldn’t pass along something like this, but this is from my uncle and therefore genuine. If you can lend a hand to his brother who’s financially destitute after a liver and kidney transplant, I’d appreciate it. Even prayers would help. Thanks!
    December 23, 2003 spout

    Lending a Helping Hand

    I know this sounds like spam, but it’s not — it’s from my Uncle Mark, who’s also my godfather and the nicest man I’ve even known:

    Chris, I’m writing you to ask your help. My brother Tom was gravely ill. Tom is 55 years old, married with two grown sons. He needed both a liver and a kidney transplant. He just received his transplants. It was by the grace of God just in time as he was within 2 to 3 days of death. He is doing well with no signs of rejection and just some minor complications. Unfortunately, he is nearly bankrupt from all his medical bills. Tom’s life has been marked by several challenges, many overcome through hard work and determination. He is a man of immense spirit and we all love him dearly. This is a challenge he can’t face alone. As you can imagine, our family is very concerned. We pray a lot. We have also undertaken a benefit and raffles for him to help him with his expenses. Right now we’re just trying to help him pay his mortgage and put food on his table. He hasn’t been able to work for three months. He also faces a tremendous bill from the transplant that his health insurance won’t pay.

    There are five courses of action I’d like you to consider. First of course is I’d appreciate your prayers for my brother Tom that he continue to recover his health and his finances. The next four things I am asking for is your support of our raffles and benefit.

    I would like you to consider purchasing a ticket for what we call the Big Money Raffle”. There will be a limit of 110 tickets sold. First prize is $2000. Second prize is $1250. Third prize is $750. There will be an additional ten $100 winners. Odds of winning some prize are 13 in 110. 3 in 110 chance of bettering your bet. 1 in 110 of winning the top prize. Tickets cost $135 apiece. Much better odds than the lottery. Drawing 1/11/04.

    Also available are Quilt tickets at $1 apiece. My sister made the Queen size quilt. Value is somewhere between $1000 and $1500. Drawing 1/11/04.

    The third thing I’d like you to consider is if you know anyone among your connections in the computer world who might also like the opportunity to purchase Big Money” and Quilt” raffle tickets. I know you know a lot of people and some of them might be generous of spirit and/or gamblers. I think this time of year people yearn to be of help and service but aren’t often sure what they can do. This is one such opportunity.

    The fourth thing I’d like you to consider is helping with the benefit dinner. It will be January 11th. There will be a silent auction. I thought with your connections at Microsoft you might be able to get them to donate something for the silent auction like some software or ?. Mr. Gates has such a wonderful legacy of philanthropy and I’m hoping that may reach down the organization for individuals in need.

    Thank you Chris for your consideration. If all you can offer is your prayers I will understand and greatly appreciate them. If you or anyone you pass this on to wish to purchase tickets, checks can be made out to TOM NEEDHAM LIVER TRANSPLANT FUND. Anyone wishing more details can contact me, Mark Needham at 952-226-1769 or e-mail me at emkayen@aol.com. I will be happy to fill out the tickets and return the stubs to them. The information needed is name, address & phone number for both the Big Money and Quilt raffles. The Minnesota lawful gambling exempt permit # is X-34753-04-001.

    While I don’t know my uncle’s brother (his part of the family never really mixed with mine for some reason), because it’s important to my uncle, I’ll be purchasing one of each of the two kinds of raffle tickets, publicizing my uncle’s plea on my web site, investigating Microsoft’s matching for charity and, of course, sending my prayers. If any of you is interested in participating in the raffles, let Mark know directly. If you wanted to publicize this on your own web sites or donate something for the silent auction, let Mark know about that, too. Of course, all prayers are warming accepted.

    Thank you very much and have a Merry Christmas and a Happy New Year.

    November 30, 2003 spout

    Learning to Learn, Part II

    Tony R. Kuphaldt, an instructor at Bellingham Technical College in Washington recently emailed me that my Learning to Learn piece spoke to him and pointed me to his web site where he provides a wonderful look at his own experiences in self-teaching. In this paper, Tony describes his insights, starting with an amazing look into my own previous field of employ:

    Industry training, at least in its popular form, is roughly based on the model of a fire hydrant: sit in front of it, open the valve, and take a big drink. Due to time limitations, trainers present information at a rapid pace, with participants retaining only a fraction of what they see and hear. What knowledge they do gain seldom passes on to co-workers after the training session, and is forgotten almost as rapidly as it is presented, necessitating continual re-training. … [Students] often leave with the impression of the instructor being something of a genius for being able to present so much information so quickly, and instilling within their own minds a sense of inferiority for not grasping all of it at the delivered pace.”
    Further, Tony describes the technique I use to really learn something:
    What did I do to learn? Simple: I would challenge my existing knowledge of a subject by trying to apply it to real-world conditions and/or thought experiments. If I didn’t know enough about a topic to successfully apply it to a realistic problem, I would research and study until I did. If ever I was completely baffled by a problem, I could determine my own conceptual weaknesses by incrementally simplifying the problem until I could solve it. Whatever complexity I eliminated from the problem that enabled me to solve it was where my understanding was weak. Once I knew what I didn’t know, I not only knew where to focus my study efforts, but I also felt more motivated to study because I could perceive my own needs.”
    Tony characterizes his (and my) self-teaching technique as an internal feedback loop, where the student knows what he doesn’t know. This is as opposed to an external feedback loop in an instructional setting, where the instructor knows what the student doesn’t know, but the feedback loop is broken between the student and the instructor.

    And as if that weren’t enough, Tony takes his goals on the road, as it were, testing a self-teaching-based curriculum on his students and reporting on his results. I find his work especially interesting not because I feel the need to teach the world to teach themselves; I’m perfectly happy to encourage folks to learn to learn, but to have them choose other techniques. However, I do feel very strongly that the Sells brothers learn to learn. I can’t imagine sending them out into the world without a firm grasp of the ability to teach themselves. I don’t know how to do that, though, unless I start home schooling them. That wouldn’t be out of the question except for this unhealthy addiction I have to a steady income stream…

    November 29, 2003 spout

    The Wonder that is XAML’s Extended Attribute Syntax

    The Wonder that is XAML’s Extended Attribute Syntax

    Saturday, November 29, 2003

    I’ve been playing with GridPanel today and really like how elegant it is. If I say the following:

    <GridPanel>
      <SimpleText>Testing</SimpleText>
      <SimpleText>1</SimpleText>
      <SimpleText>2</SimpleText>
      <SimpleText>3</SimpleText>
    </GridPanel>

    I get the equivalent of an HTML table with four rows with each SimpleText element forming a cell like so (augmented with Border elements not shown above to accentuate the cells):

    If I want to split the data into columns, I can do that using the Columns attribute:

    <GridPanel Columns="2">
      <SimpleText>Testing</SimpleText>
      <SimpleText>1</SimpleText>
      <SimpleText>2</SimpleText>
      <SimpleText>3</SimpleText>
    </GridPanel>

    Which gives me two rows of two columns each:

    That’s all nice and simple, but still flexible. For example, if I want to set the Testing string to cover two columns, I can give it an ID in the XAML and call the GridPanel.SetColumnSpan static method in code, e.g. when the Window loads:

    <!-- xaml -->
    <Window ... Loaded="window1_Loaded">
      <GridPanel Columns="2">
        <SimpleText ID="testingSimpleText">Testing</SimpleText>
        <SimpleText>1</SimpleText>
        <SimpleText>2</SimpleText>
        <SimpleText>3</SimpleText>
      </GridPanel>
    </Window>
    // C#
    void window1_Loaded(...) {
      GridPanel.SetColumnSpan(testingSimpleText, 2);
    }

    This code yields 3 rows arranged as follows:

    This is all fine and makes you appreciate the elegance of the GridPanel. However, that’s not what inspired me to write this entry.

    Remember that the SimpleText element serves as a cell in the GridPanel. Even better, the SimpleText element doesn’t know it’s serving as a cell in a GridPanel. The architecture of Avalon is loosely-couple so that all of the elements don’t need to have intimate knowledge of each other. This loose coupling is really great for future elements that some developer wants to host in a GridPanel or that want to host SimpleText elements. Still, I’d like to be able to set GridPanel-related properties for each cell” on the cell element itself, even if the cell element doesn’t know it’s a child of a GridPanel. And that’s what the extended attribute syntax in XAML lets me do. Instead of writing the code, I can just do this:

    <GridPanel Columns="2">
      <SimpleText GridPanel.ColumnSpan="2">Testing</SimpleText>
      <SimpleText>1</SimpleText>
      <SimpleText>2</SimpleText>
      <SimpleText>3</SimpleText>
    </GridPanel>

    This dotted attribute syntax allows me to set a GridPanel setting for the SimpleText element w/o any knowledge from the GridPanel of the SimpleText or vice versa. That means that if I define the FooBar element tomorrow, I can set it’s GridPanel.ColumnSpan on it when it’s used inside a GridPanel w/o extending GridPanel. This also means that if FooBar has a Quux per-child property, I can set the FooBar.Quux attribute of the SimpleText element w/o extending SimpleText. Nice!

    BTW, if you’d like to see the code that provides the GridPanel in outline mode” as above, it looks like this:

    <Border Background="black" Width="100%" Height="100%">
      <GridPanel Columns="2">
        <Border Background="white" GridPanel.ColumnSpan="2">
          <SimpleText >Testing</SimpleText>
        </Border>
        <Border Background="white">
          <SimpleText>1</SimpleText>
        </Border>
        <Border Background="white">
          <SimpleText>2</SimpleText>
        </Border>
        <Border Background="white">
          <SimpleText>3</SimpleText>
        </Border>
      </GridPanel>
    </Border>

    Notice that the GridPanel.ColumnSpan is on the Border element, not the SimpleText element. That’s because it’s the Border that’s the cell of the GridPanel, not the SimpleText.

    November 24, 2003 spout

    I don’t know UIs, but I know what I like…

    I don’t know UIs, but I know what I like…

    Monday, November 24, 2003

    The user in me sees Longhorn and dreams of software without limits. The engineer in me sees Longhorn and is scared of software without limits. An engineer’s days are defined by requirements and restrictions. Those restrictions come not only from the capabilities of the tools and technologies being bolted together, but also accepted practice. For years, I’ve been comfortable designing rich” client applications because a) my tools and technologies haven’t let me do much that was really rich” and b) because rich” was pre-defined by existing applications.

    In fact, when I started programming Windows 3.1, I adopted a single 3-step UI design process:

    1. Figure out the the requirements of the particular UI doodad I needed
    2. Find my favorite example of it in Visual Studio, Word or Outlook
    3. Make User/MFC/WTL/WinForms do that

    It doesn’t take much to design an application that looks like this:

    or even one that looks like this:

    when the process is merely aping existing apps. I was even encouraged to use this kind of UI design by books with color pictures from well respected authors:

    User Interface Design for Programmers

    When the web came along, things were scary because all the guidelines were gone. However, at first the limitations were strict, so I didn’t have any trouble building sites that looked like this:

    but when a few years later, the limitations faded away and I was expected to conceive of and implement stuff like this:

    I didn’t have a clue. Luckily, the web way” settled down over the years so that we figured out basically how to design web sites:

    Book cover: Don't Make Me Think!

    Plus, limitations took hold as we realized that you could build pretty much anything you wanted unless you wanted it to work on someone’s machine besides yours, which turned the screws down pretty tightly.

    Still, while the emerging conventions helped me figure out what I wanted my own web site to look like in general, I had to *pay* for help from a otherly-skilled professional before I could get the specifics:

    This is where it got scary until I had the one application designed for which I would ever need a designer. With my web site out of the way, it was smooth sailing.

    That is, until Longhorn and Avalon came along.

    Avalon drops the bottom out of the limitations and the guidelines again, leaving guys like me in a lurch. Oh sure, I’ve done pretty much everything there is to do in this industry, from coder to President, from docs to QA, from project management to *shudder* marketing. However, what I haven’t done and always hoped to avoid was design the graphics that go along with an application. Those were always things that I could hire done, most often as a deductible expense.

    But now what do I do? MS doesn’t provide MSDN authors a graphic artist” budget. We do have very talented graphic artists at MSDN, but what’s my boss going to say when they’re swamped doing graphics for my pet projects and not the public-facing web site?

    And standard bitmap graphic artifacts aren’t enough; I need *vector* graphics. Even I can see that while this is fine:

    nobody is expanding sol.exe’s main window to get more green space”:

    To solve problems like these, we need vector graphics that look good when they’re scaled, which I understand is roughly 10x harder than bitmaps (which are already beyond me).

    But just the graphics aren’t enough, either. MS is busy redesigning the Windows user experience” to include the best of Windows and the web:

    Apps are supposed to behavior sensibly (which I can handle) *and* look cool (where do I learn to make *that* happen?!?).

    In fact, taking the next step from the budding UX guidelines, we seem to be heading into a place where if I want to build my own sol to fix the scaling, I’ll be trying to fit a menu system” on the front like the gaming guys do:

    and like so:

    In fact, I’ve heard tell that there’s a special guy that designs these pre-game antics separately from the rest of the game just so folks think the game is cool as soon as it starts, long before you’re actually playing it. How can I stand up to that kind of pressure? I was pretty damn happy with myself when I made blocks fall and stack:

    And while this is the only scalable game of its kind of which I know (I was ready for Avalon a while ago, apparently : ), it still has the standard un-cool “menu system” that Windows comes with out of the box.

    And there’s no relief in sight! Avalon, by taking advantage of 3D hardware and displays that haven’t even been invented yet, along with intrinsic support for every kind of media and animation that I’m familiar with, blows right by the limitations we’ve grown to know and love in Windows and web applications. Now we’re into the world of game programmers, where if you can imagine it, you can do it.

    But where am I going to get the graphics for what I can imagine?

    How do I imagine a user experience when MS is literally still writing the book on it and they haven’t shipped a Longhorn Visual Studio, Word *or* Outlook?

    Graphic/user experience designers of the world, please be gentle; the engineers are spooked and could stampede at any moment…

    Know where I can get some graphics/user experience designers cheap?

    November 15, 2003 spout

    My First Meeting with BillGs Technical Advisor

    Here. The one where I meet BillG’s Technical Advisor and am charmed into volunteering for more work.
    November 15, 2003 spout

    My First Meeting with BillG’s Technical Advisor

    Saturday, November 15, 2003

    In my continuing quest to take advantage of unique experiences at Microsoft for those that aren’t able to, I spent an hour in a meeting with Bill Gates’s Technical Advisor, Alexander Gounares, earlier this week. Among other things, Alex is responsible for getting answers when Bill asks questions like Hey, what are we doing about adding air conditioning to Windows?”

    I’ve had meetings with senior execs at MS before and I always end up saying stuff that upsets them. This time, the guy was so nice, I just wanted to nod my head and do whatever he asked of me. In fact, the thing I volunteered to work on (a vision” whitepaper exploring a new application of technology that’s still under development) wasn’t so much that he asked me to do it, but rather because he asked for a volunteer and made eye contact with me in such a heart-warming way that I couldn’t say no. (Of course, my boss kicking me under the table didn’t hurt, either… : )

    BTW, in case you wondered, while the Sr. VP I upset knew me from my blog, Alex didn’t know me from Adam. : )

    For folks keeping track, in my six month career at MS, I gotten to do *lots* of cool stuff:

    • Launch the Longhorn Developer Center
    • Hang out back stage at the PDC, including preparing to act as Chris Anderson’s demo understudy and helping ship one of MSDNs new features (annotations)
    • Write a Think Week paper for BillG and receive his comments back on it
    • Meet Anders Hejlsberg, Eric Gunnerson and Robert Hess
    • Have meetings with several execs, including one Group VP, one Sr. VP and BillG’s TA
    • Crash a WinFX API review
    • Introduce MS to the joy of a DevCon
    • Help get my PUM blogging
    • Invent an extension to RSS that is getting fairly wide implementation, e.g. SharpReader, RssBandit and .Text.
    • Appear on The .NET Show
    • Get a few mentions in the press as an official MS employee (including one that my Mom saw that made her very proud : )
    • Keep up contact with the community as much as I’m able via email, mailing lists, newsgroups, articles, conference talks and appearances

    I list these not to brag, but to reflect on how many cool things there are to do at MS. I assume it’s all down hill from here. : )

    November 3, 2003 spout

    Time For An Exciting Career In Electronics

    Here. The one where blogs and RSS have removed the inefficiency in the market in which I make my living. Luckily, few people make full use of such technologies, so I may be able to make the mortgage for a few more months…
    November 3, 2003 spout

    In Search of Expertise

    Here. The one where I finally figure out that membership in a profession does not imply expertise in that profession. For those of you saying duh,” that’s not helpful… : )
    November 3, 2003 spout

    Time For An Exciting Career In Electronics

    Monday, November 3, 2003

    Depending on how you look at it, what I’m best at in the whole world has either become completely unnecessary or incredibly easy. The skill that I spent most of the last 10 years learning was to look at a group of types, APIs, reference docs, headers, source code, etc., distill it down to a set of architectural intentions and then to weave a story through the whole thing to make sense of it for developers that weren’t able to glean the intensions themselves (most often because they had real jobs). I call this exhaustive search for intention officially at an end. I’m no longer needed except as a gatherer for those not yet facile in RSS aggregators (which, luckily for me, is still a large number : ).

    Blogs like Chris’s, Scott’s and Raymond’s go way beyond the what” that docs and web sites and even mailing lists/newsgroups/web forums have typically stuck with and gone right into the “why.” And not only that, but Chris is actually taking that next step on his blog. In the old days, before my favorite technology company became so damn open, if I wanted to comment on something, I had to painstakingly track down the right people at Microsoft, make friends with them (which first demanded that I learn social skills) and then convince them that someone outside of MS might actually have something intelligent and useful to say. This often involved years of stalking softies in mailing lists and conference halls and now Chris is letting anyone give him feedback to which he actually listens!

    What use a hack like me that doesn’t invent something, but merely figures out how existing things work so that I can tell someone about it if the guy that invents it does that part, too?!? I wonder if there are slots left in the vocational technical school near my house…

    November 3, 2003 spout

    In Search of Expertise

    I had an interesting insight while watching Episode II: Attack of the Clones (I had a hankering to see Yoda kick some butt, OK?!?). The definition of expert is someone that just does whatever it is they do; they don’t think about it. Everyone else is just learning. What drove this home for me was when Anakin heard of his mother being taken and how everyone else had failed or died looking for her, Anakin started out after her without any planning whatsoever. *That’s* an expert. Of course, he had The Force and the rest of us have to live with an average amount of midichlorian, but he’d done what I’ve seen other experts do, too: unconscious competence.

    The reason that this is such an insight for me is that for my entire life, I’ve always felt that there were special people in the world that just know what they’re doing. These people worked in companies or were members of a profession and by their association with those organizations, I felt that they must be experts. I mean, how could someone be a member of professional for any length of time and not strive for mastery of the professional? It was watching Anakin that it finally sunk in that mere association is not enough; most organizations, no matter how high their standards, do not stop non-experts at the door. Experts are the ones inside the organizations that rise to the top, that stand out, that set examples for other members. Expertise is the thing that separates a moderately smart person studying up on a topic for a while from someone that really understands something down to their bones. This is what separates me catching up to my financial advisor after 6 months of study from a *real* money manager. That’s what separates a new computer science graduate from me.

    That’s not to say that I couldn’t be better than some real” money managers one day or that the new college grad couldn’t be better then me on day one. What it does say, however, is that encountering a true expert is a rare thing. Because of that rarity, I believe that most reasonably intelligent people can, with study and practice, get good at practically anything that they set their mind to. This means that I can, with a reasonable amount of study and practice, check the work of my financial advisor or my accountant or a plumbing contractor and come up with things that they don’t. I know that this is true because I’ve done it (not with the plumbing though, I’m practically clueless there : ). The amount of study I needed to catch up with my professional service provider doesn’t make me an expert, of course, because it’s highly unlikely that either of them is an expert.

    So, now that I’ve settled the question of whether membership in a profession makes one an expert (it doesn’t), that leaves two questions:

    1. How do you recognize expertise? I know it when it occurs in something that I’m familiar with, e.g. computer goo, but what about in a discipline where I’m not versed?
    2. How do you obtain expertise? I’ve got this down to a science for programming APIs, but can these techniques be applied to other disciplines?

    Comments on my continued quest for expertise welcome.

    November 3, 2003 spout

    My First PDC as a Microsoftie

    After all the preparation, planning and sheer work, it’s a letdown for the PDC to actually be over. It was an amazing experience for me to be back stage” at a PDC, the only conference I’d spent my own money on for years (although as a speaker, they let me in gratis this year : ).

    Things I Heard:

    As a Microsoft employee, my job is to listen and take feedback home. Here’s what I heard:

    • Longhorn, Avalon/XAML, Indigo, WinFS, ClickOnce: good
    • Improvements in VS.NET and ASP.NET: good
    • Indigo and ClickOnce on existing versions of Windows: good
    • Avalon not available on existing versions of Windows: not so good
      (Avalon changes things all the way to the device driver level, so retrofitting it to existing versions of Windows is impractical)
    • Not being able to download the PDC Longhorn and VS.NET Whidbey bits: not so good
      (MSDN subscribers can request the CDs to be sent to them)
    • Developers that didn’t go to the PDC and don’t have MSDN subscriptions not getting PDC bits: not so good
      (the public beta in the summer of 2004 will open this up considerably)
    • The Longhorn Developer Center features and content: good
      (whew : )
    • Having all kinds of Microsofties at the PDC and on the newsgroups and mailing lists to answer questions and take feedback: good
    • Publicly contributed annotations on the Longhorn SDK content: good
    • Longhorn bits running under Virtual PC: good
    • Longhorn bits amazingly functional and stable: good
    • Longhorn bits not especially speedy: not so good
      (these are the earliest OS bits we’ve ever given to folks — Longhorn will have years to improve in this and every other regard)
    • Availability of PDC network, both wired and wireless: not so good
      (don’t know why this happened)
    • Stacking up outside the rooms of overflowing sessions: not so good
      (although MS attendees were very good about giving up their seats to paying customers)
    • Microsoft’s commitment to pushing managed code so far into the OS: good
    • Lots of folks interested in contributing to the Longhorn developer community: good
      (if you’re planning something, please let me know)

    Things I Got To Do:

    Also, as a first timer backstage at the PDC (and a long-time member of the Windows developer community), I got to do all kinds of fun things:

    • Give a pre-conference tutorial on WinForms with Rocky Lhotka, a fellow giant Minnesotan with whom I’d never before had a chance to work
    • Prepare Sunday night to do the keynote demo in Chris Anderson’s place on Monday morning with Don Box and Jim Allchin in case Chris couldn’t make it past the fires in time
    • Hang out on the PDC keynote stage late at night, soaking up the Chairman of the Board and Sr. VPs doing their last minute preparations (and inadvertently making career-limiting statements : )
    • Watch Don and Chris and Jim pull off an amazing all-code keynote that will go down in history as one of the PDCs best
    • Hang out at the Ask The Experts session, coding up repros and solutions to WinForms questions alongside Mark Mr. WinForms” Boulter
    • Wandering the streets of downtown LA with Frank Redmond looking for Tim Ewald’s surprise birthday party
    • Answer questions instead of ask them at the MSDN booth
    • Being interviewed by Jon Box of Sys-Con Radio and an old ATL student who blames me for his career choices
    • Spent a lot of time telling people about MSDN Developer Centers, where my friends at MSDN work very hard to pull information out of the vast MSDN library and organize it for particular audiences, e.g. C#, VB.NET, ASP.NET, Security, VS.NET, the .NET Framework, Architecture, etc.
    • Shake hands and sign autographs and have my picture taken with all kinds of old friends and ex-students and readers and conference attendees
    • Gush like a fan-boy at Tim O’Reilly
    • Watch a block full of cars all go backwards one night getting back into first positions” (it was California, after all : )
    • See the 4′ high by 20′ long WinFS schema and realize just how much work the WinFS guys are actually doing to capture “Everyday Information”
    • Send out the official welcome to the WinFX newsgroups
    • Make tweaks to several potential keynote demos at the last possible moment
    • Do an interview with .NET Developer Journal that let me tell my side of all kinds of stories
    • Get all kinds of feedback from internal and external folks saying nice things about the project that has consumed me for the last 6 months: the Longhorn Developer Center
    • Go to a 1am show of The Metal Shop heavy metal mock n’ roll” band at the Viper Room on the strip in Hollywood with John Shewchuk and Matt Pietrek and screaming my voice raw to the lyrics
    • Meet Sunny Day live and in person
    • Hang out with Matt Pietrek, one of my personal heroes, along with Tim and Sarah and most of my closest friends (where was Craig?!?)
    • Shake my tail feathers to yet another amazing Band on the Runtime gig
    • Attend all kinds of technical sessions on the technologies of Longhorn so that I can continue to live the Longhorn life for those developers that aren’t yet able to
    • Start the collection of items for a Longhorn Developer FAQ which I’ll post when it reaches critical mass
    • Hang out with architects from two of the three main pillars of Longhorn (Don Box, Indigo and Chris Anderson, Avalon) at the The Kettle in Hermosa Beach
    • Share a room with the 19-year old .NET wunderkind, Ryan Dawson

    At this PDC, I definitely got to see how the sausage was made, but that still didn’t take away from the deep, rich flavor. Recommend.

    October 23, 2003 spout writing

    MSDN Wants You

    Here. Want to write for MSDN online? Here’s how.
    October 20, 2003 spout writing

    ASP Alliance reviews WinForms Programming in C#

    Here. I don’t know why an ASP site is reviewing a WinForms book, but they do a thorough job and, of course, I like their conclusion: “If you are looking for a Windows Forms book, don’t let this one slip out of your hands. The book has such insight and experience included that every reader, beginner and professional, will get benefit from reading it.”
    October 20, 2003 spout writing

    Every Vain Author’s Best Friend

    Here. Rory built me an RSS feed to track book reviews on Amazon.com. And then he thanked me for letting him do it. You’re welcome, Rory… BTW, to complete your Vain Author’s Toolkit, you’ll need junglescan.com to track a portfolio of books’ sales rank. If those ain’t web services, I don’t know what are!
    October 15, 2003 spout

    How Does One Obtain Inside Information?

    Here. The one where I list the steps I use to figure out stuff that isn’t documented.
    October 15, 2003 spout

    How Does One Obtain “Inside” Information?

    Wednesday, October 15, 2003

    I got an email today from John Reilly today asking me a question I get from time to time:

    I got my signed copy of your book. It is a great read. You have information that a friend and I have been trying to dig out for weeks.

    Which leads me to our question. How do you find out all those details? They are not to be found in the MSDN documentation, as far as we can tell. Do you just experiment, like we do? We have been unable to find any .NET training that is much more than how to use the IDE. Alan and I crave detail, meat, the stuff of your book. Seriously, how does one obtain this seemingly inside information? We are personally and professionally motivated weenies.

    Now that I’m a Microsoft employee, I have access to not only the source for most of what I’m researching, but the architects and internal mailing lists populated by the developers on the project, so that really is inside information.” However, over the 8+ years that I was a contributing member of the Windows developer community, 99% of what I’ve done has not been based on inside information. So, before I had access to internal info, how did I figure stuff out if the docs don’t answer my questions? I do the following, in order of decreasing frequency:

    • I experiment, writing hundreds of projects consisting of 10 lines of code or less to experiment with particular features
    • I read the source, even if that means reverse engineering it first (Reflector is fabulous for .NET code)
    • I search on the Microsoft-specific Google search page
    • I IM, email and call my friends who know more than I do (which is most of them : )
    • I ask questions on my favorite mailing lists and newsgroups
    • As a last resort, I ask my friends at MS. Buying a Microsoftie a beer at a conference, being smart in online forums and saying nice things about their technologies are all excellent ways to gain friends at MS
    October 10, 2003 spout writing

    Amazon giving 30% off WinForms Programming in C#

    Here. I think those Amazon guys knew I was talking about them…
    October 9, 2003 spout

    What Is An RSS Feed?

    Here. The one where I describe RSS to the world’s youngest mutual fund manager and my Mom.
    October 9, 2003 spout writing

    Nice WinForms Reviews in the Blogesphere

    Here. I’ve noticed that lots of folks have nice things to say about Windows Forms Programming in C#”. I thank you and my publisher thanks you. If you do post a review, you’ll likely get an email from me asking you to post it on Amazon.com. That’s because Amazon has noticed that it’s the number of reviews of a product that determines whether something sells better than it’s competitors, not the rating of the reviews (although feel free to say nice things… : ). I’m posting this here to a) warn you that a review on my book is likely to get you an email from me and b) because Scott Galloway’s Contact form is busted (“You must enter a search term”), so I needed *some* way to ask him to post his review on Amazon. Thanks!
    October 9, 2003 spout

    What Is An RSS Feed?

    As a deadline nears and I spend an increasing amount of time avoiding the work I should be doing, I find a finance geek acquaintance of mine asking what an RSS feed is after I implored him to add one to his web site. This is a 20-year old that’s owned stock since he was 11, read 12,000 company reports in 2002, earned 155% on his money is the last 11 months and recently been given his own $35M mutual fund to manage (becoming the youngest ever mutual fund manager). If this guy doesn’t know what an RSS feed is, then I’m guessing at least some of my readers don’t know either (yes, I’m talking to you, Mom). When he asked me what an RSS feed was, this is what I told him:

    An RSS feed is a thing of pure beauty. If you’ve ever been to a web site with an orange XML or RSS button, clicking it will yield a page that looks something like this:

    xml version=“1.0” ?>
    <rss version=”2.0 xmlns:dc=”http://purl.org/dc/elements/1.1/ xmlns:slash=”http://purl.org/rss/1.0/modules/slash/ xmlns:wfw=”http://wellformedweb.org/CommentAPI/>
    <channel>
    <title>Marquee de Sells: Chris’s insight outlet</title>
    <link>http://www.sellsbrothers.com/</link>
    <description>Thoughts that Chris Sells has about whatever interests him that day</description>
    <dc:language>en-us</dc:language>
    <dc:rights>Copyright 2002-2003, Chris Sells</dc:rights>
    <dc:creator>csells@sellsbrothers.com</dc:creator>
    <item>
    <title>The Wedding Toast</title>
    <dc:date>2003-10-10T04:17:02Z</dc:date>
    <guid isPermaLink=”false>http://www.sellsbrothers.com/news/topic866</guid>
    <link>http://weblogs.asp.net/yosit/posts/31385.aspx</link>
    <dc:creator>Chris Sells</dc:creator>
    <slash:comments>0</slash:comments>
    <comments>http://www.sellsbrothers.com/news/showTopic.aspx?ixTopic=866</comments>
    <wfw:commentRss>http://www.sellsbrothers.com/news/commentRss.aspx?ixTopic=866</wfw:commentRss>
    <wfw:comment>http://www.sellsbrothers.com/news/commentApi.aspx?ixTopic=866</wfw:comment>
    <description>Don and I send out a video of a toast to a newly married couple. We get back their reactions via video. Not as nice as real-time, but I don’t get overseas much, so still very cool. You gotta love the Internet!</description>
    </item>
    </channel>
    </rss>

    While RSS is fairly unreadable for normal humans, computers eat it up. For example, if you read the RSS feed from my site on a regular basis, whenever I make a new post, you’ll see a new entry in the RSS feed. RSS feeds aren’t useful for you, but when fed to an RSS reader” program, you can keep up to date on literally hundreds of web sites without having to browse to them manually. The RSS reader will check each RSS feed to which you subscribe, letting you know when something new on a web site has happened and showing you what it is, giving you the option to follow up or ignore the new thing. Thousands of sites have RSS feeds, letting me keep up on a bunch of things:

    • My friends’ writings
    • Global and financial news
    • People talking about topics of interest to me, like my favorite technologies or my latest book
    • My favorite comics strips (I need my daily Dilbert!)
    • The latest product and articles releases from Microsoft
    • Practically anything else I care about on a regular basis

    I keep up on all of this without ever visiting the web sites themselves them til something of interest catches my eye.

    There are a bunch of RSS readers in the world, but my favorite is SharpReader. If you install this program and start it up, SR will check all of the RSS feeds that you subscribe to on a regular basis in the background while you work, notifying you of something new by changing it’s icon from blue to yellow. If you decide to install SharpReader, your next stop should be NewsIsFree.com, where you’ll find all kinds of RSS feeds in any number of categories. After subscribing to a few of those, you’ll want to stop by Tapestry, where you can find RSS feeds for tons of daily comic strips. If you want to get fancy, you can go to GoogleAlert, where you can subscribe to searches so that whenever Google finds something new on your search topic, your RSS reader will let you know.

    If you find the ability to track hundreds of web sites without surfing to each of them manually, RSS is for you. If you find my instructions intimidating, ask a computer friend to help you out (I’ll be home for Christmas, Mom).

    October 3, 2003 spout

    My 9-Year Old Has a Cell Phone

    Friday, October 3, 2003

    Tonight is Friday night, which means the Sells family generally has pizza and a movie at home. However, since we’ve been through most of Blockbuster’s catalog and the boys aren’t quite old enough for most of my DVD collection (9 is a tad young for things like Fight Club…), we thought we’d take in the new Jack Black movie School of Rock. Kids-in-Mind.com gives it a 3.3.3, heavy on the poop jokes (which my sons like) and heavy on the irreverence (which I like), so it seemed like a winner. However, as most movies start between 7-7:30pm and I just noticed it was 6:30p but Melissa wasn’t home with the boys, I started the calling. First was her cell, but I remember her telling me it was out of batteries. Then it was her sister’s house, where she had been, but she had left for a friend’s. Then the friend, but no answer. And then I remembered my son and his cell phone.

    My son is 9 years old. He’s been into computers and gadgets of all kinds since before he was 3. A few months ago, he was digging around and found my old Nokia cell phone. It had some cool games, so he charged it up and started carrying it around with him. Then, he wanted minutes so he could make his own calls. So we finally found our way to the local AT&T wireless place (which wasn’t really very local at all) and he spent his allowance money on pre-paid minutes ($10 for 20 minutes). After less than a week, he was down to 8 minutes left. He’s most just calling his friends from our car (where I have my cell in my pocket w/o unlimited monthly minutes) or from our house (where we don’t have long distance, but we do still have a land line), but it’s his phone and his money and it gives him pleasure.

    It did, however, freak my wife out. A 9-year old doesn’t need a cell phone!” she’d say. I’d explain that it was his own money. A 9-year old doesn’t need a cell phone! Drug dealers have cell phones!” She and I both have our own cell phones and besides the occasional glass of wine, we don’t even *use* drugs, let alone *sell* them. And while no amount of reasoning with her stopped her from being upset, she didn’t say he couldn’t have a cell phone, so now he does. That he keeps charged. And that he carries. And that he spends his own money on minutes for. And that I just called because he was with his mother:

    “Hello?” said my 9-year-old son on his very own cell phone, surprised but pleased to get a call.

    Can I talk to your mother?”

    Sure.”

    “Hello. Sorry. My cell phone ran out of batteries,” she said.

    Aren’t you glad that John has a cell phone?” I asked, not bothering to keep the smug out of my voice.

    Hmphf,” she said, not bothering to keep the annoyed out of hers.

    I think I may pay for his next batch of minutes just so I can keep calling her on his phone. : )

    September 29, 2003 spout writing

    Creating Doc-Centric Apps in WinForms, part 1 of 3

    Here. This 3-part series really belonged as a chapter in my WinForms book, but after doubling the estimated size of the book (not to mention the amount of time it was supposed to take to write it), my publisher was anxious for me to stop writing. For those folks accustomed to the document management support in MFC or for anyone that needs to build document-centric WinForms application, I think you’ll like this series. Part 1 discusses the basics of document management in SDI WinForms apps. Part 2 discusses MDI apps and deeper shell integration. Part 3 wraps most everything up into a reusable component, turning the construction of document management features in .NET largely into some drag-n-drop and some property browser settings. The resultant FileDocument component is available in the latest Genghis sources (although not yet in the release zip) @ http://www.genghisgroup.com Enjoy.
    September 29, 2003 spout writing

    A *royalty* check from Pearson!

    Here. Whoa. I just got a royalty check from Pearson today. Right now, it lists my advance for the WinForms book (which may turn into positive money some day), but also includes money from ATL Internals (which I’m still proud of) and Windows Telephony Programming (which I can’t believe is still selling!). I won’t be able to put my kids through college with the money. In fact, I can barely put them through a car wash with that money, but it’s still nice. : )
    September 28, 2003 spout

    Men Extinct Soon — Only 125K Years Left

    Here. As well as women would do without us, it’s clear to me that the two sexes have evolved as a pair, although whether that’ll be enough to make saving us worth the trouble, I don’t know. For example, my wife may well decide to replace me with a footstool to reach things on the high shelves and call it good. : ) [boingboing.net]
    September 13, 2003 spout

    Google is Scary Smart, or Just Scary…

    Here. The one where Google is enormously useful and enormously scary at the same time.
    September 13, 2003 spout

    Google is Scary Smart, or Just Scary…

    Saturday, September 13, 2003

    When I was a kid, the source of universal knowledge at home was the set of dusty encyclopedias that my Mom inherited from somewhere. Today, it’s the Internet, via Google. That in itself makes Google the fulfillment of most sci-fi novels’ description of the the-store-of-all-human knowledge (I wish the text of all books were up, but that’ll happen in time…).

    Anyway, it didn’t hit me just how comprehensive Google was til I typed in “Joe Grammer” wife’ yesterday (I was calling and wanted to be prepared to address his very nice wife by name in case she answered the phone). In 0.39 seconds, Google gave 45 results, the 3rd of which contained Joe’s wife’s name! It was Joe himself who’d mentioned his wife’s name in a mailing list post but still, that’s pretty damn scary…

    September 12, 2003 spout writing

    “Move over Petzold, Sells is here.”

    Here. I’m sure it won’t last, but the WinForms book has broken 1000 (908) and has an average 5-star rating with three reviews, saying very nice things like: “This book rocks! … All chapters are brilliant.” “The localisation and resource usage in the managed world are clearly described and you won’t lose hours trying to access resources in your code anymore!” “I stayed up all last night reading Chris’ new book… I enjoyed every single page.” And, of course, the quote that makes my life complete: “Move over Petzold, Sells is here.”
    September 12, 2003 spout

    Respect for Marketing

    Here. The one where I take a look at all of the things that the typical marketing guys has to balance and thank goodness I just get to think about developers. : )
    September 12, 2003 spout

    Respect for Marketing

    Even in my short time at Microsoft so far, I’ve have already learned a *ton* from marketing. Of course, I’m working with lots of marketing folks as we get closer to the PDC. Because of my role, I have to worry about what’s good for the developer. Marketing guys, on the other hand, have to balance that with what’s good for the administrator, what’s good for the user, what’s good for the company, what’s good for the shareholders and what’s good for a bunch of other folks I don’t even know about. And, they have to do it for all of the streams of information coming out of the company, which now includes lots of informal streams like newsgroups, message boards, user group talks and blogs. Anyone that can balance all of these folks and still get developers what they need has my unabashed respect.

    September 11, 2003 spout

    Let us pause on 9/11…

    My 8-year old was proud to remind me that today was the two-year anniversary of 9/11. I was surprised that he knew and grateful to his school for taking the time to discuss it. He then went on to tell me how cool he thought the explosions were, which left me less pleased with his school. When I told him about my own experiences that day and how many people died, it immediately took all of the coolness” right out of the day for him.

    George Bullock, a colleague at MS who’s birthday happens to fall on 9/11, has also had the “coolness” taken out of the day for him and sent around a mail that starts this way:

    Let us pause on 9/11 to remember and honor the thousands killed, maimed, put out of work, and traumatized two years ago; also to honor the heroic, living and dead, who rose to the occasion on that terrible day. May God rest their souls and keep and protect their loved ones. May God also keep and protect our men and women serving here and abroad. Yes, there is much difference of opinion about what’s happening in the world today; nevertheless, I think we all support the men and women of our armed forces and wish them a safe return home. They sacrifice a lot to serve their country.”

    Personally, I try very hard not to let the terrorists get to me. Unfortunately, they have. Even time I get the anal probe treatment at the airport or a personal freedom is taken away by the Patriot Act or my sister-in-law is afraid to fly (and flat out refuses to fly on that day), they win. More subtly, ever time a US politician uses terrorism” to push their own agenda, they also win. Please don’t let them win. Have courage. Try to understand what it was that drove them to terrorism to attract our attention. Compare their lives to ours. But don’t let them win. Don’t let them take the right to the pursuit of happiness out of our lives.

    September 5, 2003 spout

    “Your enquiries frustrate the hell out of me”

    Friday, September 5, 2003

    I would classify my style of communication as get to conflict sooner rather than later.” A radio DJ once classified engineering abilities as a series of personality flaws that are accidentally useful in today’s IT industry and, arguably, he’s right. For most folks that have to work with me, it’s generally hard at first, but eventually you either love me or hate me (and I continuously work to tip that percentage towards the former : ).

    However, it’s the rare individual that can see past someone’s personal communications style and still pull out the value. Alan Cooper is one such person. I was reading one of his books and was so lost that I called and blamed him and his parents. He straightened me out by letting politely me know that he book wasn’t even trying to solve my problems and therefore it’s not surprising that it didn’t. Further, he ended his email like this:

    PS. Your enquiries frustrate the hell out of me. That’s why they are good and I want you to keep making them. If I growl at you, well, that’s my problem. Not yours.”

    I don’t know if other people would appreciate Alan encouraging my behavior, but it’s still cool to know that such tolerance exists in the world. : )

    September 2, 2003 spout writing

    Holy Cow!

    Here. Apparently my book has sold out on BookPool.com already. Cool…
    September 2, 2003 spout writing

    Windows Forms Programming in C# Sample Chapter

    Here. AW has been kind enough to post the preface and a sample chapter (Chapter 9: Design-Time Integration) to the official AW Windows Forms Programming in C# book page. They’ve also posted Mike Blaszczak’s foreword. Enjoy.
    September 2, 2003 spout writing

    977!

    Here. According to JungleScan.com, Windows Forms Programming in C# has been as well as 977. That’s as well as any of my books in the last year (except Essential .NET, which hit 226, but I didn’t write any of that… : ).
    September 2, 2003 spout writing

    Book of the Week at ASPExperts.com

    Here. I don’t know why ASPExperts.com would designate a WinForms book as Book of the Week,” but I’m honored none-the-less. : )
    September 1, 2003 spout

    Communication Is All

    Here. The one where I realize that my sister-in-law is smarter than me (shh… don’t tell…).
    September 1, 2003 spout

    Communication Is All

    It’s amazing to me the  number of problems that can be solved or avoided completely with communication. For example, the prevailing attitude of the day is that children should not be let out of an adult’s sight, in spite of an all-time low in the history of violent crime. Towards that end, and since tomorrow is the first day of school, my oldest boy is currently testing the range of our walkie-talkies to see if he and his younger brother can walk to school. The reason? Because I can communicate with him to know that they got to school OK. I need that communication so that I can continue to be paranoid while still letting him walk the half-mile to school.

    Here’s another example: Recently at work there was a minor fracas when group A published their planned work based on group B’s input aka *implicit* buy-in, but without group B’s *explicit* buy-in. This made group B unhappy, because they felt that their input wasn’t been taken (even though it was). The solution? Group A set up a regular meeting to communicate on their various projects with group B, making sure to get everyone’s buy-in explicitly.

    Here’s another one: My co-author on the VB version of my WinForms book has been working like a dog on his new job and his new baby and the VB port of my book. However, since most of his communications were with the publishing company directly, I didn’t see most of the work that he was doing and, because of our tight schedule, that caused me to worry that we wouldn’t make it. The solution? I asked him about it and he told me of the pile of work he’d done that I didn’t know about. He also volunteered to make sure to cc me on all of his email related to the book.

    And here’s my favorite example: For a long, long time, MS was labeled (and is often still labeled) as an evil” because of a perceived uncaring about developer’s hopes and dreams. Ironically, with a software engineer at the helm, all of Microsoft’s decisions are driven by that need to meet the needs of 3rd party developers. The issue was communication, both in letting internal folks make their intentions known to the external folks and in getting the hopes and dreams of external folks into the planning processes of internal folks. It’s my belief that the reason that Adam, Becky, Brad, Brian, Chris, Chris, Don, Duncan, Ed, Eric, Kent, Lutz, Martin, Sara, Scott, Tommy, and tons of other MS employees are not only not reprimanded for our blog posts, but encouraged, is so that our intentions can be known to external folks. And believe me, when someone external puts a substantive comment into their blog and one of the thousands of MS employees finds it, it makes its way into the inboxes of the internal MS employees that use that feedback. This need for bi-directional communication between internal and external folks at MS has driven all kinds of new ways of doing things and you’re going to see a whole lot more of that at the PDC.

    I could keep going on for days about problems in my life that are solved with communication and could have been avoided with communication up front. In fact, I’m started to get a feel for it when I realize that my communication could have been better and what problem I’m going to have because it wasn’t. Also, I’ve recently started to try to really concentrate on what my friends and family are saying when they start conversations with me while I’m working. (Previously I would continue working, giving a grunt now and again, as necessary.) This little thing has made a big difference. Of course, lots of folks way smarter than I already know this stuff, but to a geek who only learned how to communicate with other humans relatively recently, this is deep thinking! BTW, don’t tell my sister-in-law with the Master’s degree in communications. We give each other crap all the time on any number of topics and the idea that she knows more about what’s really important in the world would give her all kinds of extra ammunition (which she rarely needs anyway… : )

    August 29, 2003 spout

    re: The real goals of marketing?

    Here. Sometimes I write something on my spout and it gets a ton of comments on my little homegrown message board (built by The .NET Guy himself [1]). More often, I hear almost nothing at all. But sometimes I get email and IMs from all corners of the globe from folks that want to give me feedback but don’t want to post publicly for some reason. This last thing is what happened on my The real goals of marketing?” piece [2]. I got some agreement w/ my friend (“Yep, marketing guys are scum. That’s what they’re paid for.“), but mostly I got all kinds of folks, marketers and not, saying that my naive view is the favored one. John Porcaro was a rare one that actually put his feelings on the subject up for the public and sums up most of the feedback I got. Plus, he’s a Group Manager @ MSs Home and Entertainment division, so hopefully he’s so impressed with my posts that he’ll want to send me an MCE PC. I can’t be bought, John, but I can be rented. : ) [1] http://dotnetguy.techieswithcats.com/archives/001071.shtml [2] http://www.sellsbrothers.com/spout/#The_real_goals_of_marketing
    August 29, 2003 spout writing

    Windows Forms Programming in C# on Shelves

    Here. My WinForms book for C# programmers should be on the shelves today. I’ve set up the site where you can download the source and report problems. The VB.NET version should be out at the PDC. Enjoy.
    August 26, 2003 spout

    The Man Behind the Motion

    Here. What This Is Spinal Tap does for rock n’ roll. The Man Behind the Motion does for mo-cap”.
    August 25, 2003 spout

    Novel Approach to CodeGen

    Here. This code generator keeps the template right there with the generated source code. Pretty cool!
    August 25, 2003 spout

    Perl 6 Essentials. Chapter 1: Project Overview

    Here. ORA has posted the first chapter to their new book about Perl 6, which describes how and why the Perl community hit the reset button on Perl.
    August 25, 2003 spout

    Another Link In the Chain

    Here. The BBC is planning to open up the best television library in the world,” giving folks *free* access to radio and TV programs over the web. This is another step started by record albulms giving folks the ability to consume a/v content where and when they want. Next up is episodes of Friends, Gilmore Girls and The West Wing when and in the order I want.
    August 25, 2003 spout

    RSS Bandit Implements wfw:commentRss

    Here. Dare released a new version of RSS Bandit that, among other things, implements my RSS extension that exposes comments for an RSS entry via an RSS feed [1]. Dare’s implementation is not only *exactly* what I had in mind when I proposed the extension (thanks, Dare!) but I think this also address’s Shawn’s request from the other day [2]. [1] http://www.sellsbrothers.com/spout/#exposingRssComments [2] http://weblogs.asp.net/shawnmor/posts/24960.aspx
    August 23, 2003 spout

    In defense of continued innovation at MS

    Here. After watching several people complain about the lack of innovation at MS, Franci couldn’t take it anymore and weighed in with his dissenting opinion. Thanks, Franci!
    August 21, 2003 spout

    The .NET Show: Managed Code

    Here. Joining us in this episode will be Brad Abrams and Anders Hejlsberg to discuss the overall architectural issues involved with Managed Code, as well as Nick Hoddap and Chris Sells to show us some of the programming benefits that are gained by using Managed Code.”
    August 21, 2003 spout writing

    VS.NET 2003 + Mastering VS.NET

    Here. Buy VS.NET 2003 on Amazon.com and get a special deal on Mastering Visual Studio .NET by Ian Griffiths, Jon Flanders and some other guy…
    August 19, 2003 spout

    Buffering .NET Console Output

    Doing some ad hoc benchmarks, I found that my compute/IO intensive program was significantly slower in .NET than in native C++ (here’s a more rigorous test showing the same thing). However, when the IO was taken out (Console.Write), the test showed that the computation in .NET and in native C++ was nearly the same (with C++ still having a slight edge).

    My .NET IO code looked like this:

    static void OutputIt(int[] vect) {
      for (int i = 0; i < vect.Length; ++i) {
        if( i > 0 ) Console.Write(”,“);
        Console.Write(vect[i]);
      }
      Console.WriteLine();
    }

    In tracking down this disparity, Courteney van den Berg noticed that, unlike STL IO streams in native C++, .NET Console output is not buffered. A simple manual buffering using a StringBuilder brings the performance of .NET back in line with native C++:

    static void OutputIt(int[] vect) {
      StringBuilder sb = new StringBuilder();
      for (int i = 0; i < vect.Length; ++i) {
        if( i > 0 ) sb.Append(”,“);
        sb.Append(vect[i]);
      }
      Console.WriteLine(sb);
    }

    Instead of buffering manually, I could have turned on buffered console IO by reopening console output with a buffer size:

    static void Main(string[] args) {
      using( StreamWriter bufferOutput = new StreamWriter(Console.OpenStandardOutput(1024)) ) {
        Console.SetOut(bufferOutput);
        // Use Console.Write (via OutputIt)…
      }
    // Remaining buffered Console output flushed
    }

    // Console output now buffered
    static void OutputIt(int[] vect) {
      for (int i = 0; i < vect.Length; ++i) {
        if( i > 0 ) Console.Write(”,“);
        Console.Write(vect[i]);
      }
      Console.WriteLine();
    }

    Why isn’t Console output buffered by default? Unlike in C++, which has deterministic finalization, in .NET, console output would have to be manually flushed or closed (closing causes a flush). Failure to do so can cause console output to be incomplete at the end of a program. Notice our careful use of the “using” block in the code above, causing the output stream to be closed at the end of the block and the remaining buffered output to be flushed, even in the face of exceptions. Forgetting to use the using” block or forgetting to manually flush or close in a finally block, can cause console output to be lost. Rather than imposing the new burden of manually closing the console output, .NET architects opted to turn off buffering by default, while still letting you turn it on at will.

    August 15, 2003 spout

    The real goals of marketing?

    I’ve long lamented that I have no clue what the basics of marketing are and therefore I’ve been at the mercy of actual marketing people whose skill I can’t judge. In fact, I so miss this important knowledge in my life that I interviewed for a marketing job at Microsoft (although I was in no danger of getting it). A *long* time friend of mine, Dave Stroble, said that I was too “customer-focused” to be in marketing, anyway, and I should be glad I’m not in that field. When I asked how that could be (isn’t customer focus the core of marketing?), he went on to say the following:

    Marketing is not about giving the customer what he wants, or even finding out what the customer wants and trying to get engineering to create it. It’s about trying to sell the customer what you already have — whether that’s product, talent, or pre-conceived notions. If the needs of a customer occasionally overlap with an actual product, that’s merely random coincidence.

    “Marketing people are customer-focused in the sense of always thinking about why customers aren’t buying enough stuff, and how to get them to buy more. You’re customer-focused in the sense of caring about what customers need, and helping them accomplish it, even if that doesn’t result in selling anything.

    But don’t take it so hard. It’s not as if I said you were too honest to be a banker, or too smart to be a teacher. (God, what if girls thought you were too handsome to be sexy?)”

    While I find this cleverly stated (even though I’m nowhere near too sexy for girls : ), I sure hope this isn’t the real goal of marketing. My hope is that it’s about taking a solution and letting folks that have the matching problem know so that you can trade your solution for their money and both consider yourselves lucky. Is this a naive view? Anyone with real marketing training want to chime in on the real goals of marketing?

    August 12, 2003 spout

    I’m no hero

    Tuesday, August 12, 2003

    In yesterday’s post, I did not mean to imply that I was some kind of internal David against the MS Goliath. I am in the majority of employees when I say that I want to keep in mind what’s best for the customer. The only issues, really, are what is best for the customer and how can those needs be met within the limits of our resources. We do spend quite a bit of time arguing over those, however. : )

    August 11, 2003 spout

    I speak for the trees

    After a few weeks at Microsoft, when I was feeling particularly frazzled with my work and travel schedule, Peter Drayton pulled me aside to reinforce what I’d heard before: the first 6 months at MS suck for everyone; after that, you either hate it forever or you can’t ever imagine working anywhere else. At that point in my budding MS career, I was leaning towards the former. Peter, having been there, said that he’d gotten a piece of advice that had seen him through.

    The advice was simple: have an agenda. The idea is, no matter what projects you work on, no matter what groups you go to, no matter what tasks you’re into that day, to have an underlying agenda that pushes you forward and drives your decisions. Businesses call such a thing a vision statement.” Authors call it a story.” Whatever you call it, it’s always helpful to have one and here’s mine:

    “Remember what it’s like to not work at Microsoft.”

    That’s it. That’s my goal. Of course, as with all things, Dr. Seuss says it better than I can:

    I am the Lorax. I speak for the trees. I speak for the trees, for the trees have no tongues.”
    I consider it my mission to speak for the thousands of developers that I’ve known and talked to over the years that have no tongue inside Microsoft.

    This came up just this morning on the phone with a colleague of mine at MS. He said, We need to maintain the value of X.” I replied, I don’t care about the value of X. I care about enabling our customers to get the most out of our products.” Of course, there are hundreds of people concerned with X inside of MS and they would be less than happy that I’d dismissed the value of it, but that didn’t matter to me. What mattered was being the kind of developer advocate inside of MS that had helped me when I wasn’t there and to be a constant reminder to my colleagues of the needs of those folks.

    Since MS was founded by developers and run by developers (which has its pros and cons), I plan on being more successful than the Lorax.
    August 3, 2003 spout

    No huggy, no kissy, until I get an RSS feed

    Here. The one where I stoop to using a country song to make my point.
    August 3, 2003 spout

    No huggy, no kissy, until I get an RSS feed

    Before RSS took over, I had a folder named Daily” which had links to all of the URLs that I surfed to on a daily basis. One problem was that for the sites that changed daily, it was a pain to decide what was new. An even bigger problem was the ones that didn’t change daily. Eventually, the pain of surfing to them daily was outweighed by the pleasure I would get when those sites were finally updated. A bunch of my friends’ infrequently updated blogs fall into this category (you know who you are : ).

    Sure, RSS is useful to track Scoble as he shirks his moving duties, but even more useful to track Tim when he eventually does update his blog. With RSS, I don’t have to experience any pain surfing to Tim’s blog day after day. Instead, I let SharpReader poll Tim’s blog and when it’s finally updated, I’ll know about it. All gain; no pain.

    What that means, unfortunately, is that I only read blogs with RSS feeds, because I’ve long ago gotten out of the habit of surfing my Daily” folder. So when Josh Trupin (editor of MSDN Magazine) gave his reasons for being out of the office on Monday, he had to send me an email with a link to the description of his horrific train injury detailed on his blog. As fun a writer as Josh is, I won’t go back (unless Google brings me there) til he’s got an RSS feed. I’ve been hurt before; now I’m older and wiser and require an RSS feed before I’m willing to wed myself to a blog.

    August 3, 2003 spout

    Positive Affirmation

    I woke up at Don’s house one day last week utterly convinced that I was going to win the lottery that day. It was 6:30a, which is early for me, but I had an 8a meeting (*very* early for Microsofties), so I had set the alarm. Tim, who was also staying at Don’s that week and with whom I was sharing a room (separate beds : ) was on Eastern time, so had already accidently woken me at 6a that morning on his way to the door (it’s not his fault; I’m too long for the bed and it’s a tight squeeze to get past me when I’m I’m in it). I must’ve had some strong dream between 6a and 6:30a as I lay there in and out of sleep.

    The premonition was so strong that I recalled the epilog from one of the first non-comic Dilbert books in which Scott Adams talked about his belief that there were multiple parallel universi and that by process of positive affirmations, he’d moved his consciousness into one that had attained great success in spite of his abysmal drawing abilities (this was before his TV series was canceled).

    So, all morning, in classic positive affirmation style, I had I will win the lottery today” running through my head. It swamped all other thoughts, except those of whether I wanted the annual payment or the lump sum ($25M or $13M, respectively) and how I was going to spend the money.

    My first purchase was to be a two-week trip for my entire extended family to Hawaii where we would decide how rest of the money was to be spent. The idea was to devise a plan wherein every adult member of my family could get a life-changing amount of money, e.g. $100K, to use to follow their dreams, but awarded only in a manner that wouldn’t actually cause more harm than good (as large sums of money can do [or so I’ve heard…]). Then, I called my sister-in-law to ask her where, money being no object, she would want to live. I’ve been looking for houses in her neighborhood lately so that we could be closer (“It takes a village to raise a child.“).

    Right away, she was suspicious of my question, Why? Are you going to win the lottery?”

    Yes,” I said, confidently.

    Really? How do you know?”

    I woke up with a feeling,’” I said, unashamed.

    How often have you had these feelings and they’ve come true?” she asked, judging her odds.

    Never.”

    Oh,” she said, disappointedly.

    No. I mean, I’ve never had a feeling like this before,” I corrected her.

    Oh,” she said, this time more excited. I’ve also loved that about my sister-in-law. She’s very open-minded. She never once questioned my sanity (out loud), but instead started planning where she wanted to live. Her conclusion is that she’d want a nicer house very close to where she currently live, but basically, that was all. “I like my life,” she said.

    That was my conclusion as well. I have things that I want to do that aren’t likely to generate an income stream, e.g. figure out how money works, but my life is a good one and doesn’t need major changes. It was fun to go through the mental exercise and I would certainly have been happy to win the lottery that day, but it’s OK that I didn’t. That early morning feeling lead to positive affirmation of a different kind.

    July 28, 2003 spout

    My First .NET Show

    In many ways, my list of My First” articles lately have been written out of duty to all of the developers that have always wanted to work at Microsoft, but haven’t yet been able to. I first applied for a job @ MS as a summer intern in 1988. I was turned down while another guy down the hall of my fraternity was accepted. He spent all summer building LCD panels into one giant screen and I spent all summer writing FoxPro code. I wonder if he still works here. I can’t for the life of me remember his name. David something…

    Anyway, every time some new, fun, cool opportunity comes up, I feel like I have to take it just so that I can share it with the folks that don’t yet work here (seems like they’re hiring everyone, though, so it shouldn’t be much longer : ). This time, I got to be in an episode of the .NET Show. I was to be 15 minutes of code demo after Brad Abrams and Anders Hejlsberg reminded folks that .NET wasn’t just about web services. There were all kinds of folks that Robert had on tap to give the demo, but they were all busy, so eventually they got to the last monkey in the barrel and had to settle for me. : )

    I flew up this morning and had to call MS information: Hi, I’m a Microsoft employee, but I’m new. Can you tell me where to go to get the MS Studios?” This in spite of the fact that I’d been there less than two weeks before! (I’m terrible at remembering anything that doesn’t have a lot of parenthesis and braces in it). They showed me to Green Room #2, where they had some food waiting, just like I was a real “talent”. Maybe the food was really for Brad and Anders. Maybe the food was for Nick Hodapp, Project Manager for Visual C++, who was in the makeup chair when I arrived. Nick was there to remind people that MS is serious about C++ both in the native and managed spaces and to show off the port of Quake II to managed C++.

    While I waited my turn in the makeup chair, I watched Brad and Anders do their thing and made sure my demos worked. I was amazed that Robert never stopped the shooting while he did his interview. He did the whole thing in one take, which puts quite a burden on me to get my demo right the first time! I also spent some time eating the Green Room food, IMing my wife (she said to make sure not to use too much blue eye shadow or I’d look trashy”) and giving the makeup artist a talk on the benefits of Wi-Fi (she asked, honest!).

    After Brad and Anders were through, they wandered into my makeup session. I’ve always wanted to meet the creator of C#, but not while having my eyes done… Anyway, Brad and Anders were having a debate about the merits of a new optimization of the .NET framework and it was really cool to see how practical Anders was. I don’t know why, but I imagined a guy that could come up with something as clean and simple as C# to be pretty academic. That wasn’t the case at all. His view of the debate was that he wanted to see a few uses of a proposed new feature before he even thought about including it, as opposed to judging it on the basis of it’s coolness” as can happen when engineers gather together in groups. That brief chat made me feel better about having him in charge of my favorite programming language.

    After having just the right amount of blue eye shadow, I sat up on stage with Robert and Nick and my new friend Bob, who ran the entire shoot. He was like the voice of God, being only heard and not seen from his control room in the bowels of MS Studio. He and I bonded quickly as we settled into the banter of trading insults familiar amongst the wiseasses of the world (now *that* sounds like a cool domain name! : ). Robert was very causal and very smiley, very different from the seriousness he portrays on film. Nick was very polished and gave such a compelling demo of the managed C++ Quake II port that I couldn’t help but jump in and beg for more. I, on the other hand, said the word crack” and mentioned my colleague as he IM’d himself onto my computer screen, both times making Robert roll his eyes at me (off camera, I’m sure). I also went off into la la land once when I answered a question that Robert hadn’t asked, causing Nick to jump in with an answer.

    All in all, having yourself filmed for posterity was pretty different from giving a talk. It was nice, because I had Nick and Robert to play off of and Robert was very good about moving things along. It was hard because, unlike a talk, there were things that I said that I wished I hadn’t merely because they are permanent. Hopefully it went over well as a whole. I don’t know if I’ll be able to watch it myself. Someone please tell me how it is when it’s published next month…

    July 23, 2003 spout

    Windows XP Remote Assistance Rocks!

    I just had a Windows Moment.” I was on the phone with my Dad who has Windows XP and was having trouble. Since he paid for my computer science degree, he assumes that I’ll be his tech support. In fact, everyone in my family assumes I’ll be their tech support; it’s annoying as hell! I don’t know how support folks diagnose and fix problems over the phone all day long. More than 5 minutes and I’m ready to say, How much was that computer science degree, Dad? I’ll write you a check.”

    Anyway, after trying it for about 20 minutes (and failing), I asked him if he had the Remote Desktop settings on his My Computer->Remote tab, thinking that I could use terminal services to solve his problem. Of course, since he was running XP Home, he didn’t, but he did have Remote Assistance. So we tried it. And even though he’s in the back woods outside of Fargo, ND and on dial-up (isn’t this a commercial for Windows XP?), he was able to email me a request for remote assistance (Start->Help->Ask for assistance->Invite a friend to connect to your computer with Remote Assistance) and I was able to connect to his computer (through my firewall!) and solve his problem (half of Office 97 was installed on C: and half on D: and wasn’t happy about it at all).

    Wow. That’s a feature that made my life better.

    July 23, 2003 spout

    Using GotDotNet Workspaces For Commercial Work

    Wednesday, July 23, 2003

    When I visit Redmond, I share an office with Andy Oakley, the PM for GotDotNet Workspaces. Workspaces was recently released from beta to v1.0 and when that happened, Andy sent around feedback from users.

    Of course, folks love it in general (even some hard-to-please MS internals), but I was surprised to see to some folks were using private Workspaces for their team’s main source code base. I shouldn’t have been surprised; this makes a lot of sense. Private workspaces provide a protected space for file sharing, discussion, bug tracking and source code control. The last time I set up a commercial software development team, I needed weeks to get all of this picked out, installed and working and I needed an IT guy to keep it running and backed up. I remember hearing about a 3rd party that was going to bundle all of this together for a fee, but never got around to it. With Workspaces, MS already provides the whole team development environment, including VS.NET integration and a web interface, and it’s free! Plus, with a private workspace, only folks on your team get access.

    IMO, the only big piece that was missing from Workspaces was a way to pull down all of the source onto a build machine for regular automatic builds. For commercial work, this is key. So, Andy, tired of my whining, built a command line tool for pulling down all source from a GDN Workspace (and put it up in it’s own GDN Workspace). Personally, I’d be slightly happier if it took arguments from the command line instead of a .config file, but that’s easily added from the Genghis CommandLineParser class for those that are interested. Enjoy!

    July 22, 2003 spout

    My $5 Digital Music Experiment

    I *really* want to own my digital songs, so I’ve been dying for a real site to purchase them one at a time, instead of buying entire albums I don’t want or ripping the songs off of the albums I do own. Towards that end, I was excited about BuyMusic.com and immediately spend $4.95 on five Avril songs. Overall, it was not a happy experience.

    What I love about BuyMusic.com is the site:

    • The web site is very usable and full-featured, making finding, listening to and ordering artists, songs and albums easy
    • The price is right: $.99/song and $9.49/album
    • I really wanted to immediately find the web service so that I could write a program to go through my wife’s bootleg mp3s and purchase them

    Unfortunately, I hate BuyMusic.com because of the Digital Rights Management (DRM) experience:

    • On one machine, I could listen to all of the songs, but only after a DRM upgrade” (whatever that means)
    • On another machine, I had to do systems administration to play a song (DRM doesn’t like it when you’re a guest and an administrator in the same account). This is fine for me, because I can chase the error to the web page and do the systems administration on my account, but what about normal people? Then I had to do another DRM upgrade. *Then* I had to log in with my user name and password on *every* song! That means I have to roam around to every machine in my house that might possibly want to listen to the music, because only I know the email/password for the songs I buy. What a PITA!
    • I’m allowed three machines? Why? I can take my CDs to any machine in the house and my cars. I want to own this music for life and I *know* I’ll have more than 3 machines before the end of it. I tried it on four machines and it didn’t turn me away, which is nice, but how long will that last?
    • How are these WMA files going to work with my mp3 player? Even if the format works, will the DRM get in the way?
    • What about if I download a bunch of songs on my way out the door? If I’m on an airplane, I can’t jack into the Internet to obtain the license and there was no pre-license” batch mode that I could find to save me from obtaining the licenses one at a time

    The whole experience made me want to cry. The site was so great, but the playback was *so* hard. Why do I have to be treated like a child? I’m dying to pay for the music I want, but I don’t want to be penalized for it. I really wanted to find the inevitable hacking tool to strip the DRM off of the music I downloaded so that I could use it more freely, but what’s the point of that? This kind of hacking would break the license agreement and is no better than downloading mp3s (although the the latter is a hell of a lot more convenient).

    July 17, 2003 spout

    My First Visit to MS Studios

    I went with Erica Wiechers (.NET Show heart throb) to visit MS Studios today. Ostensively we were there to preview the Applied XML Developer Conference videos, some of which Erica will be turned into MSDN TV episodes. However, as long as we were there, Bob Snyder gave us the nickel tour.

    The front entry was even more secure than the normal MS buildings, being encased in wire fencing and not yielding to my badge (we had to be let in from the inside). Once in, it was a big building with lots of open space and fun decorations. I got to see several blueprints of famous imaginary places, e.g. the spaceship from Lost in Space, the Addams Family house and the island from Gilligan’s Island. I got to see the two green rooms where talent” gets ready in the full locker rooms, then relaxes on the coach til it’s their turn (although neither room is green). I got to see all of the studios, including standing on one of BillG’s markers, seeing the set where he interviewed with Larry King and the other set where he recorded his antitrust testimony. I also got to see the set for the .NET Show, which looks like the inside of half of a giant bowl, so that they can blend in custom backgrounds, both physical and logical. I go to see all kinds of cool a/v routing and mixing equipment, putting my one little PC attached to my home theater system seem so pathetic in comparison. I even got to see some live footage of Steve Ballmer that they were filming that day (man, he gets excited when he speaks : ).

    In general, I’ve been getting to see and do a lot of cool stuff here at MS. Recommended.

    July 14, 2003 spout

    Alan Cooper’s Has A Dream

    In addition to bending my head back during my flight lesson, Alan Cooper always manages to bend my brain back, too. Here’s a guy that invented drag-n-drop UI development umpteen years ago and he’s been in the business ever since, mostly doing interaction design, but lately trying to tackle the problem of software management. His main thesis is that web designers are called programmers, programmers are called engineers, engineers are called architects and architects are never called.” He justifies this statement by comparing architecture to real-world architecture, which is very different from what the IT industry has co-opted the term mean.

    For example, in the world of physical buildings, an architect meets with the clients to understand their needs and listens to their ideas. He then designs a building via a series of increasingly specific sessions with the clients to understand what they need and with engineers to understand what can be done. He uses these interactions to produce blueprints to hand off to the engineer. The engineer decides how to build the building, e.g. what materials to use, what to build or buy, what labor is needed, etc. Before we had mass-produced parts and giant spec books describing every material under the sun, this often required experimentation, which would also feed into the production of a more detailed set of plans to hand off to the construction workers, who do the actual building of the structure. While the structure is built, the engineer and the architect checks in to make sure that things are meeting their requirements and, in fact, it’s the engineer’s job to sign off when it does. Likewise, there are inspectors that check to make sure things are up to code at certain phases of the project.

    In the world of software, we’ve got inspectors, they’re called QA staff. We’ve got construction workers, they’re called programmers. We’ve got engineers, they’re called software engineers, even though we have yet to decide what being a software engineer” means (often it’s just another fancy word for “programmer”). We sometimes have architects, but we tend to rely on the combination of engineering and usability folks, most often skipping the usability and most of the contact with the customer altogether.

    Alan’s view of the world of software is that, because we don’t have this very interactive role that really corresponds to the architect very often, non-technical management really has no idea what’s going on in the software construction process. Instead, they have to rely on engineers and programmers to tell them things, when they feel like it, and those guys lie (or plain don’t know). Likewise, because there is so little architecture, what comes out the other side is often not what the users want anyway.

    In Alan’s world, architects fill the role between engineers and customers and non-technical management, designing software that users want and communicating what’s going on with management. Likewise, engineers design software to spec that works under stress; programmers build software that doesn’t crash; QA checks to make sure that this all happens the way it should.

    One of the benefits of Alan’s view is that before engineering happens, architects figure out in a detailed and thorough way what needs building, handing complete specs to the engineers. Likewise, before programming happens, engineers run the experiments and make the technology and resource decisions before any code is written, passing off details specs to the programmers. These details specs also flow to the QA folks, which uses them along with their own quality standards to make sure that the software is right before it ships.

    If this seems silly, think about an inspector signing off on a house before the foundation is poured, a construction worker pouring the concrete before the plans are done or the engineer deciding on the materials of a building before he knows if it’s a house or a mall. Software is certainly more fluid than concrete, but it’s not so fluid as we like to believe, as evidenced by the number of failed software projects and the cost overruns associated with them.

    We think we’re doing architect/engineer/programmer now, but Alan disagrees. What we have is software being hand-made by craftsman from the iron age, but reproduced like appliances from the industrial age. What we need is real engineering for the information age. Alan puts it nicely, We’re standing at the front edge of the information age with really sharp tools from the industrial age.”

    Of course, what Alan’s talking about is the standard waterfall method of software design, which is what I learned in software engineering school. So why don’t we do it? Because we don’t like drawing up blueprints. We like to make the lights go blinky, blinky on the monitor. Building a shed in your backyard is quicker and easier without an architect or an engineer involved, but is that how you want your house built?

    Another benefit of this model of architect/engineer/programmer is that it gives non-technical management much more visibility into and control of the process. You may not think so, but this is good. Right now, the only control they have over the process is the schedule. We say, That’ll take two years,” and they say, You’ve got four months.” Why? Because they’ve been down the two year” software process before and gotten burned ~100% of the time, whether the software ships late or it doesn’t ship at all. At least if they say four months,” they’ve only lost 1/6th of the money when/if things go bad. If we want to take the giant hammer of schedule out of their hands, we’ve got to give them something else so that we have the time we know we need to build quality software that we can be proud of.

    I don’t know if Alan’s right or not, but I sure want him to be. As an architect, I want the tools and the opportunity to design something that the customer will want (I’ve been down the other road before and it never ends well). As an engineer and as a programmer, I want to build something that will be loved and used when I’m done. Isn’t that what we all want?

    July 13, 2003 spout

    My First Flight Lesson

    Normally a title like My First Flight Lesson” would be a metaphor for something else because I’m generally much more engaged by mental pursuits than physical ones. However, in this case it’s literal; Alan Cooper (the Father of VB) gave me a lesson in his plane (a Piper 6-seater).

    Tim Ewald and his wife were staying at my house after the Dev.Conf., so Tim and I and the Sells brothers went to the local little airport to pick Alan up when he flew for an Saturday afternoon lark. When we got there, Alan invited us up for a sight-seeing trip. I volunteered to sit in the back with the brothers, giving Tim the front seat, but Alan insisted that I sit up front in the co-pilot’s seat, clearly having something in mind.

    After we took off and Alan took us out of PDX airspace at around 2400 feet, he told me to take the yoke because he was turning off the autopilot. After that, he took me through part of a real lesson, including playing with the flaps via the pedals at my feet, banking, trimming, descending, leveling off after a descend and in general, crapping my pants. Flying a plane was not what I expected to do that day, let alone so close to the ground with non-trivial winds and thick cloud cover. Not one do we have plenty of bumps and *sideways* motion to make mere riding a harrowing experience, but I had my boys and Tim in the back with their lives in my hands in the front. I find the sensation beyond my feeble powers of description, but it was fabulous and terrifying and emproudening all at the same time. And at least I had control. All Tim in the back got was the terrifying part!

    Alan said that I did well and had a natural ability to keep the nose up (apparently that’s a problem for newbies). Luckily, because he didn’t want to make the folks in the back puke, he didn’t turn off the engine like he said that he would normally do. Apparently there’s nothing like cutting the engine to give a new pilot experience with what actually happens (apparently the plane doesn’t drop like a brick no matter how many I were to drop in my shorts). Also, he said that normally he’d make me take off and land, but only in a Cessna, which has special landing gear for newbies, whereas had I done poorly on the Piper, I could’ve caused $200K worth of damage. On the other hand, while I was relieved not to experience the wonder of zero-engine flight or my first landing, I’m disappointed not to have those experiences as well. It was pretty damn cool to have full control in all three dimensions. That is, except when we overflew the helicopter that the tower didn’t warn us about and that we didn’t see til we were over it. Both Tim and I dropped some bricks when that happened…

    July 11, 2003 spout

    The Killer App for Web Services

    After watching Amazon’s amazing presentation at the Dev.Conf., it hit me that Amazon.com is the killer app for web services. Not only are they technically cool, but they have two business models for themselves and their associates built right in:

    1. I can build a business on their back-end data, selling targeted stuff to my customers, using their services to do all the hard stuff on the back end
    2. I can use their front-end to sell my own products

    Amazon has turned the infrastructure on which they build their own business into a major revenue generator for not only themselves, but for associates. And, if they wanted to take it further, Amazon could provide all of their payment, distribution and storing/querying data as web services for things that weren’t even available for sale on Amazon.com, e.g. medical supplies or porn, removing the need to build all of these services yourself. In fact, they’re already planning on doing this for payment services.

    *That’s* what web services are supposed to enable. *Wow*.

    July 7, 2003 spout

    My First Press Contact @ MS

    Today I spoke with Todd Bishop, a reporter from the Seattle Post-Intelligencer (“the Seattle PI). He was interested in my spout entries about my initial experiences with Microsoft, specifically the BillG ThinkWeek stuff. He called last week, but I didn’t call him back right away. Instead, I asked my grandboss (my boss was out on vacation) what I should do. I remember during NEO that MS has very clear instructions about when to talk to the press, i.e. never. Of course, some folks at MS talk with the press, but unless it’s specifically part of your job, you’re supposed to refer the press to other folks more trained in the ways of the wily reporter trying to get the dirt on MS.

    So, when Todd called and I hadn’t yet made my millions on MS stock options (any day now… : ), I thought I’d ask around first before making any career limiting moves. That was early last week. It wasn’t til today that I got the approval to give the interview. In fact, I’m pretty the MS marketing guy checking on what Todd was up to had a longer conversation than I did. Here’s pretty much the entire conversation (paraphrased from imperfect human memory):

    Todd: Thanks for getting back to me, Chris. I’m glad you went though official channels. That tends to make things go easier.”

    I thought that was strange. If I was a reporter, I’d want to track down the defenseless MS employee when they were least expecting it. That’s what I figured Todd was up to when he called my direct MS line w/o any introductions. Luckily, I work from home in PDX. Bwa ha ha ha ha!

    Chris: No problem, Todd. Sorry it took so long to get back to you. They were clear my first day at MS not to talk to the press unless explicitly instructed and I’m new.”

    Todd: Did you get the list of things I’m after? I’ve already written the story; I just want to check some facts.”

    Oh sure, I thought. This is Todd buttering Chris like toast…

    Chris: Yes. What can I tell you?”

    Todd: You spell your last name S-E-L-L-S?”

    Chris: Yes.”

    Todd: What’s your position at Microsoft?”

    Chris: detailed explanation of MSDN, DevCenters (including their need in the world) and how I’m doing the Longhorn DevCenter.

    Todd: Can I just say you’re an MSDN Content Strategist?”

    Chris: Sure.”

    So now the reporter’s got me giving him more info than he actually wants. I’m in trouble…

    Todd: And your blog is http://www.sellsbrothers.com/spout?”

    Chris: long explanation about how I organize my site, how the Spout is just the editorial section and that I announce everything from all sections on my home page.

    Todd: Oh. So your blog is just http://www.sellsbrothers.com. I’ll correct that. Thanks. That’s all I need.”

    Chris: Really? I expected to be grilled.”

    Todd: Well, you’re lucky you waited. If you’d have called last week, I’d have really hammered you.”

    Aha! He’s just lulling me into a false sense of security for next time! : )

    [ed: Apparently Robert Scoble took the brunt…]

    July 4, 2003 spout

    Alvio — a very cool place to order computers

    Craig [1] (via Brad) found Alvio, a really cool place to order computers online. My favorite is the page that lets me configure a barebones P4 system from scratch [2] and then they assembly it, test it and guarantee it for a year. The thing that I like most about Dell is how easy it is to configure computers online. To be able to configure one from the ground up w/o any OSes et al is *way* cool. [1] http://staff.develop.com/candera/weblog2/permalink.aspx/9090a88d-dd58-4310-bb33-85cdc0b121b6 [2] http://www.alvio.com/smoreinfo.asp?iid=941
    June 23, 2003 spout

    The Danger of Good Debate Skills

    I have been in technical arguments many times where I knew I was right and used every once of my debate skills to convince the other person of their terrible wrongness. This can go four ways:

    1. I’m right and they eventually agree
    2. I’m wrong and I turn to their point of view
    3. They get worn down and stop listening
    4. I’m wrong, but they fail to convince me

    Being right is fun, of course, as is finding someone that’s willing to change your mind (lots of folks don’t like to argue). Wearing a person down is no fun at all, but by far the worst is that I’m wrong and I stay wrong. Unfortunately, as a professional communicator for the better part of a decade, #4 is a real possibility and it’s something to really watch out for. Being right is easy. Recognizing that I’m wrong is easy when I’m arguing with someone with good communications skills. Recognizing that I’m wrong when the person I’m arguing with isn’t quite up to the task, that’s hard to detect and fix.

    Of course, even harder is being wrong and having no one to tell you you’re wrong, but I can’t blame that on anyone but myself. : )

    June 22, 2003 spout

    Learning to Learn

    Sun, June 22, 2003

    The most important thing that I’ve every learned is how to learn. I and a few other lucky souls gained this knowledge at the tutelage of one of my mentors, Don Box, during my tenure at DevelopMentor. Not only did I have an amazing thinker to learn from, but I had a enormously difficult topic to learn on: COM.

    When I started learning COM in the early ’90s, only a few souls inside of MS really knew it. The only real book in the world on COM at the time was inscrutable and no one with the necessary communication skills and the time to teach COM had yet grokked it fully. Don had written a five-day short course entitled Essential OLE, but only given it a few times, so hadn’t really gotten over the hump (as evidenced by the title of the course). It was my job to become the second instructor on COM at DM.

    I’ve always been one of those people that, when faced with a topic and the proper motivation, could almost always learn it easily. This skill helped me to get good grades, but didn’t teach me how to really learn; it was too natural for me to understand how I did it. Unfortunately, COM was too hard to learn naturally” and there’s nothing like preparing to stand up in front of a group of people to motivate you to learn. In fact, the first time I’d had to teach COM, I was so nervous on the last day (when I was to teach the material I knew the least well), that five minutes before my first lecture of the day, I had to find an empty room to hyperventilate. I literally didn’t know what I was going to say.

    Unfortunately, I didn’t have the option of bailing at the last day of this class unless I was prepared to give up my job at DM. It wasn’t the bailing that was the issue; if somebody else that knew the material was available, I could’ve bailed (that’s how cool DM was). Unfortunately, only Don knew it and he was out of town. So, I had only one choice — fake it. I wasn’t proud, but public speaking is like any other form of entertainment and the show must go on.”

    As I was giving the slides that morning on COM structured storage (a particularly nasty topic in COM), I found myself learning how it it worked as I told the story to my audience. All the studying and experimentation I’d done had given me the foundation, but not the insights. The insights I gained as I explained the technology. It was like fireworks. I went from through those topics in a state of bliss  as all of what was really going on underneath exploded in my head. That moment taught me the value of teaching as a way of learning that I’ve used since. Now, I always explain stuff as a way to gain insight into whatever I’m struggling with, whether it’s through speaking or writing. For me, and for lots of others, story telling is where real insight comes from.

    Still, teaching without the foundation of knowledge isn’t effective. How do I gain that foundation of knowledge? I consume the available material and ask why” a lot. If I look at a class hierarchy and it’s design isn’t immediately obvious to me, I ask why it was built that way and why was that way chosen over another. And to the answers to those questions, I keep asking why til I get to something I know already or until I get to a human reason. The reason for not stopping til I get to something I know is that I believe that all learning is only as affective as well as it can be tied to what you already know. How easily it is to learn something is directly related to how much you already know about related topics, so the more you know, the easier it is to learn more. However, when humans are involved, aesthetics take over, e.g. the reason that C++ has member initialization lists and Java doesn’t is that Stroustrup liked that feature and Gosling didn’t.

    The process and benefit of asking why is described well in a novel I’m reading: It put me in contact with military planners from a dozen nations, and more and more they began to come to me with questions well beyond those of military strategy. … I didn’t think my answers were particularly wise, I simply said whatever seemed obvious to me, or when nothing was clear, I asked questions until clarity emerged.”

    What made this process so amazing with Don was that we were both doing the same thing: experimenting and telling each other how it worked, which made for a very tight feedback loop. The loop got better as we added more people, like Tim and Keith, both of whom are also amazing thinkers. Audiences are good because of the feedback that they can provide, but optimized feedback like this got us all leapfrogged very quickly into deep COM thinkers.

    The goal of all learning is clarity. My own method involves taking in the available material, asking a bunch of why” questions and then telling somebody else til clarity emerges. After COM, I’ve successfully applied that method to learning how all kinds of other technologies work, how to run a business, how to write, how to manage, how to lose weight (50 pounds and holding) and, most recently, how Microsoft works. Thanks, COM (and Don and Tim and Keith and every audience I’ve every had : ).

    June 20, 2003 spout

    Naming My Feed

    Fri, June 20, 2003

    When I built the Windows Developer News feed on my home page, it was an attempt to build a Windows equivalent of SlashDot. Unfortunately, I’m not interested in keeping up on all the news in the Windows developer space and the few folks that have stepped up to post on this site are largely spammers (although not all of them). Also, in my own feed subscriptions, I find that the ones I’m most fond of are from individuals, not groups. Plus, my grandboss recently put a fine point on it, I hate the name of your feed. That’s not what it is.“

    So, I’ve moved this feed to be just stuff from me. The problem was, I didn’t know what to call it. In addition to posting links to stuff I produce, e.g. tools, writings, editorial, etc., my site’s feed is really about the things that I find interesting and my personal insights, so I need a name that reflects that. Also, I’m a big fan of puns, alliteration and double meanings (the logo has *3* meanings), so a name with those elements was important.

    As always, when I’m faced with something like this, I turn to the community, specifically my own readers, who seem to have an unhealthy desire to participate in things like this. When I asked them for their input, I was overwhelmed with more the number of responses; and good ones, too (it probably helped that I was giving away a free seat at the Applied XML Developer’s Conference [July 10th — register now!] to the one I picked)! Here’re some of the best that I didn’t pick:

    • The Naked Programmer” from Richard Caetano. This has a nice tie in with the logo and connotes the openness I’m fond of in my writings. The problem with this one is only that it already appears on the web.
    • ″.Nirvana” from Yaniv. This one goes nicely with the logo and my current technology of choice. However, as much as I like .NET, it’s not likely to be the last disciple I embrace, so I don’t want to tie myself to it.
    • Sells-A-Go-Go from Michael Weinhardt. This one from a former protege very much appeals to my sense of fun, but it only has one meaning.
    • Longhorn Foghorn from Mickey Williams. Again, this one ties me to a wonderful technology, but one that I’m legally obligated to stay mum about for a while longer. However, if I have anything to say about it, Mickey, you have named the Editor’s Blog for the Longhorn DevCenter when it goes live. Thanks!

    The one I did pick was a blend from three guys: Mike Prilliman, Chris Burrows and Roland Tanglao. They each gave me parts of my new RSS feed name: Marquee de Sells: Chris’s insight outlet”. This name has tons of wonderful qualities:

    • it’s unique on the web
    • it’s short and distinctive
    • I share a birthday with the Marquis de Sade
    • the Marquis and I share an unhealthy obsession with our respective writing topics of choice
    • my logo is an abstract of my naked picture (the Marquis’s topic of choice : )
    • a marquee is an entrance (like my homepage) with a sign announcing what’s new (like my feed)
    • my feed is an outlet for my insights, whether code, writing or interesting things I find I the web
    • insight outlet” sounds like “inside out,” which connotes how open I try to be (ok, I’m stretching on this one, but insight outlet”
      *does* sound cool : )

    Of course, once I’d picked a name that blends entries from three people, I had the problem of how to award the prize: a single seat at the the Applied XML Developer’s Conference. And then I remembered that it’s my conference, so all three of them get free seats. Welcome!

    BTW, the Applied XML Developer’s Conference is going to rock. Register now before all the seats are gone.

    June 18, 2003 spout

    End-To-End RSS + Comments

    My RSS 2.0 feed exposes end-to-end support for the comments specifications I’m aware of:

    • The RSS 2.0 element to expose a link for a browser-based UI to view/add comments
    • The extension element to expose the number of comments current made on an item
    • The extension element to expose the URL endpoint for posting comments via the CommentAPI
    • The extension element to expose the RSS endpoint for consuming the comments of an RSS item.

    Several other folks are working on producing and/or consuming the extension as well, including Joe, Sam, Scott, JamesS and Kevin. JamesD posted instructions on how to do it with MoveableType. Hopefully Dare, Luke and Nick will follow suit.

    June 16, 2003 spout

    Releasing Nested Objects in Rotor

    Chris Tavares is making more progress finishing up the Ref-Counting in Rotor project:

    class FinalizerObj {
      int n;

      public FinalizerObj( int n ) {
        this.n = n;
        Console.WriteLine(“Created Finalizer object {0}”, n);
      }
     
      ~FinalizerObj() {
        Console.WriteLine(“Finalizing finalizer object {0}”, n);
      }
    }
     
    class FinalizerContainingObj {
      FinalizerObj subObj1;
      int n;
      FinalizerObj subObj2;
     
      public FinalizerContainingObj( int n ) {
        this.n = n;
        subObj1 = new FinalizerObj(n * 100);
        subObj2 = new FinalizerObj((n * 100) + 1);
        Console.WriteLine(“Creating containing object {0}”, n);
      }
     
      ~FinalizerContainingObj( ) {
        Console.WriteLine(“Finalizing finalizer containing obj {0}”, n);
      }
    }
     
    class TestApp {
      static void Main() {
        for( int i = 0; i < 5; ++i ) LeakAnObj(i);
      }
     
      static void LeakAnObj(int i) {
        FinalizerContainingObj obj = new FinalizerContainingObj(i);
      }
    }

    Running this app under our ref-counted Rotor yields the following output:

    C:\Home\Chris\Projects\Rotor\src\tests>clix FinalizerTest.exe
    Created Finalizer object 0
    Created Finalizer object 1
    Creating containing object 0
    Finalizing finalizer containing obj 0
    Finalizing finalizer object 0
    Finalizing finalizer object 1
    Created Finalizer object 100
    Created Finalizer object 101
    Creating containing object 1
    Finalizing finalizer containing obj 1
    Finalizing finalizer object 100
    Finalizing finalizer object 101
    Created Finalizer object 200
    Created Finalizer object 201
    Creating containing object 2
    Finalizing finalizer containing obj 2
    Finalizing finalizer object 200
    Finalizing finalizer object 201
    Created Finalizer object 300
    Created Finalizer object 301
    Creating containing object 3
    Finalizing finalizer containing obj 3
    Finalizing finalizer object 300
    Finalizing finalizer object 301
    Created Finalizer object 400
    Created Finalizer object 401
    Creating containing object 4
    Finalizing finalizer containing obj 4
    Finalizing finalizer object 400
    Finalizing finalizer object 401

    In other words, all top-level and 2nd-level objects are finalized deterministically. Wahoo!

    June 12, 2003 spout

    Exposing RSS Comments

    UPDATE: Since publication, this recommendation has been incorporated into many RSS feeds. You can read the semi-official docs for the wfw:commentsRss element on rssboard.org.

    So far, comments have gotten a lot of play in the RSS space:

    • The RSS 2.0 element to expose a link for a browser-based UI to view/add comments
    • The extension element to expose the number of comments current made on an item
    • The extension element to expose the URL endpoint for posting comments via the CommentAPI

    However, what’s missing is the ability to pull out a list of comments associated with an item. Instead, folks like Sam publish their comments as a separate feed, and then feed readers thread the comments with the content by comparing the elements from the type feeds (as well as all of the other feeds). That works for most standard-sized RSS sites, but what about sites that exposes hundreds of thousands of entries like msdn.com? Cached per site comment feeds don’t scale as well as on-demand per-item comment feeds. Towards that end, I’d like to propose another element to the well-formed web’s CommentAPI namespace: commentRss.

    The commentRss element would be a per-item URL for an RSS feed of comments. It looks very like the wfw:comment element:

    <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/"> 
      http://bitworking.org/news/commentsRss/52
    </wfw:commentRss>

    With wfw:commentRss, the RSS reader can pull the comments down on demand, merging them in with the cross-references from other blogs as it does now. In addition, an extension to RSS like this would allow feed readers to subscribe to comments for a particular item, either manually for conversations in which the user is interested or automatically when the user posted a comment for an item.

    Comments?

    June 11, 2003 spout writing

    .NET Rocks Interview — Chris Sells (Again!)

    Here. Chris talks with Carl and Mark about Longhorn, Working at Microsoft, his book with Don Box, his new Windows Forms book, dealing with Printer Margins, passing command-line arguments to auto-deployed applications, linking assemblies, the new Matrix movie, what’s new in Ghengis, and answers the age old question to GAC or not to GAC?’”
    June 5, 2003 spout

    Ref-Counting + Rotor Status

    I just got this email from Chris Tavares (who’s doing the lion’s share of the implementation work to add ref-counting to Rotor):

    using System;
    class FinalizerObj {
      int n;

      public FinalizerObj(int n) {
        this.n = n;
        Console.WriteLine(“Created Finalizer object {0}”, n);
      }

      ~FinalizerObj() {
        Console.WriteLine(“Finalizing finalizer object {0}”, n);
      }
    }

    class TestApp {
      public static void Main() {
        for( int i = 0; i < 5; ++i ) LeakAnObj(i);
      }

      static void LeakAnObj( int i ) {
        FinalizerObj obj = new FinalizerObj(i);
      }
    }

    Under the desktop CLR, I get this:

    C:\Home\Chris\Projects\Rotor\src\tests>FinalizerTest
    Created Finalizer object 0
    Created Finalizer object 1
    Created Finalizer object 2
    Created Finalizer object 3
    Created Finalizer object 4
    Finalizing finalizer object 4
    Finalizing finalizer object 0
    Finalizing finalizer object 3
    Finalizing finalizer object 2
    Finalizing finalizer object 1
    But when I run under Rotor, now I get this:
    C:\Home\Chris\Projects\Rotor\src\tests>clix FinalizerTest.exe
    Created Finalizer object 0
    Finalizing finalizer object 0
    Created Finalizer object 1
    Finalizing finalizer object 1
    Created Finalizer object 2
    Finalizing finalizer object 2
    Created Finalizer object 3
    Finalizing finalizer object 3
    Created Finalizer object 4
    Finalizing finalizer object 4
    Finalizing finalizer object 4
    Finalizing finalizer object 0
    Finalizing finalizer object 3
    Finalizing finalizer object 2
    Finalizing finalizer object 1

    I obviously still need to figure out how to pull the object off the finalization queue, but that will have to wait until tomorrow night.

    Even though they’re being called by us and by the GC, this is the first time we’ve been able to get finalizers working. Wahoo!

    June 4, 2003 spout

    My First API Review

    Wed, June 4, 2003

    Maybe you’re getting tired of my posting my firsts” at MS, but that’s the beauty of this medium. I get to say what I feel like and you get to listen or not, as you choose. Mostly this Dear Diary” format helps me to digest the world around me. Many times, the writing itself has helped me to clear my head. If you haven’t tried it yourself, I recommend it.

    So, on with my next first.” Today I crashed an API review. I happen to be on a few internal Longhorn mailing lists and recently got an announcement of a new API that was going up for its first review. I didn’t know what to expect, but I hoped at least to see some familiar faces and to introduce myself around.

    Now, the way I work things, I try to really pack myself into meetings when I’m up in Redmond so that I can get the most out of my time away from home (I’m still based in Portland, OR). In this case, I had a meeting scheduled from 9am to 10am in building 5 and then had to truck across campus to building 42 for the API review at 10am. Needless to say, I was late (the only thing harder than finding parking in the sea of cars after 9am is finding your anonymous rental car when you come back for it). Luckily, MS meetings seem to start late as a matter of course, so I hadn’t missed anything. However, I was a bit surprised that in more than a month of introducing myself around, there was a room full of 10+ people and no familiar faces. They glanced up at me when I came in the door and seemed a bit confused as to who I was, but didn’t ask or toss me out on my butt (it’s handy being 6′5″ sometimes : ).

    The process was pretty cool. Apparently the team building the API had answered a standard questionnaire from the review team, which included target users, potential security problems and representative sample code that users would be expected to construct. The review team had prepared by going over the questionnaire and prepared topics of discussion (the latter making this review process better than most I’d attended). The API team provided answers to the questions and took notes on how to fix their API.

    I was impressed with the whole thing. The API team was very open to suggestions for improvement, even letting me put in my two cents (I couldn’t help myself : ). And the design team gave out just the kind of advice I want all .NET APIs to follow, e.g. use best practice coding conventions in sample code, support IDisposable at a macro level instead of a micro level, expose collections from properties returning IEnumerable (not from the parent object itself), prefer properties over Get/Set methods (as appropriate), don’t tack the name of the enumeration type onto the enumeration values themselves, prefer overloads to parameters that can be null, prefer typed parameters to object parameters, etc. In addition, where the API team had reinvented the wheel (they were experts in their problem domain, not the entire .NET Framework Class Library, after all), the review team pointed them at what to emulate and where to look for more guidance. The whole process gave me quite a bit of confidence in .NET maintaining the high degree of consistency that’s it’s achieved to date (the FCL consistency is not perfect, I admit, but it’s a damn sight better than COM APIs ever were and don’t even get me started on Win32).

    After all that, I did finally get to introduce myself (the note taker on the API team wanted to know who was complaining : ), I helped name a Longhorn data structure and I met a General PM that I needed to talk to anyway, so it was a useful experience all around.

    June 3, 2003 spout

    Submitting to Billg’s ThinkWeek

    As has been mentioned out in the world, every once in a while Billg takes time to back away from whatever he’s working on to think big thoughts. Employees are allowed to influence those thoughts by sending in papers about whatever they want. I heard about this a few days before the deadline and, as I had an idea for something, I wrote up a quick treatment. In spite of the odds against me, I couldn’t let such an opportunity pass by w/o even trying!

    I sent my short piece around internally and, because of it’s length (I only had time to put together 2.5 pages), I expected to get all kinds of feedback of the lack of depth. Surprisingly, I only got one of those and a bunch of positive feedback, including some useful tweaks.

    After applying the tweaks and running into the limit of time I could spend on it (I did have any actual job to do, after all : ), I sent my paper to the screener that makes sure that Bill’s not bothered by trivial things, expecting to hear where to file it. But I didn’t hear that. In fact, I didn’t hear anything at all til today when my own patron St. VP thanked me for my submission, being all kinds of vague about whether Bill will be handed my paper or not, but pointing me to some folks internally about making my idea happen. I took this as letting me down gently, but further emails indicated that my paper *had* been sent along to Bill.

    Now I’m wondering what the heck Bill will do with it. Ignore it? Shred it? Send me an email with a single line, Make it so, #1?” I’m not sure which one is scarier. After having survive my first encounter with a VP, I wonder if I’ll survive my first encounter with it’s commander and chief. Keep your fingers crossed. : )

    June 2, 2003 spout writing

    MSDN Article: No Touch Deployment

    Here. From JosephCooney: Chris has a new MSDN article on passing command-line parameters to No Touch Deployment” windows forms applications
    May 24, 2003 spout

    My First Meeting with a Senior VP

    On the anniversary of my first month at MS, I took my first meeting with a Sr. Vice President. I’m told that’s a big deal. One colleague who’d been at MS for a few years said, Wow. You must be important. I expect that the first time I’ll be in a meeting with a Sr. VP will be at my firing.” In my case, it’s not that I’m important (I’m not) that got me involved with such a meeting; it’s that I have recently been asked to participate in a project that needed to meet with the VP to clarify some review feedback . Or, in other words, it was a pretty pedestrian here’s what we’ve come up with since the last time we met” kind of meeting. What made it interesting was that it was with a Eric.

    Imagine a company run as a strict meritocracy that’s one of the most important and profitable in it’s industry. Now imagine that this company has been around for a while and has acquired tens of thousands of employees in a multi-layered hierarchy, with only the best and the brightest surviving and the best of the best rising to the top. That’s MS. Billg is layer 1. Eric is at layer 4 w/ a small number of peers. I’m at layer 9 or, as I like to call it, “the bottom.” By all rights, that means that Eric should be 5″ smarter than me, and I can see him fitting comfortably into that category.

    Had Eric wanted to shred us, I’m sure he could have. Luckily, it was a nice, calm, productive meeting w/ him cutting quickly to the main points (in spite of the fact that he was reading and making notes on our handouts while still listening to our presentation). He also make some pretty interesting comments, especially considering how little time I’m guessing he’s had to think about the problem space. At least one comment put me on a path that I like much better than the one I was on (although we’ll see how he feels about it at the next review). The comment that startled me most, however, was when he said that he read my site. If this is my last post from inside the big house, you’ll know how much he liked it. : )

    May 21, 2003 spout

    My First Month @ MS

    Wed, May 21, 2003

    Today marks the 1-month anniversary of my assimilation. For those expecting references to my scars,” you can be as surprised as I am that there aren’t any. In fact, my coming to MS has not really been a big deal. Oh, folks were nice and I got emails from all manner of internal and external folks with nothing but good wishes, but, somehow, I expected something different. Frankly, given the world’s impression of MS, I think I expected hazing. In fact, I woke up this morning with memories of dreams involving all kinds of bizarre knowledge- and activity-based initiation rites lead by my grand-boss that reminded me of a cross between my college fraternity and Fear Factor (although maybe I was still reliving my MSDN morale event” experience : ).

    Why did I expect all kinds of horrible things? Because MS is a very intimidating company; they play to win, seemingly at all costs. This A+ personality trait is certainly reflected inside the company, but there’s something else there, too. The part that surprised me was that job #1 seems to be exactly what I would pick: do the right thing” for the customer.

    In fact, doing the right thing is so important that MS builds a customer advocate” position right into the heart of their culture; these people are called Program Managers” (PMs). PMs are not to be confused with Product Managers,” who are marketing folks. Of course, MS has all the standard positions, e.g. marketing, managers, developers, testers, documentation, etc, but they also have this PM position that, as far as I can see, forms the glue for the company and affects everything else. The PMs job is wake up in the morning and think to him/herself, What’s the right thing to do today?” The range of things that fall into this category is far too wide to even give you the bounds, but essentially it’s whatever someone else isn’t already doing (or isn’t doing to their satisfaction : ). Once they identify the right thing to do, they can attempt to take ownership” of making it happen (your boss gets a say in how you spend your time).

    Once ownership is acquired, that’s when things get interesting. PMs have all kinds of responsibility, but no authority. While this kind of position is generally one to avoid in the world of corporate politics, the internal product cycle training video I watched a couple of weeks ago points out that responsibly without authority” is by design. Instead of ruling by fiat, PMs have to wander around the company finding folks that are involved with what they’re doing to get their buy in” and their help. The way to do that is through old-fashion politics, i.e. gathering consensus, persuasion, trading favors, brow-beating, table thumping, complaining up your own management chain, complaining up your opponent’s management chain, etc. It’s not just a popularity contest, although being liked certainly helps. It’s also about your reputation, as established by your technical chops and your ability to produce, among other things. Under-achievers need not apply.

    In other cultures where the hierarchy is all, such meritocracy can’t really work (in spite of lip service to the contrary). There’s often too much of an attitude of “who the hell are you to tell me what to do?” to even be allowed to present your case. Luckily, since there’s a whole bunch of folks wandering the halls looking for favors, the MS culture makes it OK to work in this manner. That’s why the role of PM forms to key to the culture, imo. Oh sure, MS is a real company with a well-established hierarchical chain of command (there’re currently 7 people between me and Billg), but hierarchy is only one part of the organization, and arguably not the dominant one (although I’m still new : ).

    In a way, the whole system is kind of like the legal system. In the court room, lawyers from each side argue before a jury, each using every trick in the book to push their agenda and the law is only part of the equation. The jury decides who’s right.

    At MS, multiple PMs all wrangle with each other, each using every trick in the book to push their agenda and technology is only part of the equation. Sometimes, it’s the folks inside of MS that serve as the jury. Sometimes, it’s the market itself that serves as the jury. In the latter case, that’s why you sometimes see multiple products from MS that seemingly serve the same purpose, e.g. C++ vs. C#. Those are two groups that both think that they’ve got the best way to accomplish their goals and they’ve both made strong enough cases internally to be allowed to compete externally. Probably the reason that each product exists in the first place is because one day some PM probably woke up and said, MS really needs a C++ compiler” or .NET really needs a C-like language that’s not as hard to use as C++,” and look what they got themselves into. : )

    Of course, it’s not just PMs that have the responsibility to constantly be on the lookout for the right thing. Everyone is supposed to get up every day with this attitude. It’s just that PMs only get to persuade; they don’t get to order things to be done (unless they get staff). Since MS is filled with folks all aiming to do the right thing, everyone is constantly committing to help with new ideas. That’s why you see MS folks at conferences always busy and always rushing back to their rooms to check their email; they’ve committed to do way more than a normal human can do because as the right things” come along, it’s darn hard to say no.” That’s why I started this spout entry on a Wednesday but I’m finishing it at 8am on a Saturday while the rest of my family sleeps. Even in the last month, I’ve accumulated a bunch of projects of varying sizes, all of them right” as far as I was concerned.

    According to the training video, in spite of this overwork and the recent lack of any expectation of riches, folks that come to MS don’t seem to ever want to leave. It’s that darn culture of the PM again. I’ve worked at large companies that run by fiat and they suck. Hell, I’ve worked at small companies that work by fiat and they suck, too. Is it any wonder that, assuming you have merit, once you find a stable, interesting, friendly company judging you on your merit that you’re loathe to leave? I find myself cataloging the skills that I think I’ll need to be successful at MS and it seems like I’ve been preparing for this job since I was 12 years old. I’ve hopped from company to company looking for the perfect fit. DM provided that fit during the boom. Is MS going to provide it from now on?

    May 16, 2003 spout

    My First Talk As A Microsoft Employee

    On Wednesday, I gave my first talk as a Microsoft employee. I was told that the talk was for a bunch of UK folks that needed to be put on the .NET path and could I do 90 minutes on intro to WinForms in a conference room on campus? I can do intro to WinForms material for hours without preparation, so I didn’t do any. Instead, I showed up with my laptop and plugged it into the overhead, where I then spent 10 minutes wrestling to get it out of suspend mode (the world needs faster hard drives!).

    While my HD woke up (apparently jet-lagged from the trip between building 5 and building 43), I started warming up the crowd with questions How many of you are C++ programmers? How many VB programmers?” The room was split pretty evenly between C++ and VB, taking half of my jokes away (I’m happy to make fun of either C++ or VB programmers equally, but it’s less fun when only half the room laughs). Plus, these guys were *way* jet lagged, so getting them to even keep their eyes open in the afternoon after they’d arrived was a challenge, let alone getting them to laugh or even engage.

    And then, because my HD was still shaking off the dust, I asked Did you hear anything good today?” Predictable, they said that they’d like the story of web services (Don had been there earlier in the morning) and that caused me to launch into my rendition of how WinForms + Web Services provided a wonderful way to keep all of the UI logic on a single machine, as opposed to web applications, where the UI is split between the client and the server. They weren’t biting.

    Plus, after diving into some WinForms intro material and having it fall flat (anchoring and docking normally wows em), I did a bit of deeper digging into my audience. It turns out that most of them were old hands at WinForms, throwing my planned material right out the window. Luckily, I did find a topic that they’re weren’t familiar with: href-exes. So, I did my normal href-exe shtick for about 60 minutes, getting them to wake up, ask questions and even laugh a bit at my witty repartee.

    Thinking I was in the clear, I opened the floor for questions. Of course, the first question they asked was the same question I’d have asked if I were in their shoes (as I so often was until about a month ago), What’s new in WinForms 2.0?” And that’s where things got shaky again. I had some ideas of where WinForms 2.0 was going in the next release of .NET, but nothing concrete (I’ve been buried in Longhorn and a whole new culture too deep to dig into WinForms futures yet). Plus, even the things that I did know, I had no idea what I could say. Where these guys under NDA? What could I say to them if they were? What can I say to them if they’re not? Even if I’m not supposed to say anything, I want them to like me (every speaker’s guiding principle) and I wanted to say something besides I know, but I’m not going to tell you. !”

    So, I stammered out what I knew to be some WinForms desires without making any promises on their behalf and hoping no one would ever know (except my closest friends reading this spout entry : ). It wasn’t a happy experience. I should have talked with the WinForms guys before my talk so I knew what I could say about the future. Rookie mistake #1.

    Rookie mistake #2: In an effort to stay open to these guys, I wrote my alias on the flipchart and then, while I filled in the domain, kept answering questions. When I looked back at the flipchart, I discovered that I’d written csells@sellsbrothers.com”. Doh! Since it was a flipchart and not a whiteboard, I couldn’t even erase it.

    All in all, I think I got them jazzed about href-exes, but it was definitely not my finest talk. Luckily, it was internal and to a small group; I would have been mortified to have given that performance at a larger venue. Plus, making fun of VB programmers isn’t fun anymore. I mean, they’re customers, too. Looks like I’m going to need some new material…

    April 25, 2003 spout

    My First Week @ MS

    Friday, April 25, 2003

    After my first week at Microsoft *everyone* wanted to know how it went, both internally and externally. I learned some things:

    • I learned that folks at MS will call a meeting for lots and lots of reasons, including at the slightest sign of confrontation or hurt feelings. For a guy that hasn’t really attended a meeting in the last decade, this is quite a switch : )
    • I learned how to schedule a meeting w/ multiple people and a conference room (listed as conf room in the address book), all with conflicting schedules and all remotely using Outlook Web Access and without a SmartCard (I was pretty proud of that one, actually : )
    • I learned that no one uses the phone for anything — instead, they schedule meetings
    • I learned that it’s the person that wants something that does the actually scheduling of the meeting
    • I learned that it’s OK to open your laptop in a meeting, otherwise when would you get any work done?
    • I learned that it causes quite a stir when you disagree with the technical lead of one of the major pieces of technology that you’re supposed to be taking to the world
    • I learned that it’s darn hard to find out who to talk to your first week, and that you should take your boss to most of your initial meetings so that s/he can make sure you’re getting what you need to get from them
    • I learned that you can mix Exchange and POP3/SMTP to keep your new and your old email addresses going, if you use Office 11 and if you are willing to give up calendar and follow up notifications on your POP3/SMTP account (have I missed something?). I also learned that internal MS support doesn’t help w/ such things.
    • I learned that internal MS support is the greatest support in the whole darn world. These people don’t let you off the phone til everything works. They’re amazing
    • I learned that you can volunteer for absolutely anything you think is cool or important so long as you get everything else done, too
    • I learned that it’s not good to ask for NDA access to super-secret bits for your friends the week before you start working there (OK, I’m pretty sure I knew that before, but I had to try… : )
    • I learned that the right folks hanging out at lunch can make all kinds of interesting things happen
    • I learned that MS and it’s employees is the most charitable company in the country (world?)
    • I learned that the internal resources for MS employees are unbelievable. I could work their my whole life and never take advantage of all of them
    • I learned that it’s important to sign up for your benefits immediately if you’re going to be remote w/o a SmartCard for a while, otherwise your son may wake you up in the middle of the night with a hard toothache and when you take him to the dentist the next day, the dentist won’t be able to confirm your dental insurance (as one example : )
    • I learned that most everyone at MS is very nice (even when they’re telling you to f-off)
    • I learned that everyone (and I’m no exception) has a hard time fitting in at first. One interviewer told me that his first 6 months at MS were the worst of his life. I pray that it doesn’t last that long for me
    • I learned that after the initial period that few that survive it would ever think of leaving. I absolutely see how that could be
    April 21, 2003 spout

    “Look with favor upon a bold beginning”

    A couple of weeks ago, I was having lunch with my wife at a little Chinese restaurant. My fortune was the title of this spout piece. I immediately associated it with my recent job interview at Microsoft and it made me smile. I had already pretty much decided to take the job, but it was nice that the Universe agreed with me. : )

    Right now I’m sitting in NEO (New Employee Orientation) for Microsoft employees. Not only is it a cool name, but the nice folks at Microsoft provide a wireless network for new folks that can’t spent hours w/o one (although I’m the only one that’s geeky enough to have his laptop out at the moment : ). I start today as a Content Strategist on the MSDN content team at Microsoft, Corp. I’ll be in charge of the Longhorn DevCenter. A DevCenter is a section of the MSDN web site that focuses on a specific technology area, like the XML/Web Services DevCenter.

    Longhorn is Microsoft’s next major operation system (and different than Windows Server 2003, which is the OS that Microsoft is launching this month). I can’t (yet) say anything more about Longhorn except that it’s cool enough that I took a job at MS so that I could get my hands on it. If you are dying for more info on Longhorn, but aren’t quite ready to change your employment arrangements to get it, check out the PDC in October. And, if you stop by and say hi,” I’ll show you the implant scars… : )

    April 17, 2003 spout

    XML For Humans

    When I sat down to write this piece, I didn’t get why the work that Don, Gudge, KeithBa, Yasser, Tim and ChrisAn is doing is so amazing. I mean, I know that they’re smart and I know that they’re building the hell out of their stuff, but why? It seems like everyone that gets into blogging starts by writing their own blogging engine. It’s like C programmers writing editors, C++ programmers writing string classes and XML programmers writing XSD<->Class codegen. Sure, it’s a useful learning tool, but earth-shattering? Worth that much energy from that many guys? When they’re done, what great problems will be solved?

    Don’t get me wrong. I love the that the web makes it easy for anyone to not only publish but also get an audience. I also love that there’s a protocol (RSS) that lets me subscribe to my favorite freelance authors in any one of dozens of tools (I’m into SharpReader today). I even like the Dear Diary style of writing because it leads itself to thoughts, feelings and insights that give me greater understanding of not only the topic but the author. As an added bonus, blog entries have turned into everything that’s good about mailing lists w/o the endless angle brackets that remove the need to write in coherent sentences. Blogs feel like the kind of democracy we had that lead to the American Revolution when the world was re-shaped with big ideas, written by great authors.

    But does the world need yet another blog engine? Personally, while it’s primitive, I find that FrontPage have served me well as a blogging tool. The mental overhead is small, the development is nil and I get red squiggles. It falls down sometimes, but I’ve spent far less time maintaining the infrastructure for my content than I would if I were to build my own blogging engine.

    On the other hand, while I don’t feel the need for another blogging engine in the world, I definitely see value in what those guys are doing. Specifically, they’re building apps, which is not something that XML guys are traditionally into. In fact, I’m scratching my head trying to think of another kind of XML-based technology that isn’t infrastructure-based and I’m not coming up with one (even InfoPath is a dev-tool). Is RSS really the first mainstream use of XML that hasn’t nothing to do with technology for it’s own sake? Are blogs the killer app for XML? I know web services were supposed to fill that role, but while they do solve a real problem, they’re not for consumers. My aunt in FLA couldn’t make use of a web service. However, she could definitely subscribe to an RSS feed and read up on the local news, her job and her hobbies.

    Of course, the beauty of having infrastructure guys building apps is that they get to put into practice what they preach. When stuff is a pain (like every single XML API ever invented and most XML vocabularies), they feel the pain. The difference between us and them is that instead of just wrapping a layer of abstraction around the ugly stuff like we have to, they can actually fix it. I started this piece wanting to shake those guys until they could tell me why they cared so much. How ironic that thinking through the issues in the very medium they’re digging into helped me figure out what they were up to. The blog engine work is but the vehicle. They’re riding the app train to enlightenment. They’re trying to understand how XML can be used to solve problems for real humans. How can I argue with that?

    April 14, 2003 spout

    Priceless

    • Running sellsbrothers.com for one month: $150
    • Round-trip ticket from OR to FL to give a 90-minute talk: $1200
    • My son picking me for his famous person” school report: priceless

    I don’t know how my son picked up on the tiny bit of fame I’ve acquired amongst a small, strange (but loveable!) group of people, but he did and now he thinks I’m cool. I’m sure it won’t last, but I plan to enjoy it while it does. : )

    April 4, 2003 spout

    Oregon & Open Source

    Friday, Apr 4, 2003

    I had an interesting experience yesterday when I was asked by Mike Sax to come to the Oregon capitol building to testify against HB 2892, known as the Open Source Software for Oregon Act. In general, the bill talks about the benefits of open source, open standards and open data formats, most of which I didn’t have any issues with. However, I got up at 6a and drove an hour down to Salem because of the following clause:

    “(2) For all new software acquisitions, the person or governing body charged with administering each administrative division of state government, including every department, division, agency, board or commission, without regard to the designation given the entity, shall:

    (c) Provide justification whenever a proprietary software product is acquired rather than open source software;

    By requiring state government employees to write a special justifications, this bill erects artificial barriers to adopting commercial software, above and beyond the fact that commercial software requires an initial payment (which should be more than enough of an edge for open source software).

    If you’ve never been to a government bill committee hearing, I highly recommend the experience. I was in a little hearing room with a bunch of other folks, all interested in this particular bill. I signed my name on the list of folks against” the bill so that I would have a chance to testify. The chairman called first proponents of the bill and then opponents up to the microphone three at a time.

    Some of the the proponents were teachers and school staff that had put Linux and other open source software to good use in combination with old computers used as thin clients against a back-end server (using X-Windows, I assume). They claimed that they solved themselves all kinds of trouble because open source software was “immune to viruses and security problems” (now *that’s* effective propaganda! : ). Some of the proponents were embittered IT staff and new college grads looking to bring some old-fashioned democracy back into a country that had been recently taken over by corporations. It was all I could do to avoid pointing out to them that that the country had been taken over by corporations shortly after Adam Smith wrote The Wealth of Nations” in 1776 and the budding US government adopted the ideas therein to fund their new country. The basic story of the proponents was that open source was good, so it should be mandated over closed source.

    The opponents, on the other hand, were largely suit-wearing fellows from large groups of commercial software corporations (one of which didn’t hesitate to remind the esteemed committee that it’s member companies had paid $135M in Oregon state taxes last year). Their arguments were that undoubtedly open source software was clearly already being used by government bodies, that there was no rule against it and that their should likewise be no rules against proprietary software. Only Mike, owner of a small Oregon-based software company, and me, owner of nothing at all of interest, represented the little guy” on the opponent side (we stuck out because of the lack of either a neck tie or a suit coat).

    19 copies of my written testimony were submitted without comment at the request of the chairman who assured the audience that all testimony would be read. My verbal testimony was limited to pointing out that shackling proprietary software was bad engineering” because it could easily cost the state of Oregon more money in the long run; maintaining source code is a lot more difficult than maintaining commercial software for normal humans. I also pointed out that being open source did not prohibit viruses or security problems; the first computer virus ever was written on a Unix, the predecessor to Linux and that they share an identical security model. To be fair, Unix wasn’t open source, but I stretched the truth less than the open source guys, so I didn’t feel too bad (Unix was source available” at the very least  : )  And finally, I let the committee know that open source didn’t mean open standards or open data formats and that, in fact, those were things that commercial software companies had done the most to bring into greater use over the years.

    Having never done anything like that before, I wasn’t sure how well I’d done, but one of my fellow panelist (a procurement officer from another giant suit-wearing organization) wrote nice job” on his pad of paper while his colleague preached the wisdom of amending the language” of the bill to be more practical.”

    At the end of the hearing, the chairman of the committee called out some names of the most credible, suit-wearing fellows from each side of the debate to form a working group to come up with a bill that the committee could actually consider submitting for a vote. The sub-text was that the bill as it currently stood was pretty silly; it didn’t allow any greater freedom to pick open source software but it did limit the ability to choose proprietary software, which wouldn’t make those Oregon software company tax payers happy. This seemed a most sensible conclusion to me and gave me confidence that our government isn’t so screwed up after all.

    When the room was cleared, I was assaulted by one of the open source proponents, reminding me that Unix wasn’t open source and that Linux would never have any such problems (which makes the presence of virus protection software for Linux seem like a very poor business decision). I was also cross-examined by a tall, thin, balding, old-ish man with the longest grey beard I’ve ever seen in person. He seemed very knowledgeable and was very interested in the details of my opinions. He reminded me of nothing more than a fallen Richard Stallman in 30 years and added to the surreality of the morning.

    On the way back to our cars, Mike thanked me for coming and asked if I was glad that I’d come. It surprised me to learn that I was. Not only did I feel that my “just a guy” presence helped the suits make their case, but I felt like I was doing my duty as a citizen. Who knows, this experience might bring out the politician in me. I’m sure I could do at least as well as Jessie Ventura. : )

    April 3, 2003 spout

    Testimony

    Chris Sells
    Sells Brothers, Inc.
    8539 SW 166th Terrace
    Beaverton, OR 97007
    http://www.sellsbrothers.com
    csells@sellsbrothers.com

    Oregon State Representatives,

    My name is Chris Sells and I run a one-man software consulting firm from my home in Beaverton, Oregon. For more than 20 years, I’ve been pretty much everything you can be in the software world: software engineer, chief architect, director, author, speaker, consultant and even marketer, so I know software ins and outs pretty well. In addition, I’ve been the treasurer for the Cooper Mountain Elementary School for the last two years, so I’m familiar with how important computer-related purchases are to at least one branch of the Oregon state government and how those decisions get made.

    Before I start my testimony, I’d like to tell you about my experience in my high schools’s band. I played the trumpet for seven years, four of them in the marching band. I wasn’t great, but I loved to play. It gave me a deep feeling of satisfaction to be part of the band and to perform for the audience. I even continued my playing into one semester of college band, but it just wasn’t the same. The band at that level required a degree of skill and professionalism that I just didn’t have. Once I figured out that I didn’t have what it took to be a professional musician, I went on to find something else to make my living (computers).

    By and large, open source software is often very much like a high school band. No one cares about the money. An open source programmer just wants to have their work seen and appreciated, regardless of whether they’re good enough, or thorough enough, to be paid for it.

    Sometimes a high school band will be amazing; easily good enough to compete at any level. However, this is very rare when compared to professional bands that get paid based on how well they entertain their audience. Likewise, sometimes open source software achieves the same level of quality as closed source software. In those cases, I?m completely in favor of considering open source software to solve Oregon?s software needs. However, I?m not in favor of mandating open source software, which is what HB 2892 does.

    By putting up artificial barriers to entry for closed source software, Oregon is narrowing their choices to those rare cases when open source software lives up to the letter of the requirements for a Request for Proposal (RFP) but doesn?t provide the same level of thoroughness that competing for money on the open market requires. This narrowing of choice is going to cost Oregon considerable additional funds in support, training and documentation, all things that the open source community lives without because of their own level of expertise. Continuing the analogy, assembling your own electric guitar if fun for an enthusiast, but requires very specialized skills. Likewise, using, supporting and maintaining open source software requires real engineering skills, which is the hidden cost you don?t see when initially installing open source software.

    In addition to mandating open source software, HD 2892 calls for open data exchange standards. This is something that I?m very much in favor of. The latest and most general purpose standard for open data exchange is called the eXtensible Markup Language (XML) and is fully embraced by both the open source and the closed source communities. However, it?s the closed source vendors, like Microsoft, IBM and BEA, that are really making XML a reality by pushing it into their software at all levels. In fact, these same closed source vendors as going beyond just XML and building standards for communicating data between computers based on open source and closed source operating systems to make sure that all computers can communicate with each other. These standards are called ?web services? and are based around the Simple Object Access Protocol (SOAP). Defining, implementing and testing standards is an expensive proposition involving man-decades of dedicated engineering work, which is why it takes companies that make money on software to turn them from an adolescent dream into an adult reality.

    I believe that open source should absolutely be considered for the state’s software needs. However, being open source is but one quality that needs consideration. Things that also need to be considered include the cost of training, documentation, support, upgrading and maintaining software systems and their support for open data standards. Some open source software will achieve the level of functionality and attention to detail that Oregon needs, but artificially narrowing your choices to open source software is like open picking high school bands to play at the Rose Garden. Sometimes you’ll get lucky but more often the audience is going to demand a refund.

    Thank you for your time and attention,

    Chris Sells

    February 18, 2003 spout

    Microsoft & Patents

    Tue, Feb 18, 2003

    The buzz was all around VSLive last week about Microsoft patenting the .NET Framework API. In fact, an eWEEK reporter asked my opinion and this is what I said:

    I’m no patent attorney, but in examining the patent application, it looks to me as if they’re claiming a patent for the entire .NET Framework, which comprises the classes that a .NET programmers uses to get anything done. My understanding of the patent laws says that Microsoft has every right to do this, since they invented it. The reason for them to do this is so that they can maintain control of its implementation. Hopefully Microsoft will grant a royalty free license to all implementations of the CLI ECMA standard, which makes up a large percentage of the .NET Framework, or that standard will be worthless.
    Even if they grant such a license, projects like Mono are still vulnerable. They plan on implementing even the parts of .NET that aren’t standardized, like ASP.NET and WinForms. This would allow Windows programs compiled against .NET to run under Mono on Linux, providing a single API for cross-platform applications. This has been tried and failed in the past as recently as Java, but I had hoped that the Mono guys could make this work. When Microsoft is granted this patent, they can shut down the non-standardized parts of Mono whenever they want. That’s good for Microsoft share holders, but it’s not good for 3rd party developers that want to write cross-platform solutions.

    What I should have added is that as far as I know, Microsoft hasn’t ever enforced its patents. Apparently they keep them for defensive reasons only. Or, they could be waiting til they have a critical mass of patents, enforce them all at once and win the game of Risk that they’re playing with the world. : )

    February 7, 2003 spout

    Saving Your Career

    Friday, Feb 7, 2003

    In response to Never Send An Email In Anger, Lars Bergstrom recommended that I set up a rule that defers sending an email for 1 minute. I set it for 2 minutes under Outlook XP like so:

    • Tools->Rules Wizard
    • New
    • Start From A Blank Rule
    • Check messages after sending
    • Which condition(s) do you want to check? -> None
    • This rule will be applied to every message you send. Is this correct? -> Yes
    • What do you want to do with this message? -> defer delivery by a number of minutes
    • a number of minutes -> 2
    • Finish

    And it works like a charm. It’s always w/in the first second that I wish I could recall a message, so two minutes should be more than enough. Wahoo!

    February 3, 2003 spout

    Let The Language Wars Continue

    A friend of mine pointed out to me the other day that the C in CLR stood for Common,” that is, the CLR provides the same services to all languages. In fact, at this date, C# and VB.NET are really just skins” over the CLR and provide nearly identical functionality. With that in mind, why are we still fighting the language wars? There are several reasons:

    • VB and C# programmers are just culturally different. They come from different backgrounds, different educations and different points of view. Remember that VB was initially invented to let non-programmers program. C++ programmers came from folks building operating systems. Those roots are still evident today.
       
    • The VB and C# product teams are different and gain benefits based on how many of each kind of programmer there are. Based on that, do you think that those teams are going to pound the all languages work great under the CLR or the C#/C++/VB.NET rocks” drum? Which message makes you look best at review-time?
       
    • Languages *should* be different. Managed C++ does that cool managed code/unmanaged types thing. Eiffel# does Design by Contract. Perl.NET has obfuscation built in at the source code level, alleviating the need for a 3rd party tool. The fact that VB and C# are virtual clones of each other is a mistake that I hope is rectified. Frankly, I hope that VB goes back to it’s roots of enabling non-programmers, as that’s a huge hole in the current list of managed languages. Certainly C# is going back to its roots by adding generics et al in the next version.

    I’ve found that the Common” means that teams can use the same language at more levels of their system, i.e. no more VB for this, C++ for that, script for this other thing. Now it can be all VB or all C# (or almost all, til Yukon ships) and the number of different kinds of programmers needed for a single project goes down. That provides a real benefit to companies trying to keep costs down and quality up while still allowing the team to decide what language features are important to them. This is goodness.

    With the increased shared capability at the runtime level, I’m actually hoping that language motivation will increase. I think that there’s still a lot left to do to make the programmers more productive and the motivation for one language to gain ground over another is a good thing. Plus, I still have an excuse to make fun of semi-colon-challenged programmers and what could be better than that? : )

    January 24, 2003 spout

    OOD (The D Stands for “Dead In The Water”)

    Reading a very interesting book which I’ll discuss in a future post, I came to a startling conclusion. As much as I love OO thinking and programming, OO databases are never going to fly. I realize that this may not be so startling considering how long OOD products have existed and how unsuccessful they’ve been so far, but the conclusion I came to was *why* they’ll never fly. The reason is simple: the data itself is more valuable than the programs that use it.

    For an OO guy, taught that behavior was everything and data was an implementation technique, that’s a startling conclusion. However, the beauty of a database is that it’s devoid of behavior, or, if there is behavior, it’s layered in on top of the data. Programming languages come and go along with the ideas that underlie them and the applications that are built with them. Relational data, on the other hand, is a model that’s simple enough, but complete enough, to move forward from application to application, accumulating value as you go in the data itself. And, since the relational model is so entrenched, no technology for the last 10 years or the next 1000 would be complete without support for it. Even Microsoft, IBM, GM and AT&T will prove to be less enduring than relational data, the tools to program against it and the tools to slice and dice it w/o programming anything (the latter are amazing strong already and continue to grow).

    Data in OO databases, on the other hand, are bound to behavior and worthless for anything but the limited set of applications for whom the behavior was paramount and the data an implementation detail. When things change, as they always do, how are you going to get the data out so you can do things different? You’re going to dump it to the simplest, most complete, most firmly entrenched data format that the world has every known — relational data.

    OO persistence formats are, by their natural, tied to a specific object model and therefore hopelessly proprietary. And with the emergence of XML, OO persistence formats are going the way of the dodo, even for applications running on machines without a database server. Why would I persist data to a closed format when I can choose relational data for the big stuff and XML for the small stuff? Both provide endless tools for slicing and dicing and bringing forward when the application dies. With OO persistence, when the app goes, so goes the data. The problem with OOD is that things are *too* seamlessly integrated. Ironic, no?

    January 23, 2003 spout

    Sealed Sucks

    I’ve come to the conclusion that the use of the sealed” keyword in C# (and the concept in .NET) should almost never be used, at least on a class. Semantically, sealed applied to a class means that a class cannot be used as a base class. For example, the ImageList class from the System.Windows.Forms namespace is sealed:

    public sealed class System.Windows.Forms.ImageList : … { … }

    What sealed means is that the designers of the ImageList class didn’t take the time to test what would happen in all the scenarios where an ImageList is specified but a subclass is provided, e.g. MyImageListEx2. So, since they didn’t test these scenarios, they’re protecting developers from deriving from the ImageList base class when bad things might happen. They’re also protecting developers if the base class changes radically in the future and derived classes no longer work.

    Stop it!

    I don’t want to be protected in this way! Instead, I want to try to derive from ImageList and see if it works in the scenarios in which I’m interested. And if future versions of the ImageList base class break my derived class, I want to update my derived class in ways that work across versions of the base class or have two versions or whatever else I need to do to make it work. By making a class sealed, I just don’t have any choice in the matter, which severely limits me in what I can do.

    As an example, I think that the current ImageList implementation sucks in the following ways:

    • Every time you need to edit an image, you need to remove the old image and add it back again
    • Images are too small to see what they are
    • Can’t tag images with names

    So, I’d like to build my own ImageList implementation that has the exact same programmatic interface, but that pulls images from manifest resources, fixing most of the issues above. All of the controls that take images get them from an ImageList type, so I need to provide my extra functionality in a type that’s compatible with ImageList. However, the only way to do that in .NET is via inheritance and the damn sealed attribute disables my ability to do that! Instead, I have to build a custom component that’s also an extender provider if I want to provide the same design-time usage as an ImageList and I have to tell developers using my image list component not to use any of the ImageList-related properties because it will conflict with mine. I literally can’t package my functionality in a way that’s developer-friendly in the same way as the ImageList and it’s all because it’s *sealed*!

    Of course, the ImageList class isn’t the only one. I had a solution to the problem of asynchronous method calls to web services from WinForms apps the other day (the problem is that an extra hop is always required to get back to the UI thread), but my solution can’t work because the base delegate type required to make an asynch call is sealed. And the list goes on and on of things that I can’t do because somebody is protected” me from potential bad things.

    Please, please, please, please, please don’t mark your classes sealed. If you do, folks that want to provide extended functionality, and test to make sure that it works the way it’s supposed to, don’t even have the option. Type compatibility is a huge deal when you’re dealing with class-based abstractions instead of interface-based abstractions and using the sealed keyword throws all of that away. The C++ community survived very nicely without sealed for a decade and it’s made half of the classes on my site possible.

    You took away my deterministic finalization. Must you also take away my ability to derive?

    January 8, 2003 spout

    New Year’s Resolution

    I just flew in from 2002:

    and boy are my arms tired! Even I look at that list and think holy workaholic, Batman!” Of course, I couldn’t have done all these things alone. I worked with fabulous co-authors and co-contributors. Thanks to you all and I look forward to working with you again in 2003!

    In the new year, I have the following goals:

    • Make Ask The Wonk a fun experience for all involved (it just started on Monday, but it’s already great fun answering the level of questions I’ve received!)
    • Move the DevCons to the phones via the PhoneCons to avoid the expense and hassle of travel for everyone, while still maintain the power and charm of the DevCon
    • Get those .NET War Colleges humming! I *so* look forward to these
    • Several more releases of Genghis (a new release is already cooking)
    • A few more magazine articles (I’ve got a few already in the queue)
    • Finishing up the Rotor ref-counting project, publishing the code and the results
    • Re-org the web site a bit (again!)
    • Continuing the Wonder of Windows Forms column
    • Hanging on the Off Topic mailing list (still my favorite mailing list)
    • A couple of other projects that I’m dying to share with folks, but am sworn to secrecy…
    • Losing another 35 pounds (it’s a 2-year plan)
    • Find a way to take a vacation

    We’ll see how I do this time next year, especially on those last two.

    January 2, 2003 spout

    Apps Are People, Too

    Apps Are People, Too

    I concerned Wahoo! patron sent in the following screen shot of the current high scores as exposed by the high scores service:

    As you can see, the high scores service has turned into the poster child for the need for web service security. However, after hanging out at two Web Services DevCons and talking with Keith Mr. Security” Brown, I’ve come to the conclusion that there is no good way to secure this specific web service. Even worse than that, there’s an entire class of web services just like it that can’t be guaranteed secure.

    The goal of the high scores web service is to provide access only to the Wahoo! app itself. Only Wahoo! knows when someone has earned their score while playing instead of merely faked it through some other means. Of course, this application is just for fun, so the lack of a secure high scores repository is hardly a big deal (although I’m often surprised when people tell me that they play wahoo.exe instead of sol.exe). However, imagine that a real application wanted to do the same thing. Maybe Microsoft only wants Office applications and not Linux knock-offs to query the clip art web service on microsoft.com. Or maybe your business wants to provide a web service that only your apps can talk to.

    Of course, Microsoft doesn’t ship the source code for Word and your business is unlikely to ship the source code for your apps if you plan on making money on them (remember actually making money on software?), so that’s different than Wahoo!, isn’t it? No. Every time you put code on a machine outside of your sphere of influence, you might as well ship code, especially if it’s .NET code, which comes with a built-in disassembler! But wait,” you say. What about code obfuscators?” Well, that arms race has already been fought in the world of Java and disassemblers won. There was no way that an obfuscator can hide the details of Java byte code without completely destroying the usability of the code (particularly in the area of performance). .NET will be no different.

    Aha! But what about unmanaged code? x86 can’t be read like IL.” You’re right. It is harder to disassemble x86 than IL, but not significantly so. The x86 disassembler tool vendors have been working for a lot longer on this problem and we’ve bred guys like Andrew Shulman and Matt Peitrek that dream in x86 and only translate to English as a convenience for their wives.

    The bottom line that if you ship code, you might as well ship the source, as it’s available anyway. If a computer can execute your code, somebody can read it and pull out the details of whatever you’re using to obfuscate the communication between your code and your back end (whether it’s a web service or not).

    So why do I have to log in all the time if there’s no such thing as security?” Well, it’s not as if there aren’t ways to secure systems in the world, but all working security thus far invented depends on physical security, whether it’s the private part of a key pair secured in your safe or a password secured in your brain. The reason that applications can’t make use of this kind of security is because they don’t have access to safes and their minds can be read much more easily that those of humans (although a rubber hose is just as effective as ildasm.exe, when something is really important).

    So what does that mean for applications that want to make use of back-ends? I see four solutions. One, you can tie security to a user instead of an application. For example, if I make everyone sign up for a Wahoo! account to log high scores, I’d at least know who to ban from use when they faked impossibly high scores. However, it also opens up the possibility of the user completely bypassing the application altogether, including any checks that the client may make on validity of the data being sent to the back-end.

    The second possibility is to make things hard*er* on the potential hackers. Keith summed it up nicely:

    “After looking at your JPG, I’d suggest some server side filtering. Limits on user name length and content would help you at least reduce the amount of space that hackers can use for advertising. OTOH, you’ve got a nice little bulletin board going there ;-)”

    Anything I do in the way of encryption and obfuscation between the app and the back-end will slow down potential hackers and for something like Wahoo!, I don’t suspect it would take much to keep folks honest (turning off the asmx test page would be a good first step, for example : ).

    One way to make things harder, and a third way to secure apps, is a dongle, which adds new hardware to a machine along with the software. Unfortunately, a dongle could be reverse engineered just as a hunk of software. It’s only the fairly uncommon use of dongles that keeps them from being broken more often.

    The fourth option, which Keith mentioned, is Microsoft’s new Palladium platform, which operates with special hardware and software to limit a user’s access to their own computer, kind of like a universal dongle.

    The real question is, what’s secure enough? Unfortunately, this is an arms race that will eventually be won by any hacker with enough smarts, time and money. For users, we continue to make things harder on hackers as we transition from passwords to biometrics and smart cards. For applications, we’ve got dongles and precious little else, which makes it darn hard to treat apps like the independent entities into which they’re evolving.

    December 20, 2002 spout

    Keep On Cookin’

    I got a very nice email today from Ross Lambert:

    I’m a new fan of yours, both in terms of your technical abilities and the down-home honesty of your columns in The Spout. I loved Of Eggs and Omelets’, mostly because I could identify with it. My own career has been littered with a lot of broken eggs. I ran my own little software company for nearly 10 years, writing and selling developer libraries for Macintosh developers. Needless to say, the ups and downs of that market were fairly impossible to survive.

    So now I am enjoying the Dark Side, as Mac folks would say. I’m a total  .NET-head, hence my fairly recent acquaintance with your work.

    Anyway, all that to say Don’t let the turkeys get you down.’ I was a pretty decent marketer; I still write ad copy for different folks from time to time. It was the only way I could manage to survive as long as I did. For what it is worth, I think your approach is innovative and fun. A few anal people will object (it sounds like they already have), but I’ve come to the conclusion that about 2% of the population actually enjoys being uptight and offering angry complaints. You’ll never make those folks happy, and it is just as well to give them a reason to bail out early in the game.”

    Thanks for that, Ross. While Of Eggs and Omelets speaks of breaking eggs as metaphor for the negative feedback I’ve gotten from my recent series of marketing-related emails, in truth only a tiny fraction of folks complained. In fact, almost 10% of my newsletter subscribers responded to my inquires in some positive way, which is about 50x the number of people that had something negative to say. According to the marketing guy, getting a 10% response was about 3x what he was hoping for (although he didn’t tell me his expectations until *after* the results were in… : ). Even more telling was the large number of people that actually thanked us for asking. Apparently expressing interest in their wants and needs was unique for a surprising number of people. Further, the shear number of people interested in the various ideas we proposed (like the .NET War College and the WinForms PhoneCon) was only overshadowed by the number of people with good ideas that we didn’t even think of (which is what lead to Ask The Wonk).

    So, while I may have broken some eggs, and every one of those emails physically pained me (how do spammers do it?!?), Ross and tons of others have encouraged me to keep on making my omelet.

    Discuss

    December 10, 2002 spout

    Of Eggs and Omelets

    My life has been one long series of experiments. I tried to be a know-it-all jerk in high school and found that this tended to cut into my social life (drastically), so I stopped (or am still stopping, depending on how well you know me : ). I tried to be a ground floor” employee for a small company, but that stopped being fun when the repetition and bureaucracy hit and it became clear that any profits that might someday happen would be kept at the owner level. I tried being an employee for a large company, but when my projects started getting axed based on political winds that, as a low-level grunt, I had no control over, I went looking elsewhere. Then I found DevelopMentor. The combination of working on lots of different things with lots of smart people was something that I loved more than anything I’ve since found.

    But even that didn’t stop my experimentation. After teaching and consulting for a while, I decided that instead of just talking about building software, that I would take one of my ideas and build a software development team. There I worked to build the best software development team that I’ve ever had the pleasure to work with and a learned a *ton* along the way. However, the fact that the product itself was a commercial failure didn’t make for lasting employment.

    So, late last year, I started another whole series of experiments, this time aimed at making myself solvent as an independent in a down economy. I’ve been doing all kinds of crazy things to see if I could use them to help build my brand, my business and my customer base. Some of them have been critically acclaimed and a few have even been commercially viable, at least to the point that I can continue to pay my mortgage (many of my friends weren’t so lucky). I have been successful in that I’ve gotten to do a lot of cool things and work with a lot of smart people.

    However, what I’ve found is that to remain independent, I have to spend a lot more time doing promotion and marketing, which goes against every fiber in my being. The problem is, although I’ve experimented a bunch, especially as related to this year’s DevCons, I don’t have any natural marketing aptitude and I don’t know where to turn for help. So, I fall back on my old standby — experimentation.

    Over several years, I’ve experimented with several sales/marketing/PR folks and organizations and so far, haven’t found what I’m looking for as far as mentors” go (to be fair, my standard for comparison includes Don Box, Tim Ewald and John Robbins, so I’m not surprised I haven’t found someone to meet that bar). Even if I did meet that person, or may have already met him/her, I don’t know that I’d recognize it. I just have no standard for comparison. With software, it either works or it doesn’t. With marketing, did it succeed or fail because of the quality of the product or the quality of the marketing? The whole thing is too damn squishy and it drives me nuts!

    My most recent set of experiments is to let a friend of mine, a long-time marketing guy that I’ve known for years, run rough-shod over my newsletter subscribers, asking them all kinds of questions and for their help in various ways, offering my money and my time as incentives. Will it work? I have no idea. Is it risky? You bet. I’ve lost a dozen or more subscribers and who knows what some people think of me now that I’ve let marketing ideas into what I do (and I’d like to apologize again to the folks that I drove away or offended in this most recent campaign). Is it worth the risk? Yes it is, but not for the promised return (I still think my marketing friend was on happy pills the day he quoted his marketing targets). What makes it worth the risk is that I’ve identified a weakness in myself and I’m willing to perform the experiment and make the mistakes to see if I can come out better on the other side. Even if I fail, I’ve learned something. Eventually, I’ll get that omelet made, no matter how many eggs need breaking.

    And to those of you who suffer with me through my experiments, thank you very much. You have no idea how much you mean to me.

    Discuss

    November 27, 2002 spout

    My Coding Standards

    Wednesday, November 27, 2002

    Sometimes it’s like I’m a war veteran in my head. I’ll be going along, minding my own business, when *bang*! out of nowhere, a flashback from my days as the director of a software organization hits me right between the eyes. When it happened today, I thought it would be therapeutic to talk about it instead of trying to bury it when these episodes” intruded on my normal life.

    The nice thing about setting up your own software organization is that you get to set your own rules, and this time do it right.” I had always planned on getting my engineers together one day and coming up with a common coding standards document, just like every software organization had, but in the interim, we started with this one:

    1. All code will use spaces instead of tabs.
    2. All new code in an existing file will match the existing style.

    Rule #1 nicely handles the case where different editors expand tabs to different spaces, causing code that was easy to read when it was written to go all crazy. Rule #2 says not to waste time reformatting existing code into your own style, but to mimic the coding style that was used by the original author. Rule #2 had the unexpected side effect of helping developers get into each others’ heads, which helped transfer knowledge between us. I personally learned a bunch of cool tricks by fixing bugs in files in the style of the original author.

    After a few attempts at adding other, more traditional rules to this short list, like where the braces go and how to name variables, we couldn’t find anything that was worth ruining the simplicity of our two-rule coding standards with, so that’s what I’ve used ever since. One other benefit of this simple set of coding standards was that it left us all kinds of time to debate the merits of various text editors, which is an argument that won’t be solved until just after the Christianity vs. Judaism debate is ended…

    Discuss

    November 11, 2002 spout

    Hierarchy Doesn’t Scale

    Sun, November 11, 2002

    I was just chatting with a friend of mine and he said that he really wanted to write a namespace extension so that he could expose a hierarchy of data in the shell. Back when namespace extensions were introduced with Win95, I thought that everything could be integrated into the shell, making the shell the last application. Sometime in the last seven years, I’ve come to hate that idea. As a hardcore computer geek, I’ve embraced the hierarchy organizational styles in three major applications:

    1. Email folders (I keep things filed in a multi-level hierarchy and use my Inbox as a to do list)
    2. The file system (I keep things filed in a multi-level hierarchy and use my Desktop as a to do list)
    3. Free-form outline program (I keep things filed in a multi-level hierarchy and use a file called todo.txt as a to do list)

    As anal as I am about arranging and categorizing things into their various hierarchies (and as many places as I’ve spread my to do list to, apparently), the hierarchy only helps me about 50% of the time. I spend just as much time searching for things as I do going right to where it should” be.

    The hierarchy used to be lots more helpful, but as the data I keep around grows over the years, it becomes less and less possible to remember where something really belongs” and to find it there. In fact, I’ve come to believe that a hierarchy is a terrible way to keep data organized at all. A hierarchy is really just a way to associate key words (called folder” names) with hunks of data (called files”) and then only showing them in a very limited way. Searching is a possibility, but it either takes a long time (because file indexing is turned off) or it misses files (because file indexing is turned on —  what’s with that, anyway?). Searching creates an ad hoc logical folder, but there’s no way in the shell to create a permanent logical folder with custom content.

    The basic hierarchy structure is easy to understand, but things become much more powerful if I can keep one hunk of data in multiple locations. Some versions of the Windows file system support this , but the shell doesn’t (although it can be simulated with shortcuts). Also, the same kind of pivot table” capability that Excel provides, mixed with a much faster, more flexibly searching capability of a database, is much closer to what I’m after. Hopefully Longhorn will provide something like this.

    Also, being able to search all three of my hierarchical  data sources at the same time would be pretty damn useful, but one thing at a time…

    Discuss

    October 26, 2002 spout

    A Giant Sucking Sound

    Sat, October 26, 2002

    While I’m in favor of NAFTA, and free trade over all, it’s certainly not helping US workers. Instead, it favors US corporations as they made use of cheaper labor. Of course, it’s the corporations that also seem to make out on these deals, doesn’t it? Similarly, the other giant sucking sound” I’ve heard lately are my friends moving to Redmond to work for Microsoft. MS is using the recession to cherry pick the best and the brightest in the industry. I can think of almost ten people I know personally that have gone to Microsoft in the last six months. And these aren’t folks that were laid off and had to go, either (even though everyone but Microsoft is laying off). These are good folks that had good jobs, either as employees or as independents. One even owned half of what was my favorite company in the whole world! So why are they doing it? Why are they giving up their old lives to work at MS, often moving to Redmond in the process?

    I think they’re going for a variety of reasons. One is definitely the safe harbor aspect. As an independent in the current economy, I have to work my butt off to attract funding using self-promotion techniques that I didn’t have to use during the Internet boom. I’m successful and I love the work and the life, but it’s still a lot of work that I know others are not willing to do. Another reason related to the really hard work” problem is that Microsoft, for the caliber of my friends, is allowed to offer what used to be a laughable salary, but is now looking pretty good against what’s generally available. If you can get 75% of what you used to make as an independent, great benefits and stock options that may do something someday, that’s pretty compelling. And the stock price is pretty attractive right now. It’s my belief that, as a government-sponsored monopoly, Microsoft is fundamentally sound, and the stock price is artificially low. If you were going to go to Microsoft any time in the last five years, now is the time. The stock is only going to go up.

    But the big reason that makes people go, and this is the one that might tip me some day, is the raw, visceral experience. For better or worse, Microsoft is the mother ship from which everything we know now has sprung. And they’re still setting the tone. I know I dream of moving to Redmond to work on the next technology that’s going to kick ass in 2-3 years, like Don and Martin and Yasser did. I’d also love to live where I am now, commuting to Redmond a week/month to work with developer education, focusing on research and writing, like Tim did. Sometimes I want to just chuck the extra effort it takes to stay outside,” throw up my hands and let the assimilation process begin.

    So, why haven’t I thrown in the towel? I’m waiting. I’m waiting for the perfect balance of quality of life where I get to spend every day doing exactly what I want, working with a team on a long-term project that I really believe in, but without the politics or the management responsibilities that I deplore and without giving up my family or dropping significantly in income. Right now I’ve got that all nailed except for the team and the long-term project, so I’ve got it damn good, but I’m still looking. Who knows? Maybe I’ll get caught in the mass geek migration to Redmond some day, but not yet…

    October 17, 2002 spout

    Type Safety in a Loosely Coupled World

    Tim Ewald gave a very rousing keynote address at the WinDev conference in Boston yesterday. During his talk, he did something I’ve never really heard anyone do convincingly before — he defended the typeless recordset/rowset/dataset style of programming. His justification was that you don’t always need type-safe object models and, when getting a subset of data, they’re often more trouble than they’re worth (do you really want a set of types for every query in your app?).

    My standard objection to the just the data, ma’am” style of programming is that I don’t get compile-time type checking. Of course, I can write the code to check all the data I get at runtime, but I don’t like to do that. Instead, I like things like the type safe dataset generator built into VS.NET. However, that damn tool fooled me. I looked at those type safe wrappers and considered that compile-time type checking. Of course, it’s not. Instead, it’s a hunk of code that pretends to offer compile-time type checking, but only really offers run-time type checking, because the data still needs to be coerced at *runtime*.

    I have always turned up my nose at run-time type checking until I realized (and this is the insight I got from Tim’s talk) that *all* marshaling-based type checking is done at run-time. Even the type-checking done in COM between apartments needs to coerce the data to and from a serialized format, which means that it’s possible for the data to be mismatched between two endpoints, causing a type exception at runtime. Since I’m not willing to give up the loose coupling involved with components talking to each other across apartment/thread/process/machine/context/appdomain/whatever boundaries, I need to accept the fact that type checking needs to happen at run-time as well as at compile-time. As far as type checking is concerned, unmarshaling an RPC call stack is really no different than coercing/converting dataset columns or applying an XSD to an XML document.

    Once I’ve accepted run-time type checking, I can take Don’s advice to free your mind” (he’s moved on to other parts of The Matrix not involving medication) and embrace things like structural typing, which is much more flexible than the nominal typing that OO languages rely on. I told you that nobody makes it the first time,” Don, but I think I’ve finally made it across. : )

    October 2, 2002 spout

    The Fallout Begins

    Two months ago, I noted a fall in morale in the IT industry amongst my friends and colleagues. I wondered whether the best people in the industry who’d been fighting for a sane development process, but living without it because people were handing out cars as signing bonuses, would rather not work in another industry when the cars were no longer available and the fight for what was right didn’t seem to make as much difference any more. Yesterday, one of the people that I’d put into the right up there” category, Justin Rudd, announced his intention to pack it in and go back to school to be a doctor.

    This kind of thing shakes my own faith. Should I continue to bust my hump on the latest and greatest technologies or ditch it all and start that novel I’ve got in the back of my head? I still really love doing the former, but it seems that everyone has to work a lot harder for a lot less these days. Maybe I just need to readjust my thinking, but damn, being smack dab in the middle of an economic boom really does a number on you! I feel like the guy who found a silver mine in the middle of the gold rush. I don’t have any trouble feeding my family and it’s not fool’s gold, but I still pine for those deep, yellow nuggets…

    September 13, 2002 spout

    Never Send An Email In Anger

    Never Send An Email In Anger

    I learned how to write good emails at the foot of the master — Don Box. Whenever we’d decide we wanted something, he’d grab his computer and say, Let’s write the email” and it would be done.

    One of the most important things that I’ve ever learned about high-tech communications is to never, ever write an email in anger. Or, to be more precise, never *send* an email in anger. I encourage you to actually write it. It always makes me feel better. But don’t address it, because you want that email to first end up in your Drafts folder and go from there to your Deleted folder. If you address it and mean to press Ctrl+S to Save but manage to press Alt+S to Send by mistake, you might well be looking for work in another industry. If you don’t address it, however, Outlook complains and you can breathe a sigh of relief. Frankly, I wish there was an add-in that protected me even if I ignore my own advice:

    Of course, this spouting could only occurred after I’ve violated my own advise, as I’ve often done over the years, always to my determent. When you’re angry, all you care about is making sure that your anger comes through. If I give myself an hour or two to think on it, when I come back to read that angry email, it always makes me flinch. Writing an email once I’m done being angry always yields the nicest, most thoughtful emails that I can write. Those I find to be *much* more effective.

    September 4, 2002 spout

    Attracting and Keeping Good Folks

    A friend of mine requested an essay on my thoughts of attracting and keeping good employees. I’ve had the privilege of working with some of the best and the brightest over the years and seeing how companies hire and keep them. My take is that companies that attract the best do so with a reputation of excellence. As one example, Google has kick-ass technology, so I’m sure most of you want to work there (I know I do : ). On the other hand, there are plenty of companies that have a reputation for buggy, unusable software that turn us off, all without ever hearing about the salary and benefits package.

    If you can attract good folks, you’ll also attract lots of mediocre folks and some not-so-good folks. There are all kinds of ways to screen these folks out. My favorite is to ask them why?” questions. If they can tell me the name of the operator that appears as a colon between the last paren of a C++ constructor signature declaration and the opening curly place, that’s great. But if they can tell me why C++ has it, and why Java and C# doesn’t, they’re hired. Of course, I let the interview candidate pick their own area of expertise and ask them questions about what they know best to see how deeply they’ve gone in their explorations. The ability to figure out the why” is a necessary skill for folks that you’re going to trust to take vague requirements and come up with Google-like results in an environment where no two consecutive projects use the same set of technologies (or even similar ones, increasingly).

    To select for personality, as well as technology, I like to whip behavior interviewing questions on folks. Instead of sketching a situation for an interviewee, e.g. how would you deal with conflict in the work place?”, behavioral interview questions ask people to remember real situations they’ve been in and how they reacted, e.g. Imagine a time when you had conflict in the work place. How did you handle it?” Everyone knows the right way to handle conflict in the work place, but far fewer of them have handled it properly when it actually happened. The idea of behavioral interviewing is that past behavior indicates future behavior, so if you don’t like that your candidate punched his last manager in the nose, that’s something to find out up front.

    Once a good person has been hired, keeping them is a matter of paying them what they’re worth, letting them do what they’re good at, helping them get better at what they’re not so good at, making sure you don’t waste their time on stuff that doesn’t matter, showing appreciation for a job well done and otherwise staying the hell out of their way.

    August 30, 2002 spout

    Spout — Development for Developers

    Here. I got an email today from David, who says, So, I am looking to see what I can do to develop my skills as a designer. The trouble that I have, is simple. Where does a programmer that is over 40 years old, with a good job, and a good family turn to to learn something like this?’”
    August 30, 2002 spout

    Development for Developers

    I got an email today from David, who says, So, I am looking to see what I can do to develop my skills as a designer. The trouble that I have, is simple. Where does a programmer that is over 40 years old, with a good job, and a good family turn to to learn something like this?”

    David, developing in any career means taking risks, trying new things, making mistakes. Some specific things you can do to improve your developer/designer skills include:

    • Examine your goals. Do you want to be a better coder, a better designer, a better tester? What’s better to you? Fewer lines of code? More lines of code? Faster code? More readable code? More documentation of code/design? More thorough designs? More testable code? More unit tests? Set yourself a list of goals and examine it on a regular basis to keep yourself on track.
    • Read some books and articles, like Writing Solid Code, and re-write some of your own code using the techniques you’ve read.
    • Pick your favorite feature in your favorite application. Design it. Implement it.
    • Read and review other peoples code to see what they do, especially in languages and task you’re unfamiliar with to get a different point of view.
    • Pick a bug out of the bug database. Find the real cause. Find the implementation mistake that caused it. Find the design mistake that caused it. Change the implementation and/or design to find other similar bugs in your code base. Change the design/implementation to make similar bugs impossible in the future.
    • Run a code review to get your peers’ feedback on your code.
    • Get together with a group of developers at your job for weekly lunch lectures. Teaching someone is a great way to learn.
    • Take the time to really do something right.” You can’t always do this due to other real-world constraints, but if you never do it, you’re much less likely to get things right in the future.
    • Take the time to follow your fetishes.” I can’t tell you how often I’ve followed up on something that didn’t have anything to do with what I was doing, but I just couldn’t leave it alone, and then it dove-tailed with something else I needed to do almost immediately. Most of this web site is a result of following this advice.
    • Attend a conference and ask a lot of questions. Really drill the speakers to make sure you get it” (especially if it’s me : ).
    • Write an article on something and send it around to your peers or put it up on the web. Writing about something is the only thing I can think of that’s better than teaching as a way for you to learn.
    • Hang out on the mailing lists and news groups, but only answer questions you don’t know the answers to. Don’t worry about being wrong and thank everyone who shows you when you are.
    • Write a hunk of freeware/shareware/open source software and put your software up on the web along with an installer and documentation. Maintain it.
    • Find yourself a mentor. Ask lots of questions and get them to review your work. I’ve had a number of mentors of my own over the years (Mike Woodring, Paul Crutcher, Don Box, Tim Ewald, John Robbins) and it’s made a world of difference.

    If you’d like some hands on” guidance to improve your skills as a developer, I’m available as a mentor. I’ve mentored a number of folks over the years and they’ve had some nice things to say about the process. But don’t feel you need me to take advantage of these tips. Take risks, try new things, make mistakes.

    August 28, 2002 spout

    Newsletters Are Hard!

    As I write this, several thousand emails are being sent to the initial list of SellsBrothers News newsletter subscribers. My motive (to let folks know what was happening on the site without having to visit every day) was pure, but if I would have know how hard it was going to be to set the thing up, I don’t that I would have started.

    It began with a simple form on the web site to take people’s email addresses, which were in turn emailed to me and sorted into a Outlook folder. When that reached a couple thousand without yet having sent out a single issue, I figured it was time to put it into a real database. So, which a bit of data cleaning through VS.NET and Excel to get the dates right, I plunked it into an Access that would serve as the repository on my ISP-managed site. That was all fine and dandy but for one problem: I had to send emails using the data from my own machine, not the machine with my live site (and therefore the latest subscriber data). Did I really want to download an Access database from my ISP every time I needed to send a newsletter? It won’t be often, I admit, but that still seems wrong, doesn’t it?

    So, I paid the extra $10/month to get SQL Server support on my site and worked with a friend of mine (Paul Crutcher) to build the form to take name, email address and HTML vs. Text settings. Except it’s not just one form. To make sure that folks aren’t subscribing other folks, we send out a confirmation email with an URL in it that updates the database and shows another form indicating whether that worked or not. Then, in case anyone changed their mind, we needed another form to change subscription settings along with another form letting them know that their changes were made. Of course, before we could let them change their settings, we needed to let them log in, which was another form. And, if they forgot their password, they need another form so that they can enter their email address and we can send it to them. Further, if the worst happens and they tire of my musings, they need to be able to unsubscribe themselves.

    Not only did Paul build all of these forms, but he built them in two parts, a form part and a control part, so that I could update the form part to have the sellsbrothers.com look n’ feel, while leaving the real logic in the control part untouched (and potentially reusable). All in all, just letting folks manage their newsletter subscriptions was 46 hunks of HTML packaged as .htm, .aspx and .ascx files. 46! I would have downloaded something and integrated it, but I never found anything to do the job (and this is where I get a hundred emails showing me the error of my ways… : ).

    Of course, all that user-managed subscription work was to avoid one thing: angry emails. I didn’t want folks who’d forgotten they subscribed many months ago or, worse, folks that were subscribed implicitly from other activities like the DevCon, to find themselves on a list with no way to get off of it except for sending me angry emails. That’s just how insecure I am. : )

    So, after a few weeks of Paul and I working on the pages to do the administration for me, I thought that the hard part was over. I was wrong. While I did have an SQL database on my site, it was still nearly empty. There were some folks who were newly subscribed after the new code went live, but all of the folks who’d subscribed before then were stuck in an Access database. That’s OK,” I thought. SQL Server and Access were made by the same folks. I’m sure I won’t have any problems moving the data.” That was two weeks ago. It took tons of advice from my database friends (thanks BobB and ShawnW and BrianR!), along with a final push from my brethren on the Off Topic Mailing List to get the data moved to the right place. The good news is that I got to polish my T-SQL skills a bit and I got to play with DTS and the Enterprise Manager (both very nice pieces of software).

    But that’s not all. Once I had the subscribers in the database, I then had to send several thousand emails, sorted into folks that want HTML and folks that want Text, keeping track of bad email addresses. This time, I went looking for a commercial product to do the job. I figured that since my inbox was full of spam (SpamNet is my new best friend!), that there must be really great tools for sending emails by the boatload. And again, my friends on the Off Topic mailing list were there to help with a recommendation of the Advanced Direct Remailer. ADR is also a nice piece of software that comes out of the box configured almost right, but not quite and the documentation has to be read very carefully. ADR is an SMTP server that takes mail from your mail client and forwards it to a list of folks based on who you sent it to. For example, you can send it to foo@localhost where foo” is a mailbox that resolves to a list of email addresses in a text file or you can send it to bar@localhost where bar” is a mailbox that resolves to a select statement from a database. That all works great, except if you get any of the settings at all wrong, ADR starts acting like a real email server and just tries to send the email to foo@localhost. Well, actually, it can’t be foo@localhost for me, since I’m using Outlook XP, a marvel of software engineering that in it’s infinite wisdom prohibits me from sending an email to a server without a .” in it. So, I send an email to foo@127.0.0.1, which ends up in ADR, but the default settings only resolve requests sent to localhost”, so ADR won’t do the queries. However, it is talking to the built-in SMTP server on my machine (which I need for testing my web site before publishing it), so it looks like it’s doing something, making it even harder to figure out what’s going on, since I’ve never seen what ADR does when it works correctly.

    When I finally do get everything right and the emails are queued in ADR properly, I can tell it’s going to take hours of 100% CPU utilization for the newsletter to get out, so I go on to something else. But I can’t stay away for very long, so I’m constantly logging into the machine doing the sending via Terminal Services to check on the progress. With the CPU fully utilized, all the failed TS connections (I have to keep trying!) eventually crash the ADR machine, causing a panic as I reboot. I needed have worried. ADR has kept everything logged and picks up right where it left off before the crash. Truly an amazing piece of software.

    Why do I feel like Jerry Pournelle all of a sudden?

    Now, as I’m drawing this missive to a close, I’m getting half a dozen emails from subscribers that wish to unsubscribe but can’t because of the peculiarities of the imported data vs. what I tested against. So, the angry emails have started. Here’s a particularly angry one:

    Subject: Get me off your spam list

    You are too much of a hassle to remove, you lie about where you got my address, I do not trust you at all.

    I will prosecute you my every means possible if you do not remove my address from your database.

    If I find out you spread my address, I will go after you for that.

    Oh, well. I tried…

    August 13, 2002 spout

    The Apple and the Tree

    Yesterday my eight-year-old and I had the following conversation:

    John: Dad, do you know a lot about computers?”
    Dad: I know my share.”

    John: But do you really know a lot?”
    Dad: I know pretty much.”

    John: What buttons to you press to make that come up (pointing to the Start button)?”
    Dad: Ctrl+Esc”

    John: And how to you make it do Run?”
    Dad: Ctrl+Esc+R”

    John: Cool.”

    Cool indeed. : )

    August 3, 2002 spout

    Industry Burn-Out

    Do you feel it? I do and I know that a bunch of my friends do. The whole IT industry is in recovery from the crashing lows that can only happen after impossible highs. In recent conversations, I hear terms like burned out,” bitter” and jaded” coming up again and again in our conversations. Since I got into this industry just as it was idling before take off, I have no frame of reference, but I’m guessing that things will level off at a bit better cash flow than right now, but much better morale.

    The question is, how long will it take for the energy and excitement to come back? I know that I’m still healing from a three-year stint on my last big project, and even though I have an itch to try something else, I fantasize about trying my hand at another industry. I always figured that the shake-out would make the bottom feeders leave for something else, but now that we seemed to have settled on good, although not great, salaries and benefits and shaky processes at best, how many of the top folks will just bail from something else? I haven’t actually seen anyone I respect leave for greener pastures, so I’ve got my fingers crossed that things will turn around.

    June 27, 2002 spout

    Where Do You Find the Time?

    I had lunch with a couple of colleagues on the lecture circuit today and after they asked me what I was working on (Genghis, the Web Services DevCon in October, ref-counting for Rotor, a few books, some consulting, etc), they asked where I found the time. Here’s how:

    1. I work with a *ton* of very talented folks. The following are just the ones I’m remembering off the top of my head that I’ve been working with lately: Chris Tavares, Brad Wilson, Shawn Van Ness, Jon Flanders, Don Box, Tim Ewald, all the Web Services DevCon speakers and staff, all the Genghis contributors, Tim Tabor, Michael Weinhardt, Microsoft, Dharma Shukla, Brian Harry, Chris Andersen, Mark Boulter, and, of course, all of my former DevelopMentor brethren.
       
    2. But most importantly, I don’t attend meetings or request vacations or approve vacations or attend meetings or receive reviews or give reviews or attend meetings (did I already say that?) or do any of the other things that employees have to do. Skipping these activities easily doubles or triples my productivity. Of course, I had to give up the steady paycheck to make it happen and it’s not the life for everyone, but it works for me just fine. : )

    Real software engineering has so little to do with actual technology, it’s kinda sad. I’m lucky. I only have to do the technology part. My question is, how do people with full-time jobs find the time to learn the technology?

    June 25, 2002 spout

    XML & Inclusion

    guest editorial by Don Box, Tue, Jun 25, 2002

    Chris, I just read your Object vs. XML post on the spout and I’d be pleased if you would allow me to respond with my own personal spoutlet. Here goes:

    For much of the 1990′s, I spent a lot of time writing COM code in C++. The combination of C++’s static type system + COMs dynamic type system was a very powerful combination that I am proud to have been involved with, even though my contributions to COM were from afar as a non-Microsoftie.

    In March of 1998, I had the pleasure of working on the initial SOAP protocol with Microsoft and Dave. That experience was a turning point for me, as it forced me to acknowledge type systems that were not part of the classic OO family that I had come to know as the one true way.”

    Unlike COM or Java, XML tends to attract developers of every stripe, each of which has a wildly different sense of esthetics with respect to language design, data vs. processing model, structural vs. nominal typing, functional vs. declarative vs. imperative styles, etc.

    Because XMLs raison d’etre is interop, XML needs to be neutral with respect to these choices, otherwise, the barrier to entry becomes too excessive for some communities to participate. The current pushback against XML Schemas is a great example of this effect.

    XML Schema imposes a type system over XML Infosets that is very similar to the OO type systems you are familiar with. This makes XML Schemas well-suited for importing directly into Java or C# programs.

    Unfortunately, the XML Schema type system has features that don’t make sense if your world doesn’t revolve around named user-defined types (e.g., several script languages, SQL, etc.). For that reason, some members of the XML community has been lobbying for something with a looser type model than XML Schemas. Had the XML Schema working group made it clearer how to do this sort of thing with XML Schemas, I believe the time for adoption would be that much shorter.

    Getting back to your original post, I find your characterization of my colleagues and I as so steeped in the new world that they forget where they came from” a bit misleading.

    As an XML guy, I try not to focus too much on where I came from. Rather, I try to bend over backwards to be respectful of where other people came from.

    I don’t want the guy writing ML code in Dayton, Ohio to shove his world view down my throat.

    I’m trying hard to reciprocate by keeping my OO/C++/COM sensibilities in perspective.

    XML is about inclusion.

    It’s the ultimate Rorschach test.

    We all make it into what we need it to be.

    That’s the secret sauce” that makes XML what it is.

    June 22, 2002 spout

    Object vs. XML

    I was watching a group of folks present a new XML standard the other day and I realized something for the first time: to XML folk, OO languages are just script-like glue” for connecting XML processing steps, the Unix pipe” of the new millennium, if you will. Integration with OO languages is necessary to enable XML dominance, but that’s an accident of history. In the view of the XML zealot, OO will eventually fall away and only pure, clean XML will be left in its place.

    As an OO guy, I find this view disturbing. As a general technology wonk who sees the value of XML, I find this view unrealistic. Just so you XML folks know, OO guys look at XML as a data transfer syntax and that’s all. OO guys are happy that XML is there, but they prefer to stay away from it in favor of their nice, familiar OO environment.

    The problem, of course, is that many XML guys are so steeped in the new world that they forget where they came from. To paraphrase the Matrix, XML guys don’t even see the angle brackets anymore — they just see blonde, brunette, redhead. OO guys, of course, *only* see the angle brackets and prefer their artificial world-like simulation.

    The result of this massive gap between XML and OO folks is that the great thing that the XML guys are building, i.e. a general-purpose hierarchical data manipulation, transformation and interoperation infrastructure, something that OO guys desperately need, is being lost because the two groups don’t know how to communicate with each other.

    So, to enable XML to dominate, XML folks have to be sneaky. Just like OO finally took off in C++ when it provided a super-set of the procedural programming in C, XML has to provide a super-set of OO programming, down to the easy syntax and the compile-time type checking. Only when you give the OO guys exactly what they already have can they begin to see what new things you’ve given them.

    June 12, 2002 spout

    Karma

    While I definitely do have faith that there is a higher power in the universe (although I haven’t yet decided if the universe is a good place to be or if it’s just a simulation solving some higher level non-deterministic finite state automata), I’m not a religious man. If fact, I consider myself a completely recovered Catholic (I’ve been clean and sober for more than a decade and I never feel the need to go back for another hit off the body of Christ) [1].

    Likewise, I’m not a superstitious man. I understand that going under a ladder may cause pain if something drops on me, but not for some other mystical reason. Similarly, breaking mirrors could cut you, but only the most serious of cuts could last for 7 years.

    Still and all, I do believe in karma, otherwise stated as what goes around, comes around.” It’s happened many times in my life that a lot of bad luck eventually yields to a lot of good luck. Likewise, when you do bad, bad comes back at you and when you do good, good comes back. Of course, these phenomenon can be explained by statistics and human nature respectively, but I prefer to think of a giant celestial scoreboard that I can affect by doing good for people. Or, and this happened just today, if I do something to cause harm, even if there’s nothing I can do to make it up to the person involved, I often find myself feeling better if I do something good for someone completely different. Oh, wait, maybe I am superstitious… Still, I find it a comforting way to run my life, so I’m going to stick with it. : )

    [1] I’ve known practicing Catholics that are offended by the idea that Catholicism is a disease to be recovered from. Sorry.

    June 11, 2002 spout

    Adding Ref-Counting to Rotor

    Microsoft has granted Sells Brothers, Inc. a research grant to add ref-counting to Rotor and to study the performance effects. The proposal that lead to that grant is available here. There’s been a lot of speculation about just how we’re planning to add ref-counting to Rotor. Here are the highlights:

    • It’s not just me,” it’s we.” I’ve already have very useful input from several folks, including Jason Whittington, Ted Neward, Ian Griffiths, Serge Lidin, Craig Andera and Bill Conroy. Also, Chris Tavares will be spending most of July doing the actual implementation. If anyone else wants to dig in, feel free! I’m happy for the help and anyone that provides insight will get credit.
       
    • The goal of adding ref-counting to Rotor is to measure the performance effects of a deterministic finalization-like model that we gave up when moving from COM/C++/VB6 to .NET. I say DF-like” because we’re not getting DF, because the price of determinism is that sometimes an object is never finalized, e.g. cycles. We can do better.
       
    • We will not be replacing the existing GCs ref-tracking. It does a fabulous job managing memory and managing cycles and we won’t touch that.
       
    • The ref-counting implementation’s sole job will be to call an object’s finalizer ASAP. Note that this is in no way deterministic.” Plain ref-counting is deterministic in that it calls an object’s finalizer just as soon as there were no more outstanding object references. Cycles meant that this would never happen (deterministically). A hybrid ref-counting/ref-tracking system improves never” to eventually” in the case of a cycle and maintains the ref-counting’s guarantee for ASAP in their absence.
       
    • Even objects that don’t have finalizers will need ref-counts, as they maintain references to objects that have finalizers (and so on).
       
    • Value types will not need reference counts, but when they go out of scope, there will need to be a Release on any object references the value objects contain.
       
    • When the GC kicks in and finally breaks a cycle, it would be nice to release all objects held by the cyclic objects so that they could return to normal ref-counting determinism. However, since we’ve already blown determinism by being in a cycle, this seems unlikely to be very helpful. Also, by skipping this we can keep all of our changes in the JITter and out of the GC, which simplifies the initial implementation.
       
    • We’d plan on adding ref-counting at the runtime level in the JITter so that all languages gain the benefits w/o updating the compilers (or mandating anything special in any language). The real work is figuring out which IL instructions require AddRef/Release calls and getting those calls into the instruction stream. Because of this, we’re not likely to be able to handle tail calls (at least, initially). Anyone with advise in this area would be welcomed with open arms.
       
    • We plan on working nicely with existing IDispose-based code. Since our ref-counting is all about calling the finalizer, if the ref-count gets to zero and there is no finalizer to call, no finalizer will be called. That means that Dispose implementations that call GC.SuppressFinalize will not cause any problems with the ref-counter. Of course, the goal is that the IDisposable.Dispose protocol is not necessary at all.
       
    • As a potential optimization, I have found a nice place to store a 7-bit ref-count in the existing space allocated to every object, so there will be no space overhead, only CPU overhead. However, this narrows the number of objects per  process with synch blocks and/or hash values from 134 million to 1 million. It also narrows the number of referencing objects from the traditional 4 billion to 127. Anecdotally, 127 seems like enough, but it will necessitate the need to abandon ref-counting on any object that reaches 127 extent references. Since most data structures where more than 127 references could happen are parent-child, e.g. every child in a tree with a reference to the root, and this indicates a cycle that can’t be handled by the ref-counting anyway, turning these objects over to the ref-tracking portion of the algorithm seems reasonable. However, we won’t know til we look how many object references an object is going to have, so we’ll track maximum reference counts during our tests to see if this optimization makes sense at all.
    May 26, 2002 spout

    The Truth Is Not Enough

    Watching the final episode of the X-Files, I realized why I don’t like that show. Mulder spends all his time searching for the truth, but even when he finds the date of the planned alien invasion, he doesn’t do anything with it! They’ve spent the last nine years discovering the truth and not doing anything to change it (or, if they do try, they fail miserably). Of course, that’s not the only problem with the show (e.g. why would an alien race powerful enough to do generic engineering to produce the miracle child” or to create super soldiers” or to create the virus in the first place, needs to bother with setting up a shadow government), but it’s the one that bothers me the most.

    Just knowing the truth is not enough. You need to act on it.

    I don’t really know what that’s got to do with the price of tea in China, but hey, you get what you pay for. : )

    May 10, 2002 spout

    Now the Fun Begins

    Last night at 4:46pm, Sara Williams announced the availability of Microsoft’s 4+ years of labor: the Microsoft .NET Framework, v1.0. And then, at 5:59pm, the great land rush to download the matching VS.NET bits began. Here are some links you may find interesting as you move to the RTM of  .NET and VS.NET:

    Here are some fun facts for you:

    • The compressed VS.NET Enterprise Architect download is 1.8GB and it took my puny cable model 4+ hours to download.
    • It took my laptop (574MHz, 512MB RAM) 30+ minutes to unzip.
    • The resulting pre-installed folder was 2.45GB.
    • The .NET runtime build number is 3705.
    • The VS.NET build number is 9466.
    • The codename for .NET was Lightning” (hence the ildasm icon).
    • The codename for C# was Cool” (hence the C# is Cool” t-shirt).
    • Mike Woodring’s most excellent asmstats tool reveals the following:

      Done processing c:\windows\microsoft.net\Framework\v1.0.3705.
      Processed 69 assemblies comprising 70 modules.

      Types: 8,866 (of any kind)
      Classes: 5,602 (2,183 public)
      Attributes: 297 (257 public)
      Delegates: 334 (213 public)
      Interfaces: 983 (659 public)
      Enums: 1,085 (710 public)
      Value types: 565 (121 public)

      Members: 414,990 (of any kind, instance and static)
      Methods: 281,630 instance, 12,797 static
      Events: 13,160 instance, 24 static
      Properties: 44,689 instance, 1,233 static
      Fields: 28,478 instance, 32,979 static

    Congrats to the Microsoft .NET team for a job well done!

    May 9, 2002 spout

    For the Love of the Story

    It’s only happened a few times in my entire life, but I want it to happen more. It’s that feeling you get when you’re telling a story, trying to describe a scene or a technology or a something and, suddenly, without warning, it starts to tell you. It happened twice in college in a creative writing assignment: one of those times it actually gripped me from the moment I started writing my life story on a 3x5 card (I remember it started I was an accident.” : ). It happened once while writing ATL Internals: Chapter 7, Collections and Enumerations. And it just happened again while finishing up a writer’s journal entry I started yesterday:

    Whack-thump-thump. Whack-thump-thump. The sound filled the first floor. Whack-thump-thump. Tom knew he wasnt supposed to play ball in the house. Whack-thump-thump. His father, watching from the kitchen, had laid down that law several times when things had gotten out of hand. Whack-thump-thump. The ball continued hitting his hand, the floor and the door in the never-never land between the kitchen and the front entry. Whack-thump-thump. Tom, at 6, seemed to be using the mesmeric sounds to enter another place, somewhere regular, somewhere safe, somewhere comfortable. He had always been able to enter that place, whether he was playing with action figures, with clay or even with ordinary items like pencils or popsicle sticks, using them in the theater taking place in his head. Whack-thump-thump. Whack-thump-thump. His father was a much more literal thinker. He was creative, but creative in an engineering/problem-solving way and he envied his sons ability to enter this world seemingly effortlessly, never getting bored when the ordinary world around him failed to offer what was safe and regular and comfortable. Whack-thump-thump. Whack-thump-thump.

    I started writing this to describe what my son Tom was doing yesterday morning just before school and it turned into a look into how much I loved and admired my 6-year-old son. He’s so much different than me, but just like his mother and looking at him makes me realize just how much I love my wife. That’s what writing is supposed to do. It’s supposed to help you reach into your self and share what you’ve got with others. That’s what this blog is all about and I appreciate you being here to listen.

    March 13, 2002 spout

    This is Not a Blog

    Web Logging (blogging) is the wave of the future. Blogging is re-making the internet. Blogging is journalism where everyone is the journalist. Blogging is all that and a bag of donuts.

    OK. I guess so. I like blogs. I read a bunch of blogs. But most bloggers feel like they have to update their site at least once/day and most do it far more than that. Because of this, their blog entries end up looking like this:

    [burb] Excuse me.

    [google this!] [comment on this! (0 comments so far)]

    It’s not that I don’t love to read a daily blow-by-blow of these peoples’ lives… oh, wait, no, it is that. Maybe a little filtering would be handy?

    And while we’re on to the filtering thing, maybe we could drop the meta-comments about blogging itself? How cool could blogging really be if every other entry is about the power of blogging itself or, even worse, a link to somebody who linked to your cool description of the power of blogging?!?

    Anyway, the spout is not a blog. I only update it when I think I’ve got something interesting to say (even if it’s something that only I’m likely to think is interesting), I don’t use any content management software (unless you count ASP.NET and FrontPage : ) and, except for this entry, I don’t spend any time talking about the wonder of blogging itself.

    February 27, 2002 spout

    HTTP is Dead?

    HTTP is Dead?

    Your friend and mine, Don Box, caused quite a stir yesterday with his keynote at European DevWeek in London. Peter Drayton has also written up a summary (which is much more technically meaty), as well as a commentary. There has been some quite spiriting follow up on this talk all over the Internet: the .NET mailing list, the Off Topic mailing list, the REST mailing list and XML Deviant on XML.COM. Also, while I absolutely agree with Don that the way we use HTTP today leads to trouble, I thought that Ian Griffiths, a fellow DevelopMentor instructor, had a wonderful point of view that he allowed me to share:

    Guest opinion by Ian Griffiths

    Basically Don seemed to be saying that there are two problems with HTTP (and saying HTTP is dead is just an effective way of getting people to listen; I was half tempted to start my Windows Forms speech at the UK MSDN DevCon with The Web Application is Dead”).

    One of these is that HTTP is unidirectional. Surely .NET remoting shows that this isn’t strictly true: individual connections are directional but it’s entirely possible to do callbacks by having connections go in both directions. (Well duh.) The real problem is that the firewall architectures of the internet are designed to make sure the connections only go in one direction; it’s not a problem with the protocol per se, it’s a problem with the infrastructure. In order to fix this problem you need to change the infrastructure regardless of what you do to the protocol. And if you fix the infrastructure you don’t actually need to fix the protocol, since we already know that it’s fine on networks that don’t deliberately break bidirectional communication.

    Arguably one of the main obstacles here is the use of NAT - NAT makes it hard for a client behind a firewall to publish an endpoint. But NAT is fundamentally important because we’d have run out of IP addresses already if it weren’t in such widespread use. So the only way to get rid of NAT is for everyone to upgrade to IPv6. This will presumably happen fairly soon since we will run out of IP addresses in any case in about 3 or 4 years. (Windows XP ships with IPv6 support by the way. Type ipv6 install” at a command prompt if you haven’t already. So Microsoft are quietly making IPv6 ubiquitous on the desktop.)

    So presuming ipv6 takes off, that’s a fundamental technical obstacle to the one-way nature of HTTP removed. But another one remains: just because IPv6 pushes the address exhaustion date out of our lifetimes (we hope), doesn’t mean that firewall admins will let connections work both ways through the firewall. The bidirectional problem can only be solved with the blessing of firewall admins. And once you have that you don’t actually need IPv6, strictly speaking - given a suitable protocol between the client machines and the firewall there’s no reason that NAT can’t be done in both directions. (Indeed my sub-$100 firewall appliance can do this on a statically configured basis. It is possible (if a little inconvenient) for machines behind the firewall to publish endpoints successfully.)

    UPnP apparently has a solution for this. (A better one than static configuration.) It supports P2P network applications that require clients behind the firewall to be able to accept incoming connections. It defines precisely what you need: a protocol that lets a client machine negotiate with the firewall to open up a port for incoming connections. So it turns out that a technical solution to the problem already exists. (Without even having to invoke IPv6. Although we still need that, due to a shortage of address bits in IPv4.)

    So the first problem already has a technical solution. Presume for a moment (and it’s a big presumption) that these solutions can be deployed, and firewall admin policies set up so that they are broadly useable.

    At this point, the second complaint Don makes - the fact that long-running requests don’t sit well with HTTP - becomes much less of an issue. We just need to use separate HTTP requests for the request and the response. We connect to the server, send a request, along with some response endpoint info (a URL). When the server is done it connects to us, sends us a response. And we’re done. I’m guessing it would probably be possible to write a .NET remoting channel that works like this. The only obstacle is the ability for clients to advertise endpoints.

    So if a client can advertise an endpoint somehow (i.e. it can (a) convince the firewall to let a connection request come in, and (b) work out what the endpoint should be - it needs to be aware of any NAT translation going on) then HTTP can actually solve both the problems raised here. And as far as I can tell, *any* solution to the problems raised is going to have to allow the client to receive incoming requests. In which case why invent a new protocol? Once you’ve solved the fundamental problems in the network that stop you from doing this, HTTP is good enough.

    The only issues are: (1) getting everyone to agree on how clients will expose endpoints (UPnP has had nothing but bad press so far, since the only thing most people know about it is that the first security hole discovered in Windows XP was connected to it somehow; so it might have to be something else…), and (2) convincing firewall admins to allow this functionality to be used.

    Of course just because a technical solution exists doesn’t mean it’s a great solution. Given that this is a fair distance from HTTP as originally envisaged, it would doubtless be possible to design a protocol better suited to the job. But would the benefits be worth it? Everyone already has an HTTP stack and an XML parser - will they flock to implement a new purpose-built solution?

    The problems raised in the ZDnet article can essentially be summed up thus: clients can’t expose endpoints. To me, this doesn’t look like a problem with HTTP, it’s a problem with the infrastructure. Changing the protocol is certainly not sufficient to fix the infrastructure problems; it’s not clear to me that it is even necessary.

    So really this is a social problem, not a technical one. ;-)

    If you’re interested in this topic or what other interesting things Don will say next, he’s giving the keynote address at the Web Services DevCon on March 21-22 in Beaverton, OR (10 minutes west of Portland).

    February 27, 2002 spout

    How Did You Get Your Start?

    Standing in the rain, with his head hung low, couldn’t get a ticket, it was a sold out show, heard the roar of the crowd, he could picture the scene, put his ear to the wall and like a distant scream, he heard one guitar, just blew him away, saw stars in his eyes and the very next day, bought a beat-up six string in a second hand store, didn’t know how to play it, but he knew for sure that one guitar felt good in his hands, didn’t take long to understand, just one guitar, slunk way down low, was a one-way ticket, only one way to go, so he started rocking, ain’t never gonna stop, gotta keep on rockin’, someday gonna make it to the top and be a Jukebox Hero….

    Jukebox Hero, Foreigner

    It’s my understanding that once a musician reaches a certain level of notoriety, they are often asked how they got their start, so that the fan can obtain the level of success that the musician has obtained. Over the years, I’ve received quite a few of these kinds of emails, all of which flatter and surprise me, since I don’t feel like I’ve obtained the level of success that I’d like to. Still, I’m happy to offer, if not advice, than a list of what I did to obtain a level of recognition in our little circle.

    It all started in early 1994, when I went to work for DevelopMentor. Don’s strategy, which remains in place to this day, was to give every instructor the opportunity for stardom.” He had just started to obtain his own notoriety in the industry with his flamboyant personality, teaching and answering every other question on the DCOM mailing list. From there, he used his political acumen to make friends with conference organizers and book publishers, working to add the same level of rigor to Windows development as he was accustomed to applying in the pursuit of his PhD.

    Since Don is a fellow that gains happiness in togetherness (or, put another way, misery loves company”), he dragged the rest of us into his world of course authorship, 24x7 mailing lists, speaker anxiety, article deadlines and demanding book editors. To find my place in this world, I did the following, leveraging the success I had in the early work to make the later work happen:

    • Answered every other question on the DCOM and ATL mailing lists and continue to be very active on the .NET mailing list.
    • Wrote and gave numerous courses and conference talks.
    • Wrote a number of books and articles.
    • Put up a web site dedicated, initially, to the various bits and pieces of code I’d built and then expanded it as I had more to say (which turned out to be quite a lot, apparently : ).
    • Took as much consulting as I could to gain real-world experience, which I put into my other work.
    • Asked fans and happy clients to post their comments on Amazon or allow me to post to my own web site.
    • Crazy things just for fun, e.g. pose naked or misinterpret an email on purpose in order to post a humorous response.
    • Made friends with the owners and producers of the technology in which I was interested.
    • Threw a couple of conferences.
    • Started (and stopped) a department to build software developer tools.
    • Launched my own (budding) software development tools.
    • Launched a couple of source available projects with folks from the community.
    • Launched my own mailing list.

    It seems like a lot, but practically everything I’ve done since 1994 has been published with my name on it, making me as much an agent for myself as an actual musician” (I believe the phrase is shameless self-promotion” : ). Based on this experience, here are the guiding principles that I try to follow:

    • Do the right thing. My father always used to say that anything worth doing was worth doing right and that the right thing was easy to spot — its was the hardest.
    • You can’t win if you don’t bet.
    • Be very thorough so that I can be sure of myself, leading to…
    • Take a stand. Have an opinion. Defend my opinion until I have been convinced of my mistake, then admit my mistake and take up the opposite stand with equal vigor.
    • Try a lot of things and don’t be afraid to make mistakes.
    • Be quick to give credit and admit mistakes, both in public and in private.
    • Recognize opportunity and follow up.
    • Get down to the real why” of something, whether it’s computer technology or another kind of technical discipline.
    • Recognize the people, on the other hand, don’t always have a why,” and learn to deal with it (I still work on that!).
    • Always strive for quality over the quick and dirty.
    • Concentrate on the things that I really want to do. I like to say Only do those things that you can’t *not* do,” but in a down economy, I’ve learned to temper that with fiscal reality.
    • Finish what I start.
    • Make sure people are happy with my work and don’t stop til they are.
    • Have balance in my life. I have a wife and children that I love and spend as much time with as possible.
    • Horse trade. I am always willing to offer what I have, e.g. experience, time, contacts, etc, for what I want, e.g. work, money, content, etc.
    • Help other people find their own places. I’m constantly concerned with my friends and their happiness and will do whatever I can to help them get to do whatever it is that they can’t not do.” This is a lesson I learned from Don. He helped me to become all that I could be and, in turn, I do my best to help others.

    Actually, most of this I learned from Don, either directly or indirectly. I guess my only real piece of advise is to try to find someone you admire and to do what they do. Don was my main mentor, but I’ve had many over the years and they’re invaluable, even if all I had was a beat-up six string…

    February 27, 2002 spout

    Please Say “Why”

    As .NET demands new books and articles and the economy has given a lot of smart folk free time, the world is becoming inundated in .NET books, articles, talks and courses, many of which I am tapped to review. Some are wonderful. Some are awful. Most, however are *almost* good, the path to goodness well within the author’s reach but for the answer to one question: why?”

    Most of my feedback is riddled with questions that start with why: Why was it built this way?” Why are there three choices and how do I choose?” Why should I care?” Please, when you write, remember this question and answer it thoroughly and well. The why is *so* much more important than the how. The online documentation for .NET is fabulous for describing the how, once you understand the motivation for this class, that method or the other namespace.

    Prose that provides the how is transient, but prose that provides the why becomes classic because the why itself is surprisingly applicable between technologies. At the very least, if you answer the why, it will save me work if I’m to review your prose.

    January 22, 2002 spout

    A Visit with the Visual C++ Team

    I spent a fun two days up at Microsoft last week at the Visual Studio  .NET C++ Authors Summit, wherein the Microsoft team shows us how cool VS.NET is for C++ and browbeat us to write a book on the topic. Since I’m already planning to write ATL Internals, 2/e with Kirk Fertitta, I couldn’t talk them out of the XBox I so richly deserve. On top of that, they tortured me by taking me to the Microsoft store where they have XBox games for only $10! Those bastards…

    If you’re a C++ programmer, VS.NET/VC7 brings a lot to the table. And according to Nick Hodapp, a PM on the VC team at Microsoft, many, many of you are C++ programmers. Microsoft quoted some 3rd party studies that say that there are about 3M C++ programmers out there (compared to 5M VB programmers and a whole lot less Java programmers). From a 3rd party survey of VC++ customers, Microsoft found that 90% (!) of them will be doing the same or more VC++ work in the future (about 22 hours/week). They also found that about 75% of VC++ users are MFC programmers (which isn’t growing) and 35% of them are ATL programmers (and is growing). Given the number of ATL7 books shipping right now or in progress (ours and a few more), and the increase in the audience, that made Kirk, my Addison-Wesley editor and me very, very happy.

    Here are some other interesting tidbits from that survey for you:

    • 68% of VC++ developers build client-server apps
    • 61% build desktop apps
    • 51% build peer-to-peer apps (This number slays me. What are these guys building?!?)
    • 36% build embedded/CE apps
    • 35% build NT services

    While we were there, various members of the VC++ team attempted to rock our world in terms of the new and improved features VC7. Sometimes they succeeded. For example, Pranish Kumar told us how the ATL Server version of the Nile benchmark web application was 10% faster than the hand-turned ISAPI version in 1/4th the development time, which is why the Microsoft site uses it for some of their through-put challenged” areas. Also, Terry Leeper showed us how make mini-dumps for VC++ projects that you can send to the developer’s who persist in saying but it works on my machine…” He also showed us how you can pause threads during debugging, load symbols on demand, set breakpoints in DLLs that aren’t loaded at start-up (without that annoying dialog box) and just how much the new optimization features can speed up your code (they did an amazing demo with a recompiled Microsoft codedec that nearly doubled the frame rate with no code changes).

    For those of you into ANSI compliance, Microsoft showed off an early internal build of their compiler that raises VCs over all compliance rating to among the highest in the industry. They are able to compile all of the popular 3rd party template libraries, e.g. Loki, Boost, Blitz++, POOMA and a complete STL.

    December 18, 2001 spout

    Too Many Secrets

    Tue, 12/18/01

    During my three years as director of a software project, I learned a lot about people. In fact, I have a little text file entitled My life as a dog” that may find a home on this site one day. However, because of a thread on the Windows Technical Off Topic list, one of the things I learned came roaring back like a bad acid trip.

    The #1 problem with any organization is always communication. You can do postmortems on projects all day long and only #2 and above will be a surprise. The problem is that to build anything of any size, you need a team. As soon as you have to communicate what’s in your head to some number of other people, it’s going to happen imperfectly. The best way that we’ve been able to come up with to deal with this issue is hierarchical structures to practice selective information hiding, i.e. exactly the way we build software.

    However, unlike software, humans have feelings and as soon as they perceive that somebody is hiding something from them, they resent it. Again and again, when I see information withheld to hide bad” news, those being hidden from know something is up and they get upset. And when they’re upset, they send emails and IMs and phone calls around the company looking for every scrap of information they can find, all the while ignoring the work that suddenly seems a waste of time in the face of impending doom. The surprising thing is that when folks are given the truth openly and honestly, no matter how bad it is, they almost always dig in and deal with it. Just knowing that they’re trusted with the secrets of the company seems to boost morale.

    I’m not saying that everyone needs to post their daily activities for everyone to see — that’s too much information. But I am saying that everyone from the CEO on down should be open about the issues they face, including being open to scrutiny and suggestions. I find that after doing that long enough, folks working for me tend to trust me to make the right decisions, leaving them to focus on their own work.

    The key is that, unlike software systems where components have information hidden from them by their clients, humans can only be effective if they know that the information is available when they want it. Information hiding still needs to happen, but it’s humans that need to choose to hide information from themselves. It whole thing falls apart if the managers do the hiding.

    December 1, 2001 spout

    Effective C# Available Today

    Sat, 12/1/01

    Effective C# is available now from Addison-Wesley. Of course, it’s called Effective Java, but *wow* the overlap is amazing. Some of his items I don’t agree with, e.g. return zero-length arrays instead of null (although I see his side) and others have been fixed” due to advances in C#, e.g. override clone judiciously, but so much of it makes sense in C# (and .NET in general) that it’s scary. I feel like asking AW for the text so that I can port it to C# over the weekend. : )

    November 16, 2001 spout

    Thank You, Don Box

    Friday, 11/16/01

    Last night, in the middle of .NET Band on the Runtime set, Don announced his retirement from DevelopMentor and training. He’s sorry to be leaving us, of course, as we are to lose him, but he’s excited about doing new things. Running a company gets more consuming as a company gets more successful and Don certainly brought DevelopMentor a great deal of success. And not only did he run his part of the company, but he also brought a amount of rigor and insight to an amazing range of technology topics, including C++, COM, DCOM, RPC, XML, Java and .NET, heretofore unprecedented in the training industry. He turned the phrase them that can’t; teach” on its ear. But these are things that are well-known of Don.

    What is perhaps not so well known is the care and dedication that he had for his friends and colleagues. He worked hard to turn his personal success into opportunities for the other technical staff members at DevelopMentor. And he succeeded. He paved the way for people like Ted Pattison, Keith Brown, Tim Ewald, Aaron Skonnard, Martin Gudgin and a host of others who’s made a name for themselves in this industry. Of course, I’m also on this list. If you look at the things that I’ve got listed on this site, i.e. books, articles, courses, conference talks, etc, a staggering amount of it was enabled either directly or indirectly by Don Box. He’s an amazing man and it’s been an honor and a privilege to work with him these last six years. They’re been the richest of my career and of my life. And for that, I’d like to thank him.

    Before we get too blubbery, Don has assured the world that he will continue to pursue technology and to communicate it to an eager audience. I, for one, look forward to what he decides to do next. Whatever it is, I’m sure it will be uniquely Don.

    November 11, 2001 spout

    If you knew .NET like I know .NET…

    Sun, 11/11/01

    Many years ago when Java was new, I dove in. My first program I wrote like a C++ programmer and I didn’t get it. Then I rewrote the program as a Java program and it was much nicer, but I still didn’t get it. Then I discovered the lack of deterministic finalization and that’s all she wrote; my C++ thinking turned me away (the fact that Java was ashamed of my favorite platform and, in fact, all platforms didn’t help).

    Now I’ve spent the last year doing .NET programming, mostly focused on Managed C++ and I didn’t get it. I’ve participated in DevelopMentor’s ASP.NET and Guerrilla .NET and loved both of them, but still didn’t get it. I rewrote (with my good friend Jon’s help) my entire web site in ASP.NET and didn’t get it. And I spent most of last week preparing for my teach of the latest version of DevelopMentor’s Essential .NET and I *still* didn’t get it. Until today. Today I finally got it. The major power of Java wasn’t that it was platform independent, as Sun so often touts. The power of Java (and therefore the power of .NET) is that it provides a major productivity boost for the programmer. I realized this today for the first time.

    It started yesterday. Yesterday I ported a tiny little application (a time client) from MFC and C++ to .NET and C#. The first time I ported it, I ported it like it was still C++ and the result was ugly (I was trying to do the standard library trick of representing time as a the number of seconds since some marker time and then translating it into a formatted string at the last moment). In fact, I couldn’t even do the nice formatting of the current time since .NET didn’t support that means of conversion. But then I remembered that, unlike C++, .NET has proper date, time and span classes. Once I rewrote it in .NET style, it was a thing of beauty. With knowledge of only the name of the sockets namespace (System.Net), I was able to learn .NET and build a time client in under an hour. To paraphrase the closing sentence of one of my first articles, it just makes you want to grab the back the of computer monitor and feel the power of .NET.

    Encouraged by my success and armed with the courage of my convictions (and a couple of web sites given me by Jason and Peter), I sat down to write a MSN Instant Messenger application. Those of you unlucky enough to have me as an IM contact saw me log in and log out about a hundred times yesterday (sorry : ). This was because every step of the way, I’d run my client and every step of the way, I’d make more progress. 90% of my code was reading and writing from the sockets and parsing strings. For the former, I used the StreamReader and StreamWriter and for the latter, I used the Regex class. Both did a ton of heavy lifting so I didn’t have to. It was amazing.

    But yesterday, I still didn’t get it. I was so focused on getting my IM client working (about a half day’s work) that I completely missed the magnitude of what I was doing. I was implementing an async notification-based socket protocol after reading an example doc, skimming a spec and digging in. And the code I ended up with wasn’t spaghetti. It wasn’t production ready yet (my error handling, while present, was rudimentary) and I didn’t implement the entire spec, but I had refactored along the way and now I have the beginnings of a nice little namespace for doing IM work. And all of this happened the same day that I first discovered the existence of the System.Net namespace. It’s only after reflection (and a good night’s sleep) that I finally get it. The power of  .NET is the programmer productivity.

    This productivity comes from a combination of ease of use and flexibility that’s going to attract almost everyone. It will attract the VB programmers because of the continued ease of use and the new functionality of the .NET Foundation Classes. It’s also going to attract the C++ and the Java programmers for the same reason, but they won’t admit that’s why they like it. They’ll claim to love .NET because of the power and flexibility. Not only are the .NET languages themselves allowed to be fully-featured, but the framework itself has tons of amazing functionality built right in. So much so that it’s easy to miss some of it. When I needed to calculate an MD5 hash in my IM client, I went to the net, downloaded some C++ code and built myself a COM object (although I could have easily built a MC++ component, too) and then brought it into my app via interop (see what not being ashamed of the platform can do? : ). That was great, but this morning Peter asked me why I hadn’t just used the MD5 functionality built into .NET. There’s so much stuff in there that I missed it. As a community, we’ll be digging into it for a long time to come.

    In the past, I had scoffed at the value of programmer productive over user productivity. My argument was that programmers are soldiers on the field of combat taking bullets and protecting the users at home. This was how I justified the complexity of C++, but measured it against the flexibility of the language and the performance of the produced code, and therefore the pleasure of the user. Don’t get me wrong. We’re still going to be using C++ for high-performance, shrink-wrap software for some time to come. Windows and Office XQ (or whatever they’re going to call them) will still be implemented in C++. Client applications that cannot dictate their deployment environment, i.e. can’t dictate the presence of the .NET runtime, will still be implemented in C++ or VB6. Most of the rest is going to be built in .NET without 12-24 months. Stand-alone corporate applications can dictate the presence of the runtime, as can server-side n-tier applications. Web-based applications can take advantage of the compiled and caching performance gains using ASP-style programming, will still enjoying the flexibility and power of ISAPI-style programming via .NET modules and handlers. Everyone in these spaces that works under Windows is going to be moving to .NET, especially the Windows Java programmers who already know the power of such a platform, but want easy access to their DLLs and their COM servers. The reason that people in these environments can now afford to move is that continued research in virtual machine-style environments and increase in machine power has brought about the first platform where ease of use for the programmer does not mean that the user has to suffer. Applications built with .NET are going to be fast enough and when it comes to ASP, they’re going to be much faster than what we’ve had in the past.

    The combination of ease of use for the home-by-5 style programmer and the flexibility for the computers-are-my-life style programmer was so great in Java that tens of thousands flooded the Java conferences from the first year. Mix in a user experience that doesn’t have to suffer from the programmers’ choice of  .NET and I finally get it.

    October 17, 2001 spout

    Be Your Own Teddy Bear

    Wednesday, 10/17/01

    According to legend, the TA office next to the Stanford computer science lab is guarded by a teddy bear. Before a student is allowed to consume valuable time asking a question of the TA, they must first explain it to the teddy bear. Apparently the bear is able to answer 80% of the questions that students ask, saving time for the TAs to play Unreal Tournament.

    I often feel like I act as the teddy bear for the COM community. I get several email messages a day from folks that consider the mailings lists (resources set up to answer just these kinds of questions) to be too slow, so they ask me directly. If I don’t know the answer off of the top of my head, I often respond with the following phrase:

        Can you send me a tiny, tiny project that reproduces the problem? –Chris”

    This, of course, implies that I will actually build and debug the project. And 20% of the time, I do. The other 80% of the time, by the time folks have reduced the problem enough to demonstrate it for me, they’ve already solved it, saving me the time (thank goodness).

    Knowing that this is the case, I recommend that you become your own teddy bear. A whiteboard is handy for explaining the problem to yourself and Microsoft development tools are now so handy that you can typically whip out a small reproduction project very quickly. These very activities will often solve the problem, but even if they don’t, you’ve got a concise description of the problem and a small repro case to send to your friends or to post to the list.

    September 17, 2001 spout

    Flattery

    September 17th, 2001

    Is it imitation or nudity that’s the sincerest form of flattery? Either way, it looks like Robert Scoble is naked outside where the neighbors could see (unlike mine, which was inside and very private : ).

    September 11, 2001 spout

    Give Comfort

    Give Comfort

    September 11th, 2001

    The World Trade Center and the Pentagon were attacked today when hi-jacked commercial airlines crashed into them, destroying both of the towers and damaging the Pentagon. I can’t possibly know what the people who had friends and families in those buildings are going through right now, but my thoughts and prayers are with them. If there’s anything you can do today or in the coming weeks or months to help those people to recover from their loss, please put aside your computers and your work and do it. I will be doing the same. Thank you.

    If you’re interested, both Amazon.com and PayPay.com have set up disaster relief donation funds. 100% of all donations go directly to the American Red Cross.

    August 23, 2001 spout

    Q&A: .NET Cross Language Inheritance?

    August 23rd, 2001

    Q: D.J. Stachniak writes:

    I missed the Conference.NET, but I’ve been reading through the PowerPoint presentations posted on DevelopMentor’s web site. I noticed in the C++ In A Managed World presentation that there is a slide (page 62 specifically) which says .NET supports real inheritance across languages - Although, that doesn’t mean you should use it…”

    Would anyone like to take a crack and explain to me why cross language inheritance might be bad?

    A: Chris responds:

    At the Microsoft PDC in 1993 (also known as the COM PDC), Kraig B. introduced COM by saying that it didn’t have inheritance, but that was a good thing, because of the fragile base class problem. This problem says that derived objects, by definition, need to have incestuous knowledge of their base classes, including full understanding of the implied contract (which often requires to source to determine). What made this relationship fragile was that reliance on the implied contract caused all kinds of trouble when it changed, implying that it was knowledge of the source that caused this problem.

    Of course, that’s not the case. We often experiment with components that we don’t have the source for and made decisions based on implied contracts that can easily change version to version. I would call this the fragile use” problem, but it’s more commonly called DLL Hell.” The idea that components can be replaced in the field without breaking things has long been known as a fallacy, and it doesn’t matter if you’ve got the source or whether you’re doing inheritance, aggregation or mere creation.

    Eiffel’s Design by Contract is a good step towards detecting problems, but that’s an Eiffel-only thing. A good step towards reducing DLL Hell is the aggressive versioning and side-by-side installation of multiple versions that  .NET supports. If your client or derived class binds to a specific version of a component, then there’s no need to worry about it changing out from under you. Lack of source makes it harder to derive than to merely use, but assuming you can make things work empirically, cross-language inheritance might actually work in .NET (but don’t hold me to that : ).

    August 17, 2001 spout

    Conference.NET: Notes from the Field

    August 17th, 2001

    In talking to fellow DevelopMentor instructor Craig Andera today, I realized that those of you who didn’t get to attend DevelopMentor’s Conference.NET this week, must’ve hoped that DevelopMentor’s inaugural conference would suck so that you didn’t miss anything good. Well, I’m pleased to tell you that it didn’t suck. In fact, it was awesome. In further fact, I can’t say that I’ve ever had more fun at a conference. Of course, I couldn’t be everywhere, but here’s what happened to me:

    Day 1: Chris Doesn’t Suck

    Monday started with a rousing keynote from David Chappel, the industry’s best-dressed speaker (not a high bar in our industry, of course, but even I have to admit that he’s very good looking : ). An overview of his talk is available here, but what I most remember is that he pegged C++ as for dinosaurs only. While I certainly see his point, Microsoft’s Managed Extensions to C++ are going to enable a lot of people to enter the world of .NET without rewriting large code bases, which is going to make it enormously popular. This was further evidenced by the volume of MC++ questions that I fielded all week long (one attendee left the lab unhappy with the answer he’d gotten from a C# bigot and dragged me back there to examine his problem). Like VB before it, I predict MC++ to be the .NET love that dares not speak its name. Of course, David’s comments weren’t exactly designed to fill my day-long MC++ tutorial later that day…

    Further compounding my potential attendance problem was going to be Don Box. Don’s an amazing man. He has the ability to dive completely into a technology, understanding it better than the designers, while still remembering the technical details of every other technology he’s ever ingested and completely belittling any value they might have had when compared to his latest fetish. In his talk, C++ didn’t respect the programmer, VB was the bane of every other programmer, COM was a mess and of course people had trouble getting DCOM to work over the Internet (how could it work when our neck-bearded network administrators had been replaced with kids pulled away from flipping burgers by the siren song of readily available MS networking certification?). Of course, to Don, only .NET and C# are at all useful to the reasonable, thinking developer. My biggest issue with Don is how right he usually is, but when he singled me out as destined to be the world’s last C++ programmer by painting an image of me in a 76 Ford truck sporting a gun rack and a bumper sticker reading, You can have my C++ when you pry it from my cold dead fingers,” I knew that those attendees who hadn’t yet decided weren’t likely to show up in my MC++ tutorial…

    The last 2/3rds of my day was spent teaching my first real material in about three years. Oh, I’d given the odd conference talk now and again, but after years on the sidelines managing the development of Gen, I was nervous. After all that time, could I still manage to entertain and educate a room full of people on a topic that the keynote speakers had spent all morning panning? As it turns out, I can. Oh, I can’t say I was brilliant, but I didn’t suck, and that was enough.

    Day 2: Chris Has a Bad Hair Day

    Day 1 ended with lots of celebration of my not sucking. I got to hang out with dear friends from as far back as 3rd grade and enjoy a bit more alcohol than was strictly necessary. After finally collapsing into bed at around 5:30am, I was hardly in any shape for my 8am business breakfast (note to self: never let the commission-based sales guy schedule the meetings — they’re just too damn eager). Needless to say I grabbed every minute of sleep that I could, but because of my short, deathlike REM, my hair was remarkably unmussed when I showed up without a shower (and even managed to make a point or two without falling asleep in my waffle). After two hours of scintillating business wrangling, I retired to my room to grab some quick Zs before returning to office hours” in the lab. The lab was really great, because it contained a couple of hundred PCs with exercises from each of the conference talks so that attendees could practice what they’d learned, getting help from the rotating speakers pulling lab monkey duty and answering attendee questions about designs scrawled on cocktail napkins. This was also where I learned that my continued lack of a shower had finally made it’s way to my hair. After thirty minutes of frightened stares, I stopped by the gift shop to buy a hat (stupid looking, but better than the Elijah Prince do” I was sporting) on the way to my first Birds of a Feather talk.

    The BOF that I was to do with Brian Randell, a died in the wool VB guy, was entitled WinForms: Love it or leave it,” and it was designed for two things: 1) to leave things very open to audience participation and 2) to make sure that Brian and I could show up without any preparation whatsoever. You see, both of us had fallen in love with WinForms, but we hadn’t gotten to do much with it. We showed some fun demos, though. Mine was dedicated to the splitting and docking that WinForms has built into it (a thing of beauty!). Brian’s was dedicated to the new opacity property setting which makes windows imperceptible (how very useful…). So, after me making fun of Brian about this fetish, he was getting a bit tense. Then, when the WinForms designer decided to crap out because of a license file problem, causing Brian to have to shut down the IDE, delete files manually, restart the IDE, etc, he got even more tense. When Don decided to rub it in with his standard, You know, when I use Emacs, that never happens,” Brian snapped. Before I even had a chance to draw a breath to put Don back in his place, Brian came right back with, And how many products did you ship last year, Don?” A low moan swept the audience and Don turned tail and ran (after waiting a few minutes to let the ruckus die down). It was an awesome site to behold! I gained much respect for Brian that day.

    I also gained much respect for WinForms. In spite of all of the hype about ASP.NET and Web Services, the thin-client backlash was in full swing at this BOF. Our room started out full and just gained people as it went on. Somewhere in the middle it became standing room only and still people came. And they didn’t just sit there, either. They all participated in a very rousing discussion first about MFC/VB vs. WinForms and then onto the more interesting thin vs. rich client. These people were very tired of the limitations of HTML 3.2 and cross-platform DHTML and anxious to get back to a real development environment for UIs. Truly, the Renaissance for rich UIs has begun.

    Day 3: Jason Whittington is Accused of Slut-like Ignorance

    Day 3 was a big day for me. It started with a talk on a subject near and dear to my heart, generative programming. This is a relatively new term for the technology ideas we’d been using for years in building Gen. Again, my room was full, not only of attendees but also of two of the software engineers from the Gen team (Chris Tavares and Shawn Vanness). The audience was certainly spending a lot of time nodding their heads and understanding the benefits of generative programming, but when I showed them how far we had taken it and all of the things for which we were using Gen, that took them right over the top.

    And then, right after getting to pitch my favorite technology, I got to proceed right to my next BOF, where I would get to tilt at my own personal windmill —  non-deterministic finalization. Those of you who know me or my programming style know that I’m absolutely in love with the idea of objects managing their own resources and them being notified immediately when the last client is done with them, either via COM-style reference counting or via a C++ destructor. This kind of deterministic finalization allows for very aggressive reclamation of resources, even in the face of exceptions or forgetful programmers. Non-deterministic finalization, on the other hand, leaves notification that an object is no longer in use to a background thread managed by a garbage collector. Because when the GC will get around to notifying an object is non-deterministic and empirically takes a long time, this means that resources can no longer be claimed by automatic means, instead leaving it to the client to manually notify the object via a Close or Dispose method. In my opinion, this is not a robust technique in the face of exceptions or forgetful programmers.

    This issue has been the bane of my existence for years. When Java was first becoming popular, I was studying to become DevelopMentor’s first Java instructor. And at first, I really liked it. Then I discovered that Java had non-deterministic destruction and my life turned to ATL instead. Fast forward a few years to an early design preview of .NET where I learn that Microsoft was leveraging” many of the ideas of Java in its new runtime, including my favorite: non-deterministic finalization. I try to explain the problems inherent in this decision, but apparently, they’ve been all through this and Bill Gates has already made the decision for them. Of course, I don’t know this, so I kept fighting the good fight with one of the first emails on DevelopMentor’s .NET mailing list. This caused quite a stir, consuming much bandwidth to this day and eventually culminating in a long, explanatory email from Brian Harry, a PM on the .NET team. This email was intelligent and thoughtful and annoyed me no end because it put the final nail into the coffin containing my hope for DF in v1.0 of .NET, which we’re going to be living with for years. In fact, this email annoyed me so much that, on Day 2, I referred to it as Brian Harry’s little’ email.” After all, the room was nearly empty except for a few of my very close friends and one attendee who I hadn’t met. I met him 5 seconds later. It was, of course, Brian Harry. Remember, this was the day I had almost zero sleep, so I wasn’t exactly on top of my game. What an inauspicious way to meet your arch-enemy… [1].

    Now, I told you that story so that I could tell you this one.

    The BOF was to be a debate between me (pro-DF) and Jason Whittington (pro-garbage collection), with Don as the master of ceremonies. Imagine a thoughtful, reasoned exchange of ideas between calm, measured adults. Now throw that image away. Instead, Don introduced the BOF by saying that there was the right way of thinking and the Chris way of thinking and that I had been lured into the packed room (containing, as backup for the side of evil, Brian Harry) for an intervention.” Now, it’s not as if some of us didn’t try to be thoughtful and reasoned. For example, Jason gave us all kinds of background into the history and practice of garbage collection and how it works under .NET. In fact, if you haven’t yet had a chance to read Jason’s GC talk from Conference.NET, you should. It’s great. Unfortunately, the passions in the audience and in the other side of the debate, i.e. me, left little time for Jason’s approach. Instead, Don and I and the audience went back and forth, invoking stories of ASP.NET applications written by the cream of the crop at DevelopMentor that leaked so many resources as to make them unusable, laments of the semantic incorrectness of tying resource management to object lifetime and analogies of deck chairs on boats that did and didn’t sink. It was somewhere between a gospel revival and a schlock talk show (in fact, at one particularly cantankerous moment, the audience was literally chanting Jerry! Jerry!). At one point, I got so worked up during Jason’s attempts to shed some actual light on the topic that I interrupted him exclaim, Jason Whittington, you ignorant slut!” It was one of the highlights of my life…

    But that was not to be the highlight of the show. Oh no. The most amazing thing about the show was later that evening at the close of conference party, where DevelopMentor introduced the .NET Band: The Band on the Runtime, made up of speakers and attendees who were also accomplished musicians. It was an awesome mix of showmanship, musicality and parody lyrics that caused the audience to sing along, wave their candles (in lieu of lighters), jump on stage and scream for an encore. When it was over, I was so moved that, in spite of my long friendship with Don and my pride in never seeing him as the hi-tech rock star that most folks do, I had to rush backstage to shake his hand and to be in his presence. I felt like a giddy school girl hoping to snatch a sweaty handkerchief from across his brow (which I’ll be auctioning off at eBay when I’m good and ready…).

    Day n: The Rest of My Life

    I have to say that I was deeply affected this week at Conference.NET. I’d like to thank everyone who organized it and hosted it and made it happen. And those of you who had the chance to go, but didn’t? Well, on your heads be it. Don’t make that mistake again next year…

    Related Links

    [1] As it turns out, it didn’t take long to make up with Mr. Harry and I soon found him to be reasoned and intelligent. Even worse, I found that I liked him. Damn it!

    August 6, 2001 spout

    What I Love Best About .NET

    Monday, 8/6/01

    DevelopMentor has long attracted smart folks. Really smart folks. These are the caliber of people that forces you to look up every once and a while and question your own worthiness. With this many high-caliber people together, you’d think they’d be able to look objectively at the world and avoid such religious arguments as What’s the best language?”, What’s the best platform?” and What’s the best editor?”

    Nope.

    We get into arguments like this (and even more esoteric) stuff all the time. Oh, open debate is healthy and we eventually come to a reasoned, balanced decision, blah, blah, blah, but these kinds of arguments made me realize that the thing I love most about .NET is that one of the most contentious arguments has just gone away: What’s the best language?” In the old days, this boiled down to VB vs. C++, otherwise known as practical vs. theoretical, simple vs. complicated or even, my personal favorite, journalism major vs. computer scientist. The argument was a real one, though, because VB6 and below put a real straight jacket on you when it came to real object-oriented features (the lack of implementation inheritance springs to mind), whereas C++ was so hard for so many people, it was almost impossible to build correct code with it. Much mud was thrown during these debates and no progress was ever made.

    Until now.

    Now, we have the same What’s the best language” arguments over VB.NET vs. C#, but they always peter out very quickly. While it’s true that VB.NET makes it much easier to build late binding component clients and C# allows unsafe code sections, neither of these features is enough for us to avoid agreeing that, modulo syntax, the two languages overlap by about 90%. Which means, and now I’m coming to the part that really makes me love .NET, I get to work with lots more smart people at DevelopMentor. Before, it was about the star-bellied Sneetches and the plain-bellied Sneetches. Since I felt I was one with a star on his belly (doesn’t everyone feel that way?), I couldn’t work with those without stars upon thars! Well, Sylvester McMonkey McBean, you can teach a Sneetch! [1]

    I just got off the phone with a good friend of mine who I’ve never been able to work with before, because we’ve always had a great divide between us caused by my C++ bias. Now, for the first time, we get to work together! He can do his stuff in VB and I can either work with it directly, or I can easily port it to C#, because all the classes and functions that he’s going use in VB are going to be identical to what I would do in C#. So, while 90% of the language features overlap, there’s 99.999% overlap in the framework and how to use it between the two languages. To answer Rodney King’s immortal question, Yes. Finally, thank .NET, we can all just get along.”

    [1] Those of you with kids will understand…

    August 3, 2001 spout

    Hanging Out My Shingle

    Friday, 8/3/01

    For the last three years, I’ve been in management. Oh, it started innocently enough. When the team was small, I was only managing a little bit. However, as the team grew and we got closer and closer to shipping our first product, I spent less and less time doing anything technical and more and more time managing. Eventually, I was doing nothing but dealing with the rest of the company and potential customers and enabling” everyone else. Luckily, Don Box, co-founder of DevelopMentor and my long-time mentor, noticed that I’d been swept right out of the things that I loved the most. And he made me an offer I couldn’t refuse…

    Now I’m back on the consulting, teaching, writing, development train and loving it. I’ve been all over .NET for about a year, but now I get to concentrate on it full-time. If you’d like any consulting help in the area of .NET (or even COM and ATL), I’m here for you. Pass the word along. Thanks!

    August 3, 2001 spout

    My Favorite Software

    Friday, 8/3/01

    The following software is what I install on nearly every computer I set up. BTW, I pay for all my favorite software and you should, too. While I am guilty of trying” friend’s software, I own legal copies of every piece of software I use.

    • Windows XP. The grand unification of Win9x and Windows 2000 is finally at hand (isn’t that one of the signs of the apocalypse?) and it is awesome. The UI make over is great, but the two killer features for me so far (I’ve only have RC2 running for a few days at this point) are the new Terminal Services client (called Remote Desktop Connection and hidden under Accessories\Communications) is amazing for the keystroke handling alone and the ClearType support for LCD panels. Unfortunately, the latter is going to force me to buy LCD panels for all my computers and will make using the former with anything by Windows XP unbearable. No wonder they have a monopoly…
       
    • Microsoft Office XP. I know that they’re a monopoly. I know that they should be broken up. But damn, they just make killer (sic) software! As a writer and web maintainer, I absolutely love Word and FrontPage. The last real feature they added was red and green squiggles, but now I can’t live without them. As a guy dealing with lots of email and people and tasks, I live in Outlook. The fact that the integration with Word is now fast enough to let me use Word as my editor (to get red and green squiggles) has cut way back on people making fun of me for my shoddy emails. And while I can’t say I’ve ever used 1% of the features in Excel, for whipping up a quick set of numbers and totals, there’s nothing like it. Also, I was a proud owner of Visio 1.0, so that fact that they now bundle it is awesome. Truly, without Office, I may very well have skipped to Linux by now, but I’m addicted.
       
    • Microsoft Visual Studio.NET. There is no better set of development tools on the planet. This is #2 reason why I haven’t gone to Linux.
       
    • WinZip from Nico Mak Computing. I keep trying others, but I always come crawling back after the flash of some upstart comes and goes out of my life.
       
    • Action Outline from Green Parrots Software. This is a free-form hierarchical information keeper. While I practically live in Outlook, it has never had a good way to keep bits and pieces from my head. And what I especially love is that, as a keyboard only boy, I can navigate between the tree view on the left and the text view on the right, including adding topics, moving topics, etc, all without taking my fingers off the keyboard, including starting it from Start->Run (via action”). The only thing that I wish they’d add is encryption and password protectionbecause I’m embarrassed to tell you just what kind of information I keep in there in plain text (Keith Mr. Security” Brown would not approve : ). Indispensable.
       
    • 1st Clock from Green Parrots Software. Actually, Green Parrots is one of my favorite software companies. They make some cool stuff. I can’t live without 1st Clock for two reasons:
      1. It puts the day of the week and the date in the toolbar (because I can never remember and the time it takes to click my way to that info is too long).
      2. It lets me put custom strings into the toolbar. I always put the machine name in the toolbar so that as I switch between multiple PCs sharing a single keyboard, mouse and monitor using my Belkin OmniView, I can tell at a glance what machine I’m currently working with.

      The built-in automatic time synching with internet time service is really cool, too.
       

    • Process Explorer from Sysinternals. This software, formerly known as HandleEx, is invaluable in helping me track down all of my Can’t replace DLL: May be in use” error messages and it’s free!
       
    • RegMon from Sysinternals. This tool will should you where a program is reading from the Registry or where it’s writing.
       
    • tcpTrace from PocketSOAP. Simon Fell is one of the most talented contributors to the Windows development community. tcpTrace is the de facto tool for tracing SOAP packets.
       
    • WinVNC from AT&T. WinVNC is a free tool for controlling one computer from another. It’s not as cool or as fast as the new Terminal Services client from Microsoft, but it lets you control the currently active Windows station instead of starting up a new one, so it’s great for controlling the PC I have connected to my home theater, from the comfort of my couch (ever try to read PC output on a TV across the room? It doesn’t work…).
       
    • DevTrack from TechExcel. DevTrack is a good bug tracking database. Even though it is not one of my favorite pieces of software (sorry to throw you for a loop there : ), it was so much easier to set up than any of the competitors at the time and it did 80% of what we needed it for, that we live with it. The web client enables developers to use it all over the world and we were able to squeeze the data out of it that we needed. We do struggle with it sometimes, but not nearly as much as we would have had to if we’d have built out own from scratch. In fact, that’s why I list it here. Please don’t waste your time writing your own bug database. Buy one. If I had it to do over again, I would definitely spend time looking at FogBUGZ from Fog Creek Software.
       
    • Source Offsite from SourceGear. Source Offsite is an NT service that allows access to your Visual SourceSource database across the internet. Until they fixed a mighty leak problem that required us to manually kill the server a couple of times a day, Source Offsite was a depressing maintenance headache that we had to put up with, because when it worked, it worked so well, and there wasn’t anything else out there. Now that the leak is fixed, it just silently works. What more can you ask from a piece of software?
       
    • CleanVC from Bear Canyon. Mike Woodring and I go way back. Like me, he also has a bend for building tools and a website where he makes them available. The one that I absolutely cannot live without is CleanVC (he’s got other cool tools worth check out, too). From the command line, CleanVC takes the name of a directory and recurses through it and all sub-directories, killing all the intermediate files you get during a build. From the shell, you can right-click on a folder, choose CleanVC and get the same thing. I use it right before I zip something up for distribution and I use it to dig through my own project directory just before my weekly backup. Fabulous.
       
    • RegSvr.reg from me. This is a simple .reg file that I built way, way back that lets you right-click on a COM DLL or EXE and register or unregister it. It’s simple, I know, but I find I can’t use my computer without it.
       
    • Reflector for .NET from Lutz Roeder. This software is the OLEVIEW of .NET and it’s free!
       
    • UrlRun from me. This is a little console app that I use to reconnect URLs split between lines in an email. It’s smart enough to take out spaces and > characters when an URL is split between forward lines in an email. To use, copy the URL (with spaces and weird characters and all) into the clipboard and run UrlRun.exe. It will take the URL out of the clipboard, clean it up and start up IE.
       
    • BTW, Doom, Half-Life, Max Payne and JellyFish are my favorite games, the latter especially since I let Don beat me badly at backgammon the other day and I need the practice!
    August 3, 2001 spout

    My Favorite Books

    Friday, 8/3/01

    When I started writing books, I decided to stop reviewing other peoples’ books. I used to have a list of all of the books in the topic of my current interest and write a little review, either pumping them or panning them (this was long before Amazon.com). Once I decided to write books myself, I figured that there’d be a conflict of interest putting down competing books, so I stopped. However, I’ve had lots of folks ask me for a list of recommended books over the years, so I thought I’d provide one. While I’m still biased, there’s at least less conflict of interest if I just tell you about books that I love (although I’m not so proud that I don’t tag each book URL with my Amazon.com associates ID…).

    I would give each of these books a 5-star rating on Amazon (and, in some cases, I’ve done just that). These are the books that I absolutely love (in no particular order):

    • The PC Is Not a Typewriter by Robin Williams. Of course, this is not by the famous actor, but Robin is as famous in the type design field as the other Robin is in the funny joke field. In fact, I’d say the former is even more impressive, because she doesn’t let herself get talked into writing bad books. You can’t go wrong with any of Robin’s books, but this is the first one of hers that I read and it still holds a special place in my heart. She specializes in teaching text design amateurs how to do text design and she’s great at it.
       
    • Genetic Programming III by J.R. Koza, et al. It’s no secret that I’ve long had a weakness in my heart for programs that generate programs. This one is the ultimate — programs that figure out themselves how to generate the correct program. Very wow. And, as is necessary for all books on this list, it’s very well written. It’s gripping in the same way that the latest John Grisham novel is gripping (to a certain kind of person : ).
       
    • Essential COM by Don Box. This is not only the classic work on COM, but it captures the heart of the movement of Windows programmers into component development. Be careful when you pick it up, though. You could start by looking something up and find yourself hours later still reading it for the pure pleasure. BTW, Don and I have good close friends for years, so I may be biased (except I’m not — this book rocks).
       
    • Don’t Make Me Think by Steve Krug. I’m still in the middle of reading this book, but wow. It lays out web usability in a way that even a web design cretin like me can appreciate. He points out the dos and don’ts in a way that’s clear, concise and entertaining. I’d love to be able to convey so much with so few words. And the production values of this book are great. I wonder if Addison-Wesley will let me write a .NET programming book in the same style…
       
    • User Interface Design for Programmers by Joel Spolsky. Joel maintains one of my favorite web logs and has collected his usability musings into a wonderful little book (clearly influenced by the Krug book). What makes this book so wonderful is that he captures all my feelings about usability, making me feel like an expert. Of course, I love a book that agrees with me. : )
       
    • Effective C++ by Scott Meyers. This is the book that started a movement. Of course, if you’re a C++ programmer, you need to read this book. But more than that, Scott laid out a style that has often been imitated, but never duplicated. (I know, because I tried.)
       
    • Mr Bunny’s Guide to ActiveX by Carlton Egemont III. If you’re a COM programmer, you need this book. Check out the close up of the pixel. It kills me every time.
       
    • C# Essentials by Peter Drayton, et al. This is hands down the best .NET programming book out there. It’s clear, concise and accurate (a novelty in the Windows book market). It only took me a few hours to read, but I learned a ton. BTW, Peter works for DevelopMentor, but I’m not biased because I don’t like him very much. : )
       
    • Fundamentals of Database System by R. A. Elmasri. This is one of the rare college text books that is not only readable, but practical. I read this after years and years of doing database work and was very surprised that they covered what software engineers actually need to know about how databases work.
       
    • Inside SQL Server by Kalen Delaney. Ironically, I haven’t had much database experience under Windows (I was a Unix Informix guy), but when I read the earlier edition by Ron Soukup, I fell in love with this product. I’m sure it was the way that Ron described it, but I couldn’t imagine doing SQL Server work without this book.
       
    • Modern Operating Systems by Andrew S. Tanenbaum. I sure wish I had had this book when I was taking my operating systems course in college, because then Linus Torvald would be reading about the success of my operating system and not the other way. This book is so great and so well-written that its inspiring. I firmly believe that every effective programmer needs to first understand what’s going on underneath their drag-n-drop, click-button IDE and this book sure lays a great foundation.
       
    • Computer Networks by Andrew S. Tanenbaum. Along those same lines, Tanenbaum’s networking book is also excellent. Makes me want to dig right into the plumbing.
       
    • TCP/IP Illustrated by W. Richard Stevens. Of course, the late Richard Stevens was a legend in the Unix community. This book, while slanted towards Unix, is still a great book about the world’s most dominant network protocol. I can’t decide whether I like this book or Computer Networks by Tanebaum better, but you can’t go wrong by owning both.
       
    • Unix Network Programming by W. Richard Stevens. As a Unix programmer not even doing network programming, this was still the bible. I know that you Windows programmers aren’t going to rush out and buy it, but if you wake up with a desire to program in a command line world, you’ll need this book.
       
    • Philip and Alex’s Guide To Web Publishing by Philip Greenspun. I don’t know how much practical information there really is in this book, but after reading it, I really wanted to quit my job and go to work for Ars Digita. Unfortunately, after Phil brought in some professional” management, they kicked him out and, as far as I can tell, are driving that company into the ground. Still, the amount that that guy has contributed to the internet community is staggering and inspiring.
       
    • ASP Internals by Jon Flanders. Now on this one, I’m very biased, because not only is Jon Flanders a fellow DevelopMentor employee, but he’s also been one of my best friends since 3rd grade and I wrote the forward. That said, if you want to know how ASP really works, down to source code for an ISAPI extension that Jon builds to work just like ASP, you need this book. And what’s so amazing is that he’s able to convey so much so concisely. I wish I could write this briefly. I hope an ASP.NET Internals is forthcoming from Jon.
       
    • The C Primer. This book is long out of print, but it’s where I learned the C syntax that has served me so well through so many languages, i.e. C++, Java, JavaScript and C#. I don’t expect anyone to need this book anymore, but it does have a special place in my heart.
    August 3, 2001 spout

    My Favorite Web Sites

    Friday, 8/3/01

    These are the sites that I visit on a regular basis and like (the sites I visit on a regular basis and don’t like are not listed : ):

    June 9, 2001 spout

    Choose Your Defaults Carefully

    Saturday, 6/9/01

    In the last week, I’ve been bitten twice by developers that have chosen defaults poorly and, therefore, have adversely affected my life. The first was on my Nokia phone. I was in a meeting” with some of my key engineers (read: we were goofing off at a movie on a Thursday afternoon), and I had set my phone to Silent mode. Now, I have a Nokia 8260 (blue) that I dearly love. It kicks butt on the silly Ericsson that I used to have. However, I noticed when I came out of the meeting that their had been several calls from my blushing bride. The Nokia is cool not only because it’s small enough to fit into my pocket (where I keep it during our meetings”), but also because it has a vibrate mode. So, I figured that if the phone was in Silent mode, but the phone was still on, if someone called, I’d get the vibrate in my pocket (separate from my change and my keys to honor the spirit of the Nokia Silent profile). Unfortunately, this was not the case. Calls came in, but no vibration was forthcoming. This happened a couple more times in the next few days until I had a free moment to check the settings for Silent mode (ironically this free moment came while waiting for another movie to start today — “Operation: Swordfish,” which I enjoyed, btw). The default for the vibrate setting in the Silent profile was *off*. How could this possibly be right? It’s a phone! It’s on! Sure, I want it silent so it doesn’t bug people around me, but I still want to know when someone calls! Hence the vibrate mode! Needless to say, my blushing bride was less than pleased.

    The second time that incorrect defaults interrupted my life happened to be a bug recently found in Gen. Because Gen installs some COM components, we require it to be installed by an account that’s part of the Administrator group. Unfortunately, the bug is that once Gen is installed, another user can’t use it on that machine unless they are also part of the Administrator group. Of course, since 98% of developers run with Admin privileges on their own machines, this bug was never reported by the secular community. So how did we find it? It was reported by none other than Keith Mr. Security” Brown, who was experimenting with running at a lower level of security for some perverse purposes that I can only imagine… Anyway, when Keith calls you with a security bug, you listen (at least it was the good kind of security bug, i.e. offering less access then we should instead of more. I can only imagine what the phone call would be like if Keith discovers that we’ve opened a hole…). The problem with security? Defaults.

    The author of CRegKey, a class in ATL we were using to read the serial number out of the Registry, built in a default access level setting. We use the Registry key when our tools are started to make sure that user has a valid serial number on their machine — standard stuff. You need to be an Admin to write the key, but you shouldn’t have to be just to read it. However, the default setting in the CRegKey::Open method is set to allow read-write permissions, as show here:

    LONG Open(HKEY hKeyParent, LPCTSTR lpszKeyName, REGSAM samDesired = KEY_ALL_ACCESS);

    The developer who wrote the code (let’s call him Shawn”), being a human with many tasks interested in doing them all efficiently, left off the default value, assuming that the default would be read-only. This was the correct assumption to make if you assume that the CRegKey author was specifying his defaults properly. Unfortunately, he wasn’t, so when we tried to merely read the SN out of the Registry, we were asking for read-write permissions, and the read failed, causing the SN validation to fail, keeping Keith from using Gen and motivating him to call me and complain about it. All due to bad defaults.

    Rules for Defaults

    Defaults are often set to save typing. That’s a bad idea. If the Nokia guy and the CRegKey guy had but followed the these simple rules for determining defaults, my life would have been better:

    1. Apply the principle of least surprise.” I’m sure he didn’t invent this rule, but it’s one I learned from Don Box and it sticks with me as one of the seven good ideas” that exist in our field (a story all its own). The principle of least surprise says that you make interface design decisions based on what people expect. Shawn expected the default access level to be read-only. I expected my phone to vibrate in Silent mode. Pretend that the default isn’t even an option. What would people expect?
    2. Minimize the harm of inadvertently choosing the default. Assuming the defaults are not changed (a very common occurrence), what bad things could happen? If the default had been read-only on CRegKey, unit testing a code path that required read-write would have immediately uncovered that greater access was needed, a fix could have been immediately supplied and no harm done (except some extra typing). However, because the default was read-write, we introduce an invisible bug that Keith has to find. Likewise, if the default had been vibrate in Silent mode, when a call came in, it would still have been silent, but I would have been notified of the call. Again, no harm (assuming no holes in your pockets and that you’re wearing underwear). However, because of the default, I missed calls and angered my wife. That didn’t happen with the Ericsson.
    3. Change defaults sparingly. Once you’ve chosen your defaults and released your thing, people are going to learn those defaults and depend on them. For example, we can’t go back into our ATL source and update the default to CRegKey::Open because we’ve got all kinds of code paths through our code depending on the default. If you change a default, even if the default was set incorrectly to begin with, you’re doing more harm than good. Unless you can change the defaults without inducing harm, don’t.

    Unfortunately, not all developers follow these rules, so when you make use of defaults, please double-check them first.

    May 16, 2001 spout

    Other Blogs

    5/16/2001

    My spout page is just one of literally thousands of web logs (“blogs”) available on the net. These are a few of the ones that I like:

    • SlashDot. This is the first blog I ever saw and it’s still really cool. Lots of Linux stuff, of course, but also lots of fun  general-purpose technology stuff.
    • BetaNews. This has no commentary. It’s just a list of software that’s gone into beta recently. I often find interesting stuff here.
    • Joel on Software. Joel Spolsky is an ex-Microsofty who runs Fog Creek Software and has a lot of really good ideas when it comes to how to build software. He often says what I think, so I think he’s a genius. : )
    • Dot Net Dan’s. Dan Green aka Dot Net Dan,” is a guy who really likes .NET and once mentioned me right between Joel Spolsky and Stephen Hawking, so I think he’s cool. : )
    • The CodeProject. This is my favorite code posting site by far. There’s something new there daily and I almost always start there when I’m looking for a hunk of code.
    • ActiveWin. This one is mostly an excuse to pay homage to Microsoft, but there’s interesting Windows news up often enough that I still visit pretty regularly.
    • Jason Whittington: Managed Space blog. Jason’s another DevelopMentor guy heavy into .NET and particularly garbage collection (at least for the moment — most of us have fairly short attention spans… : ).
    May 15, 2001 spout

    Object-Orientation is Over

    Tuesday, 5/15/01

    Java, and Java 2.0 (aka .NET), have brought with them the end of object-orientation. Of course, by that I mean that object-orientation is no longer a question — it’s just how we program. Even our scripting languages have classes and objects now. That fight is over, as are the advances in that area. Object-oriented programming, with inheritance, polymorphism and encapsulation, is just the way we do things now and Java and .NET represent the end of that line and the beginning of several others:

    Generic Programming

    Generic programming (aka generics”) provides the ability to write a partial type or function and let the compiler or runtime environment fill in the details based on client usage. Of course, C++ templates have provided generics via templates for a long time. Unfortunately, no modern object-oriented languages, i.e. Java and C#, have generics as yet, but they’re coming. My favorite research paper in this area describes how generics can be added to  .NET languages, using C# as an example, written by Microsoft’s own researchers, Andrew Kennedy and Don Syme.

    Generics have been around for a long, long time, so if you aren’t already familiar with them, you’re behind. Only C++ programmers do this now, but very soon, everyone will be.

    Component-based Programming

    Components differ from objects in that they are binary objects, often callable from languages other than that in which they were written. COM, Java and .NET are popular modern component development environments, but even DLLs have provided component-like features since Windows. Components provide a degree of encapsulation that often exceeds that of source-based OO environments, often at the expense of ease of use (although both Java and .NET work real hard to make components look and feel like objects).

    Aspect-Oriented Programming

    Aspect-oriented programming (AOP) provides the ability to define a set of characteristics of an object or a component that are actually implemented by the hosting runtime. The benefit, of course, is that it’s much easier to declare the need for some feature, e.g. method tracing or the need for a component to be part of a transaction, than it is to write the code. To date, we’ve had pretty primitive support of AOP in the popular programming environments, but it’s been there, e.g.

    • COM+ catalog attributes that describe services provided by the COM+ runtime to components or groups of components (called applications”), e.g. transactions, object pooling or role-based security.
    • Keywords in Java, e.g. the transient keyword that signals to the serialization engine whether to serialize an object’s member variable or not.
    •  .NET attributes that extend a component’s metadata, which is available via .NET reflection to clients, some of which are built into the .NET runtime and some of which that are custom to your particular application.
    • And my personal favorite, as pointed out to me by Don Box, is the PE attribute that marks an EXE as a Win32 Console application. This is primitive, but this attribute tells the OS to set up a console window for routing of stdio.

    The .NET attribute mechanism represents a giant step forward in AOP. It’s the first popular environment that provides a convenient, extensible mechanism for not only declaring attributes, but also implementing custom attribute provides, i.e. those bits of code that are activated when an attribute is encountered. Extensible .NET metadata is replacing the COM+ catalog and providing exactly what the Java serialization keywords provide and I expect most language to converge on the AOP style that .NET provides.

    Generative Programming

    Generative programming is the newest of these new programming styles. The term itself was boasted into popular usage by the book of the same name by Krzysztof Czarnecki and Ulrich Eisenecker. Generative programming is about representing your system’s design requirements in some computer-readable form, e.g. SQL schemas, XML, UML, etc, and feeding it to some kind of metaprogram that will generate your program. The main benefit of generative programming is that as the design requirements change, your programs can be regenerated, saving you from manually replicating design changes into the code. Likewise, as the implementation choices need to change, e.g. from Java to C# or from Linux to Windows, the metaprograms can change and your programs can be regenerated, saving you from doing the porting work.

    Macro languages, e.g. the C preprocessor, are generative languages for generating code within files. ASP and PHP are both generative languages for building web pages. Of course, DevelopMentor’s own Gen, was built from the ground up to be a generative programming tool (although we designed and built it long before we’d heard the term). Generative programming has a vast potential, I think (although I’m biased), because it encourages you to specify your design requirements and keep them up to date with the code, but also because of the potential for generating large parts of a system’s code, testing data and even documentation. In fact, in building Gen itself, we find ourselves generating more and more of the next version using the previous version. We don’t use it for unique code, but we use it for the repetitive horizontal or hierarchical code as well as reference docs and test data. Highly recommended.

    [new] Comment from Mickey Williams [mickey.williams@codevtech.com], Mon 7/2/2001 10:54 AM:

    I’d like to remind you that Eiffel has had generics longer than C++, and Eiffel’s generics work on .NET. So there.

    Best regards from the Eiffel bigot,
    Mickey”

    That’s true, Mickey. I knew that Eiffel supported templates, but I didn’t know that Eiffel# (the .NET version of Eiffel) did, so that’s really cool.

    May 15, 2001 spout

    Rules of Engagement

    Tuesday, 5/15/01

    This is a page where I can just spout off about whatever. I keep it separate from my Tools page so that you don’t mix up any of my spoutings with facts.

    Before I  get started, I’d like to lay some ground rules. First and foremost, I’d like to warn you that every human on the planet has an agenda, often more than one. These are some of mine:

    • I want to make people’s lives better. This drives pretty much everything I do. Since my education is in computer science and my sphere of influent is developers, most of what I do is to help that sub-species of human known as developers.” Recently I’ve been experimenting with ways to help normal humans, but what these people want is foreign to me, so it’s slow going.
    • I’m interested in putting food on my table. For the same reason, I’m interested in what’s good for me and my family. This drive is the most potentially dangerous to you if you’re going to put any stock into my spoutings. Be warned.
    • I’m interested in what I’m interested in. Once I like something, I often like it for a long, long time. However, only one thing at a time can really consume me and you’re likely to hear about it here.

    The second ground rule is that while I try to be as accurate as possible, I’m human and I make mistakes. If you find a mistake or you think my opinion is just so wrong that it requires a response or you’d just like to respond in general, feel free to send me email at csells@sellsbrothers.com.

    April 21, 2001 spout

    From COM to .NET

    Saturday, 4/21/01

    Enough people have asked me what I think about the transition from COM to .NET that I thought I’d publish my thoughts instead of responding to each individual email. This is the question that finally lead to me publishing this page in the first place.

    In the early days of C, ASM was much more efficient, but C was much easier to use and as machines got faster, and C compilers got better, ASM was relegated to use by only a few. During the transition, ASM programmers were valuable and continue to be so for very targeted tasks, but they grow increasingly unnecessary. For example, in all the time that I’ve developed software (17 years), I’ve needed ASM exactly *once* (and then I just used Keith Brown : ). To this day, I have to admit that I can neither write nor even read x86 assembly. I’ve always meant to learn and I admit to being embarrassed that I can’t, but I’ve never needed it. Each platform I programmed for, I started after the platform had moved away from ASM being the dominant programming environment.

    As Microsoft ships increasingly stable betas of .NET towards a final release, we’re nearing the end of a long and messy transition from processor-specific low-level programming to programming at a higher level on the Windows platform. To be honest, most Windows programmers are already there and have been for a while. They’re the forward-thinking Visual Basic programmers. They recognized that they had no need to learn Win32 or COM. They could program at a comfortable level and make their C++ programmer friends do the grunge work for them. C++ programmers that haven’t moved to VB yet had two reasons: the programs run too slowly and VB doesn’t let me do what I want. With each successive release of VB, the efficiency argument has gotten weaker and weaker. Now that VB6 uses the same intermediate language and backend compiler that VC6 does, speed’s really no longer an issue. The 2nd reason, VB doesn’t let me do what I want,” is real and continues through VB6. The problem is really the language. There is one feature that no C++ programmer can live without: implementation inheritance. It’s so useful for day-to-day programming chores that we can’t give it up.

    This one fatal flaw in VB6 was made very clear to me the other day when I was doing .NET programming using C#. Before we go any further, let me make one thing perfectly clear: VB.NET *is* C#. The only difference is the syntax. The language features are all the same but one: you can write unsafe” code in C#, but not in VB.NET. Unsafe code in C# is the equivalent of  inline ASM: when you need it, you can’t live without it, but you probably won’t need it. So, when I’m programming C#, I could as easily be programming VB.NET. And the beauty of my experience of programming C# caused me to examine the difference between my previous VB6 experience and my current C# experience. I had a form-based drag-n-drop environment in both. I had IntelliSense in both. I had a programming model that was much simpler than raw Win32 in both. In short, C# and .NET gave me everything that VB6 gave me, but with one addition: implementation inheritance. When I needed to model the data for my application, it was so easy because I had inheritance but would’ve been so much harder without it. That feature made all the difference to me and is the reason that C++ programmers will finally feel free to move into the VB-like environment that .NET provides.

    Will everyone abandon the Win32 API when .NET ships? No. Will everyone eventually move their code over to .NET? No. Will most folks spend most of their time programming .NET within 18-24 months of ship? Absolutely, yes. It’s too compelling a platform with too many real advantages to ignore.

    Does that mean you should stop all development and wait for .NET to ship? Absolutely, no. Build you components in COM today and you’ll be able to move them over to .NET when the time is right (which may be never). The .NET backwards compatibility story is a good one. You’ll be able to continue to make use of most of your COM components and DLLs in .NET, which means that the code you’re working on today will continue to be useful long after you’ve moved your day-to-day programming activities to .NET. To ease the transition, I recommend marking your COM interfaces with [oleautomation] if possible. This limits your method parameters to types and attributes that .NET is particularly good at marshaling.

     .NET via C# and VB.NET is the future of programming for Windows, leaving Win32 and COM as the ASM of .NET.