Monday, March 31, 2003

Resolving W2K3 Issues

As I figured he would, Greg was all over my problem with NewsGator. It turned out that - for whatever reason - the changes in the reg file he sent me last time didn't kick in when I ran it this time. Once I modified the registry settings by hand, everything started working. Whew!

My other problem is quite a bit worse: since the days of Beta 1 of W2K3, I have been unable to get my SoundBlaster Live! Platinum 5.1 working properly on my desktop machine. I don't know why, but the mixer device just won't install properly. Since I have the odd mix of requirements that this be my music-producing machine and my web server, I'd really like to run some sort of server OS and have full functionality from my sound card. At least now the basic ports are working - I just can't get all the fancy front-panel stuff like Line In 2 working.

Maybe I'll be able to call Creative now that W2K3 is a (nearly) released OS. Can't say I have much hope for them supporting a server platform, though. In the meantime, if anyone has had any luck on this front, let me know.

At least I'm not alone: Ingo is having problems too.

Sunday, March 30, 2003

It's Fun to Watch Evolution

It's just amazing how fast things move right now. Over the last two or three weeks:

I (and others, I imagine) asked Don to add the content of his blog entries (rather than just titles) to his RSS feed. First Gudge then Don did so, but Sam pointed out that content:encoded was a poor substitute for xhtml:body. Now Greg has released NewsGator 1.1, with support for xhtml:body so I can read it all in my favorite newsreader. Of course, NewsGator 1.1 doesn't work on my everything-is-beta machine at the moment, but given how quickly he's helped me fix things in the past, I have full confidence that I'll be ready to go shortly.

You have to love XML - even if you think it sucks, you have to admit that having some standard that we can all work with easily makes this sort of turnaround possible. Try this with DCOM - I dare you. ;)

Great List of Tools

Via Ingo:



This is a great list of .NET tools and resources...[Darren]


It sure is.

Saturday, March 29, 2003

Managed Direct3D - Texture Basics

In this, the latest in my Managed Direct3D tutorial series, we talk about textures.

Generally speaking, what we want is the ability to map images onto the surfaces of our triangles so they can look like brick, metal, leather, or whatever.  

Direct3D has support for this capability through something called textures. A texture is simply an image ? say from a BMP file ? that is ?glued? or ?tacked? onto a triangle or series of triangles. If you do it right, you can have very detailed-looking objects that consist of only a few triangles, and therefore render very quickly.

Friday, March 28, 2003

Congratulations Are In Order

First, to Sam Gentile, who worked on Groove, which has just won a JOLT award.


Second, to Ingo Rammer, who has joined the wonderful experience that is being a DevelopMentor instructor. Welcome aboard: I've loved it for the last 3+ years, and I'm sure you will too.


Third, to me, for surviving the redeye from Honolulu. Not quite as significant as the first two, admittedly... ;)

Wednesday, March 26, 2003

Tuesday, March 25, 2003

Greetings From Maui

Hello from Maui. This is the view off my balcony. Don't hate me because it's beautiful. :)

The wedding was a flat-out success: everyone had a great time, and basically nothing went wrong. It was very hectic beforehand, but now we're going to decompress for a few days. Thanks for all the well-wishing!

Tuesday, March 18, 2003

Off to Hawaii

I'm leaving for Hawaii in about 11 hours. I'm getting married there. Will I be blogging for the next few weeks? Probably a little - I'm helplessly nerdy, but hey, she has a degree in Computer Science from MIT, so I think I'm covered. ;)

Monday, March 17, 2003

Faster Shutdown

The incomparable Ian Griffiths wrote on the WinTech Off Topic mailing list today:



When I try to shut down, reboot, suspend, or hibernate my laptop, it sits and thrashes, often for minutes, before giving me the "Turn Off Computer" window. (I'm running Windows XP Pro, and I'm referring to the window that pops up when you do Start Menu -> Turn Off Computer.)...It turns out that the thing that was causing the thrashing pre shutdown was that Windows was scanning my whole recycling bin before showing me the window. I'm not quite sure why - I guess there are certain events that cause it to go and check that the recycle bin isn't occupying more space than it should, and shutdown is one of those.


