Monday, 22 September 2003
Holy Crap, 70-300

I woke up today and checked my Outlook Calendar first thing, like I do every morning, just to make sure I wasn't missing any 8 am meetings, and dammit if I didn't completely forget that like 6 months ago I scheduled a MCSD.NET test for Exam 70-300: Analyzing .NET Requirements.  Original MCSDs were given a free coupon for the new 70-300 but only if they took it by September 30th.  I got the coupon, cheapskate that I am, and immediately schedule the exam WAY out in September (today) figuring, "Hey, I've got months to worry about this."

This is the test with all the "new" kinds of questions.  It's got a chunk of multiple choice questions, but as soon as you get comfortable, you're faced with some weird E-R diagram with an interface that's straight out of Windows for Workgroups.  It's the Year-of-Our-Lord-Two-Thousand-and-Three and I'm taking this brand new test on 16-bit Windows.  I swear it was the same computer running the SAME software at the same testing center that certified me on WfW in 1993.

But, long story short, I passed it in about 40 minutes and made it back in time for lunch.  Now I can go back to my personal hypocrisy of bad-mouthing certifications.


Programming | Musings
09/22/2003 13:20:28 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback 

The replacement TechEd bag just arrived...

A very suspiciously-shaped package from a random distribution-warehouse-sounding address just arrived - what's inside?  Well, none other than a Replacement Backpack from TechEd U.S.  You might rememember that at TechEd by the end of the week many folk's bag's inner linings had ripped and at the end of the week there was an announcement that the bags would be replaced.  I still use my bag (I just hang on to a bag until the next conference, then I use that bag...wonder what we're getting at PDC?) and it's ripped all over.  At a recent garage sale I sold about a dozen bags for about $5 each, some going as far back as a SiteBuilders conference in the mid-90's...re-selling conference bags to the general public could become a lucrative side business for me.  I should probably read the bag's EULA, though. ;-)

Anyway, I'm not sure what critical structural reinforcement or steel beams have been added to this new bag; it looks just about the same to me.  Either way, kudos for MSFT for making good on their promise.


Musings
09/22/2003 13:08:52 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback 

Java is the SUV of Programming Languages or Phillip Greenspun is a stud

This speaks to me, not only as a reformed Java person, but also as the owner of a Toyota Prius and a Honda Civic Hybrid...

"Our students this semester in 6.171, Software Engineering for Internet Applications have divided themselves into roughly three groups.  One third has chosen to use Microsoft .NET, building pages in C#/ASP.NET connecting to SQL Server.  One third has chosen to use scripting languages such as PHP connecting to PostgreSQL and sometimes Oracle.  The final third, which seems to be struggling the most, is using Java Server Pages (JSP) with Oracle on Linux.  JSP is fantastically simpler than "J2EE", which is the recommended-by-Sun way of building applications, but still it seems to be too complex for seniors and graduate students in the MIT computer science program, despite the fact that they all had at least one semester of Java experience in 6.170.

<snip/>But the programmers and managers using Java will feel good about themselves because they are using a tool that, in theory, has a lot of power for handling problems of tremendous complexity.  Just like the suburbanite who drives his SUV to the 7-11 on a paved road but feels good because in theory he could climb a 45-degree dirt slope." [Phillip Greenspun's Blog]


Programming | Musings
09/22/2003 10:48:29 (Pacific Daylight Time, UTC-07:00)  Comments [1] | Trackback 

Neal Stephenson in Portland doing a book signing for Quicksilver

For those of us who live in Portland, Neal Stephenson, author of Cryptonomicon, Diamond Age, and more importantly, Snow Crash, is doing a book signing (get that dog-eared copy of Snow Crash signed!)on a press junket around his new book Quicksilver on Wednesday, September 24th.


Musings
09/22/2003 09:53:44 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback 

Internationalization/Globalization and ASP.NET Brainstorming at 1:05am

