# 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]  | 
# Monday, March 15, 2004

I found myself in the position this week of having to rewrite a bunch of XML parsing code that was all written using the DOM (that I didn't write).  It's not that I really have anything against the DOM model, but it seemed like overkill, since this particular code actually was organized into subroutines, each of which would take a string and load it into another XmlDocument instance.  And in each case, all that happened with the DOM was a single XPath query using selectSingleNode.  Pretty much a performance disaster. 

What I found interesting is that when I changed it all to use XPathDocument/XPathNavigators instead, the performance didn't seem much better.  Granted, I didn't do a very scientific investigation.  I'm running NUnit tests inside VS.NET using the NUnit-Addin, and the before and after NUnit tests completed in around the same time.

I'm not suggesting I'm sorry I changed the code, since it's both aesthetically more pleasing (at least to me) and has the potential for better performance over larger documents (and I'm assuming a lot less memory overhead).  I was just surprised that it wasn't faster.  I guess I really should profile both cases and see what's really going on performance wise.  Maybe I'll get around to it eventually ;-)

In a few places where the XPath wasn't really important I changed it to an XmlTextReader instead, and was gratified that the NUnit tests completed in about a quarter of the time that the DOM was taking.  Every little bit counts.

XML
Monday, March 15, 2004 9:57:09 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
# Saturday, March 13, 2004

I just survived my very first Taekwondo tournament!  Yea me!

Better than that, I actually won one of my sparring matches, which I hadn't really expected to do, and the guy I lost to was WAY better than me and totally deserved it. 

I call that a good day.  Now on the the USTU state trials in May. :-)

Saturday, March 13, 2004 7:52:47 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, March 10, 2004
I'm a big fan of alternative building methods (check out the Monolithic Dome Institute for one of my favorites) so this idea strikes me as pretty cool [via Gizmodo].  It's basically taking the 3-D printer concept to a larger scale, so instead of printing machine parts out of resin (which is also pretty dang cool) you "print" your house from blueprints using concrete or adobe.  What a great idea. 
Wednesday, March 10, 2004 11:29:45 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
Wow

And I thought I was a dork...

This guy proposed to his girlfriend by building a "bridal-themed" case mod.  With a little bride and groom and everything.  I feel pretty socially ept by comparison.

Wednesday, March 10, 2004 9:08:32 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, March 04, 2004

I love Eric Lippert's series on "Cargo Cult Programming".  I've often seen it as a problem, but never had such a catchy label before. 

I've long been a proponent of the idea that you can't be a successful architect without understanding how the underlying system (all the parts of it) work.  For example, I may be architecting a system that relies on storing data in SQL server.  I mostly likely won't be the one to do the actual SQL Server implementation, since I'm not the best qualified.  There are plenty of people who understand TSQL, indexing, and suchlike DBA stuff way better than I do, but I need to understand how SQL server works at a deep enough level that I can make informed decisions about architecture. 

I would encourage anyone working as a ".NET Architect" to read books like .NET IL Assembler, or CIL Programming.  You may never write a single line of CIL, but you can't really understand how to make good decisions about .NET architecture unless you understand what's really happening under the covers.  In case you are interested, I would recommend CIL programming over the other.  It's much easier to read, and more practically oriented, although there are some interesting details about things like .EXE headers and such in .NET IL Assembler.

To be a good architect, you don't have to know every last detail about how everything works.  In fact, IMHO, you shouldn't and can't know all the details of how things work.  That's for other people (domain experts) to know.  I would argue that an architect should avoid getting caught up in domain details, since it tends to lead you to think that everything is an exception.  Many programmers I've known in the past who really know the intimate details down to the last speck for some particular domain (an industry standard, or a piece of hardware, etc) tend to think of all the ways in which their area of expertise contains exceptions.  "Two credit reporting agencies send addresses this way, but the third sends them differently".  "The monitor always returns a valid value for this reading, except when it's too cold in which case it's -1". 

Architects who gets too involved in those kinds of details may miss the opportunity to uplevel their thinking and change their underlying model of the system.  If everything looks like an exception to a rule, then more than likely the rules are wrong.  But if you know all the details, it's easy to see the exceptions instead of trying to find new rules that work.

It's hard to find the middle way.  If you don't know enough about how things work, you'll make poor choices.  If you know too much, you may miss the big picture.  And, of course, the reality is that these days the systems we architect are often so complex that you just can't afford the space in your brain to hold all the details about the whole thing. 

It's also tempting to want to understand all the details because of how "neat" it would be to write that part of the system.  That's a trap I find myself falling into on big projects.  The reality is, though, that I just won't have time to write the whole thing (no matter how neat it is), and I have to let go and trust that someone else will understand the details. 

Hmmmm.  That ended up somewhere different than where I started, but I hope that makes sense.  Find the middle way.  Understand enough about how the system works to make good decisions. 

Thursday, March 04, 2004 9:27:48 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  |