# Monday, April 12, 2004

I just got asked a question at work that reminded me how many people still don't quite "get" XML.  And I still find it surprising.  We've now had a good 6-7 years of XML being fairly present, and 3-4 years of it being pretty ubiquitous.  And yet...

Once upon a time I wrote (and taught) a class on XML for a variety of customers, and when I think about the experience now, I think the hardest thing to get across to people is how to visualize the InfoSet.  It's not flat.  XML looks flat when you see it on a page (not flat in an ISAM way, there is hierarchy, but flat in a 2D kind of way), but the InfoSet isn't.  As soon as you introduce things like namespaces and ID/IDREFS, the InfoSet itself is really this big n-dimensional think that's hard to get your head around.  If you look at the XPath spec, it should provide a big clue.  It talks about navigating InfoSets in terms of axes.  That's exactly what they are.  Namespaces are a separate axis.  They come right out of the screen at your face.  It's not flat

And that's not even counting what happens when schema gets into the picture.  The shape of a "Post Schema Validation InfoSet" may have very little to do with that the XML looks like on the page.  That's why Binary XML shouldn't be scary to anyone.  It's just another way of serializing the InfoSet, not the XML.  Think about the thing that the XML becomes being serialized in a different manner, not the XML itself.  "Binary XML" in and of itself sounds pretty silly, since the whole point is that XML is text.  But "Binary Serialized PSVI" doesn't sound so silly, and may have some distinct advantages. 

OK, in rereading that I realize it may make sense to nobody but me, but given the self-indulgent nature of blogging I don't really care.  :-)  If I can help just one person see the InfoSet and not the flat XML, I'll sleep that much better at night.

Monday, April 12, 2004 3:54:49 PM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 

If you have any interest in builds or code maintenance (like I do) check out vil.  It's a code metrics tool that works directly on .NET assemblies.  The interesting thing (IMHO) about that approach is that when it gives metrics for lines of code, complexity, etc. that's all with regard to IL, and not the C# or VB.NET or whatever that you wrote in the first place. 

That makes sense when you consider all the stuff that get's compiled out, although particularly with things like lines of code it may be misleading.  Particularly in C#, where keywords can expand out to quite a bit of code.  Most of the other metrics still make sense with regard to IL, and of course even lines of code is useful when used for comparison rather than absolutist purposes. 

Monday, April 12, 2004 3:20:40 PM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 

Roy's released the latest version of The Regulator, which continues to build upon what has become my favorite regex tool.  You can now generate .NET code for your regex straight from the tool, and for those of us who have to work with someone else's regular expressions, there's an analyzer that explains the regex in English.  Pretty cool stuff. 

Thanks Roy.

Monday, April 12, 2004 2:53:00 PM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, April 09, 2004

I wasn't sure I'd pull that one out...  it's been a while.  I actually just had a grammar nazi episode with my son last night (who didn't appreciate it, being 8).

Grammar God!
You are a GRAMMAR GOD!

If your mission in life is not already to
preserve the English tongue, it should be.
Congratulations and thank you!

How grammatically sound are you?
brought to you by Quizilla

[Via Steve [Via Stuart]]

Friday, April 09, 2004 11:07:44 AM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, April 07, 2004

I'm really wanting to fold some kind of code coverage tool into my automated build process.  I'm using CruiseControl.NET to do continuous integration builds, which run NUnit tests, FxCop, build docs, etc, all through the wonders of NAnt.  The problem comes when trying to decide which code coverage tool to run.  For more info, see a presentation I did for a user group meeting a while back.

There seem to be two different projects, both called NCover that provide code coverage for .NET projects.  One of them is at GotDotNet, and it uses the profiling API to get coverage data from a running assembly.  Pretty cool, but I haven't been able to get it to work reliably with NUnit tests.  I think that NUnit doesn't allow enough idle time for the NCover output to get flushed to disk before the process goes away.  Drag.  However, I see that a new version was release yesterday, so I'll have to try it out and see how that goes.