I presented at ASPLive! and TechEd 2003 on Internationalizing (i18n) ASP.NET.  I know that the story changes with Whidbey and changes dramatically post-Whidbey, but until then...what are the best practices for ASP.NET 1.1?   DasBlog is a good example, as is (IMHO) the code I showed at the conferences.  Each takes certain approaches for performance vs. ease of i18n vs. avoiding $g(code smell).

Some random thoughts, some questions, some rethorical, some I could use comments/thoughts on:

  • Store a single ResourceMananger in the Application Object and either yank and cast as needed or stick it in some base blass.  [Seems reasonable.  Preferable over instantiating on each page?]
  • Create a base class (LocalizedPage, etc) that introduces an "OnLocalize" method and event, and performance most of your i18n there. [Good, but usually only an 80% solution.  Does let you bypass localization for the default language, though, and that's a BIG performance gain.]
  • For DataGrids, piggyback on DataBinding and do your i18n here [Not bad, easy, tends to spread i18n code out]
  • Localize in the .aspx page with <%#resMan.getString("someresourcename")> [Good, avoid cluttering code behind, also allows for quick changes without recompiles, although forces localization in the default language]

This and other questions burn...time to refactor...Now this looks like an interesting tool that makes ASP.NET localization more like WinForms localization.  I'll check out the trial, but I suspect it will break down when faced with complex ASP.NET DataGrids (definitely non-trivial to localize).


Programming | ASP.NET
09/22/2003 01:30:52 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback 

 Sunday, 21 September 2003
Technology and the first insulin pump...

Sorry this isn't a technical post. :-) I will continue to make this blog about the "Zen" of Computers, particularly .NET and Web Services...watch for a new look for the site very soon...

That being said, just when I start to feel lousy about being hooked up to an insulin pump 24 hours a day, I see this picture of the first insulin pump from 1978.  Guess I have little to complain about!


Diabetes
09/21/2003 00:23:11 (Pacific Daylight Time, UTC-07:00)  Comments [1] | Trackback 

 Saturday, 20 September 2003
Note to self: Buy diverse dolls

This is quite a clever idea.  I grew up with action figures and such of all colors, but this is a good reminder to me that when we do have kids (who will be diverse in their own right) to make sure their dolls and toys represent the real world, and the complete spectrum of diversity.  I was very fortunate growing up in a largely non-white neighborhood to get to attend many churches, synagogues, and mosques.

 


Musings
09/20/2003 00:34:39 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback 

 Friday, 19 September 2003
Bring all my Radio UserLand comments over to dasBlog

Well, last night's ephipany was right-on.  I finished DasBlogRadioCommentImport and ran it last night, importing hundreds of reader comments and successfully integrating them into each related dasBlog entry.  Let me know if you want the code via email.  When I get access, I'll post it on the GotDotNet workspace.

All in all, the Radio "conversion" was a big stick of butter. Here's the goodness:

  • Taking Clemen's lead, I modified my Radio template to include JavaScript and META refresh tags.  Some Details here.
  • dasBlog handles these redirects with a regular expression based Url Rewriting Module that is pure genius.  I added a series of expressions that didn't exist in order to handle Radio Categories and Radio Stories.
  • I imported all the Radio content with the included DasBlogRadioImporter.  Good.
  • Then I wrote DasBlogRadioCommentImport.  Better.

All in all, for existing Radio Userland users, dasBlog offers a fantastic migration story.  All my existing Google Radio links work.


Programming | Musings | Web Services
09/19/2003 11:33:08 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback 

 Thursday, 18 September 2003
Importing existing Radio Comments into dasBlog
I was sitting here doing some writing for work and out of nowhere came a flash, and I knew exactly how I could write a small command line util to import over a year of reader comments from Radio Userland into my new dasBlog setup. Coming soon, and Peter Provost shall be my first tester! ;-)

Programming | Musings
09/18/2003 16:38:43 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback 

How to find out what's running inside that out-of-control Services.exe or Svchost.exe

For Windows XP: http://support.microsoft.com/?kbid=314056