I've often noticed a considerable delay between picking "Shut down" off the menu and actually seeing the damn menu appear. Really annoying. So today I tried emptying my Recycle Bin, and sure enough, the response became almost instantaneous. Sweet!

NewsGator Plus Outlook 2003: Works Great...Now

I use NewsGator to read blogs. I love it. So when I upgraded to Outlook 2003 (jury is still out, but I think I like it) I was crushed when NewsGator stopped working. Actually, it works fine under Outlook 2003, but not if you don't run as adminstrator. I don't. So I had to choose:

  1. Give up running as admin.
  2. Give up Outlook 2003.
  3. Give up NewsGator.

Honestly, 1 would be a relief, but it would also be giving in to the forces of darkness. Two would sort of suck - I want to check it out, and I'm not even sure I could migrate back, since I was dumb enough not to back up my pst file. As I said, option three was painful.

Luckily, I emailed the amazing Greg Reinacker, author of NewsGator, and within a few hours, he'd sent me this .reg file:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\Outlook\\Addins\\NewsGator.Connect]
"FriendlyName"="NewsGator"
"Description"="RSS News Aggregator for Microsoft Outlook"
"LoadBehavior"=dword:00000003

And everything started working again. Woohoo! Thanks Greg - now that's customer service.

Componentry Implies Versioning

Ted has been publishing a great series of articles lately about J2EE. What's particularly interesting about them is that much of the material has nothing to do with J2EE. (Then again, much of the best writing applies across technologies. Like Tim's book or Szyperski's book.) For example, this posting talks about the rise of component-orientation, which has replaced object-orientation as the New Hope of Reuse. One thing that Ted hasn't addressed yet (but that I hope he will) is how to succeed with a component-oriented philosophy.


I've always noticed that the first time I do anything, I do it wrong. I'm not even talking about software, although it's certainly true there as well. I mean the first time I do anything - buy a car, choose a printer, play golf. I've taken many approaches over the years, from just going ahead and doing it to attempting to do all the research right up front so I can make the perfect choice. The sweet spot - as it almost invariably does - lies somewhere in the middle.


For component reuse to be successful requires a certain amount of forethought. You have to try to figure out how the component is going to be used. You should also expect to be wrong, because you will. Get over it. In fact, plan for it. Then iterate your design - the knowledge you gain integrating it into other systems is a necessary piece of information without which it is impossible to get things right.


One of the more interesting implications for this is that versioning capabilities are important to understand. If you know there's going to be a v2, then you had better understand how to deploy it over v1. There are lots of strategies for doing this, and the CLR introduces a whole new set of capabilities, but as an industry we still don't understand how to solve this problem. I'd love to hear if anyone thinks the seminal work on this topic has been written - I'm not aware of it.

Sunday, March 16, 2003

IIS 6.0 New Features

Sam Gentile talks about the new features of IIS 6.0, something I've been hearing about for a long time.



IIS 6.0 has been totally re-designed with a new request processing architecture that has the benefits of high isolation without incurring the out-of-process cost, as well as much higher levels of reliability and scalability. IIS 6.0 has been redesigned into two main pieces: HTTP.SYS - a kernel-mode HTTP listener and WAS - a user-mode configuration and process manager. Along with this are worker processes that service requests for application pools in HTTP.SYS.

One question that I'm hoping Sam will address sometime soon is, "How can I take advantage of this to have my app listen on an arbitrary endpoint on port 80?" Obviously, HTTP is an important protocol, and since having inetinfo.exe hog port 80 is a thing of the past, I'd like to know what I can do. Do I need to write ISAPI code? Is there a new API? Tell! Tell!

Saturday, March 15, 2003

Wrox Out of Business

Simon Robinson posts on the DOTNET-CLR list:

I know this isn't strictly speaking specifically technical stuff about the CLR, but I think this news is of sufficient relevence to post it here...

It appears that Wrox Press has gone into liquidation. I don't know any of the details, but I would assume the company is a victim of the current general slump in .NET book sales.

I poked around online for about five seconds, and wasn't able to find anything to confirm this, so consider it rumor for now.

Given that Jason and Simon both work for Wrox, I'd say it's confirmed. Jason comments that Wrox sent email to him about it yesterday.