The other NCover follows a more traditional source code intrumentation approach.  You build your project with it, which injects coverage hooks into your source, then you run your tests and out come coverage reports.  Cool.  And somehow it just feels more reliable to me than depending on the (slightly witchy) profiler interface.  On the other hand, it requires a lot more setup and is much more intrusive.  But it seems to work. 

Does anyone have any experience with one or the other?  Or any opinions?

Builds | Work
Wednesday, April 07, 2004 9:17:44 AM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [5]  | 
# Monday, April 05, 2004

It's amazing the difference a few good samples can make.  The last time I looked at integrating with VisualStudio.NET's new File / Project dialogs all the samples where fairly gnarly looking ATL COM objects that, even if they weren't very complicated, looked WAY too intimidating. 

Thanks to a couple of good samples, I now see how simple it is to write your own new file or project wizards.  Yes, there's still some COM involved, but thanks to the wonder of .NET, you don't really have to be too concerned with the details.  Check out the AddinWizardCS sample for a great example of how to put up a wizard dialog, get some user input, then customize your template files based on that input, all inside of VS.NET. 

The biggest trick is figuring out what goes in the .vsz and .vsdir files.  There are the little snippets of text files that you put deep in the bowels of your VS.NET installation directories to tell VS what to add to the dialog, and the ProgId of the thing to run if a user wants to create one of your projects or files.  Just text files, but figuring out the fields of the .vsdir files does take a moment of reflection (not the coding- but the thinking kind).  The help makes it look more complicated than it has to be.  Check out the samples first and see if they make sense to you before hitting the docs. 

I found this much easier to deal with that the "easy" wizard which involves a bunch more config, and some jscript for good measure.  Just implement IDTWizard yourself, and it's remarkably straightforward.

Monday, April 05, 2004 4:30:37 PM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 

It just gets better every day.  I've pretty much removed dependence on IE in favor of Firefox.  One of the last few things that was bugging me got taken care of last week, and I can now right-click to subscribe to feeds in Firefox.  (Big thanks to Stuart Hamilton!)  And also fairly recently, FreeTextBox introduced support for Firefox.  Happy day!  Although I much admit I've been too lazy (ahem, I mean busy) to get my DasBlog installation working with the new version. 

The only things I ever use IE for are Oddpost (which I can appreciate would be a lot of work to port) and SharePoint.  I'm hoping Firefox will support NTLM soon, so I can start using it for SharePoint too.  SharePoint sites look fine in Firefox, but retyping my credentials on every page gets old.  I had seen some announcements that Firefox .8 would support NTLM, but it looks like that didn't happen.  If I'm missing something, please let me know. 

On a separte note, I'll try to be better about posting anything interesting.  Life's been intruding pretty seriously the last month or so (as life does).

Monday, April 05, 2004 9:52:04 AM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, April 01, 2004
Dan Fernandez points out some new additions to Whidbey to help combat public indecency.
Thursday, April 01, 2004 9:49:49 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, March 18, 2004

Thanks to all of you who showed up yesterday in Portland to make it a great show.  I had a lot of fun presenting, and got lots of very interesting questions.  And I was gratified to hear that there were more people in Smart Client track (that's me) than on the web side.  I got some very good questions from someone who was possibly the yougest attendee I've run across.  He looked like he was maybe 14-15.  Good to get them started young. :-) 

I thought the demos and the content for the Smart Client sessions were quite good (and all the demos worked).  Kudos to Vertigo.  Someone asked me why business weren't using the IssueVision sample application to do real IT call tracking.  I suggested he check the license before recommending that anyone take that approach. ;-)  It was nice to hear though.  Not something people often say about sample applications.

All in all, a good time was had by all. 

Thursday, March 18, 2004 9:01:12 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, March 17, 2004

I found this site via Omar Shahine, and I just couldn't help myself.  There are so many more places to visit.


create your own personalized map of the USA or write about it on the open travel guide

By comparison this one looks less impressive :-)


create your own visited country map or write about it on the open travel guide
Wednesday, March 17, 2004 1:46:02 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  |