To view the list of services that are running in Svchost:

  1. Click Start on the Windows taskbar, and then click Run.
  2. In the Open box, type CMD, and then press ENTER.
  3. Type Tasklist /SVC, and then press ENTER.

 For Windows 2000: http://support.microsoft.com/default.aspx?scid=kb;EN-US;250320

 To view the list of services that are running in Svchost:

  1. From the Windows 2000 installation CD's Support\Tools folder, Extract the Tlist.exe utility from the Support.cab file.
  2. On the Start menu, click Run, and then type cmd.
  3. Change folder to the location from which you extracted the Tlist.exe utility.
  4. Type tlist -s.

Programming | Musings
09/18/2003 12:03:38 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback 

Personality Types - ENFJ - Like this surprises anyone who knows me?
Everyone seems to be all into Myers-Briggs again. I've been the same personality type the last 3 or 4 times (over the last 20 years) I've taken this test. I will admin though, it's truly scary to read about yourself...

09/18/2003 11:39:45 (Pacific Daylight Time, UTC-07:00)  Comments [1] | Trackback 

EnableVisualStyles strikes again...

My friend Jeff Berkowitz got nailed by the EnableVisualStyles bug in WinForms 1.1 that causes a weird SEHException when calling ShowDialog().  Jeff and his team really push WinForms to the limit and he finds some crazy stuff, including a scary Resource Naming problem in VS.NET 2003.

CLRSpy, Jeff Key, and Adam Nathan to the rescue though.  Although Jeff had debugged the problem and figured it out himself, CLRSpy would see the as an error probe and break on it.

Adam suggests three possible workarounds:

  1. Disable the PInvoke Calling Convention Mismatch probe, or
  2. Uncheck "Break on Error Messages" in CLR SPY so you can ignore this message and not provoke the crash, or
  3. Use an XML manifest to enable XP themes, rather than using the EnableVisualStyles API.

Of course, using the manifest is the preferred method methinks.


Web Services
09/18/2003 09:46:50 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback 

 Wednesday, 17 September 2003
Moving from Radio to DasBlog, DNS, Redirects, Permalinks and Radio "Stories"...

I gotta say, I'm really impressed with DasBlog.  Particularly the upgrade/moveover from Radio Userland.  It's really nice.  It's been a crazy week:

  • My email at hanselman.com was down since I left for ASPLive!  I wasn't even aware until I got back.  This includes all my relatives mail (really, who among us ISN'T the IT director for the entire family?)
  • I switched all my domains over to ORCSWeb.com.  Damn they are cool.  Their support is totally TOP NOTCH. 

At Stephen Forte's (and others) urging, I moved from Radio to DasBlog (no doubt there will be some cleanup and misc goo, but still).  It will be nice to be able to post from anywhere - not just my laptop!

  • I moved all my Radio articles into DasBlog with the importer tool...very slick.  Dump the resulting XML into the Content folder and you're in.
  • I added (thanks Clemens!) this META tag to Radio and re-rendered all the pages on my site for the last year.  This will redirect all visitors to the new site.  There is also some associated javascript that will bring their original referrer (Google, etc) along for the ride.
    • <meta http-equiv="REFRESH" content="2; URL=http://www.hanselman.com/blog/fromradio.ashx?external_referrer=&url=<%radio.weblog.getUrl()+path%>">
  • I imported my blogroll from NewsGator.  Had a little trouble with case-sensitivity re: xmlurl and xmlUrl.  Some manual editing did the trick; no need for XSLT (yet).
  • I modified the blogrolling display code to trim long titles and append "..."
  • DasBlog doesn't handle the concept of "Stories" from Radio, which are basically really long posts that get their own non-dated link.  Clemens suggested that I come up with a plan and add it to the GotDotNet workspace for DasBlog, but I don't have the time this instant.  Instead, I did this clever thing:
    • Added this URL rewrite info to the web.config:
      <add matchExpression="(?&lt;basedir&gt;.*?)/fromradio\.ashx\?external_referrer=(?&lt;ext&gt;.*)&amp;url=http\://radio\.weblogs\.com/0106747/stories/(?&lt;year&gt;\d+)/(?&lt;month&gt;\d+)/(?&lt;day&gt;\d+)/(?&lt;page&gt;.*)" mapTo="{basedir}/default_nocache.aspx?external_referrer={ext}&amp;test={page}" />
    • I couldn't find the xml versions of the stories (anyone?)...so I copied the rendered stories tree from Radio into blog/content/radioStories/.  Basically, if someone visits a story on my current Radio site, they'll be redirected to the same rendered (static) story inside DasBlog.