Friday, March 14, 2003

Modelers vs. Techies

Ted Neward posts an interesting blurb about the difference between "techies" and "modelers". What I found surprising was that Ted classified himself as a "techie". I know I must be one myself, then, because to me, his seeming fondness of AOP makes him look more like a modeler. In my mind, AOP doesn't work for the same reason that most OO-based distributed systems don't: failure to realize that some things just don't decompose cleanly.

But I admit to a fairly high level of AOP ignorance.

Look Who's Back

Tim Ewald has finally started blogging again. Cool! Just about every time I talk to Tim, he tells me something I never knew. Half the time, it is (professionally) life-altering.

World's first brain prosthesis revealed


The world's first brain prosthesis - an artificial hippocampus - is about to be tested in California. Unlike devices like cochlear implants, which merely stimulate brain activity, this silicon chip implant will perform the same processes as the damaged part of the brain it is replacing.


Sweet. Give me my numerical coprocessor.


Of course, something like this, it's always better to be the second guy in line.

Thursday, March 13, 2003

Path.Combine

I often see people using string concatenation to create directory names. Like this:


string path = "C:\\data\\" + filename;


But there's a much better API:


string path = System.IO.Path.Combine("C:\\data", filename);


Not only does this take care of the whole, "Do I need a trailing slash?" issue, but if you specify an absolute path for the second parameter, it will just return the second parameter. That means that someone can enter "foo" or "C:\\temp\\foo" for filename, and it'll do what you'd expect.

Wednesday, March 12, 2003

Efficient Role-Based Authentication Sample

I see Fritz has posted the sample code for our forthcoming article on ASP.NET role-based authentication. Of course, it's being published in German. :)

We're also going to try to get the article up on the DevelopMentor website. I'll post here when that happens, of course. In the meantime, from Fritz's resources page:

Efficient Role-Based Authentication Sample

One of the most useful features of ASP.NET forms-based authentication is the ability to use roles when designing a security infrastructure. When used naively, however, it can be very inefficient. This sample presents a technique for improving the efficiency of role membership lookup by leveraging the FormsAuthenticationTicket class and caching role membership information in the encrypted authentication cookie.

Monday, March 10, 2003

Microsoft vs. Open Source

John Lam writes

The key point about this figure is that the rate of innovation in Linux is greater than the rate of increase of the lower limit of user expectations. Therefore it is inevitable that the Linux curve and the lower limit of user expectations curve intersect. This is what Christensen calls a "disruptive technology".

In the case of server applications, Linux has clearly exceeded the lower limit of user expectations, which explains why Linux is commoditizing the market for low-end server applications. In the case of desktop applications, the OpenOffice / Linux combination hasn't quite reached the lower limit of user expectations, which explains the relatively shallow penetration of Linux into those markets.

However, if you accept that the rate of OpenOffice / Linux innovation will outstrip the rate of increase in the lower limit of user expectations, it becomes inevitable that Linux will begin to hit Microsoft close to home: in the desktop and the office productivity markets.

I have to say that this argument appeals to me somewhat. The idea that there's a threshhold that software needs to cross before it can "break out" seems intuitive. Not having read "The Innovator's Dilemma", I don't know whether the theory includes price and quality as factors, not to mention simple inertia - OpenOffice will have to actually be quite a bit better than the lower limit of expectations to make people switch. Also, there's a fairly explicit assumption in the "if you accept that the rate of OpenOffice / Linux innovation will outstrip the rate of increase in the lower limit of user expectations" statement.

But like I said before, I still think there's something to Open Source - it sounds like "The Innovator's Dilemma" takes a stab at quantifying. I'll have to try to read it in my copious free time.

Here I Go Again

I've cut back on my teaching quite a bit since I've been consulting more. It's actually a bit weird now, rather than something I do every other week.