Web Services | Musings
09/17/2003 20:27:38 (Pacific Daylight Time, UTC-07:00)  Comments [2] | Trackback 

The Utilities Continue...

The response to the Ultimate .NET Utils list has been overwhelming...over 10,000 hits over the last week!  Now DotNetBoy weighs in with his own list of utilities.  A lot of great stuff here, including several nice command line utils I haven't seen like:

  • AFind - command line util for listing files based on Last Accessed Time
  • Nupp.exe - a "Stack" for mapping drives (Push/Pop)
  • Sanur.exe - lets you pipe the password into RunAs, making RunAs scriptable


Web Services | Musings
09/17/2003 18:35:33 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback 

 Tuesday, 16 September 2003
Internet Explorer and the Magic of Microsoft KB Article Q293792

Seems like a lot of my posts lately have started with something like "Here's a weird IE bug" or "Here's something odd in .NET" but...

Here's a weird IE thing.  We do a lot of Check Imaging and Statement stuff here, so if someone wants to go online and get an image of a check, they can.  We often use Web Services to talk to a Check Imaging Server.  Most often we retrieve PNG, JPEG, or GIF.  Sometimes, however, the client wants an Adobe Acrobat PDF. 

We'll make the SOAP call, get a PDF then stream it directly to the user (You don't want to save these kinds of things, for security purposes). 

Enter bug/feature Q293792.  Not a lot seems to have been written about this, and not a lot of people seem to care, but apparently when opening a full ActiveX embedding window (to host Acrobat, etc) IE makes either THREE or TWO requests for the content.  This is apparently "by design" as URLMON and MSHTML have trouble communicating.  So, MSHTML sends a request to "sniff" for the MIME type to figure out what app to load. 

Other than being a bandwidth hog, this wouldn't be a big deal - except, when the generation/retrieval of a PDF is an expensive operation involving a WS call to the back end. (Wow, a production Web Service! Madness! Heresy! ;-) )

What's interesting is that IE changes the UserAgent HTTP Header to "contype" during the probe, obstensibly so we can simple return the MIME/type and not the actual data.

So, we need to handle that...something like (in classic ASP "psuedo-code"):

  If Instr(1, UserAgent, "contype") > 0 Then
   'Just send the mime/type
   Response.ContentType = "application/pdf"
   Response.End
  End If

So, that's not too bad.  But, even the "Fixed" versions of IE still send TWO requests.  So, we want to detect the second request and not return the whole thing again. 

Here's the other ODD point.  For reasons unknown to me, IE doesn't include the Accept-Language header when making this second call, so, we have them use what has already been sent by saying "Not-Modifed":

  Dim Language
  Language = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
  If Language = "" then
   Response.Clear
   Response.ContentType = "application/pdf"
   Response.AddHeader "Last-modified", "Mon, 01 Sep 1997 01:03:33 GMT"
   Response.Status = "304 Not Modified"
   Response.End
  End If

Ah, the fun of supporting older versions of IE.  I think we need an updated IE Roadmap. 

The future of browsing, dear readers, is up in the air, IMHO.


Web Services
09/16/2003 10:05:12 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback 

Switching [all] Providers...

Well, my Hanselman.com email (as well as for all my Hanselman relatives) has been down with DNS and dumb problems since Friday, so it's official.  I'm switching.  I'm switching to ORCSWeb.  I'll move all my domains there, including www.hanselman.com, www.diabeticbooks.com, www.glucopilot.com and www.computerzen.com.  Expect some weird DNS and silliness over the next few days, possibly this week.  I'm a huge believer in the permalink, so if I do it right, everything will work as before. 

After the dust has settled, I'll likely move from Radio to DasBlog.


Musings
09/16/2003 03:21:38 (Pacific Daylight Time, UTC-07:00)  Comments [2] | Trackback 

 Friday, 12 September 2003
Linux/J2EE causes colon cancer?

Wow...good thing I'm covered! ;-)

A Forrester research project, funded by Microsoft inc., has determined that developing software using a Linux/J2EE development environment increases a developer's risk of dying from colon cancer by up to 40% over the risk when developing with Microsoft's .Net technology.


Musings
09/12/2003 15:13:19 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback 

 Thursday, 11 September 2003
Rory asks, Why do I code?

Why do I code?  Because I can't cook, or change my own oil, or mow lawns.  Because I lettered in drama in High School but I never got discovered walking an L.A. mall.  Because I never made any money doing standup.  Because, God help me, if I wasn't coding the only think I'd be good at would be selling cars.  (I'm REALLY good at selling cars.  Seriously.)

For real, I code because I like solving problems that are decidedly solvable.  I mean, I hear the problem, I think for a moment, I figure it's "possible" and then I try to figure how to solve it in a way that feels good.  Because I dig physics.  Because the end of the Carl Sagan's "Contact" was UNSPEAKABLY cool.  I code because of that feeling I've gotten 5 or 6 times when I just NAILED a problem and (while alone) raised my arms high in victory the same way that rapid sports fans do.  Except I look at them with a worried disdain when they do it, but secretly I wish I felt like that more often.

I code because coding, at its best, is art and literature and math and physics all at the same time.


Musings | Web Services
09/11/2003 10:33:35 (Pacific Daylight Time, UTC-07:00)  Comments [1] | Trackback 

Acquaintances, Buddies, Colleagues, Friends, Family, and Cousins

I'm sitting on a plane from St. Louis to Orlando on the way to VSLive/ASPLive.  I was thinking about who I'm going to see at the conference.  I figure that my buddy Chris Kinsman will be there and possibly acquaintances of mine such as Keith Pleas.  Why just acquaintance?  I've had the pleasure to email Keith four or five times and I've met him four or five times, but when I see him I still lead with, "Keith! Scott Hanselman, how are you doing?" just in case Keith doesn't remember me, and this way he doesn't have to waste CPU cycles looking my face up.  I do the same thing with other acquaintances and "colleagues" like Chris Sells and Don Box and [Insert name here], et. al..  They are colleagues as I see them a few (sometimes several times) a year on campus or at conferences.  I say hi, but don't expect them to know my wife's name, since when you're holding all the WS-*.* specs in your head, sometimes you can't remember lots of trivial social details. 

So I got to thinking about the difference between "friend" and "colleague/acquaintance."  I have some remote friends, Patrick Hynds for example, who I chat with a few times a week and who could TOTALLY crash at our place on a moments notice.  We've shared (soft) drinks many times and have stories going back years.   But, I've only seen Patrick at conferences and on campus also.  Hell, I started to realize that I see Don Box more than I see my uncles (I see them on the 4th of July and at Christmas) and Don remembers my name better than my cousins! 

Therefore, I conclude that either:

A. I'm not nearly close enough to my family and need to spend more time with them instead of at conferences

or

2. Patrick, Keith, Don, ClemensChris, Chris, Sam and MANY others that I see several times a year are my REAL family and will not be surprised when I show up on their door wondering if I can sleep on their couch.

 Anyone else have this problem, or just me?


Musings
09/11/2003 10:19:43 (Pacific Daylight Time, UTC-07:00)  Comments [0] | Trackback