Part of this week I'm in Cleveland. I'll be talking about Managed C++ for two days. As I did some prep tonight to get my brain back into it (it's been a while), I was struck by how MC++ is both the coolest and lamest language in the .NET mainstream family. And for the same reason: it lets you do anything.


Reminds me of an old button I saw once: "C: the power of assembler combined with the speed of assembler."

CNN.com: Blogging Goes Mainstream

CNN.com posted this article. It starts like this:



The online diaries known as Weblogs, or "blogs," seemed like a lot of inconsequential chatter when they surfaced a few years ago.


Heh. My first thought was "and if they're going mainstream, this gets better how?"

Sunday, March 9, 2003

Managed Direct3D - Lighting Basics

I continue my series on the basics of Managed Direct3D in this article, where we cover the basics of the lighting model. Three or four more of these, and you'll know everything I do about Direct3D.

Friday, March 7, 2003

Nifty Little Shortcut

This is another one of those things that I know other people have figured out before me, but I still want to share. I noticed today that shortcuts that get created on the desktop can be accessed directly from the address bar in Internet Explorer. So, for example if I

  • Right-click on the desktop
  • Pick "new shortcut"
  • Type in a URL like http://pluralsight.com/craig
  • Hit "Next"
  • Give it a name like "CraigBlog"
  • Fire up Internet Explorer
  • Hit "Alt-d" to go to the address bar
  • Type in "cra"
  • Observe that it's now auto-completing "CraigBlog.url"
  • Hit return

Et voila! I'm shot straight to my blog page. I'm a real keyboard kind of guy, so this just rocks, especially given that I've setup a hotkey to launch Internet Explorer.

For really fast usage, I've also turned on "Inline autocomplete" in IE options. Otherwise I have to hit down-arrow to get to the entry I want.

Dave Barry Hits Close to Home

I'm getting married in a little over two weeks. It's starting to get a bit crazy around here. Luckily Alice is not the wedding psycho type, but after making 9000 decisions about flowers and food, she could be.

Thursday, March 6, 2003

Mmm...Tasty InfoPath

Clemens Vasters and Don have been talking about InfoPath (formerly XDocs), a new tool for working with XML. It sounds awesome, not least because I'm building something at work that I could have built with this in about a tenth the time. Well, the Office 11 beta goes public in about a month, so it shouldn't be long before I can get my hands on it. Some features, via Clemens's blog:



  • When you design a form based on an XML Schema, and fill out that form later, the document that you'll save will be a pure XML document instance of the exact underlying schema, without any other goo. InfoPath will only associate the instance with itself by injecting a processing instruction.
  • InfoPath understands XML Schema type restrictions, validates them and gives you red frames on fields that are wrong. It spell-checks and gives you red squiggles for misspelled words. It gives you repeating edit regions for arrays of complex types. It gives you date pickers for dates. It gives you combo-boxes for enums.
  • When you "export" a form template (whose native storage format is, inexplicably, binary), you will find an XSLT innocently hanging out in your output directory. That stylesheet is capable of rendering an XML instance of the underlying schema to a proper DHTML page that is visually (and functionally) equivalent to the form you've designed.
  • You can submit a filled out form to a file or to a web service; however, most importantly, you can submit to a Windows Scripting Host script (JScript/VBScript). Which means that you could smuggle (for instance) a COM/Interopped managed pipeline underneath it (think WSE) that will wrap the payload into an envelope and add all the current and essential web services stuff to it. Or you could submit to a disconnected message queue on a client and have a server do the processing for forwarding your data into a service-oriented bus. Or you could drop stuff into BizTalk.

Wednesday, March 5, 2003

Team Development Guide

Sam Gentile posted this link to a document at Microsoft about setting up a team development environment using Visual Studio.NET. As one of the tasks I've been assigned at my current client is to look at tools and practices for development under .NET, I'll be giving this a read-through today. It looks like they talk about a tool called BuildIt for doing builds - I also need to sit down and take the time to look at NAnt and DracoNet.

Tuesday, March 4, 2003

It's Pancake Day

Apparently, it is a pancake day today, as pancakes are the symbol of the sun.

Well, It Felt Good for a While

OK, so when I figured out that I could use Terminal Services to get at a full-up administrative login on my machine, I was missing a couple of things.

1) This isn't an option for people running Windows XP.
2) It requires that I disable Offline Files.

The first is really no big deal - it sucks for everyone else, but I've got WS2003, so I'm all set. The second one is the killer - I do make use of Offline Files, in particular when I travel. "Oh well," I thought, "I'll just use Fast User Switching, like Joeseph Shook suggested." Two problems with that:

1) I can't figure out how to turn it on (yet) in WS2003.
2) Assuming 1 is just because I'm dumb, when I do turn it on, it will preclude me joining a domain.

Right now I'm running my laptop outside a domain. But I'd really like to join up on a domain when I get my other computer flipped over to WS2003. It really sucks that I have to choose two of offline files, joining a domain, and using Terminal Services, since I want all three. But this just hammers home the point that Keith made about how developers can't assume that regular users run as non-administrators. I'm still struggling with it.

Monday, March 3, 2003

Oh, That Feels So Much Better

I've been struggling with running as a non-admin ever since I took the plunge. I, quite frankly, hate it. Lots of little things don't work right, and it's a pain to have to figure out what's wrong just because someone decided to write to the HKLM in the registry or drop data in \program files. Well today I figured out something that will save me a lot of pain. Running a command prompt as admin lets me do some stuff, but I've found that installs in particular tend to take a real login to work properly. Switching back and forth was getting old.

I'm running RC2 of Windows Server 2003. Well, I realized that I've got Terminal Services at my disposal - so I can actually log in twice! Just open up a remote connection to an administrative desktop and park it. I changed the colors on the admin desktop to give me a visual cue as to where I'm at. I still run most things in the regular user desktop, but when I need to elevate myself to admin, all I have to do to get there is ALT-TAB. 

Ahhh......

Sunday, March 2, 2003

Open Source Benefits Whom?

By way of Don's blog:



[James Avery] The open source movement is really only going to provide software for geeks like me to play around with before we go to work to build Microsoft applications."


I have to say this argument resonates with me. So often I think we can observe the effect that everyone assumes everyone else is just like them. So open source developers - highly skilled, computer-adept people - are likely to develop software aimed straight at...highly skilled, computer-adept people. Of course, ask these same people to descibe a typical user (i.e. the marketplace) and "highly skilled" and "computer-adept" are not the top phrases you'll hear.


Does this mean we shouldn't encourage open source? Hell, no! Just because something is ultimately futile in the big picture does not mean we shouldn't do it. Indeed, I struggle with this dilemma in my professional life all the time. For as many people as I teach or mentor, I know that at the end of the day, less than half of them have both the time and the talent to really make use of what I've told them. At times, I've thought this was grounds for just going into a corner and doing everything myself (note the assumption on my part that I'm any good). But eventually I realized that "it's better to light a candle than to curse the darkness."


Therefore one of these days soon, I'm going to go contribute to some worthwhile piece of open source software. If you have suggestions, for what to help out on, please let me know.

Saturday, March 1, 2003

Online Communities

By way of A Surprisingly High Tower, Justin writes:

Both postulates completely overlook what I can only offer as anecdotal evidence. When I was in college, MUSHes and MUDs were all the rage. I lived in a very energetic dorm that had a raging social life that saw us routinely sit around until 7 in the morning, interacting in large groups and generally being social. When we discovered MUDs, though, several of us took to hanging out obsessively in the computer labs at the Teer or North buildings, losing ourselves for entire weeks in the online universes when we had BETTER, PHYSICAL options closer to home. And after we came to our senses, we discovered that this wasn't an exception, but a rule; tech heads were giving up physical socializing for virtual community. It wasn't due to lack of alternatives, it was despite alternatives. I can't explain it, but I know in my gut that tech heads don't go online because they have nowhere else to turn.

I'm not sure I can completely agree. His assertion that the physical places are BETTER is what I take exception with. Comparisons like this one assume that there are some sort units of "goodness" and that that physical places rate a 7 while the online ones rate a 3. I would argue that even if there are some notional units, it's a vector quantity, not a scalar, and the axes for the two types of interaction are orthogonal.

The way I see it, the online experience (or role-playing games such as Vampire, which I still enjoy) have aspects of creation and control which real life lacks. The times when I get most involved in the computer is when I'm crafting something or solving a puzzle, and the reason I like both computers and fantasy/sci-fi fiction is that it proposes a world where magic is real and humans can transcend their inherent limitations. Real-life seldom offers these sorts of psychological payoffs, although that might explain why Mafia is so damn fun - it combines elements of